Skip to content

Commit

Permalink
switch to new FDG and PDG that use MIPS64
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianst committed Dec 20, 2024
1 parent a844865 commit 28e82b3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
3 changes: 3 additions & 0 deletions tasks/sep/026-fp-holocene-upgrade-fix/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ FOUNDATION_SAFE=0xDEe57160aAfCF04c34C887B5962D0a69676d3C8B
OWNER_SAFE=0x1Eb2fFc903729a0F03966B917003800b145F56E2
SAFE_NONCE=""
SIMULATE_WITHOUT_LEDGER=0 # 1

SCR_OVERRIDE_MIPS_ADDRESS=0xa1e470b6bd25e8eea9ffcda6a1518be5eb8ee7bb
SCR_OVERRIDE_MIPS_VERSION=1.0.0-beta.7
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNest
constructor()
SuperchainRegistry("sepolia", "op", "v1.8.0-rc.4")
DisputeGameUpgrade(
0x03f89406817db1ed7fd8b31e13300444652cdb0b9c509a674de43483b2f83568, // absolutePrestate
0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448, // faultDisputeGame
0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68 // permissionedDisputeGame
0x03b7eaa4e3cbce90381921a4b48008f4769871d64f93d113fcadca08ecee503b, // absolutePrestate
0x833a817eF459f4eCdB83Fc5A4Bf04d09A4e83f3F, // faultDisputeGame
0xbBD576128f71186A0f9ae2F2AAb4afb4aF2dae17 // permissionedDisputeGame
)
{}

Expand Down
8 changes: 4 additions & 4 deletions tasks/sep/026-fp-holocene-upgrade-fix/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Upgrades the `PERMISSIONED_CANNON` game type to the new Holocene deployment, wit

**Value:** `0 WEI`

**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68`
**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bbd576128f71186a0f9ae2f2aab4afb4af2dae17`

### Inputs
**_gameType:** `1`

**_impl:** `0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68`
**_impl:** `0xbBD576128f71186A0f9ae2F2AAb4afb4aF2dae17`


## Tx #2: Upgrade `CANNON` game type in `DisputeGameFactory`
Expand All @@ -29,9 +29,9 @@ Upgrades the `CANNON` game type to the new Holocene deployment, with an updated

**Value:** `0 WEI`

**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448`
**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000833a817ef459f4ecdb83fc5a4bf04d09a4e83f3f`

### Inputs
**_gameType:** `0`

**_impl:** `0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448`
**_impl:** `0x833a817eF459f4eCdB83Fc5A4Bf04d09A4e83f3F`
12 changes: 8 additions & 4 deletions tasks/sep/026-fp-holocene-upgrade-fix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Status: READY TO SIGN

## Objective

Upgrades the Fault Proof contracts of **OP Sepolia** for Holocene, fixing an upgrade with wrongly newly deployed `DelayedWETH` from #374.
Upgrades the Fault Proof contracts of **OP Sepolia** for Holocene, fixing an upgrade with wrongly
newly deployed `DelayedWETH` from #374, and then subsequent faulty upgrade to MIPS64-MT in #410,
which again used the wrong `DelayedWETH`.

Using a MIPS64 absolute prestate hash of `0x03b7eaa4e3cbce90381921a4b48008f4769871d64f93d113fcadca08ecee503b`.

Governance post of the upgrade can be found at https://gov.optimism.io/t/upgrade-proposal-11-holocene-network-upgrade/9313.

Expand All @@ -13,9 +17,9 @@ This upgrades the Fault Proof contracts in the

## Pre-deployments

- `MIPS` - `0x69470D6970Cd2A006b84B1d4d70179c892cFCE01`
- `FaultDisputeGame` - `0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448`
- `PermissionedDisputeGame` - `0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68`
- `MIPS64` - `0xa1e470b6bd25e8eea9ffcda6a1518be5eb8ee7bb`
- `FaultDisputeGame` - `0x833a817eF459f4eCdB83Fc5A4Bf04d09A4e83f3F`
- `PermissionedDisputeGame` - `0xbBD576128f71186A0f9ae2F2AAb4afb4aF2dae17`

## Simulation

Expand Down
14 changes: 7 additions & 7 deletions tasks/sep/026-fp-holocene-upgrade-fix/VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ This task is executed by the nested 2/2 `ProxyAdminOwner` Safe. Refer to the
for the expected state overrides and changes.

The `approvedHashes` mapping **key** of the `ProxyAdminOwner` that should change during the simulation is
- Council simulation: `0x1188ef4fb2355c49d442a7f950dad4492a2961a34786ce407c3db8c8d331250d`
- Foundation simulation: `0x030c89f6f0b759d892697ad05de88183a3f6f579e0abe30c81427eaefb20a459`
- Council simulation: `0x27f38a0f9fb806fdf71a205880cdcbd83a0bfb9ae1769b6a4aa6545c53fa4527`
- Foundation simulation: `0xf50bc38a52b16adccfd799639dd5bfabf655cb35d68c44864186a208b29b37fb`

calculated as explained in the nested validation doc:
```sh
SAFE_HASH=0x572c29de03270811431295a31c25273c7dbf3bc0f17f29a8fe3131f86b7a9cb6 # "Nested hash:"
SAFE_HASH=0x63962452498b3b28f8813e99890a00437a292fea8dca8db1fbb97c417e082879 # "Nested hash:"
SAFE_ROLE=0xf64bc17485f0B4Ea5F06A96514182FC4cB561977 # Council
cast index bytes32 $SAFE_HASH $(cast index address $SAFE_ROLE 8)
# 0x1188ef4fb2355c49d442a7f950dad4492a2961a34786ce407c3db8c8d331250d
# 0x27f38a0f9fb806fdf71a205880cdcbd83a0bfb9ae1769b6a4aa6545c53fa4527

SAFE_ROLE=0xDEe57160aAfCF04c34C887B5962D0a69676d3C8B # Foundation
cast index bytes32 $SAFE_HASH $(cast index address $SAFE_ROLE 8)
# 0x030c89f6f0b759d892697ad05de88183a3f6f579e0abe30c81427eaefb20a459
# 0xf50bc38a52b16adccfd799639dd5bfabf655cb35d68c44864186a208b29b37fb
```

## State Changes
Expand All @@ -38,12 +38,12 @@ This section describes the specific state changes of this upgrade, not related t

- **Key**: `0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b` <br/>
**Before**: `0x0000000000000000000000005e0877a8f6692ed470013e651c4357d0c4941e6c` <br/>
**After**: `0x000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448` <br/>
**After**: `0x000000000000000000000000833a817ef459f4ecdb83fc5a4bf04d09a4e83f3f` <br/>
**Meaning**: Updates the CANNON game type implementation. You can verify which implementation is set using `cast call 0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1 "gameImpls(uint32)(address)" 0`, where `0` is the [`CANNON` game type](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/lib/Types.sol#L28).
Before this task has been executed, you will see that the returned address is `0x0000000000000000000000005e0877a8f6692ed470013e651c4357d0c4941e6c`, matching the "Before" value of this slot, demonstrating this slot is storing the address of the CANNON implementation.

- **Key**: `0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e` <br/>
**Before**: `0x0000000000000000000000004ed046e66c96600dae1a4ec39267bb0ce476e8cc` <br/>
**After**: `0x000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68` <br/>
**After**: `0x000000000000000000000000bbd576128f71186a0f9ae2f2aab4afb4af2dae17` <br/>
**Meaning**: Updates the PERMISSIONED_CANNON game type implementation. You can verify which implementation is set using `cast call 0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1 "gameImpls(uint32)(address)" 1`, where `1` is the [`PERMISSIONED_CANNON` game type](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/lib/Types.sol#L31).
Before this task has been executed, you will see that the returned address is `0x0000000000000000000000004ed046e66c96600dae1a4ec39267bb0ce476e8cc`, matching the "Before" value of this slot, demonstrating this slot is storing the address of the PERMISSIONED_CANNON implementation.
8 changes: 4 additions & 4 deletions tasks/sep/026-fp-holocene-upgrade-fix/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"to": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1",
"value": "0x0",
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68",
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bbd576128f71186a0f9ae2f2aab4afb4af2dae17",
"contractMethod": {
"type": "function",
"name": "setImplementation",
Expand All @@ -31,7 +31,7 @@
},
"contractInputsValues": {
"_gameType": "1",
"_impl": "0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68"
"_impl": "0xbBD576128f71186A0f9ae2F2AAb4afb4aF2dae17"
}
},
{
Expand All @@ -41,7 +41,7 @@
},
"to": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1",
"value": "0x0",
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448",
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000833a817ef459f4ecdb83fc5a4bf04d09a4e83f3f",
"contractMethod": {
"type": "function",
"name": "setImplementation",
Expand All @@ -60,7 +60,7 @@
},
"contractInputsValues": {
"_gameType": "0",
"_impl": "0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448"
"_impl": "0x833a817eF459f4eCdB83Fc5A4Bf04d09A4e83f3F"
}
}
]
Expand Down

0 comments on commit 28e82b3

Please sign in to comment.