Skip to content

Commit

Permalink
Fix scripts and issues (#229)
Browse files Browse the repository at this point in the history
* Fix scripts and issues

* Update script to new flow

* Update README

* Add broadcast to run-upgrade
  • Loading branch information
0x00101010 authored Dec 4, 2024
1 parent 60ec57f commit e95d653
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 13 deletions.
5 changes: 2 additions & 3 deletions mainnet/2024-11-18-increase-max-gas-limit/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ OPTIMISM_REPO=https://github.com/ethereum-optimism/optimism.git
OPTIMISM_VERSION=op-contracts/v1.5.0
OPTIMISM_CONTRACT_PATCH=patch/max-gas-limit.patch

OP_MULTISIG=0x2501c477D0A35545a387Aa4A3EEe4292A9a8B3F0
CB_MULTISIG=0x6e1DFd5C1E22A4677663A81D24C6BA03561ef0f6

OP_MULTISIG=0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A
CB_MULTISIG=0x9855054731540A48b28990B63DcF4f33d8AE46A1
SAFE_ADDRESS=0x7bb41c3008b3f03fe483b28b8db90e19cf07595c
PROXY_ADMIN_ADDRESS=0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E
SYSTEM_CONFIG_ADDRESS=0x73a79Fab69143498Ed3712e519A88a918e1f4072
Expand Down
17 changes: 14 additions & 3 deletions mainnet/2024-11-18-increase-max-gas-limit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ checkout-op-commit:

.PHONY: deploy
deploy:
$(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L1_RPC_URL) DeploySystemConfig --sig "sign(address)"
forge script --rpc-url $(L1_RPC_URL) DeploySystemConfig --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --verify --broadcast

.PHONY: sign-cb
sign-cb:
Expand All @@ -36,7 +35,19 @@ sign-op:
forge script --rpc-url $(L1_RPC_URL) UpgradeSystemConfig \
--sig "sign(address)" $(OP_MULTISIG)

.PHONY: approve-cb
approve-cb:
forge script --rpc-url $(L1_RPC_URL) UpgradeSystemConfig \
--sig "approve(address,bytes)" $(CB_MULTISIG) $(SIGNATURES) \
--ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast

.PHONY: approve-op
approve-op:
forge script --rpc-url $(L1_RPC_URL) UpgradeSystemConfig \
--sig "approve(address,bytes)" $(OP_MULTISIG) $(SIGNATURES) \
--ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast

.PHONY: run-upgrade
run-upgrade:
forge script --rpc-url $(L1_RPC_URL) UpgradeSystemConfig \
--sig "run(bytes)" $(SIGNATURES) -i 1 --broadcast
--sig "run()" --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast
31 changes: 26 additions & 5 deletions mainnet/2024-11-18-increase-max-gas-limit/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [READY TO SIGN] Upgrade to new system config with 400m max gas limit
## [DRAFT] Upgrade to new system config with 400m max gas limit

Base is continuing to scale and we need higher block gas limit to support the increased demand.

Expand All @@ -9,21 +9,42 @@ Base is continuing to scale and we need higher block gas limit to support the in

2. ledger needs to be connected and unlocked
3. deploying contracts (base team):
```
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make deps
make deploy
```

4. sign (both base & op team):
4. sign (op team):
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make deps # skip if already installed
make sign-op
```

5. approve (op team):
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make deps # skip if already installed
make sign
SIGNATURES=xxx make approve-op # replace xxx with actual signatures
```

5. upgrade
6. sign (cb team):
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make deps # skip if already installed
make sign-cb
```

7. approve (cb team):
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make deps # skip if already installed
SIGNATURES=xxx make approve-cb # replace xxx with actual signatures
```

8. upgrade
```shell
cd mainnet/2024-11-18-increase-max-gas-limit
make run-upgrade
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {Vm} from "forge-std/Vm.sol";
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";

import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol";
import {MultisigBuilder, Simulation} from "@base-contracts/script/universal/MultisigBuilder.sol";
import {Simulation} from "@base-contracts/script/universal/MultisigBuilder.sol";
import "@base-contracts/script/universal/NestedMultisigBuilder.sol";

interface IProxyAdmin {
function upgrade(address _proxy, address _implementation) external;
Expand All @@ -15,7 +16,7 @@ interface IProxy {
function implementation() external view returns (address);
}

contract UpgradeSystemConfig is MultisigBuilder {
contract UpgradeSystemConfig is NestedMultisigBuilder {
address internal SAFE_ADDRESS = vm.envAddress("SAFE_ADDRESS");
address internal PROXY_ADMIN_ADDRESS = vm.envAddress("PROXY_ADMIN_ADDRESS");
address internal SYSTEM_CONFIG_ADDRESS = vm.envAddress("SYSTEM_CONFIG_ADDRESS");
Expand Down

0 comments on commit e95d653

Please sign in to comment.