gnark icon indicating copy to clipboard operation
gnark copied to clipboard

feat: MarshalSolidity() for groth16 proofs

Open mattstam opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Plonk provides a MarshalSolidity() for a proof https://github.com/Consensys/gnark/blob/1cc2d6ae4aced20f5201e84458e66e27dcdf52b6/backend/plonk/bn254/solidity.go#L1353

There does not seem to be an equivalent function for Groth16, expected location: https://github.com/Consensys/gnark/blob/1cc2d6ae4aced20f5201e84458e66e27dcdf52b6/backend/groth16/bn254/solidity.go#L545

Describe the solution you'd like

An equivalent function for a Groth16 proof.

mattstam avatar Feb 15 '24 00:02 mattstam

Your're right, currently we do not have MarshalSolidity method for Groth16 proofs. It would definitely be useful to add.

Meanwhile, please have a look how the proof is exported for usage in CI: https://github.com/Consensys/gnark/pull/1063/files#diff-f42eb1f1c6ad5c46af0a8f7f9301fc25f3e802336777e9113eef0d3d254641c9L60.

ivokub avatar Feb 21 '24 09:02 ivokub

Implemented in #1063. See additional remarks in #1094.

ivokub avatar Apr 05 '24 09:04 ivokub