Skip to content

Commit c3fbe19

Browse files
authored
feat(sepolia): set the Jovian parameters on Base Sepolia (#515)
This task sets the minimum base fee to 200,000 wei (2e-4 gwei) and the DA footprint scalar to 312. These are the values we intend to use on Base Mainnet as well. 200,000 wei was chosen based on the p5 base fee observed on Base Mainnet from November 7 to 14 and rounded down slightly to get a nice number. The DA footprint was calculated from `da_footprint_gas_scalar = block_gas_target_throughput / (blob_target * 128,000 bytes / 12 seconds * estimation_ratio)` where `block_gas_target_throughput = 30,000,000 gas/sec`, `blob_target = 6`, and `estimation_ratio = 1.5`. `30,000,000 / (6 * 128,000 / 12 * 1.5) = 312.5`, which was rounded down to the nearest integer. The task uses the `OWNER_SAFE` hierarchy from the `sepolia/2025-11-07-upgrade-fault-proofs` task. This differs from SystemConfig parameter changes on Base Mainnet, which do not use the nested safes.
1 parent 8c49b9d commit c3fbe19

File tree

10 files changed

+638
-1
lines changed

10 files changed

+638
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ checkout-base-contracts-commit:
119119
##
120120
# Task Signer Tool
121121
##
122-
SIGNER_TOOL_COMMIT=dbe7f9e358bf99e367441e95d8f6ce28716c4cc9
122+
SIGNER_TOOL_COMMIT=abbfa09210582eca32ad4873d862994a5957fbc2
123123
SIGNER_TOOL_PATH=signer-tool
124124

125125
.PHONY: checkout-signer-tool
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Base Contracts commit
2+
BASE_CONTRACTS_COMMIT=51788f920e368e72c63cef24a5e1ea0f6562d9a5
3+
4+
# Optimism commit (op-contracts/v5.0.0)
5+
OP_COMMIT=d09c836f818c73ae139f60b717654c4e53712743
6+
7+
# Contract addresses
8+
SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194
9+
OWNER_SAFE=0x0fe884546476dDd290eC46318785046ef68a0BA9
10+
CB_SIGNER_SAFE_ADDR=0x646132A1667ca7aD00d36616AFBA1A28116C770A
11+
CB_NESTED_SAFE_ADDR=0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f
12+
CB_SC_SAFE_ADDR=0x6AF0674791925f767060Dd52f7fB20984E8639d8
13+
OP_SIGNER_SAFE_ADDR=0x6AF0674791925f767060Dd52f7fB20984E8639d8
14+
15+
# Jovian parameters
16+
DA_FOOTPRINT_GAS_SCALAR=312
17+
MIN_BASE_FEE=200000
18+
19+
RECORD_STATE_DIFF=true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#### Execute the transaction
2+
3+
1. Collect outputs from all participating signers.
4+
1. Concatenate all signatures and export it as the `SIGNATURES`
5+
environment variable, i.e. `export
6+
SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`.
7+
1. Run the `make execute` or `make approve` command as described below to execute the transaction.
8+
9+
For example, if the quorum is 3 and you get the following outputs:
10+
11+
```shell
12+
Data: 0xDEADBEEF
13+
Signer: 0xC0FFEE01
14+
Signature: AAAA
15+
```
16+
17+
```shell
18+
Data: 0xDEADBEEF
19+
Signer: 0xC0FFEE02
20+
Signature: BBBB
21+
```
22+
23+
```shell
24+
Data: 0xDEADBEEF
25+
Signer: 0xC0FFEE03
26+
Signature: CCCC
27+
```
28+
29+
Coinbase facilitator:
30+
31+
```bash
32+
SIGNATURES=AAAABBBBCCCC make approve-cb
33+
```
34+
35+
```bash
36+
SIGNATURES=AAAABBBBCCCC make approve-cb-sc
37+
```
38+
39+
```bash
40+
SIGNATURES=AAAABBBBCCCC make approve-op
41+
```
42+
43+
Once the signatures have been submitted approving the transaction for all nested Safes run:
44+
45+
```bash
46+
make execute
47+
```
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
include ../../Makefile
2+
include ../../Multisig.mk
3+
4+
include ../.env
5+
include .env
6+
7+
ifndef LEDGER_ACCOUNT
8+
override LEDGER_ACCOUNT = 1
9+
endif
10+
11+
# Sepolia Commands
12+
13+
# OWNER_SAFE/
14+
# ├── CB_SIGNER_SAFE_ADDR/
15+
# │ ├── CB_NESTED_SAFE_ADDR/
16+
# │ │ └── Signers
17+
# │ └── CB_SC_SAFE_ADDR/
18+
# │ └── Signers
19+
# └── OP_SIGNER_SAFE_ADDR/
20+
# └── Signers
21+
22+
RPC_URL = $(L1_RPC_URL)
23+
SCRIPT_NAME = SetJovianParametersScript
24+
25+
.PHONY: gen-validation-cb
26+
gen-validation-cb: checkout-signer-tool run-script-cb
27+
28+
.PHONY: run-script-cb
29+
run-script-cb:
30+
cd $(SIGNER_TOOL_PATH); \
31+
npm ci; \
32+
bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \
33+
--ledger-id $(LEDGER_ACCOUNT) \
34+
--workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \
35+
$(SCRIPT_NAME) --sig "sign(address[])" "[$(CB_NESTED_SAFE_ADDR), $(CB_SIGNER_SAFE_ADDR)]" --sender 0x7f10098bd53519c739ca8a404afe127647d94774' --out ../validations/cb-signer.json;
36+
37+
38+
.PHONY: gen-validation-cb-sc
39+
gen-validation-cb-sc: checkout-signer-tool run-script-cb-sc
40+
41+
.PHONY: run-script-cb-sc
42+
run-script-cb-sc:
43+
cd $(SIGNER_TOOL_PATH); \
44+
npm ci; \
45+
bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \
46+
--ledger-id $(LEDGER_ACCOUNT) \
47+
--workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \
48+
$(SCRIPT_NAME) --sig "sign(address[])" "[$(CB_SC_SAFE_ADDR), $(CB_SIGNER_SAFE_ADDR)]" --sender 0x7f10098bd53519c739ca8a404afe127647d94774' --out ../validations/cb-sc-signer.json;
49+
50+
.PHONY: gen-validation-op
51+
gen-validation-op: checkout-signer-tool run-script-op
52+
53+
.PHONY: run-script-op
54+
run-script-op:
55+
cd $(SIGNER_TOOL_PATH); \
56+
npm ci; \
57+
bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \
58+
--ledger-id $(LEDGER_ACCOUNT) \
59+
--workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \
60+
$(SCRIPT_NAME) --sig "sign(address[])" "[$(OP_SIGNER_SAFE_ADDR)]" --sender 0x0CF2F86C3338993ce10F74d6f4B095712c7efe26' --out ../validations/op-signer.json;
61+
62+
63+
# CB
64+
.PHONY: approve-cb
65+
approve-cb:
66+
$(call MULTISIG_APPROVE,$(CB_NESTED_SAFE_ADDR) $(CB_SIGNER_SAFE_ADDR),$(SIGNATURES))
67+
68+
.PHONY: approve-cb-sc
69+
approve-cb-sc:
70+
$(call MULTISIG_APPROVE,$(CB_SC_SAFE_ADDR) $(CB_SIGNER_SAFE_ADDR),$(SIGNATURES))
71+
72+
.PHONY: approve-cb-coordinator
73+
approve-cb-coordinator:
74+
$(call MULTISIG_APPROVE,$(CB_SIGNER_SAFE_ADDR),0x)
75+
76+
.PHONY: approve-op
77+
approve-op:
78+
$(call MULTISIG_APPROVE,$(OP_SIGNER_SAFE_ADDR),$(SIGNATURES))
79+
80+
# Execute
81+
.PHONY: execute
82+
execute:
83+
$(call MULTISIG_EXECUTE,0x)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Set Jovian Parameters on Base Sepolia
2+
3+
Status: READY TO SIGN
4+
5+
## Description
6+
7+
This task sets the Jovian hardfork parameters on Base Sepolia's SystemConfig contract. The parameters being set are:
8+
9+
- `setDAFootprintGasScalar(312)` - Sets the data availability footprint gas scalar
10+
- `setMinBaseFee(200000)` - Sets the minimum base fee
11+
12+
These parameters activate with the Jovian hardfork and affect data availability fee calculations and base fee management on the L2.
13+
14+
## Procedure
15+
16+
## Install dependencies
17+
18+
### 1. Update foundry
19+
20+
```bash
21+
foundryup
22+
```
23+
24+
### 2. Install Node.js if needed
25+
26+
First, check if you have node installed
27+
28+
```bash
29+
node --version
30+
```
31+
32+
If you see a version output from the above command, you can move on. Otherwise, install node
33+
34+
```bash
35+
brew install node
36+
```
37+
38+
## Approving the Update transaction
39+
40+
### 1. Update repo:
41+
42+
```bash
43+
cd contract-deployments
44+
git pull
45+
```
46+
47+
### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root).
48+
49+
```bash
50+
make sign-task
51+
```
52+
53+
### 3. Open the UI at [http://localhost:3000](http://localhost:3000)
54+
55+
Be sure to select the correct task user from the list of available users to sign.
56+
After completion, the signer tool can be closed by using Ctrl + c
57+
58+
### 4. Send signature to facilitator
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
evm_version = "prague"
20+
21+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.15;
3+
4+
import {Vm} from "forge-std/Vm.sol";
5+
import {console} from "forge-std/console.sol";
6+
import {Simulation} from "@base-contracts/script/universal/Simulation.sol";
7+
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";
8+
9+
import {MultisigScript} from "@base-contracts/script/universal/MultisigScript.sol";
10+
11+
interface ISystemConfig {
12+
function daFootprintGasScalar() external view returns (uint16);
13+
function minBaseFee() external view returns (uint64);
14+
function setDAFootprintGasScalar(uint16 _daFootprintGasScalar) external;
15+
function setMinBaseFee(uint64 _minBaseFee) external;
16+
}
17+
18+
contract SetJovianParametersScript is MultisigScript {
19+
address internal immutable OWNER_SAFE;
20+
address internal immutable SYSTEM_CONFIG;
21+
22+
uint16 internal immutable DA_FOOTPRINT_GAS_SCALAR;
23+
uint64 internal immutable MIN_BASE_FEE;
24+
25+
constructor() {
26+
OWNER_SAFE = vm.envAddress("OWNER_SAFE");
27+
SYSTEM_CONFIG = vm.envAddress("SYSTEM_CONFIG");
28+
DA_FOOTPRINT_GAS_SCALAR = uint16(vm.envUint("DA_FOOTPRINT_GAS_SCALAR"));
29+
MIN_BASE_FEE = uint64(vm.envUint("MIN_BASE_FEE"));
30+
}
31+
32+
function setUp() external view {
33+
// Log current values for reference
34+
console.log("Current DA Footprint Gas Scalar:", ISystemConfig(SYSTEM_CONFIG).daFootprintGasScalar());
35+
console.log("Current Min Base Fee:", ISystemConfig(SYSTEM_CONFIG).minBaseFee());
36+
console.log("New DA Footprint Gas Scalar:", DA_FOOTPRINT_GAS_SCALAR);
37+
console.log("New Min Base Fee:", MIN_BASE_FEE);
38+
}
39+
40+
function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override {
41+
vm.assertEq(
42+
ISystemConfig(SYSTEM_CONFIG).daFootprintGasScalar(),
43+
DA_FOOTPRINT_GAS_SCALAR,
44+
"DA Footprint Gas Scalar mismatch"
45+
);
46+
vm.assertEq(ISystemConfig(SYSTEM_CONFIG).minBaseFee(), MIN_BASE_FEE, "Min Base Fee mismatch");
47+
}
48+
49+
function _buildCalls() internal view override returns (IMulticall3.Call3Value[] memory) {
50+
IMulticall3.Call3Value[] memory calls = new IMulticall3.Call3Value[](2);
51+
52+
calls[0] = IMulticall3.Call3Value({
53+
target: SYSTEM_CONFIG,
54+
allowFailure: false,
55+
callData: abi.encodeCall(ISystemConfig.setDAFootprintGasScalar, (DA_FOOTPRINT_GAS_SCALAR)),
56+
value: 0
57+
});
58+
59+
calls[1] = IMulticall3.Call3Value({
60+
target: SYSTEM_CONFIG,
61+
allowFailure: false,
62+
callData: abi.encodeCall(ISystemConfig.setMinBaseFee, (MIN_BASE_FEE)),
63+
value: 0
64+
});
65+
66+
return calls;
67+
}
68+
69+
function _ownerSafe() internal view override returns (address) {
70+
return OWNER_SAFE;
71+
}
72+
}

0 commit comments

Comments
 (0)