Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/entrypoint/src/net/keypair/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use e3_config::AppConfig;
use e3_crypto::Cipher;
use e3_net::NetRepositoryFactory;
use libp2p::{identity::Keypair, PeerId};
use tracing::warn;
use zeroize::Zeroize;

use crate::helpers::datastore::get_repositories;
Expand All @@ -29,6 +30,13 @@ pub async fn execute(config: &AppConfig) -> Result<PeerId> {
pub async fn autonetkey(config: &AppConfig) -> Result<()> {
let repositories = get_repositories(config)?;
if !repositories.libp2p_keypair().has().await {
warn!(
"Auto-generating network keypair because 'autonetkey: true' is set and no keypair exists. \
This will create a NEW peer identity. If your data directory is not persistent \
(e.g., running in Docker without volumes), a new identity will be generated on each restart, \
which will cause network connectivity issues with other peers. \
For production use, run 'enclave net keypair (generate)/(set --net-keypair <YOUR_PEER_ID>)' once and ensure data persistence."
);
execute(config).await?;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/net/src/net_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ async fn process_swarm_event(
let error_str = format!("{}", error);
if error_str.contains("Unexpected peer ID") {
if let Some(expected_peer) = &peer_id {
info!("Removing stale peer {expected_peer} due to peer ID mismatch");
debug!("Removing stale peer {expected_peer} due to peer ID mismatch");
swarm.behaviour_mut().kademlia.remove_peer(expected_peer);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ contract CiphernodeRegistryOwnable is ICiphernodeRegistry, OwnableUpgradeable {
SubmissionWindowNotClosed()
);
// TODO: Handle what happens if the threshold is not met.
require(c.topNodes.length >= c.threshold[0], ThresholdNotMet());
require(c.topNodes.length >= c.threshold[1], ThresholdNotMet());

c.finalized = true;
c.committee = c.topNodes;
Expand Down
4 changes: 2 additions & 2 deletions packages/enclave-contracts/deployed_contracts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sepolia": {
"PoseidonT3": {
"blockNumber": 10043244,
"blockNumber": 10051709,
"address": "0x3333333C0A88F9BE4fd23ed0536F9B6c427e3B93"
},
"MockUSDC": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"initialOwner": "0x8837e47c4Bb520ADE83AAB761C3B60679443af1B",
"proxyAddress": "0xae897dC011aBF249130257162E83dcf913e578cb",
"proxyAdminAddress": "0xe74c560c9Fd4b37d9848fbbeDCdaC58f56c60a83",
"implementationAddress": "0x06dC26a63319De03C7146bF8b6e3370d7c253C71"
"implementationAddress": "0x077a3a9ef64CdA16BD6BeeD7674E60B76EeC14a3"
},
"blockNumber": 10043251,
"address": "0xae897dC011aBF249130257162E83dcf913e578cb"
Expand Down
Loading