From c3d3ff350a16c3d6e02a0acf24736920b78db694 Mon Sep 17 00:00:00 2001 From: Nimrod Weiss Date: Thu, 25 Jun 2026 11:02:32 +0300 Subject: [PATCH] deployment: add testing-overlays native config override (node-0, all-constructs) --- .../all-constructs/chain_params.jsonnet | 33 +++++++++++++++ .../testing/all-constructs/node.jsonnet | 7 ++++ .../testing/node-0/chain_params.jsonnet | 40 +++++++++++++++++++ .../hybrid/testing/node-0/node.jsonnet | 7 ++++ .../sequencer/test/test_env_overlay_parity.py | 18 +++++++-- 5 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/chain_params.jsonnet create mode 100644 deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/node.jsonnet create mode 100644 deployments/sequencer/configs/overlays/hybrid/testing/node-0/chain_params.jsonnet create mode 100644 deployments/sequencer/configs/overlays/hybrid/testing/node-0/node.jsonnet diff --git a/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/chain_params.jsonnet b/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/chain_params.jsonnet new file mode 100644 index 00000000000..c2dbf2b9aa8 --- /dev/null +++ b/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/chain_params.jsonnet @@ -0,0 +1,33 @@ +// chain_params for the `testing/all-constructs` overlay (hybrid layout): clearly-dummy per-chain +// values plus dummy overrides of the applicative-config defaults, the minimum for native synth to +// succeed. NONE of these are deployed anywhere; the synth this overlay feeds is only `kubectl +// validate`d for manifest structure, never for config content. +{ + mandatory: { + chain_id: 'SN_DUMMY', + starknet_url: 'http://dummy-starknet/', + recorder_url: 'http://dummy-recorder/', + starknet_contract_address: '0x0', + base_layer: { + bpo1_start_block_number: 0, + bpo2_start_block_number: 0, + fusaka_no_bpo_start_block_number: 0, + }, + staking_default_committee: '0,10:0x64,1,0x1,true', + proof_archive_bucket_name: '', + nodes_at_same_cluster: true, + topology: import 'lib/layouts/hybrid.libsonnet', + }, + consensus_bootstrap_peer_multiaddr: null, + mempool_bootstrap_peer_multiaddr: null, + + // Overrides of the applicative-config defaults; each falls back to `default_replacers` when absent. + // Dummy values; nothing here is deployed. + native_classes_whitelist: 'All', + n_concurrent_txs: 1, + n_execution_workers: 1, + committer_cache_size: 1000000, + audited_libfuncs_only: false, + central_sync_client_config: null, + p2p_sync_client_config: {}, +} diff --git a/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/node.jsonnet b/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/node.jsonnet new file mode 100644 index 00000000000..5b0889438e2 --- /dev/null +++ b/deployments/sequencer/configs/overlays/hybrid/testing/all-constructs/node.jsonnet @@ -0,0 +1,7 @@ +// Full per-service SequencerNodeConfig for the `testing/all-constructs` overlay (self-contained testing overlay). +// Evaluate: jsonnet -J /crates/apollo_deployments/jsonnet node.jsonnet +local build = import 'lib/build.libsonnet'; +build.build({ + chain_params: import './chain_params.jsonnet', + node_params: { validator_id: '0x64', node_index: 0 }, +}) diff --git a/deployments/sequencer/configs/overlays/hybrid/testing/node-0/chain_params.jsonnet b/deployments/sequencer/configs/overlays/hybrid/testing/node-0/chain_params.jsonnet new file mode 100644 index 00000000000..4bad1781782 --- /dev/null +++ b/deployments/sequencer/configs/overlays/hybrid/testing/node-0/chain_params.jsonnet @@ -0,0 +1,40 @@ +// chain_params for the `testing/node-0` overlay (hybrid layout): the mandatory per-chain values plus +// this overlay's overrides of the applicative-config defaults (the latter fall back to +// `default_replacers`). Read directly by the applicative config. Functional overlay deployed by +// `hybrid_system_test.yaml`. +{ + mandatory: { + chain_id: 'CHAIN_ID_SUBDIR', + starknet_url: 'https://integration-sepolia.starknet.io/', + recorder_url: 'http://dummy-recorder-service.dummy-recorder.svc.cluster.local:8080', + starknet_contract_address: '0x5FbDB2315678afecb367f032d93F642f64180aa3', + base_layer: { + bpo1_start_block_number: 13205504, + bpo2_start_block_number: 13410304, + fusaka_no_bpo_start_block_number: 13164544, + }, + staking_default_committee: '0,100:0x64,1,0x1,true', + proof_archive_bucket_name: '', + nodes_at_same_cluster: true, + topology: import 'lib/layouts/hybrid.libsonnet', + }, + consensus_bootstrap_peer_multiaddr: null, + mempool_bootstrap_peer_multiaddr: null, + + // Overrides of the applicative-config defaults; each falls back to `default_replacers` when absent. + native_classes_whitelist: 'All', + eth_fee_token_address: '0x1001', + strk_fee_token_address: '0x1002', + proposer_idle_detection_delay_millis: 2000, + n_execution_workers: 28, + committer_cache_size: 1000000, + proposal_timeout_max: 15.0, + min_gas_price: 3000000000, + audited_libfuncs_only: false, + compare_retrospective_block_hash: false, + central_sync_client_config: null, + p2p_sync_client_config: {}, + state_sync_network_config: { + port: 55010, + }, +} diff --git a/deployments/sequencer/configs/overlays/hybrid/testing/node-0/node.jsonnet b/deployments/sequencer/configs/overlays/hybrid/testing/node-0/node.jsonnet new file mode 100644 index 00000000000..df982173e43 --- /dev/null +++ b/deployments/sequencer/configs/overlays/hybrid/testing/node-0/node.jsonnet @@ -0,0 +1,7 @@ +// Full per-service SequencerNodeConfig for the `testing/node-0` overlay (self-contained testing overlay). +// Evaluate: jsonnet -J /crates/apollo_deployments/jsonnet node.jsonnet +local build = import 'lib/build.libsonnet'; +build.build({ + chain_params: import './chain_params.jsonnet', + node_params: { validator_id: '0x64', node_index: 0 }, +}) diff --git a/deployments/sequencer/test/test_env_overlay_parity.py b/deployments/sequencer/test/test_env_overlay_parity.py index 9e9ee78cd1d..6bf1f0f8667 100644 --- a/deployments/sequencer/test/test_env_overlay_parity.py +++ b/deployments/sequencer/test/test_env_overlay_parity.py @@ -1,10 +1,12 @@ -"""Parity test: each env overlay's bucketed native config matches its YAML `config.sequencerConfig`. +"""Parity test: each overlay's bucketed native config matches its YAML `config.sequencerConfig`. Asserts every key set by the layer's bucketed jsonnet (chain_params, flattened) exists in -the layer's folded YAML sequencerConfig with an equal value. +the layer's folded YAML sequencerConfig with an equal value. Covers the sepolia/mainnet env overlays +and the `testing/*` overlays (node-0, all-constructs). -Skips when the YAML `config.sequencerConfig` has been removed downstack (at `drop-yaml-sequencer-config`), -so the test self-disables past that point instead of failing on a missing comparison source. +Skips when the YAML `config.sequencerConfig` is absent (either removed downstack at +`drop-yaml-sequencer-config`, or a structure-only stub like `all-constructs` whose sole entry is a +folded-away `components.*` marker), so the test self-disables instead of failing on a missing source. """ import json @@ -178,3 +180,11 @@ def test_sepolia_alpha_native_matches_yaml(): def test_mainnet_native_matches_yaml(): assert_env_overlay_matches_yaml(HYBRID_OVERLAYS_DIR / "mainnet") + + +def test_node_0_native_matches_yaml(): + assert_env_overlay_matches_yaml(HYBRID_OVERLAYS_DIR / "testing" / "node-0") + + +def test_all_constructs_native_matches_yaml(): + assert_env_overlay_matches_yaml(HYBRID_OVERLAYS_DIR / "testing" / "all-constructs")