Skip to content

Commit

Permalink
[feat]: print signer version and pubkey on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJOHN974 committed Jan 28, 2025
1 parent 39b961f commit d2a60f9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion signer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use signer::storage::postgres::PgStore;
use signer::transaction_coordinator;

Check warning on line 30 in signer/src/main.rs

View workflow job for this annotation

GitHub Actions / Run Lints

Diff in /home/runner/work/sbtc/sbtc/signer/src/main.rs
use signer::transaction_signer;
use signer::util::ApiFallbackClient;
use signer::keys::PublicKey;
use tokio::signal;
use tower_http::trace::TraceLayer;
use tracing::Instrument;
Expand Down Expand Up @@ -74,11 +75,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
revision = signer::GIT_COMMIT,
arch = signer::TARGET_ARCH,
env_abi = signer::TARGET_ENV_ABI,
signer_version = signer::VERSION,

Check warning on line 78 in signer/src/main.rs

View workflow job for this annotation

GitHub Actions / Run Lints

Diff in /home/runner/work/sbtc/sbtc/signer/src/main.rs
"starting the sBTC signer",
);

// Load the configuration file and/or environment variables.
let settings = Settings::new(args.config)?;

tracing::info!(
signer_public_key = %PublicKey::from_private_key(&settings.signer.private_key),

Check warning on line 86 in signer/src/main.rs

View workflow job for this annotation

GitHub Actions / Run Lints

Diff in /home/runner/work/sbtc/sbtc/signer/src/main.rs
"constructed signer settings",
);


signer::metrics::setup_metrics(settings.signer.prometheus_exporter_endpoint);

// Open a connection to the signer db.
Expand All @@ -101,6 +110,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// signing set, and only assume we are bootstrapping if that source is
// empty.
let settings = context.config();

for signer in settings.signer.bootstrap_signing_set() {
context.state().current_signer_set().add_signer(signer);
}
Expand Down

0 comments on commit d2a60f9

Please sign in to comment.