Compare commits

...

1 Commits

Author SHA1 Message Date
Jędrzej Stuczyński 336fcc7be0 unconditionally announce noise x25519 public key 2024-09-20 12:10:45 +01:00
5 changed files with 1 additions and 25 deletions
-11
View File
@@ -203,14 +203,6 @@ pub(crate) struct MixnetArgs {
env = NYMNODE_NYXD_URLS_ARG
)]
pub(crate) nyxd_urls: Option<Vec<Url>>,
/// Specifies whether this node should **NOT** use noise protocol in the connections (currently not implemented)
#[clap(
hide = true,
long,
env = NYMNODE_UNSAFE_DISABLE_NOISE
)]
pub(crate) unsafe_disable_noise: bool,
}
impl MixnetArgs {
@@ -229,9 +221,6 @@ impl MixnetArgs {
if let Some(nyxd_urls) = self.nyxd_urls {
section.nyxd_urls = nyxd_urls
}
if self.unsafe_disable_noise {
section.debug.unsafe_disable_noise = true
}
section
}
}
-5
View File
@@ -446,9 +446,6 @@ pub struct MixnetDebug {
/// Maximum number of packets that can be stored waiting to get sent to a particular connection.
pub maximum_connection_buffer_size: usize,
/// Specifies whether this node should **NOT** use noise protocol in the connections (currently not implemented)
pub unsafe_disable_noise: bool,
}
impl MixnetDebug {
@@ -465,8 +462,6 @@ impl Default for MixnetDebug {
packet_forwarding_maximum_backoff: Self::DEFAULT_PACKET_FORWARDING_MAXIMUM_BACKOFF,
initial_connection_timeout: Self::DEFAULT_INITIAL_CONNECTION_TIMEOUT,
maximum_connection_buffer_size: Self::DEFAULT_MAXIMUM_CONNECTION_BUFFER_SIZE,
// to be changed by @SW once the implementation is there
unsafe_disable_noise: true,
}
}
}
@@ -1005,7 +1005,6 @@ pub async fn try_upgrade_config_v3<P: AsRef<Path>>(
.packet_forwarding_maximum_backoff,
initial_connection_timeout: old_cfg.mixnet.debug.initial_connection_timeout,
maximum_connection_buffer_size: old_cfg.mixnet.debug.maximum_connection_buffer_size,
unsafe_disable_noise: old_cfg.mixnet.debug.unsafe_disable_noise,
},
},
storage_paths: NymNodePaths {
-1
View File
@@ -37,7 +37,6 @@ pub mod vars {
pub const NYMNODE_MIXNET_BIND_ADDRESS_ARG: &str = "NYMNODE_MIXNET_BIND_ADDRESS";
pub const NYMNODE_NYM_APIS_ARG: &str = "NYMNODE_NYM_APIS";
pub const NYMNODE_NYXD_URLS_ARG: &str = "NYMNODE_NYXD";
pub const NYMNODE_UNSAFE_DISABLE_NOISE: &str = "UNSAFE_DISABLE_NOISE";
// wireguard:
pub const NYMNODE_WG_ENABLED_ARG: &str = "NYMNODE_WG_ENABLED";
+1 -7
View File
@@ -16,19 +16,13 @@ pub(crate) fn sign_host_details(
x25519_noise: &x25519::PublicKey,
ed22519_identity: &ed25519::KeyPair,
) -> Result<api_requests::v1::node::models::SignedHostInformation, NymNodeError> {
let x25519_noise = if config.mixnet.debug.unsafe_disable_noise {
String::new()
} else {
x25519_noise.to_base58_string()
};
let host_info = api_requests::v1::node::models::HostInformation {
ip_address: config.host.public_ips.clone(),
hostname: config.host.hostname.clone(),
keys: api_requests::v1::node::models::HostKeys {
ed25519_identity: ed22519_identity.public_key().to_base58_string(),
x25519_sphinx: x22519_sphinx.to_base58_string(),
x25519_noise,
x25519_noise: x25519_noise.to_base58_string(),
},
};