|
| 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 | + |
| 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! |
0 commit comments