diff --git a/batcher/Cargo.lock b/batcher/Cargo.lock index 23f9beb842..2fe1e4460b 100644 --- a/batcher/Cargo.lock +++ b/batcher/Cargo.lock @@ -5433,6 +5433,7 @@ dependencies = [ "hex", "kimchi", "lazy_static", + "log", "mina-curves", "mina-p2p-messages", "mina-tree", diff --git a/operator/mina/lib/Cargo.lock b/operator/mina/lib/Cargo.lock index 9a4ba0f9ed..73e1ca6e73 100644 --- a/operator/mina/lib/Cargo.lock +++ b/operator/mina/lib/Cargo.lock @@ -3609,6 +3609,7 @@ dependencies = [ "hex", "kimchi", "lazy_static", + "log", "mina-curves", "mina-p2p-messages", "mina-tree", diff --git a/operator/mina/lib/Cargo.toml b/operator/mina/lib/Cargo.toml index 4945610118..105956029e 100644 --- a/operator/mina/lib/Cargo.toml +++ b/operator/mina/lib/Cargo.toml @@ -31,6 +31,7 @@ blake2 = "0.10.6" once_cell = "1.19.0" mina_bridge_core = { git = "https://github.com/lambdaclass/mina_bridge", rev = "884f28b834b62133384661fdf73c9db283f68c62" } bincode = "1.3.3" +log = "0.4.21" [patch.crates-io] ark-ff = { git = "https://github.com/lambdaclass/openmina_algebra", branch = "mina_bridge" } diff --git a/operator/mina/lib/src/lib.rs b/operator/mina/lib/src/lib.rs index fc04fbda70..be85f0d842 100644 --- a/operator/mina/lib/src/lib.rs +++ b/operator/mina/lib/src/lib.rs @@ -4,6 +4,7 @@ mod consensus_state; mod verifier_index; +use log::error; use mina_bridge_core::proof::state_proof::{MinaStateProof, MinaStatePubInputs}; use ark_ec::short_weierstrass_jacobian::GroupAffine; @@ -21,9 +22,15 @@ use verifier_index::{deserialize_blockchain_vk, MinaChain}; lazy_static! { static ref DEVNET_VERIFIER_INDEX: VerifierIndex> = - deserialize_blockchain_vk(MinaChain::Devnet).unwrap(); + deserialize_blockchain_vk(MinaChain::Devnet).unwrap_or_else(|err| { + error!("Failed to load Devnet verification key: {}", err); + std::process::exit(1); + }); static ref MAINNET_VERIFIER_INDEX: VerifierIndex> = - deserialize_blockchain_vk(MinaChain::Mainnet).unwrap(); + deserialize_blockchain_vk(MinaChain::Mainnet).unwrap_or_else(|err| { + error!("Failed to load Mainnet verification key: {}", err); + std::process::exit(1); + }); static ref MINA_SRS: SRS = SRS::::create(Fq::SRS_DEPTH); }