Skip to content

Commit 6fe9ad4

Browse files
committed
Address comments
1 parent b06aead commit 6fe9ad4

5 files changed

Lines changed: 21 additions & 14 deletions

File tree

crates/common/src/config/constants.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ pub const METRICS_PORT_ENV: &str = "CB_METRICS_PORT";
1414
pub const LOGS_DIR_ENV: &str = "CB_LOGS_DIR";
1515
pub const LOGS_DIR_DEFAULT: &str = "/var/logs/commit-boost";
1616

17+
/// Default Docker image
18+
pub const COMMIT_BOOST_IMAGE_DEFAULT: &str = "ghcr.io/commit-boost/commit-boost:latest";
19+
1720
///////////////////////// PBS /////////////////////////
1821

19-
pub const PBS_IMAGE_DEFAULT: &str = "ghcr.io/commit-boost/commit-boost:latest";
2022
pub const PBS_SERVICE_NAME: &str = "pbs";
2123

2224
/// Where to receive BuilderAPI calls from beacon node
@@ -26,7 +28,6 @@ pub const MUX_PATH_ENV: &str = "CB_MUX_PATH";
2628

2729
///////////////////////// SIGNER /////////////////////////
2830

29-
pub const SIGNER_IMAGE_DEFAULT: &str = "ghcr.io/commit-boost/commit-boost:latest";
3031
pub const SIGNER_SERVICE_NAME: &str = "signer";
3132

3233
/// Where the signer module should open the server

crates/common/src/config/pbs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use super::{
2323
use crate::{
2424
commit::client::SignerClient,
2525
config::{
26-
CONFIG_ENV, MODULE_JWT_ENV, MuxKeysLoader, PBS_IMAGE_DEFAULT, PBS_SERVICE_NAME, PbsMuxes,
27-
SIGNER_TLS_CERTIFICATE_NAME, SIGNER_TLS_CERTIFICATES_PATH_ENV, SIGNER_URL_ENV,
26+
COMMIT_BOOST_IMAGE_DEFAULT, CONFIG_ENV, MODULE_JWT_ENV, MuxKeysLoader, PBS_SERVICE_NAME,
27+
PbsMuxes, SIGNER_TLS_CERTIFICATE_NAME, SIGNER_TLS_CERTIFICATES_PATH_ENV, SIGNER_URL_ENV,
2828
SignerConfig, TlsMode, load_env_var, load_file_from_env,
2929
},
3030
pbs::{
@@ -257,7 +257,7 @@ pub struct PbsModuleConfig {
257257
}
258258

259259
fn default_pbs() -> String {
260-
PBS_IMAGE_DEFAULT.to_string()
260+
COMMIT_BOOST_IMAGE_DEFAULT.to_string()
261261
}
262262

263263
/// Loads the default pbs config, i.e. with no signer client or custom data

crates/common/src/config/signer.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use super::{
2222
};
2323
use crate::{
2424
config::{
25-
DIRK_CA_CERT_ENV, DIRK_CERT_ENV, DIRK_DIR_SECRETS_ENV, DIRK_KEY_ENV, SIGNER_IMAGE_DEFAULT,
25+
COMMIT_BOOST_IMAGE_DEFAULT, DIRK_CA_CERT_ENV, DIRK_CERT_ENV, DIRK_DIR_SECRETS_ENV,
26+
DIRK_KEY_ENV,
2627
},
2728
signer::{ProxyStore, SignerLoader},
2829
types::{Chain, ModuleId},
@@ -164,7 +165,7 @@ impl SignerConfig {
164165
}
165166

166167
fn default_signer_image() -> String {
167-
SIGNER_IMAGE_DEFAULT.to_string()
168+
COMMIT_BOOST_IMAGE_DEFAULT.to_string()
168169
}
169170

170171
fn default_tls_mode() -> TlsMode {
@@ -424,7 +425,10 @@ mod tests {
424425
use alloy::primitives::{Uint, b256};
425426

426427
use super::*;
427-
use crate::config::{LogsSettings, ModuleKind, PbsConfig, StaticModuleConfig, StaticPbsConfig};
428+
use crate::config::{
429+
COMMIT_BOOST_IMAGE_DEFAULT, LogsSettings, ModuleKind, PbsConfig, StaticModuleConfig,
430+
StaticPbsConfig,
431+
};
428432

429433
// Wrapper needed because TOML requires a top-level struct (can't serialize
430434
// a bare enum).
@@ -437,7 +441,7 @@ mod tests {
437441
SignerConfig {
438442
host: Ipv4Addr::LOCALHOST,
439443
port: 20000,
440-
docker_image: SIGNER_IMAGE_DEFAULT.to_string(),
444+
docker_image: COMMIT_BOOST_IMAGE_DEFAULT.to_string(),
441445
jwt_auth_fail_limit: 3,
442446
jwt_auth_fail_timeout_seconds: 300,
443447
tls_mode,
@@ -851,7 +855,7 @@ mod tests {
851855
cfg.signer = Some(SignerConfig {
852856
host: Ipv4Addr::new(127, 0, 0, 1),
853857
port: 20000,
854-
docker_image: SIGNER_IMAGE_DEFAULT.to_string(),
858+
docker_image: COMMIT_BOOST_IMAGE_DEFAULT.to_string(),
855859
jwt_auth_fail_limit: 3,
856860
jwt_auth_fail_timeout_seconds: 300,
857861
tls_mode: TlsMode::Insecure,

provisioning/k8s/commit-boost/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ commitBoost:
113113
repository: ghcr.io/commit-boost/commit-boost
114114
pullPolicy: IfNotPresent
115115
tag: "v0.4.0"
116+
command: ["commit-boost"]
117+
args: ["pbs"]
116118
config:
117-
chain: "Holesky"
119+
chain: "Hoodi"
118120
metrics:
119121
server_port: 10000
120122
prometheus_config: "/dev/null"

tests/src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use std::{
88
use alloy::primitives::{B256, U256};
99
use cb_common::{
1010
config::{
11-
CommitBoostConfig, LogsSettings, ModuleKind, ModuleSigningConfig, PbsConfig,
12-
PbsModuleConfig, RelayConfig, ReverseProxyHeaderSetup, SIGNER_IMAGE_DEFAULT,
11+
COMMIT_BOOST_IMAGE_DEFAULT, CommitBoostConfig, LogsSettings, ModuleKind,
12+
ModuleSigningConfig, PbsConfig, PbsModuleConfig, RelayConfig, ReverseProxyHeaderSetup,
1313
SIGNER_JWT_AUTH_FAIL_LIMIT_DEFAULT, SIGNER_JWT_AUTH_FAIL_TIMEOUT_SECONDS_DEFAULT,
1414
SIGNER_PORT_DEFAULT, SignerConfig, SignerType, StartSignerConfig, StaticModuleConfig,
1515
StaticPbsConfig, TlsMode,
@@ -131,7 +131,7 @@ pub fn get_signer_config(loader: SignerLoader, tls: bool) -> SignerConfig {
131131
SignerConfig {
132132
host: default_host(),
133133
port: SIGNER_PORT_DEFAULT,
134-
docker_image: SIGNER_IMAGE_DEFAULT.to_string(),
134+
docker_image: COMMIT_BOOST_IMAGE_DEFAULT.to_string(),
135135
jwt_auth_fail_limit: SIGNER_JWT_AUTH_FAIL_LIMIT_DEFAULT,
136136
jwt_auth_fail_timeout_seconds: SIGNER_JWT_AUTH_FAIL_TIMEOUT_SECONDS_DEFAULT,
137137
inner: SignerType::Local { loader, store: None },

0 commit comments

Comments
 (0)