diff --git a/.github/workflows/ci-build-upload-binaries.yml b/.github/workflows/ci-build-upload-binaries.yml index afaae3536e..c6a8be1811 100644 --- a/.github/workflows/ci-build-upload-binaries.yml +++ b/.github/workflows/ci-build-upload-binaries.yml @@ -30,6 +30,7 @@ on: - "sdk/rust/nym-sdk/**" - "service-providers/**" - "tools/**" + - "nymvisor/**" jobs: publish-nym: @@ -105,6 +106,7 @@ jobs: target/release/nym-network-requester target/release/nym-network-statistics target/release/nym-cli + target/release/nymvisor retention-days: 30 # If this was a pull_request or nightly, upload to build server @@ -122,6 +124,7 @@ jobs: cp target/release/nym-api $OUTPUT_DIR cp target/release/nym-network-requester $OUTPUT_DIR cp target/release/nym-network-statistics $OUTPUT_DIR + cp target/release/nymvisor $OUTPUT_DIR cp target/release/nym-cli $OUTPUT_DIR cp target/release/explorer-api $OUTPUT_DIR cp target/debian/*.deb $OUTPUT_DIR diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml index 9846dff2c7..5de57c66c7 100644 --- a/.github/workflows/publish-nym-binaries.yml +++ b/.github/workflows/publish-nym-binaries.yml @@ -29,6 +29,7 @@ jobs: client_hash: ${{ steps.binary-hashes.outputs.client_hash }} mixnode_hash: ${{ steps.binary-hashes.outputs.mixnode_hash }} gateway_hash: ${{ steps.binary-hashes.outputs.gateway_hash }} + nymvisor_hash: ${{ steps.binary-hashes.outputs.nymvisor_hash }} socks5_hash: ${{ steps.binary-hashes.outputs.socks5_hash }} netreq_hash: ${{ steps.binary-hashes.outputs.netreq_hash }} cli_hash: ${{ steps.binary-hashes.outputs.cli_hash }} @@ -36,6 +37,7 @@ jobs: client_version: ${{ steps.binary-versions.outputs.client_version }} mixnode_version: ${{ steps.binary-versions.outputs.mixnode_version }} gateway_version: ${{ steps.binary-versions.outputs.gateway_version }} + nymvisor_version: ${{ steps.binary-versions.outputs.nymvisor_version }} socks5_version: ${{ steps.binary-versions.outputs.socks5_version }} netreq_version: ${{ steps.binary-versions.outputs.netreq_version }} cli_version: ${{ steps.binary-versions.outputs.cli_version }} @@ -78,6 +80,7 @@ jobs: target/release/nym-network-requester target/release/nym-network-statistics target/release/nym-cli + target/release/nymvisor retention-days: 30 - id: create-release @@ -95,6 +98,7 @@ jobs: target/release/nym-network-requester target/release/nym-network-statistics target/release/nym-cli + target/release/nymvisor push-release-data-client: if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f5a720221c..34fa8c9398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// ## [Unreleased] +## [2024.1-marabou] (2024-02-15) + +**New Features:** +- Introduced nymvisor support for nym-api, gateway, and mixnode binaries ([#4158]) +- Revamped nym-api execution with the addition of init and run commands ([#4225]) + +**Enhancements:** +- Implemented internal improvements for gateways to optimize internal packet routing +- Improved routing score calculation + +**Bug Fixes:** +- Resolved various bugs to enhance overall stability + +[#4158]: https://github.com/nymtech/nym/pull/4158 +[#4225]: https://github.com/nymtech/nym/pull/4225 + + ## [2023.5-rolo] (2023-11-28) - Gateway won't open websocket listener until embedded Network Requester becomes available ([#4166]) diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index 465ba5ea1d..b113ecc3e6 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-client" -version = "1.1.32" +version = "1.1.33" 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 565b6c1c72..37477d9d18 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-socks5-client" -version = "1.1.32" +version = "1.1.33" 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/explorer-api/Cargo.toml b/explorer-api/Cargo.toml index eaf3876402..f4c034c0d0 100644 --- a/explorer-api/Cargo.toml +++ b/explorer-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "explorer-api" -version = "1.1.32" +version = "1.1.33" edition = "2021" license.workspace = true diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index 028658525d..90ef9195ca 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "nym-gateway" license = "GPL-3.0" -version = "1.1.32" +version = "1.1.33" authors = [ "Dave Hrycyszyn ", "Jędrzej Stuczyński ", diff --git a/gateway/debian/postinst b/gateway/debian/postinst old mode 100644 new mode 100755 index 9817170917..a6b058a689 --- a/gateway/debian/postinst +++ b/gateway/debian/postinst @@ -1,6 +1,63 @@ -#DEBHELPER# +#!/bin/sh -useradd nym -mkdir -p /etc/nym -chown -R nym /etc/nym -su nym -c 'NYM_HOME_DIR=/etc/nym nym-gateway init --host 0.0.0.0 --id nym-gateway --public-ips $(curl https://ipinfo.io/ip)' +default_location="/usr/bin/nym-gateway" +default_user="nym" +default_group="nym" + +if [ -f "/tmp/nym_gateway_preinst_marker" ]; then + backup_path=$(cat /tmp/nym_gateway_preinst_marker) + echo "Upgrade detected. Previous version backed up at $backup_path" + + existing_location=$(dirname "$backup_path" | sed 's/\.backup\..*//') + echo "Existing location: ${existing_location}" + + if [ "$existing_location" != "$default_location" ]; then + echo "Custom installation location detected: $existing_location" + + mv "$default_location" "$existing_location/nym-gateway" + + original_user=$(stat -c "%U" "$backup_path") + original_group=$(stat -c "%G" "$backup_path") + original_perms=$(stat -c "%a" "$backup_path") + + chown "$original_user:$original_group" "$existing_location/nym-gateway" + chmod "$original_perms" "$existing_location/nym-gateway" + fi + + rm -f /tmp/nym_gateway_preinst_marker +else + echo "Fresh installation detected." + + if [ -f "$default_location" ]; then + # Leave the binary as the user to perform the apt install + # It's down to the user to specify the correct ownership and permissions + chmod 755 "$default_location" + + echo "Installation complete. Please configure and start the nym-gateway process manually." + echo "Refer to https://nymtech.net/operators/nodes/gateway-setup.html" + echo "Example for setting up the nym-gateway service:" + echo + cat </dev/null) + +if [ -n "$existing_binaries" ]; then + echo "Existing installation(s) detected. Preparing for upgrade." + + for binary_path in $existing_binaries; do + backup_path="$backup_dir/$(basename $binary_path).backup.$(date +%Y-%m-%dT%H:%M:%S)" + cp "$binary_path" "$backup_path" + + echo "Backed up existing binary from $binary_path to $backup_path" + done + + oldest_binary=$(echo "$existing_binaries" | head -n 1) + echo "$oldest_binary" > /tmp/nym_gateway_preinst_marker +else + echo "No existing nym-gateway installation detected. Proceeding with fresh installation." +fi + +exit 0 + +#DEBHELPER# diff --git a/gateway/debian/service b/gateway/debian/service deleted file mode 100644 index 6581fce890..0000000000 --- a/gateway/debian/service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Nym Gateway -After=network-online.target - -[Service] -ExecStart=/usr/bin/nym-gateway run --id nym-gateway -User=nym -Environment="NYM_HOME_DIR=/etc/nym" - -[Install] -WantedBy=multi-user.target diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 489b998e2c..589feffebc 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "nym-mixnode" license = "GPL-3.0" -version = "1.1.34" +version = "1.1.35" authors = [ "Dave Hrycyszyn ", "Jędrzej Stuczyński ", diff --git a/mixnode/debian/postinst b/mixnode/debian/postinst index cda1db59b0..7c672de34b 100644 --- a/mixnode/debian/postinst +++ b/mixnode/debian/postinst @@ -1,6 +1,64 @@ -#DEBHELPER# +#!/bin/sh -useradd nym -mkdir -p /etc/nym -chown -R nym /etc/nym -su nym -c 'NYM_HOME_DIR=/etc/nym nym-mixnode init --host 0.0.0.0 --id nym-mixnode' +default_location="/usr/bin/nym-mixnode" +default_user="nym" +default_group="nym" + +if [ -f "/tmp/nym_mixnode_preinst_marker" ]; then + backup_path=$(cat /tmp/nym_mixnode_preinst_marker) + echo "Upgrade detected. Previous version backed up at $backup_path" + + existing_location=$(dirname "$backup_path" | sed 's/\.backup\..*//') + echo "Existing location: ${existing_location}" + + if [ "$existing_location" != "$default_location" ]; then + echo "Custom installation location detected: $existing_location" + + mv "$default_location" "$existing_location/nym-mixnode" + + original_user=$(stat -c "%U" "$backup_path") + original_group=$(stat -c "%G" "$backup_path") + original_perms=$(stat -c "%a" "$backup_path") + + chown "$original_user:$original_group" "$existing_location/nym-mixnode" + chmod "$original_perms" "$existing_location/nym-mixnode" + fi + + rm -f /tmp/nym_mixnode_preinst_marker +else + echo "Fresh installation detected." + + if [ -f "$default_location" ]; then + # Leave the binary as the user to perform the apt install + # It's down to the user to specify the correct ownership and permissions + chmod 755 "$default_location" + + echo "Installation complete. Please configure and start the nym-mixnode process manually." + echo "Refer to https://nymtech.net/operators/nodes/mixnode-setup.html" + echo "Example for setting up the nym-mixnode service:" + echo + + cat </dev/null) + +if [ -n "$existing_binaries" ]; then + echo "Existing installation(s) detected. Preparing for upgrade." + + for binary_path in $existing_binaries; do + backup_path="$backup_dir/$(basename $binary_path).backup.$(date +%Y-%m-%dT%H:%M:%S)" + cp "$binary_path" "$backup_path" + + echo "Backed up existing binary from $binary_path to $backup_path" + done + + oldest_binary=$(echo "$existing_binaries" | head -n 1) + echo "$oldest_binary" > /tmp/nym_mixnode_preinst_marker +else + echo "No existing nym-mixnode installation detected. Proceeding with fresh installation." +fi + +exit 0 + +#DEBHELPER# diff --git a/mixnode/debian/service b/mixnode/debian/service deleted file mode 100644 index ad533b32c7..0000000000 --- a/mixnode/debian/service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Nym Mixnode -After=network-online.target - -[Service] -ExecStart=/usr/bin/nym-mixnode run --id nym-mixnode -User=nym -Environment="NYM_HOME_DIR=/etc/nym" - -[Install] -WantedBy=multi-user.target diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 0bb2b2c263..10baf737d5 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.34" +version = "1.1.35" authors = [ "Dave Hrycyszyn ", "Jędrzej Stuczyński ", diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index ff36739bb2..0c61b55042 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -3530,7 +3530,7 @@ dependencies = [ [[package]] name = "nym_wallet" -version = "1.2.11" +version = "1.2.12" dependencies = [ "async-trait", "base64 0.13.1", diff --git a/nym-wallet/package.json b/nym-wallet/package.json index f0d1b31155..e9098e8c15 100644 --- a/nym-wallet/package.json +++ b/nym-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/nym-wallet-app", - "version": "1.2.12-rc.2", + "version": "1.2.13", "license": "MIT", "main": "index.js", "scripts": { diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index a9b72b234e..839941001b 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym_wallet" -version = "1.2.11" +version = "1.2.12" description = "Nym Native Wallet" authors = ["Nym Technologies SA"] license = "" diff --git a/nym-wallet/src-tauri/tauri.conf.json b/nym-wallet/src-tauri/tauri.conf.json index 8aabb2bc80..f0a42fa8df 100644 --- a/nym-wallet/src-tauri/tauri.conf.json +++ b/nym-wallet/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "nym-wallet", - "version": "1.2.11" + "version": "1.2.12" }, "build": { "distDir": "../dist", diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index c0f75f1670..4b9b1c8003 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.32" +version = "1.1.33" authors.workspace = true edition.workspace = true rust-version = "1.65" diff --git a/service-providers/network-statistics/Cargo.toml b/service-providers/network-statistics/Cargo.toml index 98f2494c41..5b0ec549f0 100644 --- a/service-providers/network-statistics/Cargo.toml +++ b/service-providers/network-statistics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-network-statistics" -version = "1.1.32" +version = "1.1.33" edition = "2021" license.workspace = true diff --git a/tools/nym-cli/Cargo.toml b/tools/nym-cli/Cargo.toml index 194466b2f6..85f5d8eba5 100644 --- a/tools/nym-cli/Cargo.toml +++ b/tools/nym-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-cli" -version = "1.1.33" +version = "1.1.34" authors.workspace = true edition = "2021" license.workspace = true @@ -30,4 +30,4 @@ nym-network-defaults = { path = "../../common/network-defaults" } [package.metadata.deb] name = "nym-cli" maintainer-scripts = "debian" -systemd-units = { enable = false } \ No newline at end of file +systemd-units = { enable = false }