diff --git a/config/sequencer/default_config.json b/config/sequencer/default_config.json index 244f41b129..4f852f0bfe 100644 --- a/config/sequencer/default_config.json +++ b/config/sequencer/default_config.json @@ -939,6 +939,11 @@ "privacy": "Public", "value": 8082 }, + "node_url": { + "description": "A required param! Ethereum node url.", + "param_type": "String", + "privacy": "TemporaryValue" + }, "rpc_state_reader_config.json_rpc_version": { "description": "The json rpc version.", "privacy": "Public", @@ -956,7 +961,7 @@ }, "state_sync_config.base_layer_config.node_url": { "description": "A required param! Ethereum node URL. A schema to match to Infura node: https://mainnet.infura.io/v3/, but any other node can be used.", - "param_type": "String", + "pointer_target": "node_url", "privacy": "Private" }, "state_sync_config.base_layer_config.starknet_contract_address": { diff --git a/crates/starknet_integration_tests/src/config_utils.rs b/crates/starknet_integration_tests/src/config_utils.rs index 40f3f90434..08469929bb 100644 --- a/crates/starknet_integration_tests/src/config_utils.rs +++ b/crates/starknet_integration_tests/src/config_utils.rs @@ -47,6 +47,7 @@ pub(crate) fn dump_config_file_changes( required_params.eth_fee_token_address, required_params.strk_fee_token_address, required_params.sequencer_address, + required_params.node_url, config.rpc_state_reader_config.json_rpc_version, config.rpc_state_reader_config.url, config.batcher_config.storage.db_config.path_prefix, diff --git a/crates/starknet_integration_tests/src/utils.rs b/crates/starknet_integration_tests/src/utils.rs index f8cf3f1e06..598e1410e3 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -64,6 +64,7 @@ pub async fn create_config( eth_fee_token_address: fee_token_addresses.eth_fee_token_address, strk_fee_token_address: fee_token_addresses.strk_fee_token_address, sequencer_address: ContractAddress::from(1312_u128), // Arbitrary non-zero value. + node_url: "http://localhost:12345/".to_string(), }, consensus_proposals_channels, ) diff --git a/crates/starknet_sequencer_node/src/config/node_config.rs b/crates/starknet_sequencer_node/src/config/node_config.rs index d33b891b88..29795eda2c 100644 --- a/crates/starknet_sequencer_node/src/config/node_config.rs +++ b/crates/starknet_sequencer_node/src/config/node_config.rs @@ -86,6 +86,15 @@ pub static CONFIG_POINTERS: LazyLock = LazyLock::new(|| { ), set_pointing_param_paths(&["batcher_config.block_builder_config.sequencer_address"]), ), + // TODO(tsabary): set as a regular required parameter. + ( + ser_pointer_target_required_param( + "node_url", + SerializationType::String, + "Ethereum node url.", + ), + set_pointing_param_paths(&["state_sync_config.base_layer_config.node_url"]), + ), ]; let mut common_execution_config = generate_struct_pointer( "versioned_constants_overrides".to_owned(), diff --git a/crates/starknet_sequencer_node/src/config/test_utils.rs b/crates/starknet_sequencer_node/src/config/test_utils.rs index 9434886f09..bcdd643aa9 100644 --- a/crates/starknet_sequencer_node/src/config/test_utils.rs +++ b/crates/starknet_sequencer_node/src/config/test_utils.rs @@ -12,6 +12,7 @@ pub struct RequiredParams { pub eth_fee_token_address: ContractAddress, pub strk_fee_token_address: ContractAddress, pub sequencer_address: ContractAddress, + pub node_url: String, } impl RequiredParams { @@ -21,6 +22,7 @@ impl RequiredParams { eth_fee_token_address: ContractAddress::from(2_u128), strk_fee_token_address: ContractAddress::from(3_u128), sequencer_address: ContractAddress::from(17_u128), + node_url: "http://localhost:12345/".to_string(), } } @@ -35,6 +37,8 @@ impl RequiredParams { self.strk_fee_token_address.to_string(), "--sequencer_address".to_string(), self.sequencer_address.to_string(), + "--node_url".to_string(), + self.node_url.to_string(), ]; // Verify all arguments and their values are present. assert!(