-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sep/025: Add task to fix sepolia fp upgrade
- Loading branch information
1 parent
3591eec
commit 91a5dc2
Showing
7 changed files
with
246 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ETH_RPC_URL="https://ethereum-sepolia.publicnode.com" | ||
COUNCIL_SAFE=0xf64bc17485f0B4Ea5F06A96514182FC4cB561977 | ||
FOUNDATION_SAFE=0xDEe57160aAfCF04c34C887B5962D0a69676d3C8B | ||
OWNER_SAFE=0x1Eb2fFc903729a0F03966B917003800b145F56E2 | ||
SAFE_NONCE="" | ||
SIMULATE_WITHOUT_LEDGER=0 # 1 |
34 changes: 34 additions & 0 deletions
34
tasks/sep/025-fp-holocene-upgrade-fix/NestedSignFromJson.s.sol
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.15; | ||
|
||
import {console2 as console} from "forge-std/console2.sol"; | ||
import {Vm} from "forge-std/Vm.sol"; | ||
import {Simulation} from "@base-contracts/script/universal/Simulation.sol"; | ||
import {NestedSignFromJson as OriginalNestedSignFromJson} from "script/NestedSignFromJson.s.sol"; | ||
import {DisputeGameUpgrade} from "script/verification/DisputeGameUpgrade.s.sol"; | ||
import {CouncilFoundationNestedSign } from "script/verification/CouncilFoundationNestedSign.s.sol"; | ||
import {SuperchainRegistry} from "script/verification/Verification.s.sol"; | ||
|
||
contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNestedSign, DisputeGameUpgrade { | ||
constructor() SuperchainRegistry("sepolia", "op", "v1.8.0-rc.4") | ||
DisputeGameUpgrade( | ||
0x03f89406817db1ed7fd8b31e13300444652cdb0b9c509a674de43483b2f83568, // absolutePrestate | ||
0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448, // faultDisputeGame | ||
0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68 // permissionedDisputeGame | ||
) {} | ||
|
||
function _postCheck(Vm.AccountAccess[] memory accesses, Simulation.Payload memory) internal view override { | ||
console.log("Running post-deploy assertions"); | ||
checkStateDiff(accesses); | ||
checkDisputeGameUpgrade(); | ||
console.log("All assertions passed!"); | ||
} | ||
|
||
function getAllowedStorageAccess() internal view override returns (address[] memory) { | ||
return allowedStorageAccess; | ||
} | ||
|
||
function getCodeExceptions() internal view override returns (address[] memory) { | ||
return codeExceptions; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Holocene Hardfork - Proof Contract Upgrades | ||
Upgrades the `MIPS.sol`, `FaultDisputeGame.sol`, and `PermissionedDisputeGame.sol` contracts for Holocene. | ||
|
||
The batch will be executed on chain ID `11155111`, and contains `2` transactions. | ||
|
||
## Tx #1: Upgrade `PERMISSIONED_CANNON` game type in `DisputeGameFactory` | ||
Upgrades the `PERMISSIONED_CANNON` game type to the new Holocene deployment, with an updated version of `op-program` as the absolute prestate hash. | ||
|
||
**Function Signature:** `setImplementation(uint32,address)` | ||
|
||
**To:** `0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1` | ||
|
||
**Value:** `0 WEI` | ||
|
||
**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68` | ||
|
||
### Inputs | ||
**_gameType:** `1` | ||
|
||
**_impl:** `0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68` | ||
|
||
|
||
## Tx #2: Upgrade `CANNON` game type in `DisputeGameFactory` | ||
Upgrades the `CANNON` game type to the new Holocene deployment, with an updated version of `op-program` as the absolute prestate hash. | ||
|
||
**Function Signature:** `setImplementation(uint32,address)` | ||
|
||
**To:** `0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1` | ||
|
||
**Value:** `0 WEI` | ||
|
||
**Raw Input Data:** `0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448` | ||
|
||
### Inputs | ||
**_impl:** `0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448` | ||
|
||
**_gameType:** `0` | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Holocene Hardfork Upgrade | ||
|
||
Status: DRAFT, NOT READY TO SIGN | ||
|
||
## Objective | ||
|
||
Upgrades the Fault Proof contracts for the Holocene hardfork. | ||
|
||
The proposal was: | ||
|
||
- [ ] Posted on the governance forum. | ||
- [ ] Approved by Token House voting. | ||
- [ ] Not vetoed by the Citizens' house. | ||
- [ ] Executed on OP Mainnet. | ||
|
||
The governance proposal should be treated as the source of truth and used to verify the correctness of the onchain operations. | ||
|
||
Governance post of the upgrade can be found at <placeholder>. | ||
|
||
This upgrades the Fault Proof contracts in the | ||
[op-contracts/v1.8.0](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v1.8.0-rc.1) release. | ||
|
||
## Pre-deployments | ||
|
||
- `MIPS` - `0x69470D6970Cd2A006b84B1d4d70179c892cFCE01` | ||
- `FaultDisputeGame` - `0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448` | ||
- `PermissionedDisputeGame` - `0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68` | ||
|
||
## Simulation | ||
|
||
Please see the "Simulating and Verifying the Transaction" instructions in [NESTED.md](../../../NESTED.md). | ||
When simulating, ensure the logs say `Using script /your/path/to/superchain-ops/tasks/<path>/NestedSignFromJson.s.sol`. | ||
This ensures all safety checks are run. If the default `NestedSignFromJson.s.sol` script is shown (without the full path), something is wrong and the safety checks will not run. | ||
|
||
## State Validation | ||
|
||
Please see the instructions for [validation](./VALIDATION.md). | ||
|
||
## Execution | ||
|
||
This upgrade | ||
* Changes dispute game implementation of the `CANNON` and `PERMISSIONED_CANNON` game types to contain a `op-program` release for the Holocene hardfork, which contains | ||
the Holocene fork implementation as well as a `ChainConfig` and `RollupConfig` for the L2 chain being upgraded. | ||
* Upgrades `MIPS.sol` to support the `F_GETFD` syscall, required by the golang 1.22+ runtime. | ||
|
||
See the [overview](./OVERVIEW.md) and `input.json` bundle for more details. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Validation | ||
|
||
This document can be used to validate the state diff resulting from the execution of the upgrade | ||
transaction. | ||
|
||
For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: | ||
|
||
- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. | ||
- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. | ||
- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. | ||
|
||
## State Changes | ||
|
||
### `0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1` (`DisputeGameFactoryProxy`) | ||
|
||
- **Key**: `0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b` <br/> | ||
**Before**: `0x0000000000000000000000005e0877a8f6692ed470013e651c4357d0c4941e6c` <br/> | ||
**After**: `0x000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448` <br/> | ||
**Meaning**: Updates the CANNON game type implementation. Verify that the new 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). | ||
|
||
- **Key**: `0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e` <br/> | ||
**Before**: `0x0000000000000000000000004ed046e66c96600dae1a4ec39267bb0ce476e8cc` <br/> | ||
**After**: `0x000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68` <br/> | ||
**Meaning**: Updates the PERMISSIONED_CANNON game type implementation. Verify that the new 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). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"chainId": 11155111, | ||
"metadata": { | ||
"name": "Holocene Hardfork - Proof Contract Upgrades", | ||
"description": "Upgrades the `MIPS.sol`, `FaultDisputeGame.sol`, and `PermissionedDisputeGame.sol` contracts for Holocene." | ||
}, | ||
"transactions": [ | ||
{ | ||
"metadata": { | ||
"name": "Upgrade `PERMISSIONED_CANNON` game type in `DisputeGameFactory`", | ||
"description": "Upgrades the `PERMISSIONED_CANNON` game type to the new Holocene deployment, with an updated version of `op-program` as the absolute prestate hash." | ||
}, | ||
"to": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1", | ||
"value": "0x0", | ||
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000b51bad2d9da9f94d6a4a5a493ae6469005611b68", | ||
"contractMethod": { | ||
"type": "function", | ||
"name": "setImplementation", | ||
"inputs": [ | ||
{ | ||
"name": "_gameType", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"name": "_impl", | ||
"type": "address" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
"contractInputsValues": { | ||
"_gameType": "1", | ||
"_impl": "0xb51baD2d9Da9f94d6A4A5A493Ae6469005611B68" | ||
} | ||
}, | ||
{ | ||
"metadata": { | ||
"name": "Upgrade `CANNON` game type in `DisputeGameFactory`", | ||
"description": "Upgrades the `CANNON` game type to the new Holocene deployment, with an updated version of `op-program` as the absolute prestate hash." | ||
}, | ||
"to": "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1", | ||
"value": "0x0", | ||
"data": "0x14f6b1a30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e591ebbc2ba0ead3db6a0867cc132fe1c123f448", | ||
"contractMethod": { | ||
"type": "function", | ||
"name": "setImplementation", | ||
"inputs": [ | ||
{ | ||
"name": "_gameType", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"name": "_impl", | ||
"type": "address" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
"contractInputsValues": { | ||
"_gameType": "0", | ||
"_impl": "0xe591Ebbc2Ba0EAd3db6a0867cC132Fe1c123F448" | ||
} | ||
} | ||
] | ||
} |