-
Notifications
You must be signed in to change notification settings - Fork 318
template for gas & elasticity increase #491
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: main
Are you sure you want to change the base?
Changes from all commits
c266254
dc2bc7c
b8d6d8a
827bf87
c4c32a4
a85c6e3
cfd4803
f1b9bfc
5598598
b47e360
29f6e7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| OP_COMMIT=TODO # Recommend using the version of https://github.com/ethereum-optimism/optimism that the current SystemConfig contract is on | ||
| BASE_CONTRACTS_COMMIT=TODO # Recommend using the latest version of https://github.com/base-org/contracts | ||
|
|
||
| # TODO: ensure `SYSTEM_CONFIG` is correct on the given network | ||
| SYSTEM_CONFIG=0x73a79Fab69143498Ed3712e519A88a918e1f4072 | ||
| # TODO: ensure `OWNER_SAFE` is correct on the given network | ||
| OWNER_SAFE=0x14536667Cd30e52C0b458BaACcB9faDA7046E056 | ||
|
|
||
| # TODO: ensure the current and future gas limits are set properly | ||
| OLD_GAS_LIMIT=TODO | ||
| NEW_GAS_LIMIT=TODO | ||
|
|
||
| # TODO: ensure the current and future elasticities are set properly | ||
| OLD_ELASTICITY=TODO | ||
| NEW_ELASTICITY=TODO | ||
|
|
||
| # TODO: ensure `SENDER` is a signer for `OWNER_SAFE` on the given network | ||
| SENDER=0x1841CB3C2ce6870D0417844C817849da64E6e937 | ||
|
|
||
| RECORD_STATE_DIFF=true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Facilitator Guide | ||
|
|
||
| Guide for facilitators after collecting signatures from signers. | ||
|
|
||
| ### 1. Update repo: | ||
|
|
||
| ```bash | ||
| cd contract-deployments | ||
| git pull | ||
| cd mainnet/TODO | ||
| make deps | ||
| ``` | ||
|
|
||
| ### 2. Execute upgrade | ||
|
|
||
| ```bash | ||
| SIGNATURES=AAABBBCCC make execute | ||
| ``` | ||
|
|
||
| ### 3. (**ONLY** if needed) Execute upgrade rollback | ||
|
|
||
| > [!IMPORTANT] THIS SHOULD ONLY BE PERFORMED IN THE EVENT THAT WE NEED TO ROLLBACK | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this doesn't display properly. "THIS SHOULD ONLY BE PERFORMED IN THE EVENT THAT WE NEED TO ROLLBACK" should be moved to a new line below the important tag. So |
||
|
|
||
| ```bash | ||
| SIGNATURES=AAABBBCCC make execute-rollback | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| include ../../Makefile | ||
| include ../../Multisig.mk | ||
| include ../.env | ||
| include .env | ||
|
|
||
| ifndef LEDGER_ACCOUNT | ||
| override LEDGER_ACCOUNT = 0 | ||
| endif | ||
|
|
||
| ifndef ROLLBACK_NONCE_OFFSET | ||
| override ROLLBACK_NONCE_OFFSET = 1 | ||
| endif | ||
|
|
||
| RPC_URL = $(L1_RPC_URL) | ||
| SCRIPT_NAME = IncreaseEip1559ElasticityAndIncreaseGasLimitScript | ||
|
|
||
| .PHONY: gen-validation | ||
| gen-validation: checkout-signer-tool run-script | ||
|
|
||
| .PHONY: run-script | ||
| run-script: | ||
| mkdir validations; \ | ||
| cd $(SIGNER_TOOL_PATH); \ | ||
| npm ci; \ | ||
| bun run scripts/genValidationFile.ts --rpc-url $(L1_RPC_URL) \ | ||
| --workdir .. --forge-cmd 'forge script --rpc-url $(L1_RPC_URL) \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
| $(SCRIPT_NAME) --sig "sign(address[])" [] --sender $(SENDER)' --out ../validations/base-signer-upgrade.json; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer to just name the file |
||
|
|
||
| .PHONY: execute | ||
| execute: | ||
| FROM_GAS_LIMIT=$(FROM_GAS_LIMIT) \ | ||
| TO_GAS_LIMIT=$(TO_GAS_LIMIT) \ | ||
| FROM_ELASTICITY=$(FROM_ELASTICITY) \ | ||
| TO_ELASTICITY=$(TO_ELASTICITY) \ | ||
| $(call MULTISIG_EXECUTE,$(SIGNATURES)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The env var setting here is unnecessary, no? |
||
|
|
||
| # Manually swap the old and new values for the gas limit and elasticity when passing them in for the rollback | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment old? |
||
|
|
||
| .PHONY: gen-validation-rollback | ||
| gen-validation-rollback: checkout-signer-tool run-script-rollback | ||
|
|
||
| .PHONY: run-script-rollback | ||
| run-script-rollback: | ||
| cd $(SIGNER_TOOL_PATH); \ | ||
| npm ci; \ | ||
| bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ | ||
| --workdir .. --forge-cmd 'FROM_GAS_LIMIT=$(TO_GAS_LIMIT) \ | ||
| TO_GAS_LIMIT=$(FROM_GAS_LIMIT) FROM_ELASTICITY=$(TO_ELASTICITY) TO_ELASTICITY=$(FROM_ELASTICITY) \ | ||
| SAFE_NONCE=$(shell expr $$(cast call $(OWNER_SAFE) "nonce()" --rpc-url $(RPC_URL) | cast to-dec) + $(ROLLBACK_NONCE_OFFSET)) \ | ||
| forge script --rpc-url $(RPC_URL) \ | ||
| $(SCRIPT_NAME) --sig "sign(address[])" [] --sender $(SENDER)' --out ../validations/base-signer-rollback.json; | ||
|
|
||
| .PHONY: execute-rollback | ||
| execute-rollback: | ||
| FROM_GAS_LIMIT=$(TO_GAS_LIMIT) \ | ||
| TO_GAS_LIMIT=$(FROM_GAS_LIMIT) \ | ||
| FROM_ELASTICITY=$(TO_ELASTICITY) \ | ||
| TO_ELASTICITY=$(FROM_ELASTICITY) \ | ||
| SAFE_NONCE=$(shell expr $$(cast call $(OWNER_SAFE) "nonce()" --rpc-url $(RPC_URL) | cast to-dec) + $(ROLLBACK_NONCE_OFFSET)) \ | ||
| forge script --rpc-url $(RPC_URL) $(SCRIPT_NAME) \ | ||
| --sig "run(bytes)" $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Update Gas Limit & Elasticity in L1 `SystemConfig` | ||
|
|
||
| Status: TODO[READY TO SIGN|DONE] | ||
|
|
||
| ## Description | ||
|
|
||
| We are updating the gas limit and elasticity to improve TPS and reduce gas fees. | ||
|
|
||
| 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: | ||
|
|
||
| `IncreaseEip1559ElasticityAndIncreaseGasLimitScript` -- This script will update the gas limit to our new limit of TODO gas and TODO elasticity if invoked as part of the "upgrade" process, or revert to the old limit of TODO gas and TODO elasticity if invoked as part of the "rollback" process. | ||
|
|
||
| The values we are sending are statically defined in the `.env` file. | ||
|
|
||
| > [!IMPORTANT] We have two transactions to sign. Please follow | ||
| > the flow for both "Approving the Update transaction" and | ||
| > "Approving the Rollback transaction". Hopefully we only need | ||
| > the former, but will have the latter available if needed. | ||
|
|
||
| ## Install dependencies | ||
|
|
||
| ### 1. Update foundry | ||
|
|
||
| ```bash | ||
| foundryup | ||
| ``` | ||
|
|
||
| ### 2. Install Node.js if needed | ||
|
|
||
| First, check if you have node installed | ||
|
|
||
| ```bash | ||
| node --version | ||
| ``` | ||
|
|
||
| If you see a version output from the above command, you can move on. Otherwise, install node | ||
|
|
||
| ```bash | ||
| brew install node | ||
| ``` | ||
|
|
||
| ## Approving the Update transaction | ||
|
|
||
| ### 1. Update repo: | ||
|
|
||
| ```bash | ||
| cd contract-deployments | ||
| git pull | ||
| ``` | ||
|
|
||
| ### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root). | ||
|
|
||
| ```bash | ||
| make sign-task | ||
| ``` | ||
|
|
||
| ### 3. Open the UI at [http://localhost:3000](http://localhost:3000) | ||
|
|
||
| Be sure to select the correct task from the list of available tasks to sign (**not** the rollback task). | ||
|
|
||
| ### 4. Send signature to facilitator | ||
|
|
||
| You may now kill the Signer Tool process in your terminal window by running `Ctrl + C`. | ||
|
|
||
| ## Approving the Rollback transaction | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the rollback transaction approval should just be an extension of the previous section. No need to tell the signer to |
||
|
|
||
| Complete the above steps for `Approving the Update transaction` before continuing below. | ||
|
|
||
| ### 1. Update repo: | ||
|
|
||
| ```bash | ||
| cd contract-deployments | ||
| git pull | ||
| ``` | ||
|
|
||
| ### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root). | ||
|
|
||
| ```bash | ||
| make sign-task | ||
| ``` | ||
|
|
||
| ### 3. Open the UI at [http://localhost:3000](http://localhost:3000) | ||
|
|
||
| Be sure to select the correct task from the list of available tasks to sign (ensure it **is** the rollback task). | ||
|
|
||
| ### 4. Send signature to facilitator | ||
|
|
||
| You may now kill the Signer Tool process in your terminal window by running `Ctrl + C`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [profile.default] | ||
| src = 'src' | ||
| out = 'out' | ||
| libs = ['lib'] | ||
| broadcast = 'records' | ||
| fs_permissions = [ {access = "read-write", path = "./"} ] | ||
| optimizer = true | ||
| optimizer_runs = 999999 | ||
| solc_version = "0.8.15" | ||
| via-ir = false | ||
| remappings = [ | ||
| '@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/', | ||
| '@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', | ||
| '@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', | ||
| '@rari-capital/solmate/=lib/solmate/', | ||
| '@base-contracts/=lib/base-contracts', | ||
| '@solady/=lib/solady/src/' | ||
| ] | ||
|
|
||
| # See more config options https://github.com/foundry-rs/foundry/tree/master/config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be fine to have both the mainnet and sepolia values in here so the task creator can just delete the other network that is not needed