From ed7c6a2938b3fa0b99c2a0cd3b7819f0dc375c33 Mon Sep 17 00:00:00 2001 From: Philipp Sippl Date: Tue, 17 Sep 2024 13:20:12 +0200 Subject: [PATCH] Ps/fix/main (#393) * fix main * bump --- deploy/stage/common-values-iris-mpc.yaml | 2 +- iris-mpc/src/bin/server.rs | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/deploy/stage/common-values-iris-mpc.yaml b/deploy/stage/common-values-iris-mpc.yaml index 5a2be14e1..80b3fe02b 100644 --- a/deploy/stage/common-values-iris-mpc.yaml +++ b/deploy/stage/common-values-iris-mpc.yaml @@ -1,4 +1,4 @@ -image: "ghcr.io/worldcoin/iris-mpc:v0.6.6" +image: "ghcr.io/worldcoin/iris-mpc:v0.6.7" environment: stage replicaCount: 1 diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index c0c96c46e..0a9628ab9 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -540,19 +540,16 @@ async fn server_main(config: Config) -> eyre::Result<()> { let store_len = store.count_irises().await?; - tracing::info!(format!( - "Size of the database during startup: {}", - store_len - )); + tracing::info!("Size of the database before init: {}", store_len); // Seed the persistent storage with random shares if configured and db is still // empty. if store_len == 0 && config.init_db_size > 0 { - tracing::info!(format!( + tracing::info!( "Initialize persistent iris DB with {} randomly generated shares", config.init_db_size - )); - tracing::info!(format!("Resetting the db: {}", config.clear_db_before_init)); + ); + tracing::info!("Resetting the db: {}", config.clear_db_before_init); store .init_db_with_random_shares( RNG_SEED_INIT_DB, @@ -566,6 +563,8 @@ async fn server_main(config: Config) -> eyre::Result<()> { // Fetch again in case we've just initialized the DB let store_len = store.count_irises().await?; + tracing::info!("Size of the database after init: {}", store_len); + if store_len > MAX_DB_SIZE { tracing::error!("Database size exceeds maximum allowed size: {}", store_len); eyre::bail!("Database size exceeds maximum allowed size: {}", store_len);