Closed readygo67 closed 9 months ago
Hi, sorry for the delay - if you want to recurse further then you have to provide custom hash functions for outer1 circuit generation (and verification). Example below:
// construct the PLONK proof of verifying PLONK proof in-circuit
fmt.Printf("prove outer1 start...\n")
proveOuter1Start := time.Now()
outer1Proof, err := native_plonk.Prove(outer1CCS, outer1PK, outer1SecretWitness, plonk.GetNativeProverOptions(ecc.BLS12_377.ScalarField(), ecc.BW6_761.ScalarField()))
assert.NoError(err)
proveOuter1Duration := time.Since(proveOuter1Start)
fmt.Printf("prove outer1 duration:%v\n", proveOuter1Duration)
// verify the PLONK proof
fmt.Printf("verify outer1 start...\n")
verifyOuter1Start := time.Now()
err = native_plonk.Verify(outer1Proof, outer1VK, outer1PublicWitness, plonk.GetNativeVerifierOptions(ecc.BLS12_377.ScalarField(), ecc.BW6_761.ScalarField()))
assert.NoError(err)
verifyOuter1Duration := time.Since(verifyOuter1Start)
fmt.Printf("verify outer1 duration:%v\n", verifyOuter1Duration)
Works for me locally, I'm closing the issue. cc if doesn't solve for you.
@ivokub very thanks for clear instructions, It works as expected
Description
In my case, 3 layer circuit are used, outer2[outer1[inner]], outer1 circuit1 works normally, outer2 circuit proves fail.
Expected Behavior
outer2 circuit prove success
Actual Behavior
outer2 circuit proves fail.
Steps to Reproduce
Context
Your Environment
gnark version: master + https://github.com/Consensys/gnark/commit/5f1643d98071aabc5abbe89573e4c153cd1c6b0e gnark-crypto version used: v0.12.2-0.20231221171913-5d5eded6bb15 go version (e.g. 1.20.6): 1.24.1 Operating System and version: darwin/arm64