diff --git a/CHANGELOG.md b/CHANGELOG.md index 209e993f51..7fdec67361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,80 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// ## [Unreleased] +## [2024.12-aero] (2024-10-17) + +- nym-node: don't use bloomfilters for double spending checks ([#4960]) +- bugfix: replace unreachable macro with an error return ([#4958]) +- [DOCs:/operators]: Update FAQ sphinx size ([#4946]) +- [DOCs/operators]: Release notes v2024.11-wedel ([#4939]) +- Fix handle drop ([#4934]) +- Assume offline mode ([#4926]) +- Make ip-packet-request VERSION pub ([#4925]) +- Expose error type ([#4924]) +- Fix argument to cargo-deny action ([#4922]) +- Fix nymvpn.com url in mainnet defaults ([#4920]) +- Check both version and type in message header ([#4918]) +- Bump http-api-client default timeout to 30 sec ([#4917]) +- Max/proxy ffi ([#4906]) +- Data Observatory stub ([#4905]) +- Fix missing duplication of modified tables ([#4904]) +- Update cargo deny ([#4901]) +- docs: add hostname instructions for wss ([#4900]) +- build(deps): bump the patch-updates group across 1 directory with 9 updates ([#4898]) +- Fix clippy for beta toolchain ([#4897]) +- Remove clippy github PR annotations ([#4896]) +- Fix apt install in ci-build-upload-binaries.yml ([#4894]) +- Update network monitor entrypoint ([#4893]) +- Update nym-vpn metapackage and replace nymvpn-x with nym-vpn-app ([#4889]) +- Entry wireguard tickets ([#4888]) +- Build and Push CI ([#4887]) +- Feature/updated gateway registration ([#4885]) +- Few fixes to NNM pre deploy ([#4883]) +- Fix sql serde with enum ([#4875]) +- allow clients to send stateless gateway requests without prior registration ([#4873]) +- chore: remove queued migration for adding explicit admin ([#4871]) +- Gateway database modifications for different modes ([#4868]) +- build(deps): bump strum from 0.25.0 to 0.26.3 ([#4848]) +- Use serde from workspace ([#4833]) +- build(deps): bump toml from 0.5.11 to 0.8.14 ([#4805]) +- Max/rust sdk stream abstraction ([#4743]) + +[#4960]: https://github.com/nymtech/nym/pull/4960 +[#4958]: https://github.com/nymtech/nym/pull/4958 +[#4946]: https://github.com/nymtech/nym/pull/4946 +[#4939]: https://github.com/nymtech/nym/pull/4939 +[#4934]: https://github.com/nymtech/nym/pull/4934 +[#4926]: https://github.com/nymtech/nym/pull/4926 +[#4925]: https://github.com/nymtech/nym/pull/4925 +[#4924]: https://github.com/nymtech/nym/pull/4924 +[#4922]: https://github.com/nymtech/nym/pull/4922 +[#4920]: https://github.com/nymtech/nym/pull/4920 +[#4918]: https://github.com/nymtech/nym/pull/4918 +[#4917]: https://github.com/nymtech/nym/pull/4917 +[#4906]: https://github.com/nymtech/nym/pull/4906 +[#4905]: https://github.com/nymtech/nym/pull/4905 +[#4904]: https://github.com/nymtech/nym/pull/4904 +[#4901]: https://github.com/nymtech/nym/pull/4901 +[#4900]: https://github.com/nymtech/nym/pull/4900 +[#4898]: https://github.com/nymtech/nym/pull/4898 +[#4897]: https://github.com/nymtech/nym/pull/4897 +[#4896]: https://github.com/nymtech/nym/pull/4896 +[#4894]: https://github.com/nymtech/nym/pull/4894 +[#4893]: https://github.com/nymtech/nym/pull/4893 +[#4889]: https://github.com/nymtech/nym/pull/4889 +[#4888]: https://github.com/nymtech/nym/pull/4888 +[#4887]: https://github.com/nymtech/nym/pull/4887 +[#4885]: https://github.com/nymtech/nym/pull/4885 +[#4883]: https://github.com/nymtech/nym/pull/4883 +[#4875]: https://github.com/nymtech/nym/pull/4875 +[#4873]: https://github.com/nymtech/nym/pull/4873 +[#4871]: https://github.com/nymtech/nym/pull/4871 +[#4868]: https://github.com/nymtech/nym/pull/4868 +[#4848]: https://github.com/nymtech/nym/pull/4848 +[#4833]: https://github.com/nymtech/nym/pull/4833 +[#4805]: https://github.com/nymtech/nym/pull/4805 +[#4743]: https://github.com/nymtech/nym/pull/4743 + ## [2024.11-wedel] (2024-09-23) - Backport #4894 to fix ci ([#4899]) diff --git a/Cargo.lock b/Cargo.lock index a653c26556..eb95cb7932 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2364,7 +2364,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "explorer-api" -version = "1.1.40" +version = "1.1.41" dependencies = [ "chrono", "clap 4.5.18", @@ -4347,7 +4347,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nym-api" -version = "1.1.44" +version = "1.1.45" dependencies = [ "anyhow", "async-trait", @@ -4588,7 +4588,7 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.42" +version = "1.1.43" dependencies = [ "anyhow", "base64 0.22.1", @@ -4669,7 +4669,7 @@ dependencies = [ [[package]] name = "nym-client" -version = "1.1.41" +version = "1.1.42" dependencies = [ "bs58", "clap 4.5.18", @@ -5714,7 +5714,7 @@ dependencies = [ [[package]] name = "nym-network-requester" -version = "1.1.42" +version = "1.1.43" dependencies = [ "addr", "anyhow", @@ -5765,7 +5765,7 @@ dependencies = [ [[package]] name = "nym-node" -version = "1.1.8" +version = "1.1.9" dependencies = [ "anyhow", "bip39", @@ -6055,7 +6055,7 @@ dependencies = [ [[package]] name = "nym-socks5-client" -version = "1.1.41" +version = "1.1.42" dependencies = [ "bs58", "clap 4.5.18", @@ -6600,7 +6600,7 @@ dependencies = [ [[package]] name = "nymvisor" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "bytes", diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index 74de15b8a9..c9317bb5f3 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-client" -version = "1.1.41" +version = "1.1.42" authors = ["Dave Hrycyszyn ", "Jędrzej Stuczyński "] description = "Implementation of the Nym Client" edition = "2021" diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index 7100923a87..9a22fd4355 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-socks5-client" -version = "1.1.41" +version = "1.1.42" authors = ["Dave Hrycyszyn "] description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address" edition = "2021" diff --git a/common/credential-verification/src/ecash/double_spending.rs b/common/credential-verification/src/ecash/double_spending.rs deleted file mode 100644 index 812eea1fc1..0000000000 --- a/common/credential-verification/src/ecash/double_spending.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2022-2024 - Nym Technologies SA -// SPDX-License-Identifier: GPL-3.0-only - -use crate::ecash::error::EcashTicketError; -use crate::ecash::state::SharedState; -use nym_ecash_double_spending::DoubleSpendingFilter; -use nym_gateway_storage::Storage; -use nym_task::TaskClient; -use nym_validator_client::client::NymApiClientExt; -use nym_validator_client::EcashApiClient; -use rand::prelude::SliceRandom; -use rand::thread_rng; -use std::sync::Arc; -use tokio::sync::{RwLock, RwLockReadGuard}; -use tokio::time::{interval, Duration}; -use tracing::{info, trace, warn}; - -#[derive(Clone)] -pub(crate) struct DoubleSpendingDetector { - spent_serial_numbers: Arc>, - shared_state: SharedState, -} - -impl DoubleSpendingDetector -where - S: Storage + Clone + Send + Sync + 'static, -{ - pub(crate) fn new(shared_state: SharedState) -> Self { - DoubleSpendingDetector { - spent_serial_numbers: Arc::new(RwLock::new(DoubleSpendingFilter::new_empty_ecash())), - shared_state, - } - } - - pub(crate) async fn check(&self, serial_number: &Vec) -> bool { - self.spent_serial_numbers.read().await.check(serial_number) - } - - async fn latest_api_endpoints( - &self, - ) -> Result>, EcashTicketError> { - let epoch_id = self.shared_state.current_epoch_id().await?; - self.shared_state.api_clients(epoch_id).await - } - - async fn refresh_bloomfilter(&self) { - let mut filter_builder = self.spent_serial_numbers.read().await.rebuild(); - - let api_clients = match self.latest_api_endpoints().await { - Ok(clients) => clients, - Err(err) => { - warn!("failed to obtain current api clients: {err}"); - return; - } - }; - - let mut clients = api_clients - .iter() - .map(|c| c.api_client.clone()) - .collect::>(); - clients.shuffle(&mut thread_rng()); - - for client in clients { - match client.nym_api.double_spending_filter_v1().await { - Ok(response) => { - // due to relative big size of the filter, query only one api since all of them should contain - // roughly the same data anyway. - filter_builder.add_bytes(&response.bitmap); - *self.spent_serial_numbers.write().await = filter_builder.build(); - return; - } - Err(err) => { - warn!("Validator @ {} could not be reached. There might be a problem with the ecash endpoint: {err}", client.api_url()); - } - } - } - - warn!("none of the validators could be reached. the bloomfilter will remain unchanged."); - } - - async fn run(&self, mut shutdown: TaskClient) { - info!("Starting Ecash DoubleSpendingDetector"); - let mut interval = interval(Duration::from_secs(600)); - - while !shutdown.is_shutdown() { - tokio::select! { - biased; - _ = shutdown.recv() => { - trace!("ecash_verifier::DoubleSpendingDetector : received shutdown"); - }, - _ = interval.tick() => self.refresh_bloomfilter().await, - - } - } - } - - pub(crate) fn start(self, shutdown: nym_task::TaskClient) { - tokio::spawn(async move { self.run(shutdown).await }); - } -} diff --git a/common/credential-verification/src/ecash/mod.rs b/common/credential-verification/src/ecash/mod.rs index 1fc847bc36..2c86dee586 100644 --- a/common/credential-verification/src/ecash/mod.rs +++ b/common/credential-verification/src/ecash/mod.rs @@ -4,7 +4,6 @@ use crate::Error; use credential_sender::CredentialHandler; use credential_sender::CredentialHandlerConfig; -use double_spending::DoubleSpendingDetector; use error::EcashTicketError; use futures::channel::mpsc::{self, UnboundedSender}; use nym_credentials::CredentialSpendingData; @@ -18,7 +17,6 @@ use tokio::sync::{Mutex, RwLockReadGuard}; use tracing::error; pub mod credential_sender; -pub(crate) mod double_spending; pub mod error; mod helpers; mod state; @@ -31,7 +29,6 @@ pub struct EcashManager { pk_bytes: [u8; 32], // bytes representation of a pub key representing the verifier pay_infos: Mutex>, cred_sender: UnboundedSender, - double_spend_detector: DoubleSpendingDetector, } impl EcashManager @@ -47,9 +44,6 @@ where ) -> Result { let shared_state = SharedState::new(nyxd_client, storage).await?; - let double_spend_detector = DoubleSpendingDetector::new(shared_state.clone()); - double_spend_detector.clone().start(shutdown.clone()); - let (cred_sender, cred_receiver) = mpsc::unbounded(); let cs = @@ -62,7 +56,6 @@ where pk_bytes, pay_infos: Default::default(), cred_sender, - double_spend_detector, }) } @@ -163,10 +156,6 @@ where Ok(()) } - pub async fn check_double_spend(&self, serial_number: &Vec) -> bool { - self.double_spend_detector.check(serial_number).await - } - pub fn async_verify(&self, ticket: ClientTicket) { // TODO: I guess do something for shutdowns let _ = self diff --git a/common/credential-verification/src/lib.rs b/common/credential-verification/src/lib.rs index 4d2e7be2da..0ffe090a06 100644 --- a/common/credential-verification/src/lib.rs +++ b/common/credential-verification/src/lib.rs @@ -53,18 +53,6 @@ impl CredentialVerifier { Ok(()) } - async fn check_bloomfilter(&self, serial_number: &Vec) -> Result<()> { - trace!("checking the bloomfilter..."); - - let spent = self.ecash_verifier.check_double_spend(serial_number).await; - - if spent { - trace!("the credential has already been spent before at some gateway before (bloomfilter failure)"); - return Err(Error::BandwidthCredentialAlreadySpent); - } - Ok(()) - } - async fn check_local_db_for_double_spending(&self, serial_number: &[u8]) -> Result<()> { trace!("checking local db for double spending..."); @@ -128,7 +116,6 @@ impl CredentialVerifier { } self.check_credential_spending_date(spend_date.ecash_date())?; - self.check_bloomfilter(&serial_number).await?; self.check_local_db_for_double_spending(&serial_number) .await?; diff --git a/common/wireguard/src/error.rs b/common/wireguard/src/error.rs index c261ac123a..65a7269952 100644 --- a/common/wireguard/src/error.rs +++ b/common/wireguard/src/error.rs @@ -3,9 +3,6 @@ #[derive(Debug, thiserror::Error)] pub enum Error { - #[error("peers in wireguard don't match with in-memory ")] - PeerMismatch, - #[error("traffic byte data needs to be increasing")] InconsistentConsumedBytes, @@ -20,4 +17,7 @@ pub enum Error { #[error("{0}")] GatewayStorage(#[from] nym_gateway_storage::error::StorageError), + + #[error("{0}")] + SystemTime(#[from] std::time::SystemTimeError), } diff --git a/common/wireguard/src/peer_controller.rs b/common/wireguard/src/peer_controller.rs index bc3fbad0a4..23dbd3a01c 100644 --- a/common/wireguard/src/peer_controller.rs +++ b/common/wireguard/src/peer_controller.rs @@ -158,13 +158,10 @@ impl PeerController { .ok_or(Error::MissingClientBandwidthEntry)? .client_id { - let bandwidth = storage - .get_available_bandwidth(client_id) - .await? - .ok_or(Error::MissingClientBandwidthEntry)?; + storage.create_bandwidth_entry(client_id).await?; Ok(Some(BandwidthStorageManager::new( storage, - ClientBandwidth::new(bandwidth.into()), + ClientBandwidth::new(Default::default()), client_id, BandwidthFlushingBehaviourConfig::default(), true, @@ -226,14 +223,10 @@ impl PeerController { .available_bandwidth() .await } else { - let peer = self - .host_information - .read() - .await - .peers - .get(key) - .ok_or(Error::PeerMismatch)? - .clone(); + let Some(peer) = self.host_information.read().await.peers.get(key).cloned() else { + // host information not updated yet + return Ok(None); + }; BANDWIDTH_CAP_PER_DAY.saturating_sub((peer.rx_bytes + peer.tx_bytes) as i64) }; diff --git a/common/wireguard/src/peer_handle.rs b/common/wireguard/src/peer_handle.rs index abf367b3c9..cd91d99b3c 100644 --- a/common/wireguard/src/peer_handle.rs +++ b/common/wireguard/src/peer_handle.rs @@ -3,6 +3,7 @@ use crate::error::Error; use crate::peer_controller::PeerControlRequest; +use defguard_wireguard_rs::host::Peer; use defguard_wireguard_rs::{host::Host, key::Key}; use futures::channel::oneshot; use nym_authenticator_requests::v2::registration::BANDWIDTH_CAP_PER_DAY; @@ -12,10 +13,12 @@ use nym_gateway_storage::Storage; use nym_task::TaskClient; use nym_wireguard_types::DEFAULT_PEER_TIMEOUT_CHECK; use std::sync::Arc; +use std::time::{Duration, SystemTime}; use tokio::sync::{mpsc, RwLock}; use tokio_stream::{wrappers::IntervalStream, StreamExt}; pub(crate) type SharedBandwidthStorageManager = Arc>>; +const AUTO_REMOVE_AFTER: Duration = Duration::from_secs(60 * 60 * 24); // 24 hours pub struct PeerHandle { storage: St, @@ -25,6 +28,7 @@ pub struct PeerHandle { request_tx: mpsc::Sender, timeout_check_interval: IntervalStream, task_client: TaskClient, + startup_timestamp: SystemTime, } impl PeerHandle { @@ -39,7 +43,8 @@ impl PeerHandle { let timeout_check_interval = tokio_stream::wrappers::IntervalStream::new( tokio::time::interval(DEFAULT_PEER_TIMEOUT_CHECK), ); - let task_client = task_client.fork(format!("peer{public_key}")); + let mut task_client = task_client.fork(format!("peer-{public_key}")); + task_client.disarm(); PeerHandle { storage, public_key, @@ -48,14 +53,11 @@ impl PeerHandle { request_tx, timeout_check_interval, task_client, + startup_timestamp: SystemTime::now(), } } - async fn remove_depleted_peer(&self) -> Result { - log::debug!( - "Peer {} doesn't have bandwidth anymore, removing it", - self.public_key.to_string() - ); + async fn remove_peer(&self) -> Result { let (response_tx, response_rx) = oneshot::channel(); self.request_tx .send(PeerControlRequest::RemovePeer { @@ -71,15 +73,11 @@ impl PeerHandle { Ok(success) } - async fn active_peer(&mut self, storage_peer: WireguardPeer) -> Result { - let kernel_peer = self - .host_information - .read() - .await - .peers - .get(&self.public_key) - .ok_or(Error::PeerMismatch)? - .clone(); + async fn active_peer( + &mut self, + storage_peer: WireguardPeer, + kernel_peer: Peer, + ) -> Result { if let Some(bandwidth_manager) = &self.bandwidth_storage_manager { let spent_bandwidth = (kernel_peer.rx_bytes + kernel_peer.tx_bytes) .checked_sub(storage_peer.rx_bytes as u64 + storage_peer.tx_bytes as u64) @@ -93,13 +91,25 @@ impl PeerHandle { .await .is_err() { - let success = self.remove_depleted_peer().await?; + let success = self.remove_peer().await?; return Ok(!success); } } else { + if SystemTime::now().duration_since(self.startup_timestamp)? >= AUTO_REMOVE_AFTER { + log::debug!( + "Peer {} has been present for 24 hours, removing it", + self.public_key.to_string() + ); + let success = self.remove_peer().await?; + return Ok(!success); + } let spent_bandwidth = kernel_peer.rx_bytes + kernel_peer.tx_bytes; if spent_bandwidth >= BANDWIDTH_CAP_PER_DAY { - let success = self.remove_depleted_peer().await?; + log::debug!( + "Peer {} doesn't have bandwidth anymore, removing it", + self.public_key.to_string() + ); + let success = self.remove_peer().await?; return Ok(!success); } } @@ -111,11 +121,21 @@ impl PeerHandle { while !self.task_client.is_shutdown() { tokio::select! { _ = self.timeout_check_interval.next() => { - let Some(peer) = self.storage.get_wireguard_peer(&self.public_key.to_string()).await? else { + let Some(kernel_peer) = self + .host_information + .read() + .await + .peers + .get(&self.public_key) + .cloned() else { + // the host information hasn't beed updated yet + continue; + }; + let Some(storage_peer) = self.storage.get_wireguard_peer(&self.public_key.to_string()).await? else { log::debug!("Peer {:?} not in storage anymore, shutting down handle", self.public_key); return Ok(()); }; - if !self.active_peer(peer).await? { + if !self.active_peer(storage_peer, kernel_peer).await? { log::debug!("Peer {:?} doesn't have bandwidth anymore, shutting down handle", self.public_key); return Ok(()); } diff --git a/explorer-api/Cargo.toml b/explorer-api/Cargo.toml index 62ff0ad277..8e59935476 100644 --- a/explorer-api/Cargo.toml +++ b/explorer-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "explorer-api" -version = "1.1.40" +version = "1.1.41" edition = "2021" license.workspace = true diff --git a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs index 9563f89cbc..a723a5ca2d 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs @@ -73,6 +73,9 @@ pub(crate) enum InitialAuthenticationError { #[error("Only 'Register' or 'Authenticate' requests are allowed")] InvalidRequest, + #[error("received a Message of type {typ} which was not expected in this context")] + UnexpectedMessageType { typ: String }, + #[error("Experienced connection error: {0}")] ConnectionError(#[from] WsError), @@ -861,9 +864,27 @@ where Message::Binary(_) => { return Err(InitialAuthenticationError::BinaryRequestWithoutAuthentication); } - _ => unreachable!( - "the underlying tunsgenite stream should be handling other message types" - ), + other => { + if other.is_ping() { + debug!("unexpected ping message!"); + return Err(InitialAuthenticationError::UnexpectedMessageType { + typ: "ping".to_string(), + }); + } else if other.is_pong() { + debug!("unexpected pong message!"); + return Err(InitialAuthenticationError::UnexpectedMessageType { + typ: "pong".to_string(), + }); + } else if other.is_close() { + debug!("unexpected close message!"); + return Err(InitialAuthenticationError::UnexpectedMessageType { + typ: "close".to_string(), + }); + } + + // at this point this is definitely unreachable, but just in case, let's not panic... + return Err(InitialAuthenticationError::InvalidRequest); + } }; text.parse() diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 4e55e76131..b57d11e0e7 100644 --- a/nym-api/Cargo.toml +++ b/nym-api/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "nym-api" license = "GPL-3.0" -version = "1.1.44" +version = "1.1.45" authors.workspace = true edition = "2021" rust-version.workspace = true diff --git a/nym-api/src/ecash/error.rs b/nym-api/src/ecash/error.rs index 066d62ea8b..3e17fcc6ac 100644 --- a/nym-api/src/ecash/error.rs +++ b/nym-api/src/ecash/error.rs @@ -24,6 +24,9 @@ pub type Result = std::result::Result; #[derive(Debug, Error)] pub enum EcashError { + #[error("permanently restricted")] + Restricted, + #[error(transparent)] IOError(#[from] std::io::Error), diff --git a/nym-node/Cargo.toml b/nym-node/Cargo.toml index 36af98832e..442b62a3b9 100644 --- a/nym-node/Cargo.toml +++ b/nym-node/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-node" -version = "1.1.8" +version = "1.1.9" authors.workspace = true repository.workspace = true homepage.workspace = true diff --git a/service-providers/authenticator/src/mixnet_listener.rs b/service-providers/authenticator/src/mixnet_listener.rs index 304d30584c..009dab5427 100644 --- a/service-providers/authenticator/src/mixnet_listener.rs +++ b/service-providers/authenticator/src/mixnet_listener.rs @@ -122,10 +122,17 @@ impl MixnetListener { reg.gateway_data.private_ip )))?; - let timestamp = ip.ok_or(AuthenticatorError::InternalDataCorruption( - "timestamp should be set".to_string(), - ))?; - let duration = SystemTime::now().duration_since(timestamp).map_err(|_| { + let Some(timestamp) = ip else { + registred_and_free + .registration_in_progres + .remove(®.gateway_data.pub_key()); + log::debug!( + "Removed stale registration of {}", + reg.gateway_data.pub_key() + ); + continue; + }; + let duration = SystemTime::now().duration_since(*timestamp).map_err(|_| { AuthenticatorError::InternalDataCorruption( "set timestamp shouldn't have been set in the future".to_string(), ) @@ -152,10 +159,8 @@ impl MixnetListener { ) -> AuthenticatorHandleResult { let remote_public = init_message.pub_key; let nonce: u64 = fastrand::u64(..); - if let Some(registration_data) = self - .registred_and_free - .read() - .await + let mut registred_and_free = self.registred_and_free.write().await; + if let Some(registration_data) = registred_and_free .registration_in_progres .get(&remote_public) { @@ -184,7 +189,6 @@ impl MixnetListener { )); } - let mut registred_and_free = self.registred_and_free.write().await; let private_ip_ref = registred_and_free .free_private_network_ips .iter_mut() @@ -293,10 +297,6 @@ impl MixnetListener { credential: CredentialSpendingData, client_id: i64, ) -> Result { - ecash_verifier - .storage() - .create_bandwidth_entry(client_id) - .await?; let bandwidth = ecash_verifier .storage() .get_available_bandwidth(client_id) diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index 325debcc48..6678d72c09 100644 --- a/service-providers/network-requester/Cargo.toml +++ b/service-providers/network-requester/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "nym-network-requester" license = "GPL-3.0" -version = "1.1.42" +version = "1.1.43" authors.workspace = true edition.workspace = true rust-version = "1.70" diff --git a/tools/nym-cli/Cargo.toml b/tools/nym-cli/Cargo.toml index 8f272430d2..8451a20d89 100644 --- a/tools/nym-cli/Cargo.toml +++ b/tools/nym-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-cli" -version = "1.1.42" +version = "1.1.43" authors.workspace = true edition = "2021" license.workspace = true diff --git a/tools/nymvisor/Cargo.toml b/tools/nymvisor/Cargo.toml index f82494c850..fae37c502c 100644 --- a/tools/nymvisor/Cargo.toml +++ b/tools/nymvisor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nymvisor" -version = "0.1.7" +version = "0.1.8" authors.workspace = true repository.workspace = true homepage.workspace = true