succinctlabs / gnark-plonky2-verifier

MIT License
85 stars 25 forks source link

`ExportSolidity` of Groth16 verifier fails #51

Open qope opened 6 months ago

qope commented 6 months ago

When executing the command below, the system encounters a panic due to a segmentation violation. It appears that ExportSolidity is failing.

go run benchmark.go -plonky2-circuit step -proof-system groth16 -save

The error message is as follows:

Running benchmark for step circuit with proof system groth16
Profiling: true, DummySetup: true, SaveArtifacts: true
02:50:38 INF gnark profiling enabled path=gnark.pprof
02:50:38 INF compiling circuit
02:50:38 INF parsed circuit inputs nbPublic=36 nbSecret=0
02:51:44 INF building constraint builder nbConstraints=5578802
02:51:46 INF gnark profiling disabled path=gnark.pprof
r1cs.GetNbCoefficients():  151658
r1cs.GetNbConstraints():  5578802
r1cs.GetNbSecretVariables():  0
r1cs.GetNbPublicVariables():  37
r1cs.GetNbInternalVariables():  7378794
Running circuit setup 2024-03-15 02:52:00.436113336 +0900 JST m=+82.256622922
Using dummy setup
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xd68cad]

goroutine 1 [running]:
main.groth16Proof({0x106fe80, 0xc0001ead88}, {0x7fffca19271e, 0x4}, 0x1, 0x1)
        /home/user/gnark-plonky2-verifier/benchmark.go:236 +0x64d
main.runBenchmark({0x7fffca19271e, 0x4}, {0x7fffca192731, 0x7}, 0x1, 0x1, 0x1)
        /home/user/gnark-plonky2-verifier/benchmark.go:74 +0x854
main.main()
        /home/user/gnark-plonky2-verifier/benchmark.go:323 +0x339
exit status 2

When the proof system is switched to PLONK, no errors occur.

pgebheim commented 6 months ago

I'm guessing we need to update this all to match the newest version plonky2?

akorchyn commented 4 months ago

Happened to me too, but only with dummy build.