You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubstructCircomProof{puba:G1,// each element is BigUint typepubb:G2,pubc:G1,pubprotocol:String,pubcurve:String,}// circom-proverpubstructGenerateProofResult{pubproof:CircomProof,pubinputs:Vec<BigUint>,}// mopro-ffipubstructGenerateProofResult{pubproof:CircomProof,// convert all BigUint to Stringpubinputs:Vec<String>,// convert all BigUint to String}
Problem
Now we implemented
toEthereumProof
andfromEthereumProof
mopro/mopro-ffi/src/circom/ethereum.rs
Lines 27 to 28 in da02fc4
But it only supports
Bn254
for nowWe can add support for
BLS12-381
Discussion: #367 (comment)
Discussion: #361 (comment)
Details
Solution 1 (best)
Convert the proofs in
circom-prover
with the types: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/snarkjs/index.d.ctsso that the struct becomes
the API becomes
We have handled all BN254 and BLS12-381 convert in https://github.com/zkmopro/mopro/blob/main/circom-prover/src/prover/ethereum.rs
Then it should support these 2 curves to convert to
CircomProof
Just need to update the
mopro-ffi
andtest-e2e
typesSolution 2 (short term, not recommended)
add support for
toEthereumProof
withmopro/mopro-ffi/src/circom/ethereum.rs
Lines 28 to 29 in da02fc4
deserialize/serialize BLS12-381
Acceptance criteria
Support for both BN254 and BLS12-381 that the proof needs to be
toEthereumProof
)verify_circom_proof
)Next steps (optional)
If choose Solution 1, and we can remove all
toEthereumProof
,fromEthereumProof
,toEthereumInputs
,fromEthereumInputs
The text was updated successfully, but these errors were encountered: