Compare commits

...

15 Commits

Author SHA1 Message Date
Dave Hrycyszyn 0e0a62938d Removing pointless dependency build command from TypeScript SDK example 2023-01-20 12:38:01 +00:00
durch c708a7cc12 Merge branch 'release/v1.1.6' of https://github.com/nymtech/nym into release/v1.1.6 2023-01-17 13:39:56 +01:00
durch ea35a37d4c Replace println with eprintln! 2023-01-17 13:39:49 +01:00
farbanas e40d25a97b nym-validator-api -> nym-api 2023-01-17 13:33:30 +01:00
farbanas cf903aa2e5 updated changelogs 2023-01-17 13:30:31 +01:00
farbanas 0a2e0d6a8f bump version for release 2023-01-17 13:17:15 +01:00
Jędrzej Stuczyński ea68d42886 bugfix: set default value for nym-api (and nyxd) for clients (#2822)
* setting default urls in client config

* using the same environmental variable for verloc
2023-01-17 10:27:55 +01:00
farbanas 65ed611c24 fix: changelog cleanup and added a UNRELEASED section 2023-01-16 16:00:58 +01:00
Gala f305901a18 Changing the explorers guru link (#2820) 2023-01-16 15:27:44 +01:00
Jędrzej Stuczyński 6b96e474f7 made most of cli boolean arguments optional (#2819)
so that if not provided, they would not overwrite config values
2023-01-16 12:52:29 +01:00
Fouad 4854e929ed link to the ng mixnet explorer for account info (#2823) 2023-01-12 12:33:28 +01:00
Fouad 5f88517e1d Feature/nym connect gateway performance (#2824)
* set up ui for gateway performance in nym-connect

remove duplicated imports

* set and reset (when necessary) gateway performance

* remove unneeded useEffect

* remove log
2023-01-12 10:47:58 +01:00
Fouad c7d8f3af97 Feature/nym connect gateway performance (#2815)
* set up ui for gateway performance in nym-connect

* reset gateway performance state periodically

* remove duplicated imports

* set and reset (when necessary) gateway performance

* align gateway performance text left
2023-01-11 14:19:59 +01:00
Gala 1e84f87bf5 Revert "Changing the explorers guru link"
This reverts commit 70ae45b6c9.
2023-01-11 13:33:26 +01:00
Gala 70ae45b6c9 Changing the explorers guru link 2023-01-11 12:59:16 +01:00
51 changed files with 228 additions and 139 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ jobs:
target/release/nym-gateway
target/release/nym-mixnode
target/release/nym-socks5-client
target/release/nym-validator-api
target/release/nym-api
target/release/nym-network-requester
target/release/nym-network-statistics
target/release/nym-cli
@@ -75,7 +75,7 @@ jobs:
target/release/nym-gateway
target/release/nym-mixnode
target/release/nym-socks5-client
target/release/nym-validator-api
target/release/nym-api
target/release/nym-network-requester
target/release/nym-network-statistics
target/release/nym-cli
+8 -3
View File
@@ -2,24 +2,29 @@
Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [v1.1.6] (2023-01-17)
### Added
### Changed
- streamline override_config functions -> there's a lot of duplicate if statements everywhere ([#2774])
- clean-up nym-api startup arguments/flags to use clap 3 and its macro-derived arguments ([#2772])
- renamed all references to validator_api to nym_api
- renamed all references to nymd to nyxd
- renamed all references to nymd to nyxd ([#2696])
- all-binaries: standarised argument names (note: old names should still be accepted) ([#2762]
### Fixed
- nym-api: should now correctly use `rewarding.enabled` config flag ([#2753])
[#2696]: https://github.com/nymtech/nym/pull/2696
[#2753]: https://github.com/nymtech/nym/pull/2753
[#2762]: https://github.com/nymtech/nym/pull/2762
[#2772]: https://github.com/nymtech/nym/pull/2772
[#2774]: https://github.com/nymtech/nym/pull/2774
## [v1.1.5] (2022-01-10)
## [v1.1.5] (2023-01-10)
### Added
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "client-core"
version = "1.1.5"
version = "1.1.6"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
edition = "2021"
rust-version = "1.66"
+19 -2
View File
@@ -1,6 +1,7 @@
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use config::defaults::NymNetworkDetails;
use config::{NymConfig, OptionalSet, DB_FILE_NAME};
use nymsphinx::params::PacketSize;
use serde::{Deserialize, Serialize};
@@ -499,13 +500,29 @@ pub struct Client<T> {
impl<T: NymConfig> Default for Client<T> {
fn default() -> Self {
let network = NymNetworkDetails::new_mainnet();
let nyxd_urls = network
.endpoints
.iter()
.map(|validator| validator.nyxd_url())
.collect();
let nym_api_urls = network
.endpoints
.iter()
.filter_map(|validator| validator.api_url())
.collect::<Vec<_>>();
if nym_api_urls.is_empty() {
panic!("we do not have any default nym-api urls available!")
}
// there must be explicit checks for whether id is not empty later
Client {
version: env!("CARGO_PKG_VERSION").to_string(),
id: "".to_string(),
disabled_credentials_mode: true,
nyxd_urls: vec![],
nym_api_urls: vec![],
nyxd_urls,
nym_api_urls,
private_identity_key_file: Default::default(),
public_identity_key_file: Default::default(),
private_encryption_key_file: Default::default(),
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-client"
version = "1.1.5"
version = "1.1.6"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
description = "Implementation of the Nym Client"
edition = "2021"
+2 -2
View File
@@ -41,7 +41,7 @@ pub(crate) struct Init {
/// Whether to not start the websocket
#[clap(long)]
disable_socket: bool,
disable_socket: Option<bool>,
/// Port for the socket (if applicable) to listen on in all subsequent runs
#[clap(short, long)]
@@ -60,7 +60,7 @@ pub(crate) struct Init {
/// with bandwidth credential requirement.
#[cfg(feature = "coconut")]
#[clap(long)]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
/// Save a summary of the initialization to a json file
#[clap(long)]
+5 -5
View File
@@ -54,7 +54,7 @@ pub(crate) enum Commands {
// Configuration that can be overridden.
pub(crate) struct OverrideConfig {
nym_apis: Option<Vec<url::Url>>,
disable_socket: bool,
disable_socket: Option<bool>,
port: Option<u16>,
fastmode: bool,
no_cover: bool,
@@ -62,7 +62,7 @@ pub(crate) struct OverrideConfig {
#[cfg(feature = "coconut")]
nyxd_urls: Option<Vec<url::Url>>,
#[cfg(feature = "coconut")]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
}
pub(crate) async fn execute(args: &Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
@@ -80,7 +80,7 @@ pub(crate) async fn execute(args: &Cli) -> Result<(), Box<dyn Error + Send + Syn
pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Config {
config = config
.with_disabled_socket(args.disable_socket)
.with_optional(Config::with_disabled_socket, args.disable_socket)
.with_base(BaseConfig::with_high_default_traffic_volume, args.fastmode)
.with_base(BaseConfig::with_disabled_cover_traffic, args.no_cover)
.with_optional(Config::with_port, args.port)
@@ -100,9 +100,9 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
network_defaults::var_names::NYXD,
config::parse_urls,
)
.with_base(
.with_optional_ext(
BaseConfig::with_disabled_credentials,
!args.enabled_credentials_mode,
args.enabled_credentials_mode.map(|b| !b),
);
}
+2 -2
View File
@@ -38,7 +38,7 @@ pub(crate) struct Run {
/// Whether to not start the websocket
#[clap(long)]
disable_socket: bool,
disable_socket: Option<bool>,
/// Port for the socket to listen on
#[clap(short, long)]
@@ -57,7 +57,7 @@ pub(crate) struct Run {
/// with bandwidth credential requirement.
#[cfg(feature = "coconut")]
#[clap(long)]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
}
impl From<Run> for OverrideConfig {
+2 -2
View File
@@ -31,7 +31,7 @@ pub(crate) struct Init {
/// Note that some service providers might not support this.
// the alias here is included for backwards compatibility (1.1.4 and before)
#[clap(long, alias = "use_anonymous_sender_tag")]
use_reply_surbs: bool,
use_reply_surbs: Option<bool>,
/// Id of the gateway we are going to connect to.
#[clap(long)]
@@ -69,7 +69,7 @@ pub(crate) struct Init {
/// with bandwidth credential requirement.
#[cfg(feature = "coconut")]
#[clap(long)]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
/// Save a summary of the initialization to a json file
#[clap(long)]
+5 -5
View File
@@ -57,14 +57,14 @@ pub(crate) enum Commands {
pub(crate) struct OverrideConfig {
nym_apis: Option<Vec<url::Url>>,
port: Option<u16>,
use_anonymous_replies: bool,
use_anonymous_replies: Option<bool>,
fastmode: bool,
no_cover: bool,
#[cfg(feature = "coconut")]
nyxd_urls: Option<Vec<url::Url>>,
#[cfg(feature = "coconut")]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
}
pub(crate) async fn execute(args: &Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
@@ -84,7 +84,7 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
config = config
.with_base(BaseConfig::with_high_default_traffic_volume, args.fastmode)
.with_base(BaseConfig::with_disabled_cover_traffic, args.no_cover)
.with_anonymous_replies(args.use_anonymous_replies)
.with_optional(Config::with_anonymous_replies, args.use_anonymous_replies)
.with_optional(Config::with_port, args.port)
.with_optional_custom_env_ext(
BaseConfig::with_custom_nym_apis,
@@ -102,9 +102,9 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
network_defaults::var_names::NYXD,
config::parse_urls,
)
.with_base(
.with_optional_ext(
BaseConfig::with_disabled_credentials,
!args.enabled_credentials_mode,
args.enabled_credentials_mode.map(|b| !b),
);
}
+2 -2
View File
@@ -31,7 +31,7 @@ pub(crate) struct Run {
/// Note that some service providers might not support this.
// the alias here is included for backwards compatibility (1.1.4 and before)
#[clap(long, alias = "use_anonymous_sender_tag")]
use_anonymous_replies: bool,
use_anonymous_replies: Option<bool>,
/// Address of the socks5 provider to send messages to.
#[clap(long)]
@@ -68,7 +68,7 @@ pub(crate) struct Run {
/// with bandwidth credential requirement.
#[cfg(feature = "coconut")]
#[clap(long)]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
}
impl From<Run> for OverrideConfig {
+1
View File
@@ -19,6 +19,7 @@ url = "2.2"
thiserror = "1.0.37"
crypto = { path = "../crypto" }
network-defaults = { path = "../network-defaults" }
nymsphinx-acknowledgements = { path = "../nymsphinx/acknowledgements" }
nymsphinx-addressing = { path = "../nymsphinx/addressing" }
nymsphinx-forwarding = { path = "../nymsphinx/forwarding" }
+2 -1
View File
@@ -7,6 +7,7 @@ use crypto::asymmetric::identity;
use futures::stream::FuturesUnordered;
use futures::StreamExt;
use log::*;
use network_defaults::mainnet::NYM_API;
use rand::seq::SliceRandom;
use rand::thread_rng;
use std::net::SocketAddr;
@@ -160,7 +161,7 @@ impl Default for ConfigBuilder {
tested_nodes_batch_size: DEFAULT_BATCH_SIZE,
testing_interval: DEFAULT_TESTING_INTERVAL,
retry_timeout: DEFAULT_RETRY_TIMEOUT,
nym_api_urls: vec![],
nym_api_urls: vec![NYM_API.parse().expect("Invalid default API URL")],
})
}
}
+6
View File
@@ -1,5 +1,11 @@
## UNRELEASED
## [nym-explorer-v1.0.2](https://github.com/nymtech/nym/tree/nym-explorer-v1.0.2) (2023-01-17)
- changing the explorers guru link ([#2820])
[#2820]: https://github.com/nymtech/nym/pull/2820
## [nym-explorer-v1.0.1](https://github.com/nymtech/nym/tree/nym-explorer-v1.0.1) (2023-01-10)
- Feat/2161 ne gate version by @gala1234 in https://github.com/nymtech/nym/pull/2743
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nym/network-explorer",
"version": "1.0.1",
"version": "1.0.2",
"private": true,
"license": "Apache-2.0",
"dependencies": {
+2
View File
@@ -20,3 +20,5 @@ export const UPTIME_STORY_API_GATEWAY = `${NYM_API_BASE_URL}/api/v1/status/gatew
export const MIXNODE_API_ERROR = "We're having trouble finding that record, please try again or Contact Us.";
export const NYM_WEBSITE = 'https://nymtech.net';
export const NYM_BIG_DIPPER = 'https://mixnet.explorers.guru';
+3 -3
View File
@@ -12,7 +12,7 @@ import { Title } from '../../components/Title';
import { cellStyles, UniversalDataGrid } from '../../components/Universal-DataGrid';
import { unymToNym } from '../../utils/currency';
import { Tooltip } from '../../components/Tooltip';
import { BIG_DIPPER } from '../../api/constants';
import { NYM_BIG_DIPPER } from '../../api/constants';
import { splice } from '../../utils';
export const PageGateways: React.FC = () => {
@@ -134,7 +134,7 @@ export const PageGateways: React.FC = () => {
renderCell: (params: GridRenderCellParams) => (
<MuiLink
sx={{ ...cellStyles }}
href={`${BIG_DIPPER}/account/${params.value}`}
href={`${NYM_BIG_DIPPER}/account/${params.value}`}
target="_blank"
data-testid="owner"
>
@@ -152,7 +152,7 @@ export const PageGateways: React.FC = () => {
renderCell: (params: GridRenderCellParams) => (
<MuiLink
sx={{ ...cellStyles }}
href={`${BIG_DIPPER}/account/${params.value}`}
href={`${NYM_BIG_DIPPER}/account/${params.value}`}
target="_blank"
data-testid="owner"
>
+2 -2
View File
@@ -10,7 +10,7 @@ import { useMainContext } from '../../context/main';
import { MixnodeRowType, mixnodeToGridRow } from '../../components/MixNodes';
import { TableToolbar } from '../../components/TableToolbar';
import { MixNodeResponse, MixnodeStatusWithAll, toMixnodeStatus } from '../../typeDefs/explorer-api';
import { BIG_DIPPER } from '../../api/constants';
import { NYM_BIG_DIPPER } from '../../api/constants';
import { CustomColumnHeading } from '../../components/CustomColumnHeading';
import { Title } from '../../components/Title';
import { cellStyles, UniversalDataGrid } from '../../components/Universal-DataGrid';
@@ -261,7 +261,7 @@ export const PageMixnodes: React.FC = () => {
headerClassName: 'MuiDataGrid-header-override',
renderCell: (params: GridRenderCellParams) => (
<MuiLink
href={`${BIG_DIPPER}/account/${params.value}`}
href={`${NYM_BIG_DIPPER}/account/${params.value}`}
target="_blank"
sx={getCellStyles(theme, params.row)}
data-testid="big-dipper-link"
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-gateway"
version = "1.1.5"
version = "1.1.6"
authors = [
"Dave Hrycyszyn <futurechimp@users.noreply.github.com>",
"Jędrzej Stuczyński <andrew@nymtech.net>",
+9 -9
View File
@@ -68,11 +68,11 @@ pub struct Init {
/// bypass bandwidth credential requirement
#[cfg(feature = "coconut")]
#[clap(long)]
only_coconut_credentials: bool,
only_coconut_credentials: Option<bool>,
/// Enable/disable gateway anonymized statistics that get sent to a statistics aggregator server
#[clap(long)]
enabled_statistics: bool,
enabled_statistics: Option<bool>,
/// URL where a statistics aggregator is running. The default value is a Nym aggregator server
#[clap(long)]
@@ -103,10 +103,10 @@ impl From<Init> for OverrideConfig {
}
pub async fn execute(args: &Init, output: OutputFormat) {
println!("Initialising gateway {}...", args.id);
eprintln!("Initialising gateway {}...", args.id);
let already_init = if Config::default_config_file_path(Some(&args.id)).exists() {
println!(
eprintln!(
"Gateway \"{}\" was already initialised before! Config information will be \
overwritten (but keys will be kept)!",
args.id
@@ -146,15 +146,15 @@ pub async fn execute(args: &Init, output: OutputFormat) {
)
.expect("Failed to save identity keys");
println!("Saved identity and mixnet sphinx keypairs");
eprintln!("Saved identity and mixnet sphinx keypairs");
}
let config_save_location = config.get_config_file_save_location();
config
.save_to_file(None)
.expect("Failed to save the config file");
println!("Saved configuration file to {:?}", config_save_location);
println!("Gateway configuration completed.\n\n\n");
eprintln!("Saved configuration file to {:?}", config_save_location);
eprintln!("Gateway configuration completed.\n\n\n");
crate::node::create_gateway(config)
.await
@@ -182,11 +182,11 @@ mod tests {
nym_apis: None,
mnemonic: None,
statistics_service_url: None,
enabled_statistics: false,
enabled_statistics: None,
#[cfg(feature = "coconut")]
nyxd_urls: None,
#[cfg(feature = "coconut")]
only_coconut_credentials: false,
only_coconut_credentials: None,
};
std::env::set_var(BECH32_PREFIX, "n");
+11 -8
View File
@@ -52,7 +52,7 @@ pub(crate) struct OverrideConfig {
clients_port: Option<u16>,
datastore: Option<PathBuf>,
announce_host: Option<String>,
enabled_statistics: bool,
enabled_statistics: Option<bool>,
statistics_service_url: Option<url::Url>,
nym_apis: Option<Vec<url::Url>>,
mnemonic: Option<bip39::Mnemonic>,
@@ -60,7 +60,7 @@ pub(crate) struct OverrideConfig {
#[cfg(feature = "coconut")]
nyxd_urls: Option<Vec<url::Url>>,
#[cfg(feature = "coconut")]
only_coconut_credentials: bool,
only_coconut_credentials: Option<bool>,
}
pub(crate) async fn execute(args: Cli) {
@@ -103,7 +103,7 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
NYM_API,
config::parse_urls,
)
.with_enabled_statistics(args.enabled_statistics)
.with_optional(Config::with_enabled_statistics, args.enabled_statistics)
.with_optional_env(
Config::with_custom_statistics_service_url,
args.statistics_service_url,
@@ -130,7 +130,10 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
NYXD,
config::parse_urls,
)
.with_only_coconut_credentials(args.only_coconut_credentials);
.with_optional(
Config::with_only_coconut_credentials,
args.only_coconut_credentials,
);
}
config
@@ -143,8 +146,8 @@ pub(crate) fn validate_bech32_address_or_exit(address: &str) {
bech32_address_validation::try_bech32_decode(address)
{
let error_message = format!("Error: wallet address decoding failed: {err}").red();
println!("{}", error_message);
println!("Exiting...");
eprintln!("{}", error_message);
eprintln!("Exiting...");
process::exit(1);
}
@@ -152,8 +155,8 @@ pub(crate) fn validate_bech32_address_or_exit(address: &str) {
bech32_address_validation::validate_bech32_prefix(&prefix, address)
{
let error_message = format!("Error: wallet address type is wrong, {err}").red();
println!("{}", error_message);
println!("Exiting...");
eprintln!("{}", error_message);
eprintln!("Exiting...");
process::exit(1);
}
}
+7 -7
View File
@@ -68,11 +68,11 @@ pub struct Run {
/// bypass bandwidth credential requirement
#[cfg(feature = "coconut")]
#[clap(long)]
only_coconut_credentials: bool,
only_coconut_credentials: Option<bool>,
/// Enable/disable gateway anonymized statistics that get sent to a statistics aggregator server
#[clap(long)]
enabled_statistics: bool,
enabled_statistics: Option<bool>,
/// URL where a statistics aggregator is running. The default value is a Nym aggregator server
#[clap(long)]
@@ -103,14 +103,14 @@ impl From<Run> for OverrideConfig {
}
fn show_binding_warning(address: String) {
println!("\n##### NOTE #####");
println!(
eprintln!("\n##### NOTE #####");
eprintln!(
"\nYou are trying to bind to {} - you might not be accessible to other nodes\n\
You can ignore this warning if you're running setup on a local network \n\
or have set a custom 'announce-host'",
address
);
println!("\n\n");
eprintln!("\n\n");
}
fn special_addresses() -> Vec<&'static str> {
@@ -118,7 +118,7 @@ fn special_addresses() -> Vec<&'static str> {
}
pub async fn execute(args: &Run, output: OutputFormat) {
println!("Starting gateway {}...", args.id);
eprintln!("Starting gateway {}...", args.id);
let mut config = match Config::load_from_file(Some(&args.id)) {
Ok(cfg) => cfg,
@@ -144,7 +144,7 @@ pub async fn execute(args: &Run, output: OutputFormat) {
}
let mut gateway = crate::node::create_gateway(config).await;
println!(
eprintln!(
"\nTo bond your gateway you will need to install the Nym wallet, go to https://nymtech.net/get-involved and select the Download button.\n\
Select the correct version and install it to your machine. You will need to provide the following: \n ");
gateway.print_node_details(output);
+3 -3
View File
@@ -65,18 +65,18 @@ fn print_signed_address(private_key: &identity::PrivateKey, wallet_address: nyxd
validate_bech32_address_or_exit(wallet_address.as_ref());
let signature = private_key.sign_text(wallet_address.as_ref());
println!("The base58-encoded signature on '{wallet_address}' is: {signature}",);
eprintln!("The base58-encoded signature on '{wallet_address}' is: {signature}",);
}
fn print_signed_text(private_key: &identity::PrivateKey, text: &str) {
println!(
eprintln!(
"Signing the text {:?} using your mixnode's Ed25519 identity key...",
text
);
let signature = private_key.sign_text(text);
println!(
eprintln!(
"The base58-encoded signature on '{}' is: {}",
text, signature
);
+3 -3
View File
@@ -22,7 +22,7 @@ fn fail_upgrade<D1: Display, D2: Display>(from_version: D1, to_version: D2) -> !
}
fn print_start_upgrade<D1: Display, D2: Display>(from: D1, to: D2) {
println!(
eprintln!(
"\n==================\nTrying to upgrade gateway from {} to {} ...",
from, to
);
@@ -36,7 +36,7 @@ fn print_failed_upgrade<D1: Display, D2: Display>(from: D1, to: D2) {
}
fn print_successful_upgrade<D1: Display, D2: Display>(from: D1, to: D2) {
println!(
eprintln!(
"Upgrade from {} to {} was successful!\n==================\n",
from, to
);
@@ -121,7 +121,7 @@ fn do_upgrade(mut config: Config, args: &Upgrade, package_version: Version) {
let config_version = parse_config_version(&config);
if config_version == package_version {
println!("You're using the most recent version!");
eprintln!("You're using the most recent version!");
return;
}
+2 -2
View File
@@ -119,8 +119,8 @@ where
let identity_keypair = load_identity_keys(&pathfinder);
let Some(address) = self.config.get_wallet_address() else {
let error_message = "Error: gateway hasn't set its wallet address".red();
println!("{error_message}");
println!("Exiting...");
eprintln!("{error_message}");
eprintln!("Exiting...");
process::exit(1);
};
// perform extra validation to ensure we have correct prefix
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-mixnode"
version = "1.1.5"
version = "1.1.6"
authors = [
"Dave Hrycyszyn <futurechimp@users.noreply.github.com>",
"Jędrzej Stuczyński <andrew@nymtech.net>",
+11 -8
View File
@@ -94,11 +94,11 @@ struct ApiArgs {
/// Specifies whether network monitoring is enabled on this API
#[clap(short = 'm', long)]
enable_monitor: bool,
enable_monitor: Option<bool>,
/// Specifies whether network rewarding is enabled on this API
#[clap(short = 'r', long, requires = "enable_monitor", requires = "mnemonic")]
enable_rewarding: bool,
enable_rewarding: Option<bool>,
/// Endpoint to nyxd instance from which the monitor will grab nodes to test
#[clap(long)]
@@ -132,7 +132,7 @@ struct ApiArgs {
/// Set this nym api to work in a enabled credentials that would attempt to use gateway with the bandwidth credential requirement
#[clap(long)]
enabled_credentials_mode: bool,
enabled_credentials_mode: Option<bool>,
/// Announced address where coconut clients will connect.
#[cfg(feature = "coconut")]
@@ -142,7 +142,7 @@ struct ApiArgs {
/// Flag to indicate whether coconut signer authority is enabled on this API
#[cfg(feature = "coconut")]
#[clap(long, requires = "mnemonic", requires = "announce-address")]
enable_coconut: bool,
enable_coconut: Option<bool>,
}
async fn wait_for_interrupt(mut shutdown: TaskManager) {
@@ -186,15 +186,18 @@ fn override_config(mut config: Config, args: ApiArgs) -> Config {
Config::with_min_gateway_reliability,
args.min_gateway_reliability,
)
.with_network_monitor_enabled(args.enable_monitor)
.with_rewarding_enabled(args.enable_rewarding)
.with_disabled_credentials_mode(!args.enabled_credentials_mode);
.with_optional(Config::with_network_monitor_enabled, args.enable_monitor)
.with_optional(Config::with_rewarding_enabled, args.enable_rewarding)
.with_optional(
Config::with_disabled_credentials_mode,
args.enabled_credentials_mode.map(|b| !b),
);
#[cfg(feature = "coconut")]
{
config = config
.with_optional(Config::with_announce_address, args.announce_address)
.with_coconut_signer_enabled(args.enable_coconut);
.with_optional(Config::with_coconut_signer_enabled, args.enable_coconut);
}
if args.save_config {
+8 -1
View File
@@ -1,11 +1,18 @@
# Changelog
## UNRELEASED
## [nym-connect-v1.1.6](https://github.com/nymtech/nym/tree/nym-connect-v1.1.6) (2023-01-17)
- part (1) show gateway status on the UI if the gateway is not live, is overloaded or is slow ([#2824])
[#2824]: https://github.com/nymtech/nym/pull/2824
## [nym-connect-v1.1.5](https://github.com/nymtech/nym/tree/nym-connect-v1.1.5) (2023-01-10)
- get version number from tauri and display by @fmtabbara in https://github.com/nymtech/nym/pull/2684
- Feature/nym connect experimental software text by @fmtabbara in https://github.com/nymtech/nym/pull/2692
- NymConnect - Display service info in tooltip **1.1.5 Release** by @fmtabbara in https://github.com/nymtech/nym/pull/2704
- Feat/2130 tables update rebase by @gala1234 in https://github.com/nymtech/nym/pull/2742
## [nym-connect-v1.1.4](https://github.com/nymtech/nym/tree/nym-connect-v1.1.4) (2022-12-20)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nym/nym-connect",
"version": "1.1.5",
"version": "1.1.6",
"main": "index.js",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-connect"
version = "1.1.5"
version = "1.1.6"
description = "nym-connect"
authors = ["Nym Technologies SA"]
license = ""
+1 -1
View File
@@ -1,7 +1,7 @@
{
"package": {
"productName": "nym-connect",
"version": "1.1.5"
"version": "1.1.6"
},
"build": {
"distDir": "../dist",
+1
View File
@@ -74,6 +74,7 @@ export const App: React.FC = () => {
onConnectClick={handleConnectClick}
ipAddress="127.0.0.1"
port={1080}
gatewayPerformance={context.gatewayPerformance}
connectedSince={context.connectedSince}
serviceProvider={context.serviceProvider}
stats={[
@@ -1,7 +1,7 @@
import React from 'react';
import { Box, CircularProgress, Divider, Stack, Tooltip, Typography } from '@mui/material';
import { DateTime } from 'luxon';
import { ConnectionStatusKind } from '../types';
import { ConnectionStatusKind, GatewayPerformance } from '../types';
import { ServiceProvider } from '../types/directory';
import { ServiceProviderInfo } from './ServiceProviderInfo';
@@ -58,9 +58,10 @@ const ConnectionStatusContent: React.FC<{
export const ConnectionStatus: React.FC<{
status: ConnectionStatusKind;
gatewayPerformance?: GatewayPerformance;
connectedSince?: DateTime;
serviceProvider?: ServiceProvider;
}> = ({ status, serviceProvider }) => {
}> = ({ status, serviceProvider, gatewayPerformance }) => {
const color =
status === ConnectionStatusKind.connected || status === ConnectionStatusKind.disconnecting
? '#21D072'
@@ -69,7 +70,13 @@ export const ConnectionStatus: React.FC<{
return (
<>
<Box color={color} fontSize={FONT_SIZE} sx={{ mb: 1 }}>
<ConnectionStatusContent status={status} />
{status === ConnectionStatusKind.connected && gatewayPerformance !== 'Good' ? (
<Typography fontWeight={FONT_WEIGHT} fontStyle={FONT_STYLE} textAlign="left" color="primary">
Gateway has issues
</Typography>
) : (
<ConnectionStatusContent status={status} />
)}
</Box>
{serviceProvider ? (
<Tooltip title={<ServiceProviderInfo serviceProvider={serviceProvider} />}>
+27 -5
View File
@@ -1,15 +1,15 @@
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState, useRef } from 'react';
import { DateTime } from 'luxon';
import { invoke } from '@tauri-apps/api';
import type { UnlistenFn } from '@tauri-apps/api/event';
import { listen } from '@tauri-apps/api/event';
import { forage } from '@tauri-apps/tauri-forage';
import { ConnectionStatusKind, GatewayPerformance } from '../types';
import { ConnectionStatsItem } from '../components/ConnectionStats';
import { ServiceProvider, Services } from '../types/directory';
import { Error } from 'src/types/error';
import { TauriEvent } from 'src/types/event';
import { getVersion } from '@tauri-apps/api/app';
import { ConnectionStatusKind } from '../types';
import { ConnectionStatsItem } from '../components/ConnectionStats';
import { ServiceProvider, Services } from '../types/directory';
const TAURI_EVENT_STATUS_CHANGED = 'app:connection-status-changed';
@@ -25,7 +25,7 @@ export type TClientContext = {
serviceProvider?: ServiceProvider;
showHelp: boolean;
error?: Error;
gatewayPerformance: GatewayPerformance;
setMode: (mode: ModeType) => void;
clearError: () => void;
handleShowHelp: () => void;
@@ -50,12 +50,15 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
const [showHelp, setShowHelp] = useState(false);
const [error, setError] = useState<Error>();
const [appVersion, setAppVersion] = useState<string>();
const [gatewayPerformance, setGatewayPerformance] = useState<GatewayPerformance>('Good');
const getAppVersion = async () => {
const version = await getVersion();
setAppVersion(version);
};
const timerId = useRef<NodeJS.Timeout>();
useEffect(() => {
invoke('get_services').then((result) => {
setServices(result as Services);
@@ -93,6 +96,22 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
unlisten.push(result);
});
listen('socks5-status-event', (e: TauriEvent) => {
if (e.payload.message.includes('slow')) {
setGatewayPerformance('Poor');
if (timerId.current) {
clearTimeout(timerId.current);
}
timerId.current = setTimeout(() => {
setGatewayPerformance('Good');
}, 10000);
}
}).then((result) => {
unlisten.push(result);
});
return () => {
unlisten.forEach((unsubscribe) => unsubscribe());
};
@@ -110,6 +129,7 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
const startDisconnecting = useCallback(async () => {
try {
await invoke('start_disconnecting');
setGatewayPerformance('Good');
} catch (e) {
console.log(e);
}
@@ -187,6 +207,7 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
setServiceProvider,
showHelp,
handleShowHelp,
gatewayPerformance,
}),
[
appVersion,
@@ -200,6 +221,7 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
connectedSince,
services,
serviceProvider,
gatewayPerformance,
],
);
+1
View File
@@ -9,6 +9,7 @@ const mockValues: TClientContext = {
services: [],
showHelp: false,
serviceProvider: { id: '1', description: 'Keybase service provider', gateway: 'abc123', address: '123abc' },
gatewayPerformance: 'Good',
setMode: () => {},
clearError: () => {},
handleShowHelp: () => {},
+9 -3
View File
@@ -4,7 +4,7 @@ import { DateTime } from 'luxon';
import { IpAddressAndPortModal } from 'src/components/IpAddressAndPortModal';
import { ConnectionTimer } from 'src/components/ConntectionTimer';
import { ConnectionStatus } from '../components/ConnectionStatus';
import { ConnectionStatusKind } from '../types';
import { ConnectionStatusKind, GatewayPerformance } from '../types';
import { ConnectionStatsItem } from '../components/ConnectionStats';
import { ConnectionButton } from '../components/ConnectionButton';
import { IpAddressAndPort } from '../components/IpAddressAndPort';
@@ -13,6 +13,7 @@ import { TestAndEarnButtonArea } from '../components/Growth/TestAndEarnButtonAre
export const ConnectedLayout: React.FC<{
status: ConnectionStatusKind;
gatewayPerformance: GatewayPerformance;
stats: ConnectionStatsItem[];
ipAddress: string;
port: number;
@@ -25,6 +26,7 @@ export const ConnectedLayout: React.FC<{
serviceProvider?: ServiceProvider;
}> = ({
status,
gatewayPerformance,
showInfoModal,
handleCloseInfoModal,
ipAddress,
@@ -37,8 +39,12 @@ export const ConnectedLayout: React.FC<{
}) => (
<>
<IpAddressAndPortModal show={showInfoModal} onClose={handleCloseInfoModal} ipAddress={ipAddress} port={port} />
<Box>
<ConnectionStatus status={ConnectionStatusKind.connected} serviceProvider={serviceProvider} />
<Box pb={1}>
<ConnectionStatus
status={ConnectionStatusKind.connected}
serviceProvider={serviceProvider}
gatewayPerformance={gatewayPerformance}
/>
</Box>
<Divider sx={{ my: 2 }} />
<Box sx={{ mb: 3 }}>
+28 -27
View File
@@ -86,32 +86,33 @@ export const Mock: ComponentStory<typeof AppWindowFrame> = () => {
}
return (
<Box width={width} height={height}>
<AppWindowFrame>
<ConnectedLayout
showInfoModal={false}
handleCloseInfoModal={() => undefined}
status={context.connectionStatus}
busy={busy}
onConnectClick={handleConnectClick}
ipAddress="127.0.0.1"
port={1080}
connectedSince={context.connectedSince}
serviceProvider={services[0].items[0]}
stats={[
{
label: 'in:',
totalBytes: 1024,
rateBytesPerSecond: 1024 * 1024 * 1024 + 10,
},
{
label: 'out:',
totalBytes: 1024 * 1024 * 1024 * 1024 * 20,
rateBytesPerSecond: 1024 * 1024 + 10,
},
]}
/>
</AppWindowFrame>
</Box>
<AppWindowFrame>
<ConnectedLayout
gatewayPerformance="Good"
showInfoModal={false}
handleCloseInfoModal={() => {
return undefined;
}}
status={context.connectionStatus}
busy={busy}
onConnectClick={handleConnectClick}
ipAddress="127.0.0.1"
port={1080}
connectedSince={context.connectedSince}
serviceProvider={services[0].items[0]}
stats={[
{
label: 'in:',
totalBytes: 1024,
rateBytesPerSecond: 1024 * 1024 * 1024 + 10,
},
{
label: 'out:',
totalBytes: 1024 * 1024 * 1024 * 1024 * 20,
rateBytesPerSecond: 1024 * 1024 + 10,
},
]}
/>
</AppWindowFrame>
);
};
@@ -14,6 +14,7 @@ export const Default: ComponentStory<typeof ConnectedLayout> = () => (
<Box p={2} width={242} sx={{ bgcolor: 'nym.background.dark' }}>
<ConnectedLayout
showInfoModal={false}
gatewayPerformance="Good"
handleCloseInfoModal={() => {
return undefined;
}}
@@ -10,17 +10,17 @@ export default {
} as ComponentMeta<typeof ConnectionStatus>;
export const Disconnected: ComponentStory<typeof ConnectionStatus> = () => (
<ConnectionStatus status={ConnectionStatusKind.disconnected} />
<ConnectionStatus status={ConnectionStatusKind.disconnected} gatewayPerformance="Good" />
);
export const Connecting: ComponentStory<typeof ConnectionStatus> = () => (
<ConnectionStatus status={ConnectionStatusKind.connecting} />
<ConnectionStatus status={ConnectionStatusKind.connecting} gatewayPerformance="Good" />
);
export const Connected: ComponentStory<typeof ConnectionStatus> = () => (
<ConnectionStatus status={ConnectionStatusKind.connected} connectedSince={DateTime.now()} />
<ConnectionStatus status={ConnectionStatusKind.connected} connectedSince={DateTime.now()} gatewayPerformance="Good" />
);
export const Disconnecting: ComponentStory<typeof ConnectionStatus> = () => (
<ConnectionStatus status={ConnectionStatusKind.disconnecting} />
<ConnectionStatus status={ConnectionStatusKind.disconnecting} gatewayPerformance="Good" />
);
+2
View File
@@ -4,3 +4,5 @@ export enum ConnectionStatusKind {
connected = 'connected',
connecting = 'connecting',
}
export type GatewayPerformance = 'Good' | 'Poor' | 'VeryPoor';
+10 -7
View File
@@ -1,16 +1,19 @@
# Changelog
## UNRELEASED
## [nym-wallet-v1.1.7](https://github.com/nymtech/nym/releases/tag/nym-wallet-v1.1.7) (2023-01-17)
- link to the ng mixnet explorer for account info ([#2823])
[#2823]: https://github.com/nymtech/nym/pull/2823
## [nym-wallet-v1.1.6](https://github.com/nymtech/nym/releases/tag/nym-wallet-v1.1.6) (2023-01-10)
- wallet: rewrite some abci errors on the fly by @octol in https://github.com/nymtech/nym/pull/2716
- Feature/node settings apy playground by @fmtabbara in https://github.com/nymtech/nym/pull/1677
- Fix param input layout **1.1.5 Release** by @fmtabbara in https://github.com/nymtech/nym/pull/2720
- Add epoch info to unbond modal **1.1.5 Release** by @fmtabbara in https://github.com/nymtech/nym/pull/2718
- Feat/2130 tables update rebase by @gala1234ss as url param by @doums in https://github.com/nymtech/nym/pull/2780
## [nym-wallet-v1.1.5](https://github.com/nymtech/nym/releases/tag/nym-wallet-v1.1.5) (2022-12-22)
This release contains the APY calculator feature.
- Feat/2130 tables update rebase by @gala1234 https://github.com/nymtech/nym/pull/2742
- pass wallet address as url param by @doums in https://github.com/nymtech/nym/pull/2780
## [nym-wallet-v1.1.5](https://github.com/nymtech/nym/releases/tag/nym-wallet-v1.1.5) (2022-12-22)
+1 -1
View File
@@ -2932,7 +2932,7 @@ dependencies = [
[[package]]
name = "nym_wallet"
version = "1.1.5"
version = "1.1.6"
dependencies = [
"aes-gcm",
"argon2 0.3.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nymproject/nym-wallet-app",
"version": "1.1.6",
"version": "1.1.7",
"main": "index.js",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym_wallet"
version = "1.1.6"
version = "1.1.7"
description = "Nym Native Wallet"
authors = ["Nym Technologies SA"]
license = ""
+1 -1
View File
@@ -1,7 +1,7 @@
{
"package": {
"productName": "nym-wallet",
"version": "1.1.6"
"version": "1.1.7"
},
"build": {
"distDir": "../dist",
+1
View File
@@ -21,6 +21,7 @@ import { Console } from '../utils/console';
export const urls = (networkName?: Network) =>
networkName === 'MAINNET'
? {
mixnetExplorer: 'https://mixnet.explorers.guru/',
blockExplorer: 'https://blocks.nymtech.net',
networkExplorer: 'https://explorer.nymtech.net',
}
+1 -1
View File
@@ -43,7 +43,7 @@ export const BalanceCard = () => {
{network && (
<Grid item>
<Link
href={`${urls(network).blockExplorer}/account/${clientDetails?.client_address}`}
href={`${urls(network).mixnetExplorer}/account/${clientDetails?.client_address}`}
target="_blank"
text="Last transactions"
fontSize={14}
@@ -52,7 +52,6 @@
"webpack-merge": "^5.8.0"
},
"scripts": {
"prestart": "yarn build:dependencies",
"start": "webpack serve --progress --port 3000",
"build:dependencies": "run-s build:dependencies:nym-client-wasm build:dependencies:ts-packages build:dependencies:sdk",
"build:dependencies:nym-client-wasm": "../../packages/nym-client-wasm/scripts/build.sh",
@@ -69,4 +68,4 @@
"lint": "eslint src",
"lint:fix": "eslint src --fix"
}
}
}
@@ -3,7 +3,7 @@
[package]
name = "nym-network-requester"
version = "1.1.5"
version = "1.1.6"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
edition = "2021"
rust-version = "1.65"
@@ -1,6 +1,6 @@
[package]
name = "nym-network-statistics"
version = "1.1.5"
version = "1.1.6"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-cli"
version = "1.1.5"
version = "1.1.6"
authors = ["Nym Technologies SA"]
edition = "2021"