Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0

// TEMPORARY WORKAROUND:
// those features are expected as the below should only get activated whenever
// the corresponding features in tendermint-rpc are enabled transitively
#![allow(unexpected_cfgs)]

use crate::nyxd::cosmwasm_client::client_traits::SigningCosmWasmClient;
use crate::nyxd::error::NyxdError;
use crate::nyxd::{Config, GasPrice, Hash, Height};
Expand Down
5 changes: 5 additions & 0 deletions common/client-libs/validator-client/src/nyxd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0

// TEMPORARY WORKAROUND:
// those features are expected as the below should only get activated whenever
// the corresponding features in tendermint-rpc are enabled transitively
#![allow(unexpected_cfgs)]

use crate::nyxd::contract_traits::{NymContractsProvider, TypedNymContracts};
use crate::nyxd::cosmwasm_client::types::{
ChangeAdminResult, ContractCodeId, ExecuteResult, InstantiateOptions, InstantiateResult,
Expand Down
5 changes: 5 additions & 0 deletions common/client-libs/validator-client/src/rpc/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0

// TEMPORARY WORKAROUND:
// those features are expected as the below should only get activated whenever
// the corresponding features in tendermint-rpc are enabled transitively
#![allow(unexpected_cfgs)]

use async_trait::async_trait;
use cosmrs::tendermint::{self, abci, block::Height, evidence::Evidence, Genesis, Hash};
use serde::{de::DeserializeOwned, Serialize};
Expand Down
1 change: 0 additions & 1 deletion common/topology/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub enum NymTopologyError {
PayloadBuilder,

#[error("Outfox: {0}")]
#[cfg(feature = "outfox")]
Outfox(#[from] nym_sphinx_types::OutfoxError),

#[error("{0}")]
Expand Down
1 change: 1 addition & 0 deletions common/topology/src/random_route_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use nym_sphinx_routing::SphinxRouteMaker;
use nym_sphinx_types::Node;
use rand::{CryptoRng, Rng};

#[allow(dead_code)]
pub struct NymTopologyRouteProvider<R> {
rng: R,
inner: NymTopology,
Expand Down
4 changes: 3 additions & 1 deletion common/wasm/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ gloo-utils = { workspace = true }
gloo-net = { workspace = true, features = ["websocket"], optional = true }
#gloo-net = { path = "../../../../gloo/crates/net", features = ["websocket"], optional = true }

console_error_panic_hook = { workspace = true, optional = true }

# we don't want entire tokio-tungstenite, tungstenite itself is just fine - we just want message and error enums
[dependencies.tungstenite]
workspace = true
Expand All @@ -28,7 +30,7 @@ workspace = true
optional = true

[features]
default = ["sleep"]
default = ["sleep", "console_error_panic_hook"]
sleep = ["web-sys", "web-sys/Window"]
websocket = [
"getrandom",
Expand Down
1 change: 1 addition & 0 deletions nym-api/src/coconut/dkg/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ impl<R: RngCore + CryptoRng> DkgController<R> {
/// - BTE public key (alongside the proof of discrete log)
/// - ed25519 public key
/// - announce address to be used by clients for obtaining credentials
///
/// Upon successful registration, the node will receive a unique "NodeIndex"
/// which is the x-coordinate of the to be derived keys.
///
Expand Down
9 changes: 1 addition & 8 deletions nym-api/src/coconut/storage/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use crate::coconut::storage::models::{EpochCredentials, IssuedCredential};
use crate::support::storage::manager::StorageManager;
use nym_coconut_dkg_common::types::EpochId;
use thiserror::Error;

#[async_trait]
pub trait CoconutStorageManagerExt {
Expand All @@ -23,6 +22,7 @@ pub trait CoconutStorageManagerExt {
/// # Arguments
///
/// * `epoch_id`: Id of the (coconut) epoch in question.
#[allow(dead_code)]
async fn create_epoch_credentials_entry(&self, epoch_id: EpochId) -> Result<(), sqlx::Error>;

/// Update the EpochCredentials by incrementing the total number of issued credentials,
Expand Down Expand Up @@ -361,10 +361,3 @@ impl CoconutStorageManagerExt for StorageManager {
Ok(())
}
}

#[derive(Debug, Error)]
#[error("tried to store an invalid nonce. the received value is {got} while current is {current}. expected {current} + 1")]
pub struct UnexpectedNonce {
current: u32,
got: u32,
}
6 changes: 3 additions & 3 deletions nym-api/src/coconut/tests/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ pub fn pseudorandom_account(rng: &mut ChaCha20Rng) -> AccountId {
AccountId::new("n", &dummy_account_key_hash).unwrap()
}

pub fn dealer_fixture(mut rng: &mut ChaCha20Rng, id: NodeIndex) -> DealerDetails {
pub fn dealer_fixture(rng: &mut ChaCha20Rng, id: NodeIndex) -> DealerDetails {
// we might possibly need that private key later on
let keypair = DkgKeyPair::new(dkg::params(), &mut rng);
let keypair = DkgKeyPair::new(dkg::params(), rng.clone());

let addr = pseudorandom_account(rng);
let identity_keypair = identity::KeyPair::new(&mut rng);
let identity_keypair = identity::KeyPair::new(rng);
let bte_public_key_with_proof = bs58::encode(&keypair.public_key().to_bytes()).into_string();

let port = 8080 + id;
Expand Down
14 changes: 7 additions & 7 deletions nym-api/src/epoch_operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ impl RewardedSetUpdater {
/// 2. it queries the mixnet contract to check the current `EpochState` in order to figure out whether
/// a different nym-api has already started epoch transition (not yet applicable)
/// 3. it sends a `BeginEpochTransition` message to the mixnet contract causing the following to happen:
/// - if successful, the address of the this validator is going to be saved as being responsible for progressing this epoch.
/// What it means in practice is that once we have multiple instances of nym-api running,
/// only this one will try to perform the rest of the actions. It will also allow it to
/// more easily recover in case of crashes.
/// - if successful, the address of this validator is going to be saved as being responsible for progressing this epoch.
/// What it means in practice is that once we have multiple instances of nym-api running,
/// only this one will try to perform the rest of the actions. It will also allow it to
/// more easily recover in case of crashes.
/// - the `EpochState` changes to `Rewarding`, meaning the nym-api will now be allowed to send
/// `RewardMixnode` transactions. However, it's not going to be able anything else like `ReconcileEpochEvents`
/// until that is done.
/// `RewardMixnode` transactions. However, it's not going to be able anything else like `ReconcileEpochEvents`
/// until that is done.
/// - ability to send transactions (by other users) that get resolved once given epoch/interval rolls over,
/// such as `BondMixnode` or `DelegateToMixnode` will temporarily be frozen until the entire procedure is finished.
/// such as `BondMixnode` or `DelegateToMixnode` will temporarily be frozen until the entire procedure is finished.
/// 4. it obtains the current rewarded set and for each node in there (**SORTED BY MIX_ID!!**),
/// it sends (in a single batch) `RewardMixnode` message with the measured performance.
/// Once the final message gets executed, the mixnet contract automatically transitions
Expand Down
1 change: 1 addition & 0 deletions nym-wallet/src-tauri/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ impl WalletStateInner {
/// 1. from the configuration file
/// 2. provided remotely
/// 3. hardcoded fallback
///
/// The format is the config backend format, which is flat due to serialization preference.
pub fn get_config_validator_entries(
&self,
Expand Down
4 changes: 2 additions & 2 deletions nym-wallet/src-tauri/src/wallet_storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
///
/// Wallet
/// - Login
/// -- Account
/// --- Mnemonic
/// -- Account
/// --- Mnemonic
pub(crate) use crate::wallet_storage::account_data::StoredLogin;
pub(crate) use crate::wallet_storage::password::{AccountId, LoginId, UserPassword};

Expand Down
6 changes: 2 additions & 4 deletions sdk/rust/nym-sdk/src/mixnet/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ where
///
/// - If the client is already registered with a gateway, use that gateway.
/// - If no gateway is registered, but there is an existing configuration and key, use that.
/// - If no gateway is registered, and there is no pre-existing configuration or key, try to
/// register a new gateway.
/// - If no gateway is registered, and there is no pre-existing configuration or key, try to register a new gateway.
///
/// # Example
///
Expand Down Expand Up @@ -691,8 +690,7 @@ where
///
/// - If the client is already registered with a gateway, use that gateway.
/// - If no gateway is registered, but there is an existing configuration and key, use that.
/// - If no gateway is registered, and there is no pre-existing configuration or key, try to
/// register a new gateway.
/// - If no gateway is registered, and there is no pre-existing configuration or key, try to register a new gateway.
///
/// # Example
///
Expand Down