Skip to content

Commit a3ee928

Browse files
committed
complete initial setup for the gas limit and elasticity increase on 2025-10-28
1 parent 5fc93d3 commit a3ee928

File tree

8 files changed

+453
-1
lines changed

8 files changed

+453
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ checkout-base-contracts-commit:
112112
##
113113
# Task Signer Tool
114114
##
115-
SIGNER_TOOL_COMMIT=dc9dcd57e66cc71d8e8f40afc2d0bad454cba998
115+
SIGNER_TOOL_COMMIT=92a4b600252cd7ffe255a876a880c2540802b99c
116116
SIGNER_TOOL_PATH=signer-tool
117117

118118
.PHONY: checkout-signer-tool
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
OP_COMMIT=8d89359da4c5635044d0b130b3cdee800c8106c7 # Recommend using the version of https://github.com/ethereum-optimism/optimism that the current SystemConfig contract is on
2+
BASE_CONTRACTS_COMMIT=98ec680a67c173d38aa52588c5dc0fbaa1c0561c # Recommend using the latest version of https://github.com/base-org/contracts
3+
4+
# TODO: ensure `SYSTEM_CONFIG` is correct on the given network
5+
SYSTEM_CONFIG=0x73a79Fab69143498Ed3712e519A88a918e1f4072
6+
# TODO: ensure `OWNER_SAFE` is correct on the given network
7+
OWNER_SAFE=0x14536667Cd30e52C0b458BaACcB9faDA7046E056
8+
9+
FROM_GAS_LIMIT=150000000
10+
TO_GAS_LIMIT=200000000
11+
12+
FROM_ELASTICITY=3
13+
TO_ELASTICITY=4
14+
15+
# TODO: ensure `SENDER` is a signer for `OWNER_SAFE` on the given network
16+
SENDER=0x1841CB3C2ce6870D0417844C817849da64E6e937
17+
18+
RECORD_STATE_DIFF=true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Facilitator Guide
2+
3+
Guide for facilitators after collecting signatures from signers.
4+
5+
### 1. Update repo:
6+
7+
```bash
8+
cd contract-deployments
9+
git pull
10+
cd mainnet/2025-10-28-increase-gas-and-elasticity-limit
11+
make deps
12+
```
13+
14+
### 2. Execute upgrade
15+
16+
```bash
17+
SIGNATURES=AAABBBCCC make execute
18+
```
19+
20+
### 3. (**ONLY** if needed) Execute upgrade rollback
21+
22+
> [!IMPORTANT] THIS SHOULD ONLY BE PERFORMED IN THE EVENT THAT WE NEED TO ROLLBACK
23+
24+
```bash
25+
SIGNATURES=AAABBBCCC make execute-rollback
26+
```
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
include ../../Makefile
2+
include ../../Multisig.mk
3+
4+
include ../.env
5+
include .env
6+
7+
ifndef LEDGER_ACCOUNT
8+
override LEDGER_ACCOUNT = 0
9+
endif
10+
11+
ifndef ROLLBACK_NONCE_OFFSET
12+
override ROLLBACK_NONCE_OFFSET = 1
13+
endif
14+
15+
SCRIPT_NAME = IncreaseEip1559ElasticityAndIncreaseGasLimitScript
16+
17+
# # Map .env values and export them for child processes
18+
# export FROM_GAS_LIMIT=$(OLD_GAS_LIMIT)
19+
# export TO_GAS_LIMIT=$(NEW_GAS_LIMIT)
20+
# export FROM_ELASTICITY=$(OLD_ELASTICITY)
21+
# export TO_ELASTICITY=$(NEW_ELASTICITY)
22+
23+
.PHONY: deps
24+
deps: new-forge-deps
25+
26+
.PHONY: new-forge-deps
27+
new-forge-deps:
28+
forge install --no-git safe-global/safe-smart-account@186a21a74b327f17fc41217a927dea7064f74604
29+
30+
.PHONY: gen-validation
31+
gen-validation: checkout-signer-tool run-script
32+
33+
.PHONY: run-script
34+
run-script:
35+
cd $(SIGNER_TOOL_PATH); \
36+
npm ci; \
37+
bun run scripts/genValidationFile.ts --rpc-url $(L1_RPC_URL) \
38+
--workdir .. --forge-cmd 'forge script --rpc-url $(L1_RPC_URL) \
39+
$(SCRIPT_NAME) --sig "sign(address[])" [] --sender $(SENDER)' --out ../validations/base-signer.json;
40+
41+
.PHONY: execute
42+
execute:
43+
FROM_GAS_LIMIT=$(FROM_GAS_LIMIT) \
44+
TO_GAS_LIMIT=$(TO_GAS_LIMIT) \
45+
FROM_ELASTICITY=$(FROM_ELASTICITY) \
46+
TO_ELASTICITY=$(TO_ELASTICITY) \
47+
$(call MULTISIG_EXECUTE,$(SIGNATURES))
48+
49+
.PHONY: sign-rollback
50+
sign-rollback:
51+
FROM_GAS_LIMIT=$(TO_GAS_LIMIT) \
52+
TO_GAS_LIMIT=$(FROM_GAS_LIMIT) \
53+
FROM_ELASTICITY=$(TO_ELASTICITY) \
54+
TO_ELASTICITY=$(FROM_ELASTICITY) \
55+
SAFE_NONCE=$(shell expr $$(cast call $(OWNER_SAFE) "nonce()" --rpc-url $(L1_RPC_URL) | cast to-dec) + $(ROLLBACK_NONCE_OFFSET)) \
56+
$(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
57+
forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
58+
--sig "sign(address[])" [] --sender $(SENDER)
59+
60+
.PHONY: execute-rollback
61+
execute-rollback:
62+
FROM_GAS_LIMIT=$(TO_GAS_LIMIT) \
63+
TO_GAS_LIMIT=$(FROM_GAS_LIMIT) \
64+
FROM_ELASTICITY=$(TO_ELASTICITY) \
65+
TO_ELASTICITY=$(FROM_ELASTICITY) \
66+
SAFE_NONCE=$(shell expr $$(cast call $(OWNER_SAFE) "nonce()" --rpc-url $(L1_RPC_URL) | cast to-dec) + $(ROLLBACK_NONCE_OFFSET)) \
67+
forge script --rpc-url $(L1_RPC_URL) $(SCRIPT_NAME) \
68+
--sig "run(bytes)" $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# Update Gas Limit & Elasticity in L1 `SystemConfig`
2+
3+
Status: READY TO SIGN
4+
5+
## Description
6+
7+
We are updating the gas limit and elasticity to improve TPS and reduce gas fees.
8+
9+
This runbook invokes the following script which allows our signers to sign the same call with two different sets of parameters for our Incident Multisig, defined in the [base-org/contracts](https://github.com/base/contracts) repository:
10+
11+
`IncreaseEip1559ElasticityAndIncreaseGasLimitScript` -- This script will update the gas limit to our new limit of 200M gas and 4 elasticity if invoked as part of the "upgrade" process, or revert to the old limit of 150M gas and 3 elasticity if invoked as part of the "rollback" process.
12+
13+
The values we are sending are statically defined in the `.env` file.
14+
15+
> [!IMPORTANT] We have two transactions to sign. Please follow
16+
> the flow for both "Approving the Update transaction" and
17+
> "Approving the Rollback transaction". Hopefully we only need
18+
> the former, but will have the latter available if needed.
19+
20+
## Install dependencies
21+
22+
### 1. Update foundry
23+
24+
```bash
25+
foundryup
26+
```
27+
28+
### 2. Install Node.js if needed
29+
30+
First, check if you have node installed
31+
32+
```bash
33+
node --version
34+
```
35+
36+
If you see a version output from the above command, you can move on. Otherwise, install node
37+
38+
```bash
39+
brew install node
40+
```
41+
42+
## Approving the Update transaction
43+
44+
### 1. Update repo:
45+
46+
```bash
47+
cd contract-deployments
48+
git pull
49+
```
50+
51+
### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root).
52+
53+
```bash
54+
make sign-task
55+
```
56+
57+
### 3. Open the UI at [http://localhost:3000](http://localhost:3000)
58+
59+
Be sure to select the correct task user from the list of available users to sign (**not** the "rollback" user).
60+
61+
### 4. Send signature to facilitator
62+
63+
## Approving the Rollback transaction
64+
65+
Complete the above steps for `Approving the Update transaction` before continuing below.
66+
67+
### 1. Simulate and validate the transaction
68+
69+
Make sure your ledger is still unlocked and run the following.
70+
71+
```shell
72+
make sign-rollback
73+
```
74+
75+
Once you run the make sign command successfully, you will see a "Simulation link" from the output. Once again paste this URL in your browser and click "Simulate Transaction".
76+
77+
We will be performing 3 validations and then we'll extract the domain hash and
78+
message hash to approve on your Ledger then verify completion:
79+
80+
1. Validate integrity of the simulation and that it completed successfully.
81+
2. Validate correctness of the state diff.
82+
3. Validate and extract domain hash and message hash to approve.
83+
84+
#### 2. Validate integrity of the simulation and that it completed successfully.
85+
86+
Make sure you are on the "Overview" tab of the tenderly simulation, to
87+
validate integrity of the simulation, we need to check the following:
88+
89+
1. "Network": Check the network is Ethereum Mainnet.
90+
2. "Timestamp": Check the simulation is performed on a block with a
91+
recent timestamp (i.e. close to when you run the script).
92+
3. "Sender": Check the address shown is your signer account or a valid signer address (from the Safe multi-sig).
93+
4. "Success" with a green check mark
94+
95+
#### 3. Validate correctness of the state diff.
96+
97+
Now click on the "State" tab. Verify that:
98+
99+
1. Verify that the nonce is incremented for the Incident Multisig under the "GnosisSafeProxy" at address `0x14536667Cd30e52C0b458BaACcB9faDA7046E056`:
100+
101+
```
102+
Key: 0x0000000000000000000000000000000000000000000000000000000000000005
103+
Before: 0x000000000000000000000000000000000000000000000000000000000000005d
104+
After: 0x000000000000000000000000000000000000000000000000000000000000005e
105+
```
106+
107+
2. Verify that **NO** gas limit value or elasticity value is updated and thus no changes are shown for a "Proxy" address at `0x73a79fab69143498ed3712e519a88a918e1f4072`. This is because the values would change back to the exact same values that are currently set, therefore no state changes should be displayed for this.
108+
109+
#### 4. Validate and extract domain hash and message hash to approve.
110+
111+
Now that we have verified the transaction performs the right
112+
operation, we need to extract the domain hash and the message hash to
113+
approve.
114+
115+
Go back to the "Overview" tab, and find the
116+
`GnosisSafe.checkSignatures` call. This call's `data` parameter
117+
contains both the domain hash and the message hash that will show up
118+
in your Ledger.
119+
120+
Here is an example screenshot. Note that the value will be
121+
different for each signer:
122+
123+
![Screenshot 2024-03-07 at 5 49 32 PM](https://github.com/base-org/contract-deployments/assets/84420280/b6b5817f-0d05-4862-b16a-4f7f5f18f036)
124+
125+
It will be a concatenation of `0x1901`, the domain hash, and the
126+
message hash: `0x1901[domain hash][message hash]`.
127+
128+
Note down this value. You will need to compare it with the ones
129+
displayed on the Ledger screen at signing. Also, ensure that it matches the following:
130+
131+
```
132+
Domain hash: 0xf3474c66ee08325b410c3f442c878d01ec97dd55a415a307e9d7d2ea24336289
133+
Message hash: 0x5d50efea16ce96c189a49bcb87e208506bb4c612a5ef66c81dd5790f01ef7089
134+
```
135+
136+
### 5. Approve the signature on your ledger
137+
138+
Once the validations are done, it's time to actually sign the
139+
transaction. Make sure your ledger is still unlocked and run the
140+
following:
141+
142+
```shell
143+
make sign-rollback
144+
```
145+
146+
> [!IMPORTANT] This is the most security critical part of the
147+
> playbook: make sure the domain hash and message hash in the
148+
> following two places match:
149+
150+
1. On your Ledger screen.
151+
2. In the Tenderly simulation. You should use the same Tenderly
152+
simulation as the one you used to verify the state diffs, instead
153+
of opening the new one printed in the console.
154+
155+
There is no need to verify anything printed in the console. There is
156+
no need to open the new Tenderly simulation link either.
157+
158+
After verification, sign the transaction. You will see the `Data`,
159+
`Signer` and `Signature` printed in the console. Format should be
160+
something like this:
161+
162+
```
163+
Data: <DATA>
164+
Signer: <ADDRESS>
165+
Signature: <SIGNATURE>
166+
```
167+
168+
Double check the signer address is the right one.
169+
170+
### 6. Send the output to Facilitator(s)
171+
172+
Nothing has occurred onchain - these are offchain signatures which
173+
will be collected by Facilitators for execution. Execution can occur
174+
by anyone once a threshold of signatures are collected, so a
175+
Facilitator will do the final execution for convenience.
176+
177+
Share the `Data`, `Signer` and `Signature` with the Facilitator, and
178+
congrats, you are done!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[profile.default]
2+
src = 'src'
3+
out = 'out'
4+
libs = ['lib']
5+
broadcast = 'records'
6+
fs_permissions = [ {access = "read-write", path = "./"} ]
7+
optimizer = true
8+
optimizer_runs = 999999
9+
solc_version = "0.8.15"
10+
via-ir = false
11+
remappings = [
12+
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
13+
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
14+
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
15+
'@rari-capital/solmate/=lib/solmate/',
16+
'@base-contracts/=lib/base-contracts',
17+
'@solady/=lib/solady/src/'
18+
]
19+
20+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config

0 commit comments

Comments
 (0)