Skip to content

Commit

Permalink
increment height in peptide proof
Browse files Browse the repository at this point in the history
  • Loading branch information
RnkSngh committed Dec 6, 2024
1 parent 1dcd580 commit b9f269e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions contracts/core/proofAPI/CrossL2Prover.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

pragma solidity ^0.8.0;
pragma solidity 0.8.15;

import {RLPReader} from "optimism/libraries/rlp/RLPReader.sol";
import {MerkleTrie} from "optimism/libraries/trie/MerkleTrie.sol";
Expand Down Expand Up @@ -60,7 +60,9 @@ contract CrossL2Prover is AppStateVerifier, ICrossL2Prover {
// VerifyMembership verifies the receipt root through an ics23 proof of peptide state that attests that the
// given eventHeight has the receipt root at the peptide height
this.verifyMembership(
bytes32(_getPeptideAppHash(peptideAppProof.height)),
bytes32(_getPeptideAppHash(peptideAppProof.height - 1)), // a proof generated at height H can only be
// verified against state root (app hash) from block H - 1. this means the relayer must have updated the
// contract with the app hash from the previous block and that is why we use proof.height - 1 here.
Ibc.receiptRootKey(peptideClientId, eventHeight),
abi.encodePacked(receiptRoot),
peptideAppProof
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-ibc/vibc-core-smart-contracts",
"version": "4.0.13",
"version": "4.0.14",
"main": "dist/index.js",
"bin": {
"verify-vibc-core-smart-contracts": "./dist/scripts/verify-contract-script.js",
Expand Down
Loading

0 comments on commit b9f269e

Please sign in to comment.