Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base mainnet fp upgrade #352

Merged
merged 25 commits into from
Oct 24, 2024
Merged
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e9f9dbe
initial commit
sbvegan Oct 21, 2024
09e2fd6
bundle generate and validation file created
sbvegan Oct 21, 2024
f5c2728
clean up
sbvegan Oct 22, 2024
b6f7895
Merge branch 'main' into base-mainnet-fps
sbvegan Oct 23, 2024
5389abc
adding task to ci
sbvegan Oct 23, 2024
8f01e9f
gaslimited updated
sbvegan Oct 23, 2024
8297d98
addressesing anika's review
sbvegan Oct 24, 2024
0680c0c
removing unecessary comment
sbvegan Oct 24, 2024
dbc1886
Apply suggestions from code review
sbvegan Oct 24, 2024
4f7df7d
fixing nits
sbvegan Oct 24, 2024
5d50274
fixing getcontract function
sbvegan Oct 24, 2024
8a545a0
adding PreimageOracle addr, same as OPM
sbvegan Oct 24, 2024
62a84e0
fixing the input.json's human readable section to match the actual ca…
sbvegan Oct 24, 2024
048ff87
removing exec file
sbvegan Oct 24, 2024
6ee089a
adding safe validation info
sbvegan Oct 24, 2024
8ee5ad4
updating contract addresses based on SCR pr
sbvegan Oct 24, 2024
fd6c243
dedup safe addresses and add sanity checks
sbvegan Oct 24, 2024
33b93be
Apply suggestions from code review
sbvegan Oct 24, 2024
0e3a1f7
fixing getAllowedStorageAccess
sbvegan Oct 24, 2024
67d67a1
fixing comment about contract semvers
sbvegan Oct 24, 2024
7b965f8
updating note
sbvegan Oct 24, 2024
a7ade1f
adding final sanity check
sbvegan Oct 24, 2024
63ad175
Update tasks/eth/base-002-fp-upgrade/NestedSignFromJson.s.sol
sbvegan Oct 24, 2024
9ddfa3d
adding the permissioned deplayedweth proxy
sbvegan Oct 24, 2024
a8a151a
fixing sanity check
sbvegan Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -175,6 +175,27 @@ jobs:
just prepare-json
just simulate-council # simulate again to make sure the json is still valid

just_simulate_base-002-fp-upgrade:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
steps:
- checkout
- run:
name: just simulate base-002-fp-upgrade
command: |
go install github.com/mikefarah/yq/v4@latest
just install
cd tasks/eth/base-002-fp-upgrade
export SIMULATE_WITHOUT_LEDGER=1
just \
--dotenv-path .env \
--justfile ../../../nested.just \
simulate council
just \
--dotenv-path .env \
--justfile ../../../nested.just \
simulate foundation

forge_build:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
@@ -237,3 +258,4 @@ workflows:
- just_simulate_sc_rehearsal_1
- just_simulate_sc_rehearsal_2
- just_simulate_sc_rehearsal_4
- just_simulate_base-002-fp-upgrade
7 changes: 7 additions & 0 deletions tasks/eth/base-002-fp-upgrade/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ETH_RPC_URL="https://ethereum.publicnode.com"
OWNER_SAFE=0x7bB41C3008B3f03FE483B28b8DB90e19Cf07595c
# This is Base's safe but the Nested.just file uses council as a keyword and
# we want to minimize changes
COUNCIL_SAFE=0x9855054731540A48b28990B63DcF4f33d8AE46A1
sbvegan marked this conversation as resolved.
Show resolved Hide resolved
FOUNDATION_SAFE=0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A
sbvegan marked this conversation as resolved.
Show resolved Hide resolved
SAFE_NONCE=""
127 changes: 127 additions & 0 deletions tasks/eth/base-002-fp-upgrade/EXEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# FP Upgrade - Base Mainnet
Upgrades the `OptimismPortal` and `SystemConfig` implementations

The batch will be executed on chain ID `1`, and contains `7` transactions.

## Tx #1: Upgrade OptimismPortal to StorageSetter
Upgrade OptimismPortal to StorageSetter and reset `initializing`

**Function Signature:** `upgradeAndCall(address,address,bytes)`

**To:** `0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E`

**Value:** `0 WEI`

**Raw Input Data:** `0x9623609d00000000000000000000000049048044d57e1c92a77f79988d21fa8faf74e97e000000000000000000000000d81f43edbcacb4c29a9ba38a13ee5d79278270cc000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000444e91db080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`

### Inputs
**_implementation:** `0xd81f43eDBCAcb4c29a9bA38a13Ee5d79278270cC`

**_proxy:** `0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`

**_data:** `0x4e91db0800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`


## Tx #2: Reset l2Sender in OptimismPortalProxy
Pre-initialization of the OptimismPortal2

**Function Signature:** `setAddress(bytes32,address)`

**To:** `0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`

**Value:** `0 WEI`

**Raw Input Data:** `0xca446dd900000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000`

### Inputs
**_slot:** `0x0000000000000000000000000000000000000000000000000000000000000032`

**_address:** `0x0000000000000000000000000000000000000000`


## Tx #3: Upgrade the OptimismPortal
Upgrade and initialize the OptimismPortal to OptimismPortal2 (3.10.0)

**Function Signature:** `upgradeAndCall(address,address,bytes)`

**To:** `0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E`

**Value:** `0 WEI`

**Raw Input Data:** `0x9623609d00000000000000000000000049048044d57e1c92a77f79988d21fa8faf74e97e00000000000000000000000049048044d57e1c92a77f79988d21fa8faf74e97e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000014e2f826324b2faf99e513d16d266c3f80ae87832b000000000000000000000000`

### Inputs
**_data:** `0x8e819e5400000000000000000000000043edb88c4b80fdd2adff2412a7bebf9df42cb40e00000000000000000000000073a79fab69143498ed3712e519a88a918e1f407200000000000000000000000095703e0982140d16f8eba6d158fccede42f04a4c0000000000000000000000000000000000000000000000000000000000000000`

**_implementation:** `0xe2F826324b2faf99E513D16D266c3F80aE87832B`

**_proxy:** `0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`


## Tx #4: Upgrade SystemConfig to StorageSetter
Upgrades the `SystemConfig` proxy to the `StorageSetter` contract in preparation for clearing the legacy `L2OutputOracle` storage slot and set the new `DisputeGameFactory` storage slot to contain the address of the `DisputeGameFactory` proxy.

**Function Signature:** `upgrade(address,address)`

**To:** `0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E`

**Value:** `0 WEI`

**Raw Input Data:** `0x99a88ec400000000000000000000000073a79fab69143498ed3712e519a88a918e1f4072000000000000000000000000d81f43edbcacb4c29a9ba38a13ee5d79278270cc`

### Inputs
**_implementation:** `0xd81f43eDBCAcb4c29a9bA38a13Ee5d79278270cC`

**_proxy:** `0x73a79Fab69143498Ed3712e519A88a918e1f4072`


## Tx #5: Clear SystemConfig's L2OutputOracle slot
clears the keccak(systemconfig.l2outputoracle)-1 slot

**Function Signature:** `setAddress(bytes32,address)`

**To:** `0x73a79Fab69143498Ed3712e519A88a918e1f4072`

**Value:** `0 WEI`

**Raw Input Data:** `0xca446dd9e52a667f71ec761b9b381c7b76ca9b852adf7e8905da0e0ad49986a0a68718150000000000000000000000000000000000000000000000000000000000000000`

### Inputs
**_address:** `0x0000000000000000000000000000000000000000`

**_slot:** `0xe52a667f71ec761b9b381c7b76ca9b852adf7e8905da0e0ad49986a0a6871815`


## Tx #6: Set SystemConfig's DisputeGameFactory slot
sets the keccak(systemconfig.disputegamefactory)-1 slot

**Function Signature:** `setAddress(bytes32,address)`

**To:** `0x73a79Fab69143498Ed3712e519A88a918e1f4072`

**Value:** `0 WEI`

**Raw Input Data:** `0xca446dd952322a25d9f59ea17656545543306b7aef62bc0cc53a0e65ccfa0c75b97aa906000000000000000000000000e5965ab5962edc7477c8520243a95517cd252fa9`

### Inputs
**_slot:** `0x52322a25d9f59ea17656545543306b7aef62bc0cc53a0e65ccfa0c75b97aa906`

**_address:** `0xe5965Ab5962eDc7477C8520243A95517CD252fA9`
sbvegan marked this conversation as resolved.
Show resolved Hide resolved


## Tx #7: Upgrade SystemConfig to 2.2.0
Upgrade SystemConfig to 2.2.0

**Function Signature:** `upgrade(address,address)`

**To:** `0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E`

**Value:** `0 WEI`

**Raw Input Data:** `0x99a88ec400000000000000000000000073a79fab69143498ed3712e519a88a918e1f4072000000000000000000000000f56d96b2535b932656d3c04ebf51babff241d886`

### Inputs
**_proxy:** `0x73a79Fab69143498Ed3712e519A88a918e1f4072`

**_implementation:** `0xF56D96B2535B932656d3c04Ebf51baBff241D886`

Loading