-
Notifications
You must be signed in to change notification settings - Fork 318
feat(sepolia): set the Jovian parameters on Base Sepolia #515
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
31d2e43
feat(sepolia): add task to set Jovian parameters on Base Sepolia
niran 8edc500
feat(sepolia): add gen-validation for Jovian parameters task
niran 7166798
feat(sepolia): update DA footprint gas scalar to 325
niran 5d748de
feat(sepolia): set placeholder min base fee to 10,000 wei
niran 49d2b79
feat(sepolia): update DA footprint scalar to 312 for 30 Mgas/sec target
niran 60c8d46
feat(sepolia): update minimum base fee to 2e-4 gwei
niran d4b8e21
Update the task to use the OWNER_SAFE hierarchy and signer-tool proce…
niran b60864d
Generate validations
niran 0af73e7
Get sign-task to work successfully
niran 20ae0ac
Use the latest signer tool commit
niran 47dcabe
Make the script's variables immutable
niran af4fbbd
Use the new --ledger-id option
niran 1e5c072
Regenerate validations
niran b106c0c
Update status to ready to sign
niran 7b77e97
forge fmt
niran ee5717a
Add FACILITATORS.md derived from sepolia/2025-11-07-upgrade-fault-proofs
niran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Base Contracts commit | ||
| BASE_CONTRACTS_COMMIT=51788f920e368e72c63cef24a5e1ea0f6562d9a5 | ||
|
|
||
| # Optimism commit (op-contracts/v5.0.0) | ||
| OP_COMMIT=d09c836f818c73ae139f60b717654c4e53712743 | ||
|
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. Confirmed this is the correct OP commit hash |
||
|
|
||
| # Contract addresses | ||
| SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194 | ||
| OWNER_SAFE=0x0fe884546476dDd290eC46318785046ef68a0BA9 | ||
| CB_SIGNER_SAFE_ADDR=0x646132A1667ca7aD00d36616AFBA1A28116C770A | ||
| CB_NESTED_SAFE_ADDR=0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f | ||
| CB_SC_SAFE_ADDR=0x6AF0674791925f767060Dd52f7fB20984E8639d8 | ||
| OP_SIGNER_SAFE_ADDR=0x6AF0674791925f767060Dd52f7fB20984E8639d8 | ||
|
|
||
| # Jovian parameters | ||
| DA_FOOTPRINT_GAS_SCALAR=312 | ||
| MIN_BASE_FEE=200000 | ||
|
|
||
| RECORD_STATE_DIFF=true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #### Execute the transaction | ||
|
|
||
| 1. Collect outputs from all participating signers. | ||
| 1. Concatenate all signatures and export it as the `SIGNATURES` | ||
| environment variable, i.e. `export | ||
| SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`. | ||
| 1. Run the `make execute` or `make approve` command as described below to execute the transaction. | ||
|
|
||
| For example, if the quorum is 3 and you get the following outputs: | ||
|
|
||
| ```shell | ||
| Data: 0xDEADBEEF | ||
| Signer: 0xC0FFEE01 | ||
| Signature: AAAA | ||
| ``` | ||
|
|
||
| ```shell | ||
| Data: 0xDEADBEEF | ||
| Signer: 0xC0FFEE02 | ||
| Signature: BBBB | ||
| ``` | ||
|
|
||
| ```shell | ||
| Data: 0xDEADBEEF | ||
| Signer: 0xC0FFEE03 | ||
| Signature: CCCC | ||
| ``` | ||
|
|
||
| Coinbase facilitator: | ||
|
|
||
| ```bash | ||
| SIGNATURES=AAAABBBBCCCC make approve-cb | ||
| ``` | ||
|
|
||
| ```bash | ||
| SIGNATURES=AAAABBBBCCCC make approve-cb-sc | ||
| ``` | ||
|
|
||
| ```bash | ||
| SIGNATURES=AAAABBBBCCCC make approve-op | ||
| ``` | ||
|
|
||
| Once the signatures have been submitted approving the transaction for all nested Safes run: | ||
|
|
||
| ```bash | ||
| make execute | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| include ../../Makefile | ||
| include ../../Multisig.mk | ||
|
|
||
| include ../.env | ||
| include .env | ||
|
|
||
| ifndef LEDGER_ACCOUNT | ||
| override LEDGER_ACCOUNT = 1 | ||
| endif | ||
|
|
||
| # Sepolia Commands | ||
|
|
||
| # OWNER_SAFE/ | ||
| # ├── CB_SIGNER_SAFE_ADDR/ | ||
| # │ ├── CB_NESTED_SAFE_ADDR/ | ||
| # │ │ └── Signers | ||
| # │ └── CB_SC_SAFE_ADDR/ | ||
| # │ └── Signers | ||
| # └── OP_SIGNER_SAFE_ADDR/ | ||
| # └── Signers | ||
|
|
||
| RPC_URL = $(L1_RPC_URL) | ||
| SCRIPT_NAME = SetJovianParametersScript | ||
|
|
||
| .PHONY: gen-validation-cb | ||
| gen-validation-cb: checkout-signer-tool run-script-cb | ||
|
|
||
| .PHONY: run-script-cb | ||
| run-script-cb: | ||
| cd $(SIGNER_TOOL_PATH); \ | ||
| npm ci; \ | ||
| bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ | ||
| --ledger-id $(LEDGER_ACCOUNT) \ | ||
| --workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \ | ||
| $(SCRIPT_NAME) --sig "sign(address[])" "[$(CB_NESTED_SAFE_ADDR), $(CB_SIGNER_SAFE_ADDR)]" --sender 0x7f10098bd53519c739ca8a404afe127647d94774' --out ../validations/cb-signer.json; | ||
|
|
||
|
|
||
| .PHONY: gen-validation-cb-sc | ||
| gen-validation-cb-sc: checkout-signer-tool run-script-cb-sc | ||
|
|
||
| .PHONY: run-script-cb-sc | ||
| run-script-cb-sc: | ||
| cd $(SIGNER_TOOL_PATH); \ | ||
| npm ci; \ | ||
| bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ | ||
| --ledger-id $(LEDGER_ACCOUNT) \ | ||
| --workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \ | ||
| $(SCRIPT_NAME) --sig "sign(address[])" "[$(CB_SC_SAFE_ADDR), $(CB_SIGNER_SAFE_ADDR)]" --sender 0x7f10098bd53519c739ca8a404afe127647d94774' --out ../validations/cb-sc-signer.json; | ||
|
|
||
| .PHONY: gen-validation-op | ||
| gen-validation-op: checkout-signer-tool run-script-op | ||
|
|
||
| .PHONY: run-script-op | ||
| run-script-op: | ||
| cd $(SIGNER_TOOL_PATH); \ | ||
| npm ci; \ | ||
| bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ | ||
| --ledger-id $(LEDGER_ACCOUNT) \ | ||
| --workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \ | ||
| $(SCRIPT_NAME) --sig "sign(address[])" "[$(OP_SIGNER_SAFE_ADDR)]" --sender 0x0CF2F86C3338993ce10F74d6f4B095712c7efe26' --out ../validations/op-signer.json; | ||
|
|
||
|
|
||
| # CB | ||
| .PHONY: approve-cb | ||
| approve-cb: | ||
| $(call MULTISIG_APPROVE,$(CB_NESTED_SAFE_ADDR) $(CB_SIGNER_SAFE_ADDR),$(SIGNATURES)) | ||
|
|
||
| .PHONY: approve-cb-sc | ||
| approve-cb-sc: | ||
| $(call MULTISIG_APPROVE,$(CB_SC_SAFE_ADDR) $(CB_SIGNER_SAFE_ADDR),$(SIGNATURES)) | ||
|
|
||
| .PHONY: approve-cb-coordinator | ||
| approve-cb-coordinator: | ||
| $(call MULTISIG_APPROVE,$(CB_SIGNER_SAFE_ADDR),0x) | ||
|
|
||
| .PHONY: approve-op | ||
| approve-op: | ||
| $(call MULTISIG_APPROVE,$(OP_SIGNER_SAFE_ADDR),$(SIGNATURES)) | ||
|
|
||
| # Execute | ||
| .PHONY: execute | ||
| execute: | ||
| $(call MULTISIG_EXECUTE,0x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Set Jovian Parameters on Base Sepolia | ||
|
|
||
| Status: READY TO SIGN | ||
|
|
||
| ## Description | ||
|
|
||
| This task sets the Jovian hardfork parameters on Base Sepolia's SystemConfig contract. The parameters being set are: | ||
|
|
||
| - `setDAFootprintGasScalar(312)` - Sets the data availability footprint gas scalar | ||
| - `setMinBaseFee(200000)` - Sets the minimum base fee | ||
|
|
||
| These parameters activate with the Jovian hardfork and affect data availability fee calculations and base fee management on the L2. | ||
|
|
||
| ## Procedure | ||
|
|
||
| ## 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 user from the list of available users to sign. | ||
| After completion, the signer tool can be closed by using Ctrl + c | ||
|
|
||
| ### 4. Send signature to facilitator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [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/', | ||
| ] | ||
| evm_version = "prague" | ||
|
|
||
| # See more config options https://github.com/foundry-rs/foundry/tree/master/config |
72 changes: 72 additions & 0 deletions
72
sepolia/2025-11-18-set-jovian-parameters/script/SetJovianParameters.s.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.8.15; | ||
|
|
||
| import {Vm} from "forge-std/Vm.sol"; | ||
| import {console} from "forge-std/console.sol"; | ||
| import {Simulation} from "@base-contracts/script/universal/Simulation.sol"; | ||
| import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol"; | ||
|
|
||
| import {MultisigScript} from "@base-contracts/script/universal/MultisigScript.sol"; | ||
|
|
||
| interface ISystemConfig { | ||
| function daFootprintGasScalar() external view returns (uint16); | ||
| function minBaseFee() external view returns (uint64); | ||
| function setDAFootprintGasScalar(uint16 _daFootprintGasScalar) external; | ||
| function setMinBaseFee(uint64 _minBaseFee) external; | ||
| } | ||
|
|
||
| contract SetJovianParametersScript is MultisigScript { | ||
| address internal immutable OWNER_SAFE; | ||
| address internal immutable SYSTEM_CONFIG; | ||
|
|
||
| uint16 internal immutable DA_FOOTPRINT_GAS_SCALAR; | ||
| uint64 internal immutable MIN_BASE_FEE; | ||
|
|
||
| constructor() { | ||
| OWNER_SAFE = vm.envAddress("OWNER_SAFE"); | ||
| SYSTEM_CONFIG = vm.envAddress("SYSTEM_CONFIG"); | ||
| DA_FOOTPRINT_GAS_SCALAR = uint16(vm.envUint("DA_FOOTPRINT_GAS_SCALAR")); | ||
| MIN_BASE_FEE = uint64(vm.envUint("MIN_BASE_FEE")); | ||
| } | ||
|
|
||
| function setUp() external view { | ||
| // Log current values for reference | ||
| console.log("Current DA Footprint Gas Scalar:", ISystemConfig(SYSTEM_CONFIG).daFootprintGasScalar()); | ||
| console.log("Current Min Base Fee:", ISystemConfig(SYSTEM_CONFIG).minBaseFee()); | ||
| console.log("New DA Footprint Gas Scalar:", DA_FOOTPRINT_GAS_SCALAR); | ||
| console.log("New Min Base Fee:", MIN_BASE_FEE); | ||
| } | ||
|
|
||
| function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override { | ||
| vm.assertEq( | ||
| ISystemConfig(SYSTEM_CONFIG).daFootprintGasScalar(), | ||
| DA_FOOTPRINT_GAS_SCALAR, | ||
| "DA Footprint Gas Scalar mismatch" | ||
| ); | ||
| vm.assertEq(ISystemConfig(SYSTEM_CONFIG).minBaseFee(), MIN_BASE_FEE, "Min Base Fee mismatch"); | ||
| } | ||
|
|
||
| function _buildCalls() internal view override returns (IMulticall3.Call3Value[] memory) { | ||
| IMulticall3.Call3Value[] memory calls = new IMulticall3.Call3Value[](2); | ||
|
|
||
| calls[0] = IMulticall3.Call3Value({ | ||
| target: SYSTEM_CONFIG, | ||
| allowFailure: false, | ||
| callData: abi.encodeCall(ISystemConfig.setDAFootprintGasScalar, (DA_FOOTPRINT_GAS_SCALAR)), | ||
| value: 0 | ||
| }); | ||
|
|
||
| calls[1] = IMulticall3.Call3Value({ | ||
| target: SYSTEM_CONFIG, | ||
| allowFailure: false, | ||
| callData: abi.encodeCall(ISystemConfig.setMinBaseFee, (MIN_BASE_FEE)), | ||
| value: 0 | ||
| }); | ||
|
|
||
| return calls; | ||
| } | ||
|
|
||
| function _ownerSafe() internal view override returns (address) { | ||
| return OWNER_SAFE; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Confirmed this is the latest Base contracts commit hash