diff --git a/bolt-sidecar/.env.example b/bolt-sidecar/.env.example index a7ed8591..cb234a59 100644 --- a/bolt-sidecar/.env.example +++ b/bolt-sidecar/.env.example @@ -1,10 +1,16 @@ - -# node + PBS URLs +# Ethereum node connections BOLT_SIDECAR_EXECUTION_API_URL=http://localhost:4485 BOLT_SIDECAR_BEACON_API_URL=http://localhost:4400 BOLT_SIDECAR_ENGINE_API_URL=http://localhost:4451 +BOLT_SIDECAR_ENGINE_JWT_HEX= + +# Constraint URL: should point to the constraint API sidecar. +# Usually this corresponds to `mev-boost` or `bolt-boost` BOLT_SIDECAR_CONSTRAINTS_URL=http://localhost:19550 + +# Commit-boost specific options (optional) BOLT_SIDECAR_CB_SIGNER_URL=http://localhost:19551 +BOLT_SIDECAR_CB_JWT_HEX= # server ports BOLT_SIDECAR_PORT=8000 @@ -15,14 +21,13 @@ BOLT_SIDECAR_MAX_COMMITMENTS=128 BOLT_SIDECAR_MAX_COMMITTED_GAS=10000000 # chain configs -BOLT_SIDECAR_CHAIN=helder +BOLT_SIDECAR_CHAIN=holesky BOLT_SIDECAR_COMMITMENT_DEADLINE=8000 BOLT_SIDECAR_SLOT_TIME=12 # sidecar security configs BOLT_SIDECAR_VALIDATOR_INDEXES= -BOLT_SIDECAR_JWT_HEX= -BOLT_SIDECAR_CB_JWT_HEX= BOLT_SIDECAR_FEE_RECIPIENT= BOLT_SIDECAR_BUILDER_PRIVATE_KEY= -BOLT_SIDECAR_PRIVATE_KEY= +BOLT_SIDECAR_CONSTRAINT_PRIVATE_KEY= +BOLT_SIDECAR_COMMITMENT_PRIVATE_KEY= diff --git a/bolt-sidecar/src/builder/payload_builder.rs b/bolt-sidecar/src/builder/payload_builder.rs index 1dfe2e9f..c8338262 100644 --- a/bolt-sidecar/src/builder/payload_builder.rs +++ b/bolt-sidecar/src/builder/payload_builder.rs @@ -57,7 +57,7 @@ impl FallbackPayloadBuilder { pub fn new(config: &Opts, beacon_api_client: BeaconClient, genesis_time: u64) -> Self { let engine_hinter = EngineHinter { client: reqwest::Client::new(), - jwt_hex: config.jwt_hex.to_string(), + jwt_hex: config.engine_jwt_hex.to_string(), engine_rpc_url: config.engine_api_url.clone(), }; diff --git a/bolt-sidecar/src/config/mod.rs b/bolt-sidecar/src/config/mod.rs index f6b38f42..1d11f680 100644 --- a/bolt-sidecar/src/config/mod.rs +++ b/bolt-sidecar/src/config/mod.rs @@ -46,8 +46,12 @@ pub struct Opts { #[clap(long, env = "BOLT_SIDECAR_ENGINE_API_URL", default_value = "http://localhost:8551")] pub engine_api_url: Url, /// URL for the Constraint sidecar client to use - #[clap(long, env = "BOLT_SIDECAR_CONSTRAINTS_URL", default_value = "http://localhost:3030")] - pub constraints_url: Url, + #[clap( + long, + env = "BOLT_SIDECAR_CONSTRAINTS_API_URL", + default_value = "http://localhost:3030" + )] + pub constraints_api_url: Url, /// Constraint proxy server port to use #[clap(long, env = "BOLT_SIDECAR_CONSTRAINTS_PROXY_PORT", default_value_t = DEFAULT_CONSTRAINTS_PROXY_PORT)] pub constraints_proxy_port: u16, @@ -62,8 +66,8 @@ pub struct Opts { /// /// It can either be a hex-encoded string or a file path to a file /// containing the hex-encoded secret. - #[clap(long, env = "BOLT_SIDECAR_JWT_HEX", default_value_t)] - pub jwt_hex: JwtSecretConfig, + #[clap(long, env = "BOLT_SIDECAR_ENGINE_JWT_HEX", default_value_t)] + pub engine_jwt_hex: JwtSecretConfig, /// The fee recipient address for fallback blocks #[clap(long, env = "BOLT_SIDECAR_FEE_RECIPIENT", default_value_t = Address::ZERO)] pub fee_recipient: Address, @@ -133,7 +137,7 @@ mod tests { assert_eq!(config.execution_api_url, Url::parse("http://localhost:8545").unwrap()); assert_eq!(config.beacon_api_url, Url::parse("http://localhost:5052").unwrap()); assert_eq!(config.engine_api_url, Url::parse("http://localhost:8551").unwrap()); - assert_eq!(config.constraints_url, Url::parse("http://localhost:3030").unwrap()); + assert_eq!(config.constraints_api_url, Url::parse("http://localhost:3030").unwrap()); assert_eq!(config.constraints_proxy_port, 18551); } } diff --git a/bolt-sidecar/src/driver.rs b/bolt-sidecar/src/driver.rs index 44fa366f..370abd2e 100644 --- a/bolt-sidecar/src/driver.rs +++ b/bolt-sidecar/src/driver.rs @@ -181,7 +181,7 @@ impl SidecarDriver { let (payload_requests_tx, payload_requests_rx) = mpsc::channel(16); let builder_proxy_cfg = BuilderProxyConfig { - constraints_url: opts.constraints_url.clone(), + constraints_url: opts.constraints_api_url.clone(), server_port: opts.constraints_proxy_port, }; @@ -198,7 +198,7 @@ impl SidecarDriver { let (api_events_tx, api_events_rx) = mpsc::channel(1024); CommitmentsApiServer::new(api_addr).run(api_events_tx).await; - let mut constraints_client = ConstraintsClient::new(opts.constraints_url.clone()); + let mut constraints_client = ConstraintsClient::new(opts.constraints_api_url.clone()); // read the delegaitons from disk if they exist and add them to the constraints client if let Some(delegations_file_path) = opts.constraint_signing.delegations_path.as_ref() { diff --git a/bolt-sidecar/src/test_util.rs b/bolt-sidecar/src/test_util.rs index b4dbf40c..4a71746c 100644 --- a/bolt-sidecar/src/test_util.rs +++ b/bolt-sidecar/src/test_util.rs @@ -99,7 +99,7 @@ pub(crate) async fn get_test_config() -> Option { if let Some(url) = try_get_engine_api_url().await { opts.engine_api_url = url.parse().expect("valid URL"); } - opts.jwt_hex = JwtSecretConfig(jwt); + opts.engine_jwt_hex = JwtSecretConfig(jwt); Some(opts) }