Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function(overrides)
},
storage_reader_server_static_config: {
ip: '0.0.0.0',
port: 8091,
port: 55011,
},
validation_only: std.get(overrides, 'validation_only', constants.DEFAULT_VALIDATION_ONLY),
},
Expand Down Expand Up @@ -232,7 +232,7 @@ function(overrides)
persistent_root: '/data/class_manager/classes',
storage_reader_server_static_config: {
ip: '0.0.0.0',
port: 8091,
port: 55210,
},
},
},
Expand Down Expand Up @@ -633,7 +633,7 @@ function(overrides)
},
storage_reader_server_static_config: {
ip: '0.0.0.0',
port: 8091,
port: 55014,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
"batcher_config.static_config.storage.mmap_file_config.max_size": 1099511627776,
"batcher_config.static_config.storage.scope": "StateOnly",
"batcher_config.static_config.storage_reader_server_static_config.ip": "0.0.0.0",
"batcher_config.static_config.storage_reader_server_static_config.port": 8091
"batcher_config.static_config.storage_reader_server_static_config.port": 55011
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"class_manager_config.static_config.class_storage_config.class_hash_storage_config.scope": "StateOnly",
"class_manager_config.static_config.class_storage_config.persistent_root": "/data/class_manager/classes",
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.ip": "0.0.0.0",
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port": 8091,
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port": 55210,
"class_manager_config.dynamic_config.storage_reader_server_dynamic_config.enable": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
"batcher_config.static_config.storage.mmap_file_config.max_size": 1099511627776,
"batcher_config.static_config.storage.scope": "StateOnly",
"batcher_config.static_config.storage_reader_server_static_config.ip": "0.0.0.0",
"batcher_config.static_config.storage_reader_server_static_config.port": "$$$_BATCHER_CONFIG-STATIC_CONFIG-STORAGE_READER_SERVER_STATIC_CONFIG-PORT_$$$"
"batcher_config.static_config.storage_reader_server_static_config.port": 55011
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"class_manager_config.static_config.class_storage_config.class_hash_storage_config.scope": "StateOnly",
"class_manager_config.static_config.class_storage_config.persistent_root": "/data/class_manager/classes",
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.ip": "0.0.0.0",
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port": "$$$_CLASS_MANAGER_CONFIG-STATIC_CONFIG-CLASS_STORAGE_CONFIG-STORAGE_READER_SERVER_STATIC_CONFIG-PORT_$$$"
"class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port": 55210
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
"state_sync_config.static_config.storage_config.mmap_file_config.max_size": 1099511627776,
"state_sync_config.static_config.storage_config.scope": "FullArchive",
"state_sync_config.static_config.storage_reader_server_static_config.ip": "0.0.0.0",
"state_sync_config.static_config.storage_reader_server_static_config.port": "$$$_STATE_SYNC_CONFIG-STATIC_CONFIG-STORAGE_READER_SERVER_STATIC_CONFIG-PORT_$$$"
"state_sync_config.static_config.storage_reader_server_static_config.port": 55014
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
"state_sync_config.static_config.storage_config.scope": "FullArchive",
"state_sync_config.dynamic_config.storage_reader_server_dynamic_config.enable": false,
"state_sync_config.static_config.storage_reader_server_static_config.ip": "0.0.0.0",
"state_sync_config.static_config.storage_reader_server_static_config.port": 8091
"state_sync_config.static_config.storage_reader_server_static_config.port": 55014
}
14 changes: 12 additions & 2 deletions crates/apollo_deployments/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pub static KEYS_TO_BE_REPLACED: phf::Set<&'static str> = phf_set! {
"state_sync_config.static_config.central_sync_client_config.#is_none",
"state_sync_config.static_config.central_sync_client_config.sync_config.store_sierras_and_casms_block_threshold",
"state_sync_config.static_config.network_config.#is_none",
"state_sync_config.static_config.network_config.port",
"state_sync_config.static_config.p2p_sync_client_config.#is_none",
"state_sync_config.static_config.rpc_config.port",
"strk_fee_token_address",
Expand Down Expand Up @@ -361,12 +362,21 @@ fn replace_pred(key: &str, value: &Value) -> bool {
return true;
}

// Only `components.*` infra fields are auto-templatized: the layout assigns each component's
// remote URL and port per deployment. Ports/URLs OUTSIDE `components.*` are NOT
// auto-templatized — an overridable one must be listed explicitly in `KEYS_TO_BE_REPLACED`;
// the rest (e.g. the fixed storage-reader-server ports) keep their literal app_config
// value.
if !key.starts_with("components.") {
return false;
}

let invalid_port: u64 = DEFAULT_INVALID_PORT.into();

// Condition 1: ports set by the infra: ".port" suffix and a non-zero integer value
// Component port: ".port" suffix with a non-invalid integer value.
let port_cond = key.ends_with(".port") && value.as_u64().is_some_and(|n| n != invalid_port);

// Condition 2: service urls: ".url" suffix and a non-localhost string value
// Component service URL: ".url" suffix with a non-localhost string value.
let url_cond = key.ends_with(".url") && value.as_str().is_some_and(|s| s != DEFAULT_URL);

port_cond || url_cond
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ config:
batcher_config.dynamic_config.proposer_idle_detection_delay_millis: 2000
batcher_config.static_config.block_builder_config.bouncer_config.block_max_capacity.n_events: 5000
batcher_config.static_config.block_builder_config.bouncer_config.block_max_capacity.receipt_l2_gas: 5800000000
batcher_config.static_config.storage_reader_server_static_config.port: 55011
class_manager_config.static_config.class_manager_config.max_compiled_contract_class_object_size: 4089446
class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port: 55210
consensus_manager_config.consensus_manager_config.dynamic_config.require_virtual_proposer_vote: false
consensus_manager_config.consensus_manager_config.dynamic_config.timeouts.proposal.base: 9.1
consensus_manager_config.consensus_manager_config.dynamic_config.timeouts.proposal.max: 9.1
Expand Down Expand Up @@ -46,7 +44,6 @@ config:
components.state_sync.url: sequencer-core-service
state_sync_config.static_config.p2p_sync_client_config.#is_none: true
state_sync_config.static_config.rpc_config.port: 8090
state_sync_config.static_config.storage_reader_server_static_config.port: 55014
service:
ports:
- name: batcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ config:
batcher_config.static_config.first_block_with_partial_block_hash.block_number: 0
batcher_config.static_config.first_block_with_partial_block_hash.block_hash: "0x0"
batcher_config.static_config.first_block_with_partial_block_hash.parent_block_hash: "0x0"
batcher_config.static_config.storage_reader_server_static_config.port: 55011
class_manager_config.static_config.class_manager_config.max_compiled_contract_class_object_size: 4089446
class_manager_config.static_config.class_storage_config.storage_reader_server_static_config.port: 55210
components.batcher.port: 55000
components.batcher.url: sequencer-core-service
components.class_manager.port: 55001
Expand Down Expand Up @@ -70,7 +68,6 @@ config:
state_sync_config.static_config.network_config.port: 55010
state_sync_config.static_config.p2p_sync_client_config.#is_none: false
state_sync_config.static_config.rpc_config.port: 8090
state_sync_config.static_config.storage_reader_server_static_config.port: 55014

service:
enabled: true
Expand Down
Loading