@@ -47,20 +47,20 @@ contract OpenVmHalo2Verifier is Halo2Verifier, IOpenVmHalo2Verifier {
4747 /// proof[14 * 32..(14 + GUEST_PVS_LENGTH) * 32]: guestPvs[0..GUEST_PVS_LENGTH]
4848 /// proof[(14 + GUEST_PVS_LENGTH) * 32..]: Guest PVs Suffix
4949 ///
50- /// @param guestPvs The PVs revealed by the OpenVM guest program.
51- /// @param partialProof All components of the proof except the Guest PVs,
50+ /// @param publicValues The PVs revealed by the OpenVM guest program.
51+ /// @param proofData All components of the proof except the Guest PVs,
5252 /// leaf and app exe commits. The expected format is:
5353 /// `abi.encodePacked(kzgAccumulators, proofSuffix)`
5454 /// @param appExeCommit The commitment to the OpenVM application executable whose execution
5555 /// is being verified.
56- function verify (bytes calldata guestPvs , bytes calldata partialProof , bytes32 appExeCommit ) external view {
57- if (guestPvs .length != GUEST_PVS_LENGTH) revert InvalidGuestPvsLength ();
58- if (partialProof .length != PARTIAL_PROOF_LENGTH) revert InvalidPartialProofLength ();
56+ function verify (bytes calldata publicValues , bytes calldata proofData , bytes32 appExeCommit ) external view {
57+ if (publicValues .length != GUEST_PVS_LENGTH) revert InvalidGuestPvsLength ();
58+ if (proofData .length != PARTIAL_PROOF_LENGTH) revert InvalidPartialProofLength ();
5959
6060 // We will format the public values and construct the full proof payload
6161 // below.
6262
63- MemoryPointer proofPtr = _constructProof (guestPvs, partialProof , appExeCommit);
63+ MemoryPointer proofPtr = _constructProof (publicValues, proofData , appExeCommit);
6464
6565 uint256 fullProofLength = FULL_PROOF_LENGTH;
6666
@@ -86,12 +86,12 @@ contract OpenVmHalo2Verifier is Halo2Verifier, IOpenVmHalo2Verifier {
8686 /// `guestPvs` separated into its own `bytes32` word.
8787 ///
8888 /// This function does not clean the memory it allocates. Since it is the
89- /// only memory allocation that occurs in the call frame, we know that the
90- /// memory was not written to before.
89+ /// only memory allocation that occurs in the call frame, so we know that
90+ /// the memory region was not written to before.
9191 ///
9292 /// @return proofPtr Memory pointer to the beginning of the constructed
9393 /// proof.
94- function _constructProof (bytes calldata guestPvs , bytes calldata partialProof , bytes32 appExeCommit )
94+ function _constructProof (bytes calldata publicValues , bytes calldata proofData , bytes32 appExeCommit )
9595 internal
9696 pure
9797 returns (MemoryPointer proofPtr )
@@ -115,7 +115,7 @@ contract OpenVmHalo2Verifier is Halo2Verifier, IOpenVmHalo2Verifier {
115115
116116 // Copy the KZG accumulators (length 0x180) into the beginning of
117117 // the memory buffer
118- calldatacopy (proofPtr, partialProof .offset, 0x180 )
118+ calldatacopy (proofPtr, proofData .offset, 0x180 )
119119
120120 // Copy the App Exe Commit and Leaf Exe Commit into the memory buffer
121121 mstore (add (proofPtr, 0x180 ), appExeCommit)
@@ -128,13 +128,13 @@ contract OpenVmHalo2Verifier is Halo2Verifier, IOpenVmHalo2Verifier {
128128 // Begin copying from the end of the KZG accumulators in the
129129 // calldata buffer (0x180)
130130 let suffixProofOffset := add (0x1c0 , shl (5 , GUEST_PVS_LENGTH))
131- calldatacopy (add (proofPtr, suffixProofOffset), add (partialProof .offset, 0x180 ), 0x560 )
131+ calldatacopy (add (proofPtr, suffixProofOffset), add (proofData .offset, 0x180 ), 0x560 )
132132
133133 // Copy each byte of the guestPvs into the proof. It copies the
134134 // most significant bytes of guestPvs first.
135135 let guestPvsMemOffset := add (add (proofPtr, 0x1c0 ), 0x1f )
136136 for { let i := 0 } iszero (eq (i, GUEST_PVS_LENGTH)) { i := add (i, 1 ) } {
137- calldatacopy (add (guestPvsMemOffset, shl (5 , i)), add (guestPvs .offset, i), 0x01 )
137+ calldatacopy (add (guestPvsMemOffset, shl (5 , i)), add (publicValues .offset, i), 0x01 )
138138 }
139139 }
140140 }
0 commit comments