diff --git a/nym-api/src/coconut/dkg/controller.rs b/nym-api/src/coconut/dkg/controller.rs index 87176f6189..e0fa545796 100644 --- a/nym-api/src/coconut/dkg/controller.rs +++ b/nym-api/src/coconut/dkg/controller.rs @@ -57,14 +57,14 @@ impl DkgController { &config.storage_paths.decryption_key_path, &config.storage_paths.public_key_with_proof_path, ))?; - if let Ok(coconut_keypair_value) = - nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new( - &config.storage_paths.secret_key_path, - &config.storage_paths.verification_key_path, - )) - { - coconut_keypair.set(Some(coconut_keypair_value)).await; - } + // if let Ok(coconut_keypair_value) = + // nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new( + // &config.storage_paths.secret_key_path, + // &config.storage_paths.verification_key_path, + // )) + // { + // coconut_keypair.set(Some(coconut_keypair_value)).await; + // } let persistent_state = PersistentState::load_from_file(&config.storage_paths.dkg_persistent_state_path) .unwrap_or_default(); diff --git a/nym-api/src/main.rs b/nym-api/src/main.rs index 20982ef087..9401f3e5d3 100644 --- a/nym-api/src/main.rs +++ b/nym-api/src/main.rs @@ -80,6 +80,14 @@ async fn start_nym_api_tasks( let network_details = NetworkDetails::new(connected_nyxd.to_string(), nym_network_details); let coconut_keypair = coconut::keypair::KeyPair::new(); + let keys = nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new( + &config.coconut_signer.storage_paths.secret_key_path, + &config.coconut_signer.storage_paths.verification_key_path, + )) + .expect("failed to load coconut keys"); + + coconut_keypair.set(Some(keys)).await; + info!("set coconut keys"); // let's build our rocket! let rocket = http::setup_rocket(