Compare commits

..

2 Commits

Author SHA1 Message Date
benedetta davico f6ad6e94c2 Update network_tunnel_manager.sh 2025-10-03 15:18:53 +02:00
benedettadavico a43a4f1656 Edit network rules script
update network tunnel manager script
2025-10-03 15:08:23 +02:00
18 changed files with 58 additions and 144 deletions
-44
View File
@@ -4,50 +4,6 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://
## [Unreleased]
## [2025.18-jarlsberg] (2025-10-14)
- ns-api: add descriptions to dVPN gateway responses ([#6102])
- NS API: use new probe download filesize and milliseconds field ([#6097])
- ns-api: use download files size from probes instead of parsing filenames ([#6095])
- ns-api: add new fields for probe output for query_metadata and download file size and duration in ms ([#6091])
- Bugfix/bloomfilters purge ([#6089])
- Hotfix: Update API source in node ping tester script ([#6082])
- Get wireguard keypair as arg instead of reading it from disk ([#6078])
- Feature: Ping probe all nodes /described nodes from a server ([#6074])
- Node Status API: add bridge information to dVPN endpoint ([#6069])
- frontdoor typo fix ([#6067])
- Feature: Node rewards tracker ([#6064])
- [chore] Clippy fix ([#6060])
- Registration Client ([#6059])
- Bugfix: Nym node CLI download nym-node exception ([#6058])
- Feature: Nym node html landing page ([#6053])
- feat: DKG contract method for updating announce address ([#6050])
- feat: NS ticket faucet ([#6047])
- Bridge proto client params in Self-Described ([#6035])
- Node Status API: remove sqlite support ([#6004])
- Benny/ci contract fix ([#5962])
[#6102]: https://github.com/nymtech/nym/pull/6102
[#6097]: https://github.com/nymtech/nym/pull/6097
[#6095]: https://github.com/nymtech/nym/pull/6095
[#6091]: https://github.com/nymtech/nym/pull/6091
[#6089]: https://github.com/nymtech/nym/pull/6089
[#6082]: https://github.com/nymtech/nym/pull/6082
[#6078]: https://github.com/nymtech/nym/pull/6078
[#6074]: https://github.com/nymtech/nym/pull/6074
[#6069]: https://github.com/nymtech/nym/pull/6069
[#6067]: https://github.com/nymtech/nym/pull/6067
[#6064]: https://github.com/nymtech/nym/pull/6064
[#6060]: https://github.com/nymtech/nym/pull/6060
[#6059]: https://github.com/nymtech/nym/pull/6059
[#6058]: https://github.com/nymtech/nym/pull/6058
[#6053]: https://github.com/nymtech/nym/pull/6053
[#6050]: https://github.com/nymtech/nym/pull/6050
[#6047]: https://github.com/nymtech/nym/pull/6047
[#6035]: https://github.com/nymtech/nym/pull/6035
[#6004]: https://github.com/nymtech/nym/pull/6004
[#5962]: https://github.com/nymtech/nym/pull/5962
## [2025.17-isabirra] (2025-09-29)
- Bugfix | Fix the registration handshake ([#6062])
Generated
+8 -8
View File
@@ -4787,7 +4787,7 @@ dependencies = [
[[package]]
name = "nym-api"
version = "1.1.67"
version = "1.1.66"
dependencies = [
"anyhow",
"async-trait",
@@ -5013,7 +5013,7 @@ dependencies = [
[[package]]
name = "nym-cli"
version = "1.1.64"
version = "1.1.63"
dependencies = [
"anyhow",
"base64 0.22.1",
@@ -5096,7 +5096,7 @@ dependencies = [
[[package]]
name = "nym-client"
version = "1.1.64"
version = "1.1.63"
dependencies = [
"bs58",
"clap",
@@ -5373,7 +5373,7 @@ dependencies = [
[[package]]
name = "nym-credential-proxy"
version = "0.3.0"
version = "0.2.0"
dependencies = [
"anyhow",
"axum",
@@ -6240,7 +6240,7 @@ dependencies = [
[[package]]
name = "nym-network-requester"
version = "1.1.65"
version = "1.1.64"
dependencies = [
"addr",
"anyhow",
@@ -6290,7 +6290,7 @@ dependencies = [
[[package]]
name = "nym-node"
version = "1.19.0"
version = "1.16.0"
dependencies = [
"anyhow",
"arc-swap",
@@ -6815,7 +6815,7 @@ dependencies = [
[[package]]
name = "nym-socks5-client"
version = "1.1.64"
version = "1.1.63"
dependencies = [
"bs58",
"clap",
@@ -7553,7 +7553,7 @@ dependencies = [
[[package]]
name = "nymvisor"
version = "0.1.29"
version = "0.1.28"
dependencies = [
"anyhow",
"bytes",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-client"
version = "1.1.64"
version = "1.1.63"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
description = "Implementation of the Nym Client"
edition = "2021"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-socks5-client"
version = "1.1.64"
version = "1.1.63"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
edition = "2021"
@@ -1,3 +0,0 @@
## Quick Start
**To install, configure, bond and run a `nym-node` you can use our interactive command-line-based tool [Nym Node CLI](https://nym.com/docs/operators/tools#nym-node-cli).**
@@ -1 +1 @@
Sunday, October 5th 2025, 09:29:02 UTC
Wednesday, October 1st 2025, 11:16:15 UTC
@@ -1,5 +1,3 @@
import QuickStart from 'components/operators/snippets/quick-start.mdx'
# Introduction
This is **Nym's Operators guide**, containing information and setup guides for the various components of Nym network and Nyx blockchain validators.
@@ -24,8 +22,6 @@ If you want to explore kickstart options and examples, learn how to integrate wi
**If you are an operator and want to join the journey of starting and mantaining a Nym Node, begin with visiting [Minimum requirements page](nodes.mdx).**
<QuickStart />
## Popular pages
**Binary Information**
+3 -9
View File
@@ -2,8 +2,7 @@ import { Callout } from 'nextra/components';
import { Steps } from 'nextra/components';
import { Tabs } from 'nextra/components';
import NymNodeSpecs from 'components/operators/snippets/nym-node-specs.mdx';
import TermsConditions from 'components/operators/snippets/tc-info.mdx';
import QuickStart from 'components/operators/snippets/quick-start.mdx'
import TermsConditions from 'components/operators/snippets/tc-info.mdx'
# Nym Nodes Operator Guides
@@ -11,7 +10,7 @@ Welcome to the section containing setup guides for operators of Nym Nodes and Ny
## Minimum Requirements
Operating a `nym-node` is not a set-and-forget endeavor. To prevent operators committing their time and money into a sub-optimal server, resulting in frustration of never seeing their node active, we composed this list of prerequisites. Please read below about expectations regarding operators [skill set](#knowledge-base), [time dedication](#time), [minimum hardware specs](#vps-hardware-specs) and [Nym Wallet](nodes/preliminary-steps/wallet-preparation) with at least 101 NYM tokens.
Operating a `nym-node` is not a set-and-forget endeavor. To prevent operators committing their time and money into a sub-optimal server, resulting in frustration of never seeing their node active, we composed this list of prerequisites. Please read below about expectations regarding operators [skill set](#knowledge-base), [time dedication](#time) and [minimum hardware specs](#vps-hardware-specs).
### Knowledge base
@@ -19,10 +18,6 @@ Operating a `nym-node` is not a set-and-forget endeavor. To prevent operators co
<NymNodeSpecs />
### Nym Wallet
To [register (bond)](nodes/nym-node/bonding) `nym-node` to the network, you need a Nyx blockchain account and at least 101 NYM tokens. Follow the steps on [this page](nodes/preliminary-steps/wallet-preparation).
### Time
Last but not least, managing a Nym Node is work. More skilled an operator is, less time it takes to run and maintain a node (and search extra details), but just like any other work, it takes effort.
@@ -35,12 +30,11 @@ Outdated nodes are never selected for routing/mixing packets, resulting in not r
Accepting T&Cs is done via a flag `--accept-operator-terms-and-conditions` added explicitly to `nym-node run` command every time. Detailed info and proper syntax is provided on the [setup page](nodes/nym-node/setup#terms--conditions).
<QuickStart />
## Steps for Nym Node Operators
This is a summary of all needed steps for node operators to setup and configure a `nym-node` and register it to Nym Network:
1. **Start with [Preliminary Steps](nodes/preliminary-steps.mdx), preparing [VPS](nodes/preliminary-steps/vps-setup.mdx) and [Nym wallet](nodes/preliminary-steps/wallet-preparation)**
2. **[Setup](nodes/nym-node/setup.mdx) the node**
@@ -8,7 +8,6 @@ import NymNodeHelp from 'components/outputs/command-outputs/nym-node-help.md';
import NymNodeRunHelp from 'components/outputs/command-outputs/nym-node-run-help.md';
import { AccordionTemplate } from 'components/accordion-template.tsx';
import TermsConditions from 'components/operators/snippets/tc-info.mdx';
import QuickStart from 'components/operators/snippets/quick-start.mdx'
# Nym Node Setup & Run
@@ -37,7 +36,6 @@ Detailed version archive and release notes is documented [here](../../changelog.
<BuildInfo />
*/}
## Functionality (mode)
<Callout type="info">
@@ -78,8 +76,6 @@ Everything essential for each mode exists on `nym-node` by default. For instance
Note that every `exit-gateway` mode is basically an `entry-gateway` with NR (Network Requester) and IPR (IP Packet Router) enabled. This means that every `exit-gateway` can work as an `entry-gateway` but not the opposite.
<QuickStart />
## Command & Examples
**`nym-node` introduces a default human readible ID (local only) `default-nym-node`, which is used if there is not an explicit custom `--id <ID>` specified. All configuration is stored in `~/.nym/nym-nodes/default-nym-node/config/config.toml` or `~/.nym/nym-nodes/<ID>/config/config.toml` respectively.**
+1 -1
View File
@@ -4,7 +4,7 @@
[package]
name = "nym-api"
license = "GPL-3.0"
version = "1.1.67"
version = "1.1.66"
authors.workspace = true
edition = "2021"
rust-version.workspace = true
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-node"
version = "1.19.0"
version = "1.16.0"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
@@ -1,7 +1,9 @@
// Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: GPL-3.0-only
use crate::config::persistence::DEFAULT_RD_BLOOMFILTER_FLUSH_FILE_EXT;
use crate::config::persistence::{
DEFAULT_RD_BLOOMFILTER_FILE_EXT, DEFAULT_RD_BLOOMFILTER_FLUSH_FILE_EXT,
};
use crate::config::Config;
use crate::error::NymNodeError;
use crate::node::replay_protection::bloomfilter::RotationFilter;
@@ -22,6 +24,7 @@ use tracing::{debug, error, info, trace, warn};
// background task responsible for periodically flushing the bloomfilters to disk
pub struct ReplayProtectionDiskFlush {
bloomfilters_directory: PathBuf,
disk_flushing_rate: Duration,
filters_manager: ReplayProtectionBloomfiltersManager,
@@ -121,23 +124,8 @@ impl ReplayProtectionDiskFlush {
None
};
// if we have any other stored bloomfilters that are neither primary nor secondary,
// remove them - they are an artifact from an old version that had a bug in purging code
for (rotation_id, path) in filter_files {
if rotation_id == primary_key_rotation_id {
continue;
}
if let Some(secondary_key_rotation_id) = secondary_key_rotation_id {
if secondary_key_rotation_id == rotation_id {
continue;
}
}
info!("stale bloomfilter for rotation {rotation_id} found at: {path:?}. it is going to get removed");
fs::remove_file(&path)
.map_err(|source| NymNodeError::BloomfilterIoFailure { source, path })?;
}
Ok(ReplayProtectionDiskFlush {
bloomfilters_directory,
disk_flushing_rate: config
.mixnet
.replay_protection
@@ -154,12 +142,15 @@ impl ReplayProtectionDiskFlush {
}
fn bloomfilter_filepath(&self, rotation_id: u32) -> PathBuf {
self.filters_manager.bloomfilter_filepath(rotation_id)
self.bloomfilters_directory
.join(format!("rot-{rotation_id}"))
.with_extension(DEFAULT_RD_BLOOMFILTER_FILE_EXT)
}
fn current_bloomfilter_being_flushed_filepath(&self, rotation_id: u32) -> PathBuf {
self.filters_manager
.current_bloomfilter_being_flushed_filepath(rotation_id)
self.bloomfilters_directory
.join(format!("rot-{rotation_id}"))
.with_extension(DEFAULT_RD_BLOOMFILTER_FLUSH_FILE_EXT)
}
pub(crate) fn bloomfilters_manager(&self) -> ReplayProtectionBloomfiltersManager {
@@ -222,7 +213,7 @@ impl ReplayProtectionDiskFlush {
}
async fn flush_filters_to_disk(&self) -> Result<(), NymNodeError> {
if let Some(parent) = self.filters_manager.bloomfilters_directory().parent() {
if let Some(parent) = self.bloomfilters_directory.parent() {
fs::create_dir_all(parent).map_err(|source| NymNodeError::BloomfilterIoFailure {
source,
path: parent.to_path_buf(),
@@ -4,7 +4,6 @@
use crate::error::NymNodeError;
use bloomfilter::Bloom;
use nym_sphinx_types::REPLAY_TAG_SIZE;
use nym_validator_client::models::KeyRotationId;
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
@@ -13,6 +12,7 @@ use std::path::Path;
use std::sync::{Arc, Mutex, PoisonError, TryLockError};
use time::OffsetDateTime;
use tracing::{error, info, warn};
// auxiliary data associated with the bloomfilter to get some statistics from the time of its creation
// this is needed in order to more accurately resize it upon reset
@@ -178,16 +178,15 @@ impl ReplayProtectionBloomfilters {
Ok(())
}
pub(crate) fn purge_secondary(&self) -> Result<Option<KeyRotationId>, NymNodeError> {
pub(crate) fn purge_secondary(&self) -> Result<(), NymNodeError> {
let mut guard = self
.inner
.lock()
.map_err(|_| NymNodeError::BloomfilterFailure {
message: "mutex got poisoned",
})?;
let id = guard.overlap.take().map(|f| f.metadata.rotation_id);
Ok(id)
guard.overlap = None;
Ok(())
}
pub(crate) fn primary_metadata(
+1 -38
View File
@@ -1,9 +1,6 @@
// Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: GPL-3.0-only
use crate::config::persistence::{
DEFAULT_RD_BLOOMFILTER_FILE_EXT, DEFAULT_RD_BLOOMFILTER_FLUSH_FILE_EXT,
};
use crate::config::Config;
use crate::error::NymNodeError;
use crate::node::replay_protection::bloomfilter::{ReplayProtectionBloomfilters, RotationFilter};
@@ -11,16 +8,12 @@ use crate::node::replay_protection::items_in_bloomfilter;
use human_repr::HumanCount;
use nym_node_metrics::NymNodeMetrics;
use std::cmp::max;
use std::fs;
use std::path::PathBuf;
use std::time::Duration;
use time::OffsetDateTime;
use tracing::info;
#[derive(Clone)]
pub(crate) struct ReplayProtectionBloomfiltersManager {
bloomfilters_directory: PathBuf,
target_fp_p: f64,
minimum_bloomfilter_packets_per_second: usize,
bloomfilter_size_multiplier: f64,
@@ -33,7 +26,6 @@ impl ReplayProtectionBloomfiltersManager {
pub(crate) fn new_disabled(metrics: NymNodeMetrics) -> Self {
// the exact config values are irrelevant as the filters will never be recreated
ReplayProtectionBloomfiltersManager {
bloomfilters_directory: Default::default(),
target_fp_p: 0.001,
minimum_bloomfilter_packets_per_second: 1,
bloomfilter_size_multiplier: 1.0,
@@ -49,12 +41,6 @@ impl ReplayProtectionBloomfiltersManager {
metrics: NymNodeMetrics,
) -> Self {
ReplayProtectionBloomfiltersManager {
bloomfilters_directory: config
.mixnet
.replay_protection
.storage_paths
.current_bloomfilters_directory
.clone(),
target_fp_p: config.mixnet.replay_protection.debug.false_positive_rate,
minimum_bloomfilter_packets_per_second: config
.mixnet
@@ -71,22 +57,6 @@ impl ReplayProtectionBloomfiltersManager {
}
}
pub(crate) fn bloomfilters_directory(&self) -> &PathBuf {
&self.bloomfilters_directory
}
pub(crate) fn bloomfilter_filepath(&self, rotation_id: u32) -> PathBuf {
self.bloomfilters_directory
.join(format!("rot-{rotation_id}"))
.with_extension(DEFAULT_RD_BLOOMFILTER_FILE_EXT)
}
pub(crate) fn current_bloomfilter_being_flushed_filepath(&self, rotation_id: u32) -> PathBuf {
self.bloomfilters_directory
.join(format!("rot-{rotation_id}"))
.with_extension(DEFAULT_RD_BLOOMFILTER_FLUSH_FILE_EXT)
}
pub(crate) fn bloomfilters(&self) -> ReplayProtectionBloomfilters {
self.filters.clone()
}
@@ -100,14 +70,7 @@ impl ReplayProtectionBloomfiltersManager {
}
pub(crate) fn purge_secondary(&self) -> Result<(), NymNodeError> {
// remove data in memory
if let Some(secondary_id) = self.filters.purge_secondary()? {
// remove data on disk (if applicable)
let path = self.bloomfilter_filepath(secondary_id);
fs::remove_file(&path)
.map_err(|source| NymNodeError::BloomfilterIoFailure { source, path })?;
}
Ok(())
self.filters.purge_secondary()
}
pub(crate) fn promote_pre_announced(&self) -> Result<(), NymNodeError> {
+22
View File
@@ -223,6 +223,24 @@ configure_dns_and_icmp_wg() {
echo "dns and icmp configuration completed."
}
enable_bandwidth_metadata_endpoint() {
echo "allowing inbound TCP on port 51830 on interface nymwg (IPv4 and IPv6)..."
# IPv4
sudo iptables -A INPUT -i "$wg_tunnel_interface" -p tcp --dport 51830 -j ACCEPT
sudo iptables -A OUTPUT -o "$wg_tunnel_interface" -p tcp --dport 51830 -j ACCEPT
# IPv6
sudo ip6tables -A INPUT -i "$wg_tunnel_interface" -p tcp --dport 51830 -j ACCEPT
sudo ip6tables -A OUTPUT -o "$wg_tunnel_interface" -p tcp --dport 51830 -j ACCEPT
echo "saving iptables rules..."
sudo iptables-save | sudo tee /etc/iptables/rules.v4
sudo ip6tables-save | sudo tee /etc/iptables/rules.v6
echo "allow rule for TCP/51830 on nymwg applied."
}
case "$1" in
fetch_ipv6_address_nym_tun)
fetch_ipv6_address "$tunnel_interface"
@@ -260,6 +278,9 @@ joke_through_wg_tunnel)
configure_dns_and_icmp_wg)
configure_dns_and_icmp_wg
;;
enable_bandwidth_metadata_endpoint)
enable_bandwidth_metadata_endpoint
;;
adjust_ip_forwarding)
adjust_ip_forwarding
;;
@@ -281,6 +302,7 @@ remove_duplicate_rules)
echo " joke_through_the_mixnet - Fetch a joke via nymtun0."
echo " joke_through_wg_tunnel - Fetch a joke via nymwg."
echo " configure_dns_and_icmp_wg - Allows icmp ping tests for probes alongside configuring dns"
echo " enable_bandwidth_metadata_endpoint - Allow port to enable wireguard metadata endpoint"
echo " adjust_ip_forwarding - Enable IPV6 and IPV4 forwarding"
echo " remove_duplicate_rules <interface> - Remove duplicate iptables rules. Valid interfaces: nymwg, nymtun0"
exit 1
@@ -4,7 +4,7 @@
[package]
name = "nym-network-requester"
license = "GPL-3.0"
version = "1.1.65"
version = "1.1.64"
authors.workspace = true
edition.workspace = true
rust-version = "1.70"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-cli"
version = "1.1.64"
version = "1.1.63"
authors.workspace = true
edition = "2021"
license.workspace = true
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nymvisor"
version = "0.1.29"
version = "0.1.28"
authors.workspace = true
repository.workspace = true
homepage.workspace = true