Verifier contracts
Used to verify transaction and tree zkSNARK proofs
Last updated
Was this helpful?
Used to verify transaction and tree zkSNARK proofs
Last updated
Was this helpful?
The verifier contracts are used to validate zkSNARK proofs. There are two verifiers in the zkBob solution:
Transfer verifier is used to check transaction correctness. The associated proofs are generated by the user on transaction creation and calculated with the . The main question the verifier answers is whether the user is able to make the corresponding deposit\transfer\withdrawal.
Tree verifier is used to check the Merkle tree updating sequence. The transaction subtree (which should be added to the general tree) should be placed on the correct offset and update the Merkle tree root properly. The associated proofs are usually generated by the relayer (but the user should calculate the proof himself when he wants to interact with the Pool contract directly). The main question the verifier answers is whether the Merkle tree has been updated correctly.
Verifier contracts are built within the proving system. The Solidity source code is generated by a . Building the verifier contracts require verification keys generated during the process.
Contracts source code: generated during the