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

Compiling an assigned witness gives a confusing error message #1406

Open
ThomasPiellard opened this issue Jan 30, 2025 · 0 comments
Open

Compiling an assigned witness gives a confusing error message #1406

ThomasPiellard opened this issue Jan 30, 2025 · 0 comments

Comments

@ThomasPiellard
Copy link
Collaborator

ThomasPiellard commented Jan 30, 2025

This code gives an error which is a bit confusing:

        // create witness for a given circuit
        good := &frontend.AddCircuit{
        		A: 1,
        		Z: 1,
        		B: 10,
        	}
       
        // the fields A, Z, B of the circuit are modified after Compile is called
	ccs, _ := frontend.Compile(ecc.BN254.ScalarField(), scs.NewBuilder, good)

       /* ... */

      witness, err := frontend.NewWitness(good, ecc.BN254.ScalarField())
      // ---> At this stage, the fields of the witness cannot be parsed, as Compile modified the fields of the structure representing the circuit
	

Describe the solution you'd like

modify Compile (the error occurs in chema.Walk(circuit, tVariable, variableAdder(/* */)) ) so that the fields of the circuit are left as they were

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant