Skip to content

Commit

Permalink
fix: Update absolute prestate (#12161)
Browse files Browse the repository at this point in the history
* fix: Update absolute prestate

* fix: just pre-pr

* fix: absolute prestate updated as part of assertions.

* chore: semver lock

---------

Co-authored-by: Matt Solomon <[email protected]>
  • Loading branch information
blmalone and mds1 authored Sep 26, 2024
1 parent 0561fd4 commit c7ab63b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion packages/contracts-bedrock/scripts/DeployOPChain.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,13 @@ contract DeployOPChainOutput is BaseDeployIO {
PermissionedDisputeGame game = permissionedDisputeGame();

require(GameType.unwrap(game.gameType()) == GameType.unwrap(GameTypes.PERMISSIONED_CANNON), "DPG-10");
require(Claim.unwrap(game.absolutePrestate()) == bytes32(hex"dead"), "DPG-20");
// This hex string is the absolutePrestate of the latest op-program release, see where the
// `EXPECTED_PRESTATE_HASH` is defined in `config.yml`.
require(
Claim.unwrap(game.absolutePrestate())
== bytes32(hex"038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c"),
"DPG-20"
);

OPContractsManager opcm = _doi.opcmProxy();
(address mips,) = opcm.implementations(opcm.latestRelease(), "MIPS");
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"sourceCodeHash": "0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649"
},
"src/L1/OPContractsManager.sol": {
"initCodeHash": "0x15ace86b1d389d02654392e10c3d444000f22e549ad2736cd5a869e4d862ddc8",
"sourceCodeHash": "0xffb7698ab51b7ea58460146de3d094d8e2f869c1425d289832855062c77692a8"
"initCodeHash": "0x620481066bd0979c409ed9c089d32a1b7a05c610509222901ee3e73b0dc5565d",
"sourceCodeHash": "0x1bd201aef876cd32a34f8b100362df87ffaa0c1ddfbf5a19a5c43ced4c26d791"
},
"src/L1/OptimismPortal.sol": {
"initCodeHash": "0xbe2c0c81b3459014f287d8c89cdc0d27dde5d1f44e5d024fa1e4773ddc47c190",
Expand Down
6 changes: 3 additions & 3 deletions packages/contracts-bedrock/src/L1/OPContractsManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ contract OPContractsManager is ISemver, Initializable {

// -------- Constants and Variables --------

/// @custom:semver 1.0.0-beta.12
string public constant version = "1.0.0-beta.12";
/// @custom:semver 1.0.0-beta.13
string public constant version = "1.0.0-beta.13";

/// @notice Represents the interface version so consumers know how to decode the DeployOutput struct
/// that's emitted in the `Deployed` event. Whenever that struct changes, a new version should be used.
Expand Down Expand Up @@ -592,7 +592,7 @@ contract OPContractsManager is ISemver, Initializable {
{
return abi.encode(
GameType.wrap(1), // Permissioned Cannon
Claim.wrap(bytes32(hex"dead")), // absolutePrestate
Claim.wrap(bytes32(hex"038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c")), // absolutePrestate
73, // maxGameDepth
30, // splitDepth
Duration.wrap(3 hours), // clockExtension
Expand Down

0 comments on commit c7ab63b

Please sign in to comment.