Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial loops over components cause panic in witness extension #235

Open
fabian1409 opened this issue Oct 24, 2024 · 0 comments
Open

Partial loops over components cause panic in witness extension #235

fabian1409 opened this issue Oct 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@fabian1409
Copy link
Contributor

Looping over components and skipping e.g., the 0th element, causes a panic during the witness extension.
Probably a bug in our compiler (there were similar issues in the past).

A minimal example that runs with snarkjs and fails with co-circom:

pragma circom 2.0.0;
include "comparators.circom";

template Main(inputs) {
    component isZero[inputs+1];
    for (var i = 1; i < inputs+1; i++) {
		    isZero[i] = IsZero();
		    isZero[i].in <== 1;
    }
}

component main = Main(2);

Panic:

thread panicked at ./collaborative-circom-main/co-circom/circom-mpc-vm/src/mpc_vm.rs:463:32:
range end index 9 out of range for slice of length 7

This is probably the reason why the witness extension for HinkalswapperM1x2x1 is wrong.

@0xThemis 0xThemis added bug Something isn't working and removed needs triage labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants