Skip to content

Commit cfcf68f

Browse files
deployment: add mainnet native config override layer
Translate the mainnet config.sequencerConfig overrides (the public common.yaml + services/*.yaml flat dotted keys) into the nested sequencer_config.jsonnet override layer the native config builder consumes, mirroring the existing sepolia-integration and sepolia-alpha layers. Add a regression test asserting the jsonnet layer stays in lockstep with the combined YAML overrides (folded: Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2c6cc65 commit cfcf68f

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// Overrides layer for the `mainnet` environment (hybrid layout).
2+
{
3+
chain_id: 'SN_MAIN',
4+
native_classes_whitelist: '["0x054c5afe61ed27be53b1e4dec5707209a9fcabdb14712fb800fbc60439090115"]',
5+
recorder_url: 'http://starknet-mainnet.cende-recorder-proxy.starknet.io/',
6+
starknet_url: 'https://feeder.alpha-mainnet.starknet.io/',
7+
8+
base_layer_config: {
9+
bpo1_start_block_number: 23973546,
10+
bpo2_start_block_number: 24168146,
11+
fusaka_no_bpo_start_block_number: 23934586,
12+
starknet_contract_address: '0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4',
13+
},
14+
15+
batcher_config: {
16+
dynamic_config: {
17+
n_concurrent_txs: 100,
18+
},
19+
static_config: {
20+
block_builder_config: {
21+
bouncer_config: {
22+
block_max_capacity: {
23+
state_diff_size: 5000,
24+
},
25+
},
26+
execute_config: {
27+
n_workers: 12,
28+
},
29+
},
30+
first_block_with_partial_block_hash: {
31+
block_hash: '0x12889b177c93baa28b5ee3afc80cb6f4836adac086af4bef25ae1ac762e8a62',
32+
block_number: 671813,
33+
parent_block_hash: '0x1e68b0d22b14688dc97afa3006a53cf4e62ebcb02102e80f55e8b48f9a28b97',
34+
},
35+
},
36+
},
37+
38+
committer_config: {
39+
storage_config: {
40+
cache_size: 50000000,
41+
},
42+
},
43+
44+
consensus_manager_config: {
45+
context_config: {
46+
dynamic_config: {
47+
min_l2_gas_price_per_height: '8269292:27400000000,8742344:30100000000',
48+
},
49+
},
50+
staking_manager_config: {
51+
dynamic_config: {
52+
default_committee: '0,10:0x64,1,0x1,true;0x65,1,0x1,true;0x66,1,0x1,true;0x67,1,0x1,true;0x68,1,0x1,true',
53+
},
54+
},
55+
},
56+
57+
gateway_config: {
58+
static_config: {
59+
proof_archive_writer_config: {
60+
bucket_name: 'starkware-starknet-mainnet',
61+
},
62+
},
63+
},
64+
65+
sierra_compiler_config: {
66+
audited_libfuncs_only: true,
67+
},
68+
69+
state_sync_config: {
70+
static_config: {
71+
central_sync_client_config: {
72+
sync_config: {
73+
store_sierras_and_casms_block_threshold: 103129,
74+
},
75+
},
76+
network_config: {
77+
port: 55010,
78+
},
79+
},
80+
},
81+
}

deployments/sequencer/test/test_native_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
COMMON_LAYER_DIR = HYBRID_OVERLAYS_DIR / "common"
2525
INTEGRATION_LAYER_DIR = HYBRID_OVERLAYS_DIR / "sepolia-integration"
2626
SEPOLIA_ALPHA_LAYER_DIR = HYBRID_OVERLAYS_DIR / "sepolia-alpha"
27+
MAINNET_LAYER_DIR = HYBRID_OVERLAYS_DIR / "mainnet"
2728

2829

2930
def test_deep_merge_preserves_explicit_null():
@@ -178,3 +179,8 @@ def test_integration_layer_jsonnet_mirrors_combined_yaml():
178179
def test_sepolia_alpha_layer_jsonnet_mirrors_combined_yaml():
179180
"""REGRESSION: same invariant for the `sepolia-alpha` env layer."""
180181
_assert_layer_jsonnet_mirrors_combined_yaml(SEPOLIA_ALPHA_LAYER_DIR)
182+
183+
184+
def test_mainnet_layer_jsonnet_mirrors_combined_yaml():
185+
"""REGRESSION: same invariant for the `mainnet` env layer."""
186+
_assert_layer_jsonnet_mirrors_combined_yaml(MAINNET_LAYER_DIR)

0 commit comments

Comments
 (0)