Skip to content

Commit 2f85133

Browse files
committed
log version on startup
1 parent 73e7cdc commit 2f85133

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

crates/common/src/constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pub const APPLICATION_BUILDER_DOMAIN: [u8; 4] = [0, 0, 0, 1];
22
pub const GENESIS_VALIDATORS_ROOT: [u8; 32] = [0; 32];
33
pub const COMMIT_BOOST_DOMAIN: [u8; 4] = [109, 109, 111, 67];
4+
pub const COMMIT_BOOST_VERSION: &str = env!("CARGO_PKG_VERSION");

crates/common/src/pbs/constants.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::constants::COMMIT_BOOST_VERSION;
2+
13
pub const BUILDER_API_PATH: &str = "/eth/v1/builder";
24

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

1012
pub const HEADER_SLOT_UUID_KEY: &str = "X-MEVBoost-SlotID";
1113
pub const HEADER_VERSION_KEY: &str = "X-CommitBoost-Version";
12-
pub const HEADER_VERSION_VALUE: &str = env!("CARGO_PKG_VERSION");
14+
pub const HEADER_VERSION_VALUE: &str = COMMIT_BOOST_VERSION;
1315
pub const HEADER_START_TIME_UNIX_MS: &str = "X-MEVBoost-StartTimeUnixMS";
1416

1517
pub const BUILDER_EVENTS_PATH: &str = "/builder_events";

crates/pbs/src/service.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::net::SocketAddr;
22

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

2526
let app = create_app_router::<S, A>(state);
2627
let listener = TcpListener::bind(address).await.expect("failed tcp binding");

crates/signer/src/service.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use cb_common::{
1919
},
2020
},
2121
config::StartSignerConfig,
22+
constants::COMMIT_BOOST_VERSION,
2223
types::{Jwt, ModuleId},
2324
};
2425
use eyre::{Result, WrapErr};
@@ -50,7 +51,7 @@ impl SigningService {
5051
let module_ids: Vec<String> =
5152
config.jwts.left_values().cloned().map(Into::into).collect();
5253

53-
info!(modules =? module_ids, port =? config.server_port, "Starting signing service");
54+
info!(version = COMMIT_BOOST_VERSION, modules =? module_ids, port =? config.server_port, "Starting signing service");
5455
}
5556

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

0 commit comments

Comments
 (0)