Skip to content

Commit

Permalink
log version on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ltitanb committed Oct 7, 2024
1 parent 73e7cdc commit 2f85133
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions crates/common/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub const APPLICATION_BUILDER_DOMAIN: [u8; 4] = [0, 0, 0, 1];
pub const GENESIS_VALIDATORS_ROOT: [u8; 32] = [0; 32];
pub const COMMIT_BOOST_DOMAIN: [u8; 4] = [109, 109, 111, 67];
pub const COMMIT_BOOST_VERSION: &str = env!("CARGO_PKG_VERSION");
4 changes: 3 additions & 1 deletion crates/common/src/pbs/constants.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use crate::constants::COMMIT_BOOST_VERSION;

pub const BUILDER_API_PATH: &str = "/eth/v1/builder";

pub const GET_HEADER_PATH: &str = "/header/:slot/:parent_hash/:pubkey";
Expand All @@ -9,7 +11,7 @@ pub const SUBMIT_BLOCK_PATH: &str = "/blinded_blocks";

pub const HEADER_SLOT_UUID_KEY: &str = "X-MEVBoost-SlotID";
pub const HEADER_VERSION_KEY: &str = "X-CommitBoost-Version";
pub const HEADER_VERSION_VALUE: &str = env!("CARGO_PKG_VERSION");
pub const HEADER_VERSION_VALUE: &str = COMMIT_BOOST_VERSION;
pub const HEADER_START_TIME_UNIX_MS: &str = "X-MEVBoost-StartTimeUnixMS";

pub const BUILDER_EVENTS_PATH: &str = "/builder_events";
Expand Down
3 changes: 2 additions & 1 deletion crates/pbs/src/service.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::net::SocketAddr;

use cb_common::constants::COMMIT_BOOST_VERSION;
use cb_metrics::provider::MetricsProvider;
use eyre::{Context, Result};
use prometheus::core::Collector;
Expand All @@ -20,7 +21,7 @@ impl PbsService {
let address = SocketAddr::from(([0, 0, 0, 0], state.config.pbs_config.port));
let events_subs =
state.config.event_publisher.as_ref().map(|e| e.n_subscribers()).unwrap_or_default();
info!(?address, events_subs, chain =? state.config.chain, "Starting PBS service");
info!(version = COMMIT_BOOST_VERSION, ?address, events_subs, chain =? state.config.chain, "Starting PBS service");

let app = create_app_router::<S, A>(state);
let listener = TcpListener::bind(address).await.expect("failed tcp binding");
Expand Down
3 changes: 2 additions & 1 deletion crates/signer/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use cb_common::{
},
},
config::StartSignerConfig,
constants::COMMIT_BOOST_VERSION,
types::{Jwt, ModuleId},
};
use eyre::{Result, WrapErr};
Expand Down Expand Up @@ -50,7 +51,7 @@ impl SigningService {
let module_ids: Vec<String> =
config.jwts.left_values().cloned().map(Into::into).collect();

info!(modules =? module_ids, port =? config.server_port, "Starting signing service");
info!(version = COMMIT_BOOST_VERSION, modules =? module_ids, port =? config.server_port, "Starting signing service");
}

let mut manager = SigningManager::new(config.chain);
Expand Down

0 comments on commit 2f85133

Please sign in to comment.