Repository navigation
fix(verifier): call OpenVM wrapper through its typed entry point - #181
Merged
Merged
Conversation
Contributor
Author
|
Previously reviewed on a private fork by @lispc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ZkEvmVerifierPostFeynmanbuilt the Halo2 payload by hand and sent it with a rawstaticcall. The first 4 bytes of that call came from the caller'sbundleProof. The OpenVM 2.0 wrapper has a function dispatcher, so these bytes can select the wrapper's ownverify(...). That function reads public values from caller-chosen offsets, so a valid old proof can pass for a new public input.This PR replaces the raw call with the typed call
IOpenVmHalo2Verifier.verify(publicInputHash, bundleProof, verifierDigest1, verifierDigest2). The compiler now fixes the selector. The contract supplies the commitments and the public-input hash.Changes
ZkEvmVerifierPostFeynman.sol: typed call intry/catch. The hand-built payload is gone. Constructor checks for the verifier and the digests.IOpenVmHalo2Verifier.sol: new interface.src/test/openvm/, verbatim except the pragma).Equivalence with the old encoding
zkvm-prover@bf88715releases/dev/verifier/verifier.bin, the same commit as the vendored source.Behavior changes
bundleProofmust be exactly 1760 bytes. The old path also accepted a valid proof with extra bytes on the end; the new path rejects it. All 38 sampled mainnet proofs are 1760 bytes.plonkVerifierhas no code (InvalidPlonkVerifier) or if a digest is at or above the BN254 field modulus (InvalidVerifierDigest).verifyfailures still revert withVerificationFailed().Deployment
Deploy a new
ZkEvmVerifierPostFeynman. Check thatplonkVerifierandprotocolVersionequal the live0x7966…values. Then register it for version 10 inMultipleVersionRollupVerifier.