diff --git a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/circulating-supply.md b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/circulating-supply.md index 0d7c399aa9a..7f5aad7cd4f 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/circulating-supply.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/circulating-supply.md @@ -1 +1 @@ -803_103_234 +804_560_131 diff --git a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/stake-saturation.md b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/stake-saturation.md index 8bc02c386eb..b2ed9e28efd 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/stake-saturation.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/stake-saturation.md @@ -1 +1 @@ -1_016_987 +1_020_023 diff --git a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/staking-target.md b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/staking-target.md index af97e1d3119..49bf2c6564a 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/staking-target.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/staking-target.md @@ -1 +1 @@ -401_551_617 +402_280_065 diff --git a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/token-table.md b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/token-table.md index b1f5c4dea30..413c6d0177f 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/token-table.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/nyx-outputs/token-table.md @@ -1,7 +1,7 @@ | **Item** | **Description** | **Amount in NYM** | |:-------------------|:------------------------------------------------------|--------------------:| | Total Supply | Maximum amount of NYM token in existence | 1_000_000_000 | -| Mixmining Reserve | Tokens releasing for operators rewards | 196_896_265 | +| Mixmining Reserve | Tokens releasing for operators rewards | 195_439_368 | | Vesting Tokens | Tokens locked outside of cicrulation for future claim | 500 | -| Circulating Supply | Amount of unlocked tokens | 803_103_234 | -| Stake Saturation | Optimal size of node self-bond + delegation | 1_016_987 | +| Circulating Supply | Amount of unlocked tokens | 804_560_131 | +| Stake Saturation | Optimal size of node self-bond + delegation | 1_020_023 | diff --git a/documentation/docs/components/outputs/api-scraping-outputs/time-now.md b/documentation/docs/components/outputs/api-scraping-outputs/time-now.md index 1d7a6e3d3b5..2710b013a7c 100644 --- a/documentation/docs/components/outputs/api-scraping-outputs/time-now.md +++ b/documentation/docs/components/outputs/api-scraping-outputs/time-now.md @@ -1 +1 @@ -Monday, November 25th 2024, 13:24:04 UTC +Friday, December 6th 2024, 10:16:06 UTC diff --git a/documentation/docs/components/outputs/command-outputs/nym-api-help.md b/documentation/docs/components/outputs/command-outputs/nym-api-help.md index fcaf94ce6ba..1ba192c6e85 100644 --- a/documentation/docs/components/outputs/command-outputs/nym-api-help.md +++ b/documentation/docs/components/outputs/command-outputs/nym-api-help.md @@ -9,9 +9,9 @@ Commands: Options: -c, --config-env-file - Path pointing to an env file that configures the Nym API + Path pointing to an env file that configures the Nym API [env: NYMAPI_CONFIG_ENV_FILE_ARG=] --no-banner - A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) + A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) [env: NYMAPI_NO_BANNER_ARG=] -h, --help Print help -V, --version diff --git a/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md b/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md index 0a5070b615a..29da832b97b 100644 --- a/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md +++ b/documentation/docs/components/outputs/command-outputs/nym-node-run-help.md @@ -44,6 +44,8 @@ Options: Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false] --mixnet-bind-address Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=] + --mixnet-announce-port + If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_MIXNET_ANNOUNCE_PORT=] --nym-api-urls Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=] --nyxd-urls @@ -60,6 +62,8 @@ Options: The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=] --verloc-bind-address Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=] + --verloc-announce-port + If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_VERLOC_ANNOUNCE_PORT=] --entry-bind-address Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=] --announce-ws-port diff --git a/documentation/docs/pages/operators/changelog.mdx b/documentation/docs/pages/operators/changelog.mdx index 06ac73d2dcf..6c156b5f229 100644 --- a/documentation/docs/pages/operators/changelog.mdx +++ b/documentation/docs/pages/operators/changelog.mdx @@ -25,14 +25,285 @@ export const CiConfig = () => ( ); +export const TunnelManagerCommands = () => ( +
+ Commands to update IP tables rules with a new network_tunnel_manager.sh +
+); + # Changelog -This page displays a full list of all the changes during our release cycle from `v2024.3-eclipse` onwards. Operators can find here the newest updates together with links to relevant documentation. The list is sorted so that the newest changes appear first. +This page displays a full list of all the changes during our release cycle from `v2024.3-eclipse` onward. Operators can find here the newest updates together with links to relevant documentation. The list is sorted so that the newest changes appear first. +## `v2024.14-crunch` + +- [Release binaries](https://github.com/nymtech/nym/releases/tag/nym-binaries-v2024.14-crunch) +- [`nym-node`](nodes/nym-node.mdx) version `1.2.0` +- [Releae operators updates and tools](changelog#operators-updates--tools) +- [Github CHANGELOG.md](https://github.com/nymtech/nym/blob/nym-binaries-v2024.14-crunch/CHANGELOG.md) + +```sh +nym-node +Binary Name: nym-node +Build Timestamp: 2024-12-11T13:49:11.974104790Z +Build Version: 1.2.0 +Commit SHA: a491e6a71a8cf862d77defd740a4ee8d65d8292a +Commit Date: 2024-12-11T10:28:47.000000000+01:00 +Commit Branch: HEAD +rustc Version: 1.83.0 +rustc Channel: stable +cargo Profile: release +``` + +### Features + +- [Bump elliptic from `6.5.4` to `6.5.7` in /testnet-faucet](https://github.com/nymtech/nym/pull/4768): Bumps [elliptic](https://github.com/indutny/elliptic) from `6.5.4` to `6.5.7`. + +- [build(deps): bump micromatch from `4.0.4` to `4.0.8` in /nym-wallet/webdriver](https://github.com/nymtech/nym/pull/4789): Bumps [micromatch](https://github.com/micromatch/micromatch) from `4.0.4` to `4.0.8`. + +- [build(deps): bump axios from 1.6.0 to 1.7.5 in /nym-api/tests](https://github.com/nymtech/nym/pull/4790) Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.7.5. + +- [Sync code with `.env` in build.rs](https://github.com/nymtech/nym/pull/4876): Keep `dotenv` file always up to date + +- [build(deps): bump lazy_static from `1.4.0` to `1.5.0`](https://github.com/nymtech/nym/pull/4913): Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from `1.4.0` to `1.5.0`. + +- [Create TaskStatusEvent trait instead of piggybacking on Error](https://github.com/nymtech/nym/pull/4919) + +- [build(deps): bump once_cell from `1.19.0` to `1.20.2`](https://github.com/nymtech/nym/pull/4952): Bumps [`once_cell`](https://github.com/matklad/once_cell) from `1.19.0` to `1.20.2` + +- [Bump the patch-updates group across 1 directory with 10 updates](https://github.com/nymtech/nym/pull/5011): Bumps the patch-updates group with 9 updates in the / directory: + +| Package | From | To | +| --- | --- | --- | +| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.89` | `1.0.90` | +| [clap](https://github.com/clap-rs/clap) | `4.5.18` | `4.5.20` | +| [clap_complete](https://github.com/clap-rs/clap) | `4.5.29` | `4.5.33` | +| [pin-project](https://github.com/taiki-e/pin-project) | `1.1.5` | `1.1.6` | +| [serde](https://github.com/serde-rs/serde) | `1.0.210` | `1.0.211` | +| [serde_json](https://github.com/serde-rs/json) | `1.0.128` | `1.0.132` | +| [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) | `0.2.93` | `0.2.95` | +| [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) | `0.4.43` | `0.4.45` | +| [web-sys](https://github.com/rustwasm/wasm-bindgen) | `0.3.70` | `0.3.72` | +| Updates `anyhow` | `1.0.89` | `1.0.90` | + +- [[Product Data] Introduce data persistence on gateways](https://github.com/nymtech/nym/pull/5022): This PR builds on top of [\#4974](https://github.com/nymtech/nym/pull/4974), not changing the behavior of the data collection, but persisting them in a sqlite database so they can be kept across restarts and crashes. It also leave the door open for other stats module to use that storage if needed. Here are some points of interest: + - New [`gateway_stats_storage`](https://github.com/nymtech/nym/tree/simon/gateway_stats_persistence/common/gateway-stats-storage) crate + - [Config migration](https://github.com/nymtech/nym/blob/simon/gateway_stats_persistence/nym-node/src/config/old_configs/old_config_v4.rs) resulting from the added database. + - Resulting changes in the [`statistics`](https://github.com/nymtech/nym/tree/simon/gateway_stats_persistence/gateway/src/node/statistics) module to account the new storage system + +- [Integrate nym-credential-proxy into workspace](https://github.com/nymtech/nym/pull/5027): Integrate `nym-credential-proxy` into the main workspace + +- [Authenticator CLI client mode](https://github.com/nymtech/nym/pull/5044) + +- [Node Status API](https://github.com/nymtech/nym/pull/5050): merging a long-diverged feature branch - all commits here were their own merge requests + +- [IPv6 support for wireguard](https://github.com/nymtech/nym/pull/5059) + +- [Add nym node GH workflow](https://github.com/nymtech/nym/pull/5080) + +- [[Product Data] Better unique user count on gateways](https://github.com/nymtech/nym/pull/5084): To avoid double counting clients across gateways, we add a user ID to the gateway session data. + +- [chore: ecash contract migration to remove unused 'redemption_gateway_share'](https://github.com/nymtech/nym/pull/5104) + +- [[Product Data] Client-side stats collection ](https://github.com/nymtech/nym/pull/5107): The goal is to anonymously gather stats from nym-clients. These stats will be sent through the mixnet to a Nym run service provider that will gather them. This PR sets the scene to send stats in a mixnet message to an address. The address can be set when the client is created. Current stats include some infos on sent packets along with platform information. If a receiving address is set, the client will send a mixnet packet every 5min to this address. Otherwise, nothing happens and the client runs as usual. + +- [Send mixnet packet stats using task client](https://github.com/nymtech/nym/pull/5109) + +- [Add granular log on nym-node](https://github.com/nymtech/nym/pull/5111) and make use of it for `defguard_wireguard_rs` big info logs + +- [Rewarding for ticketbook issuance](https://github.com/nymtech/nym/pull/5112): Revamps the current validator rewarder to allow for rewards for issuing the zk-nym ticketbooks. + +- [[Product Data] Add stats reporting configuration in client config ](https://github.com/nymtech/nym/pull/5115): Adds the stats reporting address to client configs. It can be set in the config file, as a CLI argument and as an env var in a `.env` file. As the stats reporting config in now in the `DebugConfig`, the `StatsReportingConfig` is no longer required, making the propagation of these changes more readable + +- [config score](https://github.com/nymtech/nym/pull/5117): introduces a concept of a `config_score` to a nym node which influences performance and thus rewarding amounts and chances of being in the rewarded set. Currently it's influenced by the following factors: + - Accepting terms and conditions (not accepted: 0) + - Exposing self-described API (not exposed: 0) + - Running "nym-node" binary (legacy binary: 0) + - Number of versions behind the core (`score = 0.995 ^ (X * versions_behind ^ 1.65)`) + - The old performance is now treated as `routing_score` + - the "new" performance = `routing_score * config_score` + +- [Add Dockerfile and add env vars for clap arguments](https://github.com/nymtech/nym/pull/5118) + +- [Aadd GH workflow for nym-validator-rewarder](https://github.com/nymtech/nym/pull/5119) + +- [[Product data] Data consumption with ecash ticket](https://github.com/nymtech/nym/pull/5120): Send an event each time an ecash ticket get successfully spent. This allows to approximate how much data each client is using. + +- [[Product Data] Config deserialization bug fix](https://github.com/nymtech/nym/pull/5126): Fixes a bug where a `None` value was serialized into an empty string, and incorrectly deserialized into a `Some` variant. + +- [NS Agent auth with NS API](https://github.com/nymtech/nym/pull/5127): NS Agent authenticates with key that was registered with NS API + - Added flag to Agent to generate keypairs + - Agent requests are signed by agent + - Server-side requests are checked for authentication + +- [CI: reduce jobs running on cluster](https://github.com/nymtech/nym/pull/5132) + +- [Removed ci-nym-api-tests.yml which was running outdated (and broken) tests](https://github.com/nymtech/nym/pull/5133) + +- [[Product Data] Set up country reporting from vpn-client](https://github.com/nymtech/nym/pull/5134): Add the ability to report exit country, along with a small refactoring of a module. + +- [chore: remove standalone legacy mixnode/gateway binaries](https://github.com/nymtech/nym/pull/5135) + +- [Update `serde_json_path` due to compilation issue](https://github.com/nymtech/nym/pull/5144) + +- [Add version to clientStatsReport](https://github.com/nymtech/nym/pull/5147): Add a `kind` and `api_version` field for `ClientStatsReport` + +- [Start session collection for exit gateways](https://github.com/nymtech/nym/pull/5148): Apparently, exit gateways are also entry gateways so we need to start session stats for them as well + +- [build(deps): bump mikefarah/yq from `4.44.3` to `4.44.5`](https://github.com/nymtech/nym/pull/5149): Bumps [mikefarah/yq](https://github.com/mikefarah/yq) from `4.44.3` to `4.44.5`. + +- [build(deps): bump cross-spawn from `7.0.3` to `7.0.6` in /testnet-faucet](https://github.com/nymtech/nym/pull/5150): Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from `7.0.3` to `7.0.6`. + +- [Add export_to_env to NymNetworkDetails](https://github.com/nymtech/nym/pull/5162): In `nym-vpn-core` we've started to read the network environment from a json file and then try to pass around `NymNetworkDetails` directly instead of relying on the exported environment. However we still need to bridge with old code so we need to export the network details instance to the environment. + +- [Add strum::EnumIter for TicketType](https://github.com/nymtech/nym/pull/5164) + +- [Fix env var name](https://github.com/nymtech/nym/pull/5165) + +- [Add support for DELETE to nym-http-api-client](https://github.com/nymtech/nym/pull/5166): Add delete support to `http-api-client` + +- [Add derive_extended_private_key to DirectSecp256k1HdWallet](https://github.com/nymtech/nym/pull/5167): Add `derive_extended_private_key` to `DirectSectp256k1HdWallet` to support seeding ecash keys + +- [Move two minor jobs to free tier github hosted runners](https://github.com/nymtech/nym/pull/5169): In an attempt to easy the load on the self-hosted runners, move two minor workflows over to GH hosted free tier runners. + +- [Remove peers with no allowed ip from storage](https://github.com/nymtech/nym/pull/5175) + +- [Add indexes to monitor run and testing route](https://github.com/nymtech/nym/pull/5181) + +- [Add `monitor_run` and testing_route indexes](https://github.com/nymtech/nym/pull/5182) + +- [`explorer-api`: add nym node endpoints + UI to show nym-nodes and account balances](https://github.com/nymtech/nym/pull/5183): Explorer API: + - Existing endpoints stay identical + - Adds new endpoints to get: + - `nym-nodes` (list + by id) + - account balance + delegations + rewarding + vesting + + - Explorer UI (NextJS) + - List of nym-nodes + - Remove service providers routes (Harbour Master shows these) + - Updates summary page to show nym-nodes + - Adds legacy markers to old gateway and mixnode bond lists + +- [Add `monitor_run` and testing_route indexes](https://github.com/nymtech/nym/pull/5182) + +- [Bugfix/credential proxy sequencing](https://github.com/nymtech/nym/pull/5187) + +- [improvement: make internal gateway clients use the same topology cache](https://github.com/nymtech/nym/pull/5191): This should result in 66% reduction in queries for topology within `nym-node` as all the clients should rely on the same cache + +- [chore: apply 1.84 linter suggestions](https://github.com/nymtech/nym/pull/5192) + +- [Guard storage access with cache](https://github.com/nymtech/nym/pull/5193) + +- [Update Security disclosure email, public key and policy](https://github.com/nymtech/nym/pull/5195) + +- [merge crunch into develop](https://github.com/nymtech/nym/pull/5199) + +- [Fix backwards compat mac generation](https://github.com/nymtech/nym/pull/5202) + +- [adjusted config score penalty calculation](https://github.com/nymtech/nym/pull/5206) + +- [`nym-api` NMv1 adjustments](https://github.com/nymtech/nym/pull/5209) + +- [Nmv2 add debug config](https://github.com/nymtech/nym/pull/5212): Adds debug config to disable poisson process, cover traffic and min performance filtering + +- [introduce UNSTABLE endpoints for returning network monitor run details](https://github.com/nymtech/nym/pull/5214) + +- [Don't consider legacy nodes for rewarded set selection](https://github.com/nymtech/nym/pull/5215) + +- [Derive serialize for UserAgent (#5210)](https://github.com/nymtech/nym/pull/5217): Cherry-pick PR [\#5210](https://github.com/nymtech/nym/pull/5210) + +- [Backport \#5218](https://github.com/nymtech/nym/pull/5220) + +- [Remove any filtering on node semver](https://github.com/nymtech/nym/pull/5224): Removed any filtering on version of nodes. however, the parameters can still be passed to `nym-api` queries to not break existing clients, but they will happily ignore them + +- [Further config score adjustments](https://github.com/nymtech/nym/pull/5225): I still want to add helper endpoints on `nym-api` to expose some of this data. but for now, I'll let this PR bake over the weekend. + +### Bugfix + +- [Correct IPv6 address generation](https://github.com/nymtech/nym/pull/5113) + +- [bugfix: don't send empty BankMsg in ecash contract](https://github.com/nymtech/nym/pull/5121): If ticketbook prices were to be set so low the resultant redemption would have created `BankMsg` with value of 0, that message is no longer going to be sent + +- [fix: validator-rewarder GH job](https://github.com/nymtech/nym/pull/5151) + +- [bugfix: correctly expose ecash-related data on nym-api](https://github.com/nymtech/nym/pull/5155): This PR makes fixes to ecash-related endpoints on `nym-api` + - global data (such as aggregated signatures and keys) are actually always available by all apis + - global data (such as aggregated signatures and keys) are actually always available by all apis + +- [bugfix: use default value for verloc config when deserialising missing values](https://github.com/nymtech/nym/pull/5177) + +- [bugfix: fixed nym-node config migrations (again)](https://github.com/nymtech/nym/pull/5179) + +- [bugfix: added explicit openapi servers to account for route prefixes](https://github.com/nymtech/nym/pull/5237) + +### Operators Updates & Tools + + +**Nym Network will now only allow nodes which [migrated](nodes/nym-node/bonding#migrate-to-nym-node-in-mixnet-smart-contract) their node in Nym mixnet smart contract to Nym Node. All nodes which are still bonded as a legacy one (Mixnode or Gateway) in the wallet will have no chance to take part in the [Rewarded set selection](tokenomics/mixnet-rewards#rewarded-set-selection).** + +**Operators taking part in Delegation program or Service Grant program must migrate their nodes latest by December 16th, 08:00 UTC.** + + +#### Updates + +- [Version count as a part of config score](tokenomics/mixnet-rewards#config-score-calculation) has been introduced. To familiarize yourself with Nym Node operator rewards calculation, read [this page](tokenomics/mixnet-rewards). +- Nym nodes running as Exit Gateway in Service Grant program received delegation. Nym team is now delegating total of **64,800,000 NYM on top 241 Nym Nodes** (137 in Mixnode mode and 104 as Gateways). Our delegation aims to incentivise committed operators who support bootstrapping of Nym network before paying users come. + +
+ + +- 250k NYM - Upgrading to magura in time - 2 nodes +- 300k NYM - Upgrading to magura + bonus for a quick patch upgrade - 102 nodes +- No delegation - not upgrading in time - 2 nodes + + +- `nym-node` has now implemented [IPv6 support for wireguard](https://github.com/nymtech/nym/pull/5059) + +- [`network_tunnel_manager.sh` updated](network): run the commands below to make sure + +
+ +}> +These commands can be run one by one or copy-pasted and run as a block. +```sh +mkdir $HOME/nym-binaries; \ + +curl -L https://raw.githubusercontent.com/nymtech/nym/refs/heads/develop/scripts/network_tunnel_manager.sh -o $HOME/nym-binaries/network_tunnel_manager.sh && \ +chmod +x $HOME/nym-binaries/network_tunnel_manager.sh; \ + +$HOME/nym-binaries/network_tunnel_manager.sh check_nymtun_iptables ; \ +$HOME/nym-binaries/network_tunnel_manager.sh remove_duplicate_rules nymtun0 ;\ +$HOME/nym-binaries/network_tunnel_manager.sh remove_duplicate_rules nymwg;\ +$HOME/nym-binaries/network_tunnel_manager.sh check_nymtun_iptables ; \ +$HOME/nym-binaries/network_tunnel_manager.sh adjust_ip_forwarding ; \ +$HOME/nym-binaries/network_tunnel_manager.sh apply_iptables_rules ; \ +$HOME/nym-binaries/network_tunnel_manager.sh check_nymtun_iptables ; \ +$HOME/nym-binaries/network_tunnel_manager.sh apply_iptables_rules_wg ; \ +$HOME/nym-binaries/network_tunnel_manager.sh configure_dns_and_icmp_wg ; \ +$HOME/nym-binaries/network_tunnel_manager.sh adjust_ip_forwarding ; \ +$HOME/nym-binaries/network_tunnel_manager.sh check_ipv6_ipv4_forwarding; \ + +systemctl daemon-reload && service nym-node restart && journalctl -u nym-node -f +``` + +Then run the jokes in a new window for control +```sh +$HOME/nym-binaries/network_tunnel_manager.sh joke_through_the_mixnet +$HOME/nym-binaries/network_tunnel_manager.sh joke_through_wg_tunnel +``` + + +#### Tools + +- **[New APIs documentation](../apis/introduction)** with interactive APIs generated from the OpenAPI specs of various API endpoints offered by bits of Nym infrastructure run both by Nym and community operators for both Mainnet and the Sandbox testnet. +- [Nym Harbourmaster](https://harbourmaster.nymtech.net/) has a new tab called `CONTRACT EXPLORER` querying data from Nym mixnet contract in real time. +- [Nym Explorer](https://explorer.nymtech.net) is updated to read migrated nodes correctly +- [New community explorer by SpectreDAO](https://explorer.nym.spectredao.net/dashboard) offers Nym Network dashboard, Node overview and Account stats view functions for operators and delegators. +- [`nym-vpnc`](../developers/nymvpncli) build and run documentation, for those who don't want to use the Nym VPN GUIs. ## `magura-drift` diff --git a/documentation/docs/pages/operators/nodes/nym-node/configuration.mdx b/documentation/docs/pages/operators/nodes/nym-node/configuration.mdx index 63ba5b3f0d6..9a82c0081f6 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/configuration.mdx +++ b/documentation/docs/pages/operators/nodes/nym-node/configuration.mdx @@ -301,8 +301,10 @@ chmod +x network_tunnel_manager.sh && \ ###### 3. Setup IP tables rules -- Apply the rules for IPv4 and IPv6: +- Delete IP tables rules for IPv4 and IPv6 and apply new ones: ```sh +./network_tunnel_manager.sh remove_duplicate_rules nymtun0 + ./network_tunnel_manager.sh apply_iptables_rules ``` @@ -363,9 +365,11 @@ operation check_nymtun_iptables completed successfully. ``` -###### 5. Apply rules for wireguad routing +###### 5. Remove old and apply new rules for wireguad routing ```sh +/network_tunnel_manager.sh remove_duplicate_rules nymwg + ./network_tunnel_manager.sh apply_iptables_rules_wg ``` @@ -374,8 +378,15 @@ operation check_nymtun_iptables completed successfully. ```sh ./network_tunnel_manager.sh configure_dns_and_icmp_wg ``` +###### 7. Adjust and validate IP forwarding + +```sh +./network_tunnel_manager.sh adjust_ip_forwarding + +./network_tunnel_manager.sh check_ipv6_ipv4_forwarding +``` -###### 7. Check `nymtun0` interface and test routing configuration +###### 8. Check `nymtun0` interface and test routing configuration ```sh ip addr show nymtun0 @@ -409,7 +420,7 @@ ip addr show nymtun0 - **Note:** WireGuard will return only IPv4 joke, not IPv6. WG IPv6 is under development. Running IPR joke through the mixnet with `./network_tunnel_manager.sh joke_through_the_mixnet` should work with both IPv4 and IPv6! -###### 8. Enable wireguard +###### 9. Enable wireguard Now you can run your node with the `--wireguard-enabled true` flag or add it to your [systemd service config](#systemd). Restart your `nym-node` or [systemd](#2-following-steps-for-nym-nodes-running-as-systemd-service) service (recommended): diff --git a/documentation/docs/pages/operators/nodes/nym-node/configuration/_meta.json b/documentation/docs/pages/operators/nodes/nym-node/configuration/_meta.json index 3d0ff2819e7..a48b50f426a 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/configuration/_meta.json +++ b/documentation/docs/pages/operators/nodes/nym-node/configuration/_meta.json @@ -1,3 +1,3 @@ { - "proxy-configuration": "WSS & Reverese Proxy" + "proxy-configuration": "WSS & Reverse Proxy" } diff --git a/documentation/docs/pages/operators/nodes/nym-node/setup.mdx b/documentation/docs/pages/operators/nodes/nym-node/setup.mdx index f2d6197fee8..33e7e3f6c34 100644 --- a/documentation/docs/pages/operators/nodes/nym-node/setup.mdx +++ b/documentation/docs/pages/operators/nodes/nym-node/setup.mdx @@ -17,10 +17,10 @@ This documentation page provides a guide on how to set up and run a [NYM NODE](. ```sh nym-node Binary Name: nym-node -Build Timestamp: 2024-11-29T13:10:51.813092288Z -Build Version: 1.1.12 -Commit SHA: 4a9a5579c40ad956163ea02e01d7b53aef2ac8ef -Commit Date: 2024-11-29T14:06:32.000000000+01:00 +Build Timestamp: 2024-12-11T13:49:11.974104790Z +Build Version: 1.2.0 +Commit SHA: a491e6a71a8cf862d77defd740a4ee8d65d8292a +Commit Date: 2024-12-11T10:28:47.000000000+01:00 Commit Branch: HEAD rustc Version: 1.83.0 rustc Channel: stable @@ -33,6 +33,7 @@ cargo Profile: release ## Summary + To run a new node, you can simply execute the `nym-node` command without any flags. By default, the node will set necessary configurations. If you later decide to change a setting, you can use the `-w` flag. diff --git a/documentation/docs/pages/operators/tokenomics/mixnet-rewards.mdx b/documentation/docs/pages/operators/tokenomics/mixnet-rewards.mdx index facd3860f30..569cd12e089 100644 --- a/documentation/docs/pages/operators/tokenomics/mixnet-rewards.mdx +++ b/documentation/docs/pages/operators/tokenomics/mixnet-rewards.mdx @@ -12,6 +12,10 @@ import { Clt } from 'components/callout-custom/CalloutCustom.jsx'; # Nym Operators Rewards + +**Nym Network Rewarded set selection had been upgraded recently. Make sure to read the chapter *[Rewarded Set Selection](#rewarded-set-selection)* below carefully to fully understand all requirements to be rewarded!** + + * Nym tokenomics are based on the research paper [*Reward Sharing for Mixnets*](https://nymtech.net/nym-cryptoecon-paper.pdf) @@ -42,6 +46,7 @@ To make it easier for the reader, we use a highlighting line on the left side, w Nodes bonded with vesting tokens are [not allowed to join rewarded set](https://github.com/nymtech/nym/pull/5129) - read more on [Nym operators forum](https://forum.nymtech.net/t/vesting-accounts-are-no-longer-supported/827). + ## Overview This is a quick summary, to understand the full picture, please see detailed [*Rewards Logic & Calculation*](#rewards-logic--calculation) chapter below. @@ -126,34 +131,94 @@ This is a quick summary, to understand the full picture, please see detailed [*R -### Active Set Selection - -*Performance matters!* +### Rewarded Set Selection For a node to be rewarded, the node must be part of a [Rewarded set](https://validator.nymtech.net/api/v1/epoch/reward_params) (which currently = active set) in the first place. The active set is selected in the beginning of each epoch (every 60min) where total of 240 Nym nodes - represented by 120 mixnodes and 120 gateways, are randomly allocated across the layers. -The algorithm choosing nodes into the active set takes into account node's performance and [stake saturation](../tolkenomics.mdx#stake-saturation), both values being between 0 and 1 and config score which is either 0 or 1. +The algorithm choosing nodes into the active set takes into account these parameters: + +1. [Config score](#config-score-calculation) +2. [Performance](#performance-calculation) +3. [Stake saturation](../tokenomics.mdx#stake-saturation) + +Besides these values, the API is also looking whther the node is bonded in Mixnet smart contract as a Nym Node or legacy node (Mixnode or Gateway). **Only nodes bonded as Nym Node in Mixnet smart contract can be selected to the Rewrded set, if you haven't migrated your node yet, please [follow these steps](../nodes/nym-node/bonding#migrate-to-nym-node-in-mixnet-smart-contract)!** + +**The Rewarded set selection probablity formula:** + + +> **active_set_selection_probability = config_score \* ( node_performance ^ 20 ) \* stake_saturation** + + +#### Config Score Calculation + +The nodes selection to the active set has a new parameter - `config_score`. Config score currently looks into three paramteres: -**Config score is introduced:** The nodes selection to the active set has a new parameter - `config_score`. Config score currently looks if the node binary is `nym-node` (not legacy `nym-mixnode` or `nym-gateway`) **AND** if [Terms & Conditions](nodes/nym-node/setup.mdx#terms--conditions) are accepted. Config score has binary values of either 0 or 1, with a following logic: +1. If the node binary is `nym-node` (not legacy `nym-mixnode` or `nym-gateway`) +2. If [Terms & Conditions](../nodes/nym-node/setup.mdx#terms--conditions) are accepted. +3. Version of `nym-node` binary + +**The `config_score` parameter calculation formula:** + + +> **config_score = is_tc_accepted \* is_nym-node_binary \* ( 0.995 ^ ( ( X * versions_behind) ^ 1.65 ) )** + -| **Run `nym-node` binary** | **T&C's accepted** | **`config_score`** | +First two points have binary values of either 0 or 1, with a following logic: + +| **Run `nym-node` binary** | **T&C's accepted** | **Value** | | :-- | :-- | ---: | +| True | True | 1 | | True | False | 0 | | False | True | 0 | | False | False | 0 | -| True | True | 1 | +Only if both conditions above are `True` the node can have any chance to be selected, as otherwise the probability will always be 0. + +**The `version_behind` parameter in `config_score` calculation** -The entire active set selection probablity: +From release `2024.14-crunch` (`nym-node v1.2.0`), the `config_score` parameter takes into account also nodes version. Current version is the +one marked as `Latest` in our repository. From that one we count the parameter `version_behind`, where every version back the number of `versions_behind` increases by 1 in this formula: -> **active_set_selection_probability = config_score \* stake_saturation \* node_performance ^ 20** +> **0.995 ^ ( ( X * versions_behind ) ^ 1.65 )** +> +> where:
+> **X = 1; for patches**
+> **X = 10; for minor versions**
+> **X = 100; for major versions**
-For a comparison we made an example with 5 nodes, where first number is node performance and second stake saturation (assuming all of them `config_score` = 1 and not 0): +> The exact parameters are live accessible on [`/v1/status/config-score-details`](https://validator.nymtech.net/api/swagger/index.html#/Status/config_score_details). + +Our versioning convention is: `major_version . minor_version . patch` + +For example `nym-node` on version `1.2.0` is on 1st major version, 2nd minor and 0 patches. See the the table and graph below: + +| **Version behind** | **Patches (X = 1)** | **Minor versions (X = 10)** | **Major versions (X = 100)** | +| :-- | --: | --: | --: | +| 0 (current version) | 1.0 | 1.0 | 1.0 | +| 1 | 0.995 | 0.7994 | 0.0000 | +| 2 | 0.9844 | 0.4953 | 0.0000 | +| 3 | 0.9698 | 0.2536 | 0.0000 | +| 4 | 0.9518 | 0.1102 | 0.0000 | +| 5 | 0.9311 | 0.0413 | 0.0000 | + + +![](/images/operators/tokenomics/reward_version_graph.png) + +As you can see on above, the algorithm is designed to give maximum probability (`1`) to the latest version and exponentialy dicrease the probability to non-upgraded nodes where the more important version the node is behind, the faster the cliff. This eliminates any older nodes despite their saturation and performance to take place in the Rewarded set and gives a priority to the operators running up-to-date nodes, ensuring as strong network as possible. + + +#### Performance Calculation + +Performance is measured by Nym Network Monitor which sends thousands of packages through different routes every 15 minutes and measures how many were dropped on the way. Test result represents percentage of packets succesfully returned (can be anything between 0 and 1). Performance value is nodes average of these tests in last 24h. + +Good performance is much more essential than [stake saturation](../tokenomics.mdx#stake-saturation), because it's lifted to 20th power in the selection formula. + +For a comparison we made an example with 5 nodes, where first number is node performance and second stake saturation (assuming all of them `config_score` = 1):
- + > node_1 = 1.00 ^ 20 \* 1.0 = 1
> node_2 = 1.00 ^ 20 \* 0.5 = 0.5
> node_3 = 0.99 ^ 20 \* 1.0 = 0.818
@@ -201,7 +266,7 @@ $33\% - 67\%$ ## Roadmap -We are working on the final architecture of [*Fair Mixnet*](#fair-mixnet) tokenomics implementation. The current design is called [*Naive rewarding*](#naive-rewarding). This is an intermediate step, allowing operators to migrate to `nym-node` in Mixnet smart contract and for the first time recieve delegations and earn rewards for any `nym-node` functionality, in opposite to the past system, where only Mixnodes were able to recieve delegations and rewards. +We are working on the final architecture of [*Fair Mixnet*](#fair-mixnet) tokenomics implementation. The current design is called [*Naive rewarding*](#naive-rewarding). This is an intermediate step, expecting operators to migrate to `nym-node` in Mixnet smart contract and be able to recieve delegations and earn rewards for any `nym-node` functionality, in opposite to the past system, where only Mixnodes were able to recieve delegations and rewards. On November 5th, we presented a release roadmap in live [Operators Townhall](https://www.youtube.com/watch?v=3G1pJqvO2VM) where we explained in detail the steps of Nym node and tokenomics development and the effect it will have on node operators and put it into a rough timeline. diff --git a/documentation/docs/public/images/operators/tokenomics/reward_version_graph.png b/documentation/docs/public/images/operators/tokenomics/reward_version_graph.png new file mode 100644 index 00000000000..57948742702 Binary files /dev/null and b/documentation/docs/public/images/operators/tokenomics/reward_version_graph.png differ diff --git a/documentation/scripts/rewards_version_graph.py b/documentation/scripts/rewards_version_graph.py new file mode 100644 index 00000000000..6177c3d7e23 --- /dev/null +++ b/documentation/scripts/rewards_version_graph.py @@ -0,0 +1,67 @@ +import matplotlib.pyplot as plt +import matplotlib.axes as ax +import matplotlib.pylab as pylab +from matplotlib.pyplot import figure +import numpy as np + +plt.style.use('dark_background') + +a = 0.995 +b = 1.65 + +# make data +x1 = [0,1,2,3,4,5] +x2 = x1 +x3 = x1 +x4 = x1 + +y1 = [a**((v*1)**b) for v in x1] +y2 = [a**((v*10)**b) for v in x1] +y3 = [a**((v*100)**b) for v in x1] +# y4 = [a**((11)**b) for v in x1] + +f = plt.figure() +f.set_figwidth(12) +f.set_figheight(9) + +# plot +#fig, ax = plt.subplots() +plt.plot(x1,y1, label=f'Patches behind: config_score_multiplier = {a} ^ ((1 * versions_behind) ^ {b})') +plt.plot(x2,y2, label=f'Minor versions behind: config_score_multiplier = {a} ^ ((10 * versions_behind) ^ {b})') +plt.plot(x3,y3, label=f'Major versions behind: config_score_multiplier = {a} ^ ((100 * versions_behind) ^ {b})') +#ax.plot(x, y, linewidth=2.0) + + +# naming the x axis +plt.xlabel('Nym Node versions behind the current one', fontsize=20) + + +# naming the y axis +plt.ylabel('Config score multiplier', fontsize=20) + +# giving a title to my graph +plt.title('Nym node version config score multiplier', fontsize=28) + + +#ax.Axes.set_xticks([x]) +#ax.Axes.set_yticks([y]) + +plt.legend(fontsize=12) + +#params = {'legend.fontsize': 20, +# 'axes.labelsize': 24, +# 'axes.titlesize':'x-large', +# 'xtick.labelsize':20, +# 'ytick.labelsize':20} +# +#pylab.rcParams.update(params) + +# set the limits +plt.xlim([0, 5]) +plt.ylim([0,1]) + + + +#plt.show() + +plt.savefig('../docs/public/images/operators/tokenomics/reward_version_graph.png')