Skip to content

Commit eca2f14

Browse files
authored
feat(mainnet): set the Jovian parameters on Base Mainnet (#532)
This task sets the minimum base fee to 200,000 wei (2e-4 gwei) and the DA footprint scalar to 312 on Base Mainnet. 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. This task was adapted from `sepolia/2025-11-18-set-jovian-parameters` (#515), the Sepolia version of this task.
1 parent 6e71378 commit eca2f14

File tree

7 files changed

+304
-0
lines changed

7 files changed

+304
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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=0x73a79Fab69143498Ed3712e519A88a918e1f4072
9+
OWNER_SAFE=0x14536667Cd30e52C0b458BaACcB9faDA7046E056
10+
11+
# Jovian parameters
12+
DA_FOOTPRINT_GAS_SCALAR=312
13+
MIN_BASE_FEE=200000
14+
15+
SENDER=0x1841CB3C2ce6870D0417844C817849da64E6e937
16+
17+
RECORD_STATE_DIFF=true
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#### Execute the transaction
2+
3+
### 1. Update repo:
4+
5+
```bash
6+
cd contract-deployments
7+
git pull
8+
cd mainnet/2025-12-04-set-jovian-parameters
9+
make deps
10+
```
11+
12+
### 2. Execute
13+
14+
1. Collect outputs from all participating signers.
15+
1. Concatenate all signatures and export it as the `SIGNATURES`
16+
environment variable, i.e. `export
17+
SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`.
18+
1. Run the `make execute` command as described below to execute the transaction.
19+
20+
For example, if the quorum is 3 and you get the following outputs:
21+
22+
```shell
23+
Data: 0xDEADBEEF
24+
Signer: 0xC0FFEE01
25+
Signature: AAAA
26+
```
27+
28+
```shell
29+
Data: 0xDEADBEEF
30+
Signer: 0xC0FFEE02
31+
Signature: BBBB
32+
```
33+
34+
```shell
35+
Data: 0xDEADBEEF
36+
Signer: 0xC0FFEE03
37+
Signature: CCCC
38+
```
39+
40+
Execute the transaction:
41+
42+
```bash
43+
SIGNATURES=AAAABBBBCCCC make execute
44+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include ../../Makefile
2+
include ../../Multisig.mk
3+
include ../.env
4+
include .env
5+
6+
ifndef LEDGER_ACCOUNT
7+
override LEDGER_ACCOUNT = 0
8+
endif
9+
10+
SCRIPT_NAME = SetJovianParametersScript
11+
12+
RPC_URL = $(L1_RPC_URL)
13+
14+
.PHONY: gen-validation
15+
gen-validation: checkout-signer-tool run-script
16+
17+
.PHONY: run-script
18+
run-script:
19+
cd $(SIGNER_TOOL_PATH); \
20+
npm ci; \
21+
bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \
22+
--workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \
23+
$(SCRIPT_NAME) --sig "sign(address[])" [] --sender $(SENDER)' --out ../validations/base-signer.json;
24+
25+
.PHONY: execute
26+
execute:
27+
$(call MULTISIG_EXECUTE,$(SIGNATURES))
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Set Jovian Parameters on Base Mainnet
2+
3+
Status: READY TO SIGN
4+
5+
## Description
6+
7+
This task sets the Jovian hardfork parameters on Base Mainnet'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: 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
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+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"cmd": "forge script --rpc-url https://eth-mainnet.public.blastapi.io SetJovianParametersScript --sig sign(address[]) [] --sender 0x1841CB3C2ce6870D0417844C817849da64E6e937",
3+
"ledgerId": 0,
4+
"rpcUrl": "https://eth-mainnet.public.blastapi.io",
5+
"expectedDomainAndMessageHashes": {
6+
"address": "0x14536667Cd30e52C0b458BaACcB9faDA7046E056",
7+
"domainHash": "0xf3474c66ee08325b410c3f442c878d01ec97dd55a415a307e9d7d2ea24336289",
8+
"messageHash": "0xabbc13082dc0c978a0d67092bf4da43670451de5604d69434dc7f7ab594785b5"
9+
},
10+
"stateOverrides": [
11+
{
12+
"name": "Incident Safe - Mainnet",
13+
"address": "0x14536667cd30e52c0b458baaccb9fada7046e056",
14+
"overrides": [
15+
{
16+
"key": "0x0000000000000000000000000000000000000000000000000000000000000004",
17+
"value": "0x0000000000000000000000000000000000000000000000000000000000000001",
18+
"description": "Override the threshold to 1 so the transaction simulation can occur.",
19+
"allowDifference": false
20+
},
21+
{
22+
"key": "0xc3011018e301845703e8f147902e20fa435a206bf02aa8a392467aa139cf4049",
23+
"value": "0x0000000000000000000000000000000000000000000000000000000000000001",
24+
"description": "Simulates an approval from msg.sender in order for the task simulation to succeed.",
25+
"allowDifference": false
26+
}
27+
]
28+
}
29+
],
30+
"stateChanges": [
31+
{
32+
"name": "Incident Safe - Mainnet",
33+
"address": "0x14536667cd30e52c0b458baaccb9fada7046e056",
34+
"changes": [
35+
{
36+
"key": "0x0000000000000000000000000000000000000000000000000000000000000005",
37+
"before": "0x0000000000000000000000000000000000000000000000000000000000000061",
38+
"after": "0x0000000000000000000000000000000000000000000000000000000000000062",
39+
"description": "Increments the nonce",
40+
"allowDifference": false
41+
}
42+
]
43+
},
44+
{
45+
"name": "System Config - Mainnet",
46+
"address": "0x73a79fab69143498ed3712e519a88a918e1f4072",
47+
"changes": [
48+
{
49+
"key": "0x000000000000000000000000000000000000000000000000000000000000006a",
50+
"before": "0x0000000000000000000000000000000000000000000000000000000500000032",
51+
"after": "0x0000000000000000000001380000000000000000000000000000000500000032",
52+
"description": "Sets the DA Footprint Gas Scalar to 312 (0x0138)",
53+
"allowDifference": false
54+
},
55+
{
56+
"key": "0x000000000000000000000000000000000000000000000000000000000000006c",
57+
"before": "0x00000000000000000000000095703e0982140d16f8eba6d158fccede42f04a4c",
58+
"after": "0x000000000000000000030d4095703e0982140d16f8eba6d158fccede42f04a4c",
59+
"description": "Sets the Min Base Fee to 200000 (0x030d40)",
60+
"allowDifference": false
61+
}
62+
]
63+
}
64+
],
65+
"balanceChanges": []
66+
}

0 commit comments

Comments
 (0)