gnark icon indicating copy to clipboard operation
gnark copied to clipboard

Odd behavior with hint

Open kevjue opened this issue 1 year ago • 3 comments

I am using a hint to help perform arithmetic operations within Goldilocks. When the proof is being generated, the number of times the hint function is called is much higher than the number of times the calling function is called (there should be a one-to-one mapping).

Also, I see at least one invocation of the hint function with parameters that was NOT explicitly passed to it via the calling function.

I encounter this issue only when using the Assert.ProverSucceeded function and not when using the test.isSolved one.

Here is a link to the circuit frontend function that is using the hint: https://github.com/succinctlabs/gnark-plonky2-verifier/blob/30c64a3084bdc641079d7fcc024632d1df4cc751/field/goldilocks.go#L145

Here is a link to the hint function: https://github.com/succinctlabs/gnark-plonky2-verifier/blob/30c64a3084bdc641079d7fcc024632d1df4cc751/field/goldilocks.go#L168

We are currently using Gnark 0.8 (https://github.com/succinctlabs/gnark-plonky2-verifier/blob/30c64a3084bdc641079d7fcc024632d1df4cc751/go.mod#L6) with this PR cherry picked.

kevjue avatar Jun 16 '23 17:06 kevjue