fixed beta clippy: lints + updated cosmwasm to 1.4
This commit is contained in:
Generated
+25
-23
@@ -798,9 +798,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bnum"
|
||||
version = "0.7.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "845141a4fade3f790628b7daaaa298a25b204fb28907eb54febe5142db6ce653"
|
||||
checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d"
|
||||
|
||||
[[package]]
|
||||
name = "bs58"
|
||||
@@ -1355,11 +1355,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-crypto"
|
||||
version = "1.4.1"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6fb22494cf7d23d0c348740e06e5c742070b2991fd41db77bba0bcfbae1a723"
|
||||
checksum = "9934c79e58d9676edfd592557dee765d2a6ef54c09d5aa2edb06156b00148966"
|
||||
dependencies = [
|
||||
"digest 0.10.7",
|
||||
"ecdsa 0.16.8",
|
||||
"ed25519-zebra",
|
||||
"k256",
|
||||
"rand_core 0.6.4",
|
||||
@@ -1368,18 +1369,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-derive"
|
||||
version = "1.4.1"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e199424486ea97d6b211db6387fd72e26b4a439d40cc23140b2d8305728055b"
|
||||
checksum = "bc5e72e330bd3bdab11c52b5ecbdeb6a8697a004c57964caeb5d876f0b088b3c"
|
||||
dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-schema"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb6b2fb76758ef59cddc77f2e2ae91c22f77da49037e9f182e9c2833f0e959b1"
|
||||
checksum = "11ae2e971fb831d0c4fa3c8c3d2291cdbdd73786a73d65196dbf983d9b2468af"
|
||||
dependencies = [
|
||||
"cosmwasm-schema-derive",
|
||||
"schemars",
|
||||
@@ -1390,9 +1391,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-schema-derive"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bfa39422f0d9f1c9a6fd3711573258495314dfa3aae738ea825ecd9964bc659"
|
||||
checksum = "0cadc57fd0825b85bc2f9b972c17da718b9efb4bc17e5935cc2d6036324f853d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -1401,11 +1402,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-std"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f6dc2ee23313add5ecacc3ccac217b9967ad9d2d11bd56e5da6aa65a9da6138"
|
||||
checksum = "e98e19fae6c3f468412f731274b0f9434602722009d6a77432d39c7c4bb09202"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.4",
|
||||
"bnum",
|
||||
"cosmwasm-crypto",
|
||||
"cosmwasm-derive",
|
||||
@@ -1797,9 +1798,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw-storage-plus"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79"
|
||||
checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c"
|
||||
dependencies = [
|
||||
"cosmwasm-std",
|
||||
"schemars",
|
||||
@@ -1823,23 +1824,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw2"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908"
|
||||
checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
"cw-storage-plus",
|
||||
"schemars",
|
||||
"semver 1.0.20",
|
||||
"serde",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cw20"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "011c45920f8200bd5d32d4fe52502506f64f2f75651ab408054d4cfc75ca3a9b"
|
||||
checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -1850,9 +1852,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw3"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "171af3d9127de6805a7dd819fb070c7d2f6c3ea85f4193f42cef259f0a7f33d5"
|
||||
checksum = "2967fbd073d4b626dd9e7148e05a84a3bebd9794e71342e12351110ffbb12395"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -1865,9 +1867,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw4"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a398696307efadaaa2d0850076f865fa706c959d493cb4203314f72be6b77a64"
|
||||
checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
|
||||
+9
-9
@@ -202,19 +202,19 @@ ff = "0.13.0"
|
||||
|
||||
|
||||
# cosmwasm-related
|
||||
cosmwasm-derive = "=1.3.0"
|
||||
cosmwasm-schema = "=1.3.0"
|
||||
cosmwasm-std = "=1.3.0"
|
||||
# use 0.5.0 as that's the version used by cosmwasm-std 1.3.0
|
||||
cosmwasm-derive = "=1.4.3"
|
||||
cosmwasm-schema = "=1.4.3"
|
||||
cosmwasm-std = "=1.4.3"
|
||||
# use 0.5.0 as that's the version used by cosmwasm-std 1.4.3
|
||||
# (and ideally we don't want to pull the same dependency twice)
|
||||
serde-json-wasm = "=0.5.0"
|
||||
cosmwasm-storage = "=1.3.0"
|
||||
cosmwasm-storage = "=1.4.3"
|
||||
# same version as used by cosmwasm
|
||||
cw-utils = "=1.0.1"
|
||||
cw-storage-plus = "=1.1.0"
|
||||
cw2 = { version = "=1.1.0" }
|
||||
cw3 = { version = "=1.1.0" }
|
||||
cw4 = { version = "=1.1.0" }
|
||||
cw-storage-plus = "=1.2.0"
|
||||
cw2 = { version = "=1.1.2" }
|
||||
cw3 = { version = "=1.1.2" }
|
||||
cw4 = { version = "=1.1.2" }
|
||||
cw-controllers = { version = "=1.1.0" }
|
||||
|
||||
# cosmrs-related
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "1.1.33"
|
||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||
description = "Implementation of the Nym Client"
|
||||
edition = "2021"
|
||||
rust-version = "1.65"
|
||||
rust-version = "1.70"
|
||||
license.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -247,7 +247,6 @@ fn try_load_current_config(id: &str) -> Result<Config, ClientError> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::CommandFactory;
|
||||
|
||||
#[test]
|
||||
fn verify_cli() {
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::error::{self, ErrorKind};
|
||||
use crate::text::ClientRequestText;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_sphinx::anonymous_replies::requests::{AnonymousSenderTag, SENDER_TAG_SIZE};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use std::mem::size_of;
|
||||
|
||||
#[repr(u8)]
|
||||
|
||||
@@ -9,7 +9,7 @@ use crate::text::ServerResponseText;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_sphinx::anonymous_replies::requests::{AnonymousSenderTag, SENDER_TAG_SIZE};
|
||||
use nym_sphinx::receiver::ReconstructedMessage;
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::mem::size_of;
|
||||
|
||||
#[repr(u8)]
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::responses::ServerResponse;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
|
||||
// local text equivalent of `ClientRequest` for easier serialization + deserialization with serde
|
||||
// TODO: figure out if there's an easy way to avoid defining it
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "1.1.33"
|
||||
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
|
||||
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.70"
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -313,7 +313,6 @@ fn try_load_current_config(id: &str) -> Result<Config, Socks5ClientError> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::CommandFactory;
|
||||
|
||||
#[test]
|
||||
fn verify_cli() {
|
||||
|
||||
@@ -16,6 +16,8 @@ const OLDEST_LANE_SET_SIZE: usize = 4;
|
||||
// As a way of prune connections we also check for timeouts.
|
||||
const MSG_CONSIDERED_STALE_AFTER_SECS: u64 = 10 * 60;
|
||||
|
||||
// this trait is apparently not used in wasm
|
||||
#[allow(dead_code)]
|
||||
pub(crate) trait SizedData {
|
||||
fn data_size(&self) -> usize;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ use nym_sphinx::forwarding::packet::MixPacket;
|
||||
use nym_task::TaskClient;
|
||||
use nym_validator_client::nyxd::contract_traits::DkgQueryClient;
|
||||
use rand::rngs::OsRng;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tungstenite::protocol::Message;
|
||||
|
||||
@@ -22,8 +22,6 @@ use tokio::net::TcpStream;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use tokio_tungstenite::{MaybeTlsStream, WebSocketStream};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use wasm_bindgen_futures;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use wasm_utils::websocket::JSWebsocket;
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ use cosmrs::{AccountId, Coin as CosmosCoin, Tx};
|
||||
use log::trace;
|
||||
use prost::Message;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::time::Duration;
|
||||
use tendermint_rpc::{
|
||||
endpoint::{block::Response as BlockResponse, broadcast, tx::Response as TxResponse},
|
||||
|
||||
+1
-2
@@ -12,7 +12,6 @@ use crate::signing::signer::OfflineSigner;
|
||||
use crate::signing::tx_signer::TxSigner;
|
||||
use crate::signing::SignerData;
|
||||
use async_trait::async_trait;
|
||||
use cosmrs::abci::GasInfo;
|
||||
use cosmrs::bank::MsgSend;
|
||||
use cosmrs::distribution::MsgWithdrawDelegatorReward;
|
||||
use cosmrs::feegrant::{
|
||||
@@ -26,7 +25,7 @@ use log::debug;
|
||||
use serde::Serialize;
|
||||
use sha2::Digest;
|
||||
use sha2::Sha256;
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::time::SystemTime;
|
||||
use tendermint_rpc::endpoint::broadcast;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ use cosmrs::vesting::{
|
||||
use cosmrs::{AccountId, Any, Coin as CosmosCoin};
|
||||
use prost::Message;
|
||||
use serde::Serialize;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
|
||||
pub use cosmrs::abci::GasInfo;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use crate::signing::{AccountData, Secp256k1Derivation};
|
||||
use cosmrs::bip32::{DerivationPath, XPrv};
|
||||
use cosmrs::crypto::secp256k1::SigningKey;
|
||||
use cosmrs::crypto::PublicKey;
|
||||
use cosmrs::tx;
|
||||
use cosmrs::tx::SignDoc;
|
||||
use cosmrs::{bip32, tx};
|
||||
use nym_config::defaults;
|
||||
use thiserror::Error;
|
||||
use zeroize::{Zeroize, ZeroizeOnDrop};
|
||||
|
||||
@@ -191,8 +191,7 @@ impl InputFileReader {
|
||||
#[cfg(test)]
|
||||
mod test_multiple_send_input_csv {
|
||||
use super::*;
|
||||
use nym_validator_client::nyxd::AccountId;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[test]
|
||||
fn works_on_happy_path() {
|
||||
let input_csv = InputFileReader::new("fixtures/test_send_multiple.csv").unwrap();
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::rewarding::RewardDistribution;
|
||||
use crate::{BlockHeight, ContractStateParams, IdentityKeyRef, Interval, Layer, MixId};
|
||||
pub use contracts_common::events::*;
|
||||
use cosmwasm_std::{Addr, Coin, Decimal, Event};
|
||||
use std::fmt::Display;
|
||||
|
||||
pub const EVENT_VERSION_PREFIX: &str = "v2_";
|
||||
|
||||
@@ -54,8 +55,8 @@ impl From<MixnetEventType> for String {
|
||||
}
|
||||
}
|
||||
|
||||
impl ToString for MixnetEventType {
|
||||
fn to_string(&self) -> String {
|
||||
impl Display for MixnetEventType {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let event_name = match self {
|
||||
MixnetEventType::MixnodeBonding => "mixnode_bonding",
|
||||
MixnetEventType::PendingPledgeIncrease => "pending_pledge_increase",
|
||||
@@ -95,7 +96,7 @@ impl ToString for MixnetEventType {
|
||||
MixnetEventType::GatewayConfigUpdate => "gateway_config_update",
|
||||
};
|
||||
|
||||
format!("{EVENT_VERSION_PREFIX}{event_name}")
|
||||
write!(f,"{EVENT_VERSION_PREFIX}{event_name}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,13 +226,8 @@ mod tests {
|
||||
#[cfg(test)]
|
||||
mod single_node_case {
|
||||
use super::*;
|
||||
use crate::helpers::compare_decimals;
|
||||
use crate::reward_params::IntervalRewardParams;
|
||||
use crate::rewarding::helpers::truncate_reward_amount;
|
||||
use crate::Percent;
|
||||
use cosmwasm_std::coin;
|
||||
use cosmwasm_std::testing::mock_env;
|
||||
use std::time::Duration;
|
||||
|
||||
// explicitly marking this as part of #[allow(clippy::unwrap_used)] until
|
||||
// https://github.com/rust-lang/rust-clippy/pull/9686
|
||||
@@ -599,8 +594,8 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(clippy::inconsistent_digit_grouping)]
|
||||
fn multiple_nodes_against_known_values() {
|
||||
#![allow(clippy::inconsistent_digit_grouping)]
|
||||
|
||||
// TODO: this test can be further improved by checking values after EVERY interval
|
||||
// rather than just checking the final results
|
||||
|
||||
@@ -52,7 +52,6 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::blake3;
|
||||
|
||||
// TODO: is it somehow possible to make the test not depend on blake3 specifically and
|
||||
// make it more generic?
|
||||
|
||||
@@ -641,7 +641,6 @@ impl ProofOfChunking {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::bte::Share;
|
||||
use crate::ChunkedShare;
|
||||
|
||||
// limit number of nodes to some reasonable-ish value, as it significantly affects
|
||||
|
||||
@@ -63,7 +63,7 @@ fn parse_address_policy_rule(rule: &str) -> Result<AddressPolicyRule, PolicyErro
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::policy::AddressPolicyAction::{Accept, Accept6, Reject, Reject6};
|
||||
use crate::policy::{AddressPortPattern, IpPattern, PortRange};
|
||||
use crate::policy::IpPattern;
|
||||
|
||||
#[test]
|
||||
fn parsing_policy() {
|
||||
|
||||
@@ -13,7 +13,7 @@ use nym_sphinx_types::{
|
||||
Delay as SphinxDelay, DestinationAddressBytes, NodeAddressBytes, NymPacket, NymProcessedPacket,
|
||||
PrivateKey, ProcessedPacket,
|
||||
};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
type ForwardAck = MixPacket;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use crate::verloc::error::RttError;
|
||||
use nym_crypto::asymmetric::identity::{self, PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH};
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
pub(crate) struct EchoPacket {
|
||||
sequence_number: u64,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use core::ops::{Deref, Mul};
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, Scalar};
|
||||
use group::Curve;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// TODO: look at https://crates.io/crates/merlin to perhaps use it instead?
|
||||
|
||||
use std::borrow::Borrow;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Projective, Scalar};
|
||||
use digest::generic_array::typenum::Unsigned;
|
||||
|
||||
@@ -140,7 +140,6 @@ pub fn aggregate_signature_shares(
|
||||
mod tests {
|
||||
use crate::scheme::issuance::sign;
|
||||
use crate::scheme::keygen::ttp_keygen;
|
||||
use crate::scheme::setup::Parameters;
|
||||
use crate::scheme::verification::verify;
|
||||
use crate::tests::helpers::random_scalars_refs;
|
||||
use bls12_381::G1Projective;
|
||||
|
||||
@@ -6,8 +6,8 @@ use crate::traits::{Base58, Bytable};
|
||||
use crate::utils::try_deserialize_g2_projective;
|
||||
use bls12_381::{G2Affine, G2Projective};
|
||||
use group::Curve;
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ops::Deref;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
use std::ops::Neg;
|
||||
|
||||
use bls12_381::{multi_miller_loop, G1Affine, G1Projective, G2Prepared, Scalar};
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use core::borrow::Borrow;
|
||||
use core::iter::Sum;
|
||||
use core::ops::{Add, Mul};
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Projective, Scalar};
|
||||
use group::Curve;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
// TODO: implement https://crates.io/crates/signature traits?
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Prepared, G2Projective, Scalar};
|
||||
use group::Curve;
|
||||
|
||||
@@ -12,8 +12,8 @@ use crate::Attribute;
|
||||
use bls12_381::{multi_miller_loop, G1Affine, G2Prepared, G2Projective, Scalar};
|
||||
use core::ops::Neg;
|
||||
use group::{Curve, Group};
|
||||
use std::convert::TryFrom;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
|
||||
pub use crate::scheme::double_use::BlindedSerialNumber;
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ pub use random_scalars_refs;
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use super::*;
|
||||
use crate::{KeyPair, Parameters, SecretKey};
|
||||
use bls12_381::Scalar;
|
||||
use nym_dkg::{bte::decrypt_share, combine_shares, Dealing, NodeIndex};
|
||||
use rand_chacha::rand_core::SeedableRng;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
use crate::CoconutError;
|
||||
use bls12_381::{G1Affine, G1Projective, Scalar};
|
||||
use group::GroupEncoding;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
pub trait Bytable
|
||||
where
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use core::iter::Sum;
|
||||
use core::ops::Mul;
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
use bls12_381::hash_to_curve::{ExpandMsgXmd, HashToCurve, HashToField};
|
||||
use bls12_381::{G1Affine, G1Projective, G2Affine, G2Projective, Scalar};
|
||||
|
||||
@@ -13,7 +13,7 @@ use nym_sphinx_types::delays::Delay;
|
||||
use nym_sphinx_types::{NymPacket, NymPacketError, MIN_PACKET_SIZE};
|
||||
use nym_topology::{NymTopology, NymTopologyError};
|
||||
use rand::{CryptoRng, RngCore};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::time;
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_sphinx_types::{NodeAddressBytes, NODE_ADDRESS_LENGTH};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ use nym_topology::{NymTopology, NymTopologyError};
|
||||
use rand::{CryptoRng, RngCore};
|
||||
use serde::de::{Error as SerdeError, Visitor};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt::{self, Formatter};
|
||||
use std::time;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use crate::ChunkingError;
|
||||
use nym_sphinx_params::{SerializedFragmentIdentifier, FRAG_ID_LEN};
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
|
||||
// Personal reflection: In hindsight I've spent too much time on relatively too little
|
||||
|
||||
@@ -16,7 +16,7 @@ use nym_sphinx_params::{
|
||||
use nym_sphinx_types::NymPacket;
|
||||
use nym_topology::{NymTopology, NymTopologyError};
|
||||
use rand::{CryptoRng, RngCore};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::time;
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use nym_sphinx_addressing::nodes::{NymNodeRoutingAddress, NymNodeRoutingAddressError};
|
||||
use nym_sphinx_params::{PacketSize, PacketType};
|
||||
use nym_sphinx_types::{NymPacket, NymPacketError};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -241,8 +241,7 @@ mod packet_encoding {
|
||||
mod decode_will_allocate_enough_bytes_for_next_call {
|
||||
use super::*;
|
||||
use nym_sphinx_params::packet_version::PacketVersion;
|
||||
use nym_sphinx_params::PacketType;
|
||||
|
||||
|
||||
#[test]
|
||||
fn for_empty_bytes() {
|
||||
// empty bytes should allocate for header + ack packet
|
||||
|
||||
@@ -7,7 +7,7 @@ use nym_sphinx_params::packet_sizes::PacketSize;
|
||||
use nym_sphinx_params::packet_version::PacketVersion;
|
||||
use nym_sphinx_params::PacketType;
|
||||
use nym_sphinx_types::NymPacket;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FramedNymPacket {
|
||||
|
||||
@@ -8,7 +8,7 @@ use nym_sphinx_types::{header::HEADER_SIZE, PAYLOAD_OVERHEAD_SIZE};
|
||||
use nym_sphinx_types::{MIN_PACKET_SIZE, MIX_PARAMS_LEN, OUTFOX_PACKET_OVERHEAD};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp::Ordering;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use std::str::FromStr;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
use crate::PacketSize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt;
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use nym_sphinx_params::{PacketType, ReplySurbKeyDigestAlgorithm, DEFAULT_NUM_MIX
|
||||
use nym_sphinx_types::{Delay, NymPacket};
|
||||
use nym_topology::{NymTopology, NymTopologyError};
|
||||
use rand::{CryptoRng, Rng};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
pub(crate) mod payload;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::traits::{PemStorableKey, PemStorableKeyPair};
|
||||
use pem::{self, Pem};
|
||||
use pem::Pem;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -28,7 +28,7 @@ use std::io;
|
||||
use std::net::SocketAddr;
|
||||
use std::pin::Pin;
|
||||
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadBuf};
|
||||
use tokio::{self, net::TcpStream};
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
#[pin_project(project = StateProject)]
|
||||
enum StreamState {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
use std::convert::TryFrom;
|
||||
|
||||
|
||||
use self::types::SocksProxyError;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::{
|
||||
use nym_service_providers_common::interface::{Serializable, ServiceProviderRequest};
|
||||
use nym_sphinx_addressing::clients::{Recipient, RecipientFormattingError};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use tap::TapFallible;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -7,7 +7,7 @@ use nym_crypto::asymmetric::{encryption, identity};
|
||||
use nym_mixnet_contract_common::GatewayBond;
|
||||
use nym_sphinx_addressing::nodes::{NodeIdentity, NymNodeRoutingAddress};
|
||||
use nym_sphinx_types::Node as SphinxNode;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use std::fmt;
|
||||
use std::fmt::Formatter;
|
||||
use std::io;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// Copyright 2021-2023 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
// clippy::to_string_trait_impl is not on stable as of 1.77
|
||||
|
||||
use crate::filter::VersionFilterable;
|
||||
pub use error::NymTopologyError;
|
||||
use log::warn;
|
||||
@@ -11,7 +14,7 @@ use nym_sphinx_types::Node as SphinxNode;
|
||||
use rand::prelude::SliceRandom;
|
||||
use rand::{CryptoRng, Rng};
|
||||
use std::collections::BTreeMap;
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::fmt::{self, Display, Formatter};
|
||||
use std::io;
|
||||
use std::net::{IpAddr, SocketAddr, ToSocketAddrs};
|
||||
@@ -51,6 +54,7 @@ pub enum NodeVersion {
|
||||
|
||||
// this is only implemented for backwards compatibility so we wouldn't need to change everything at once
|
||||
// (also I intentionally implemented `ToString` as opposed to `Display`)
|
||||
#[allow(clippy::to_string_trait_impl)]
|
||||
impl ToString for NodeVersion {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
|
||||
@@ -7,7 +7,7 @@ pub use nym_mixnet_contract_common::Layer;
|
||||
use nym_mixnet_contract_common::{MixId, MixNodeBond};
|
||||
use nym_sphinx_addressing::nodes::NymNodeRoutingAddress;
|
||||
use nym_sphinx_types::Node as SphinxNode;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use std::fmt::Formatter;
|
||||
use std::io;
|
||||
use std::net::SocketAddr;
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
// clippy::empty_docs is not on stable as of 1.77
|
||||
|
||||
// due to the code generated by Tsify
|
||||
#![allow(clippy::empty_docs)]
|
||||
|
||||
use crate::gateway::GatewayConversionError;
|
||||
use crate::mix::MixnodeConversionError;
|
||||
use crate::{gateway, mix, MixLayer, NymTopology};
|
||||
@@ -11,6 +17,7 @@ use std::collections::BTreeMap;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
#[cfg(feature = "wasm-serde-types")]
|
||||
use tsify::Tsify;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use std::fmt::{Display, Formatter};
|
||||
use strum::{Display, EnumString, EnumVariantNames};
|
||||
|
||||
@@ -396,9 +396,7 @@ impl TryFrom<DecCoin> for Coin {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use std::convert::TryFrom;
|
||||
use std::string::ToString;
|
||||
|
||||
|
||||
#[test]
|
||||
fn dec_value_scale_down() {
|
||||
let dec = DecCoin {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
// clippy::empty_docs is not on stable as of 1.77
|
||||
|
||||
// due to the code generated by Tsify
|
||||
#![allow(clippy::empty_docs)]
|
||||
|
||||
use super::{
|
||||
AcknowledgementsWasm, CoverTrafficWasm, DebugWasm, GatewayConnectionWasm, ReplySurbsWasm,
|
||||
TopologyWasm, TrafficWasm,
|
||||
|
||||
Generated
+215
-361
@@ -50,6 +50,12 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
|
||||
|
||||
[[package]]
|
||||
name = "base16ct"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
@@ -106,9 +112,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bnum"
|
||||
version = "0.7.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "845141a4fade3f790628b7daaaa298a25b204fb28907eb54febe5142db6ce653"
|
||||
checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d"
|
||||
|
||||
[[package]]
|
||||
name = "bs58"
|
||||
@@ -118,9 +124,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
|
||||
|
||||
[[package]]
|
||||
name = "bs58"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896"
|
||||
checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
|
||||
dependencies = [
|
||||
"tinyvec",
|
||||
]
|
||||
@@ -219,31 +225,31 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-crypto"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d076a08ec01ed23c4396aca98ec73a38fa1fee5f310465add52b4108181c7a8"
|
||||
checksum = "c533b66e502ecab30fec23d03eb54ab1d3ce120645a00493459f8510b7a9736f"
|
||||
dependencies = [
|
||||
"digest 0.10.7",
|
||||
"ed25519-zebra",
|
||||
"k256",
|
||||
"k256 0.13.2",
|
||||
"rand_core 0.6.4",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-derive"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dec361f3c09d7b41221948fc17be9b3c96cb58e55a02f82da36f888a651f2584"
|
||||
checksum = "d7a2c11de93c565a993b2b687469789146808970b6cfabcd0d44a8915f96da67"
|
||||
dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-schema"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb6b2fb76758ef59cddc77f2e2ae91c22f77da49037e9f182e9c2833f0e959b1"
|
||||
checksum = "11ae2e971fb831d0c4fa3c8c3d2291cdbdd73786a73d65196dbf983d9b2468af"
|
||||
dependencies = [
|
||||
"cosmwasm-schema-derive",
|
||||
"schemars",
|
||||
@@ -254,9 +260,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-schema-derive"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bfa39422f0d9f1c9a6fd3711573258495314dfa3aae738ea825ecd9964bc659"
|
||||
checksum = "0cadc57fd0825b85bc2f9b972c17da718b9efb4bc17e5935cc2d6036324f853d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -265,11 +271,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-std"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f6dc2ee23313add5ecacc3ccac217b9967ad9d2d11bd56e5da6aa65a9da6138"
|
||||
checksum = "e98e19fae6c3f468412f731274b0f9434602722009d6a77432d39c7c4bb09202"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.0",
|
||||
"bnum",
|
||||
"cosmwasm-crypto",
|
||||
"cosmwasm-derive",
|
||||
@@ -285,9 +291,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cosmwasm-storage"
|
||||
version = "1.3.0"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ade8cae79dc08a06bcf119c0854ffaed11bd8cb1013c6b04abfe1f51f36211e"
|
||||
checksum = "8935079712688b8d8d4c036378b38b49d13692621c6fcba96700fadfd5126a18"
|
||||
dependencies = [
|
||||
"cosmwasm-std",
|
||||
"serde",
|
||||
@@ -314,6 +320,18 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-bigint"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
||||
dependencies = [
|
||||
"generic-array 0.14.7",
|
||||
"rand_core 0.6.4",
|
||||
"subtle 2.4.1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
@@ -393,7 +411,7 @@ dependencies = [
|
||||
"cw-utils",
|
||||
"derivative",
|
||||
"itertools",
|
||||
"k256",
|
||||
"k256 0.11.6",
|
||||
"prost",
|
||||
"schemars",
|
||||
"serde",
|
||||
@@ -402,9 +420,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw-storage-plus"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79"
|
||||
checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c"
|
||||
dependencies = [
|
||||
"cosmwasm-std",
|
||||
"schemars",
|
||||
@@ -428,23 +446,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw2"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908"
|
||||
checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
"cw-storage-plus",
|
||||
"schemars",
|
||||
"semver",
|
||||
"serde",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cw20"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "011c45920f8200bd5d32d4fe52502506f64f2f75651ab408054d4cfc75ca3a9b"
|
||||
checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -473,9 +492,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw3"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "171af3d9127de6805a7dd819fb070c7d2f6c3ea85f4193f42cef259f0a7f33d5"
|
||||
checksum = "2967fbd073d4b626dd9e7148e05a84a3bebd9794e71342e12351110ffbb12395"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -488,9 +507,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw3-fixed-multisig"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "705875c68f95870e9707e7b72b50631ddc58c07517d6cc43758306e38921118e"
|
||||
checksum = "58d7480e78644625c38bb082bfe9a27b01ca58bfcb785690ef43363fd40acf51"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -525,9 +544,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cw4"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a398696307efadaaa2d0850076f865fa706c959d493cb4203314f72be6b77a64"
|
||||
checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
@@ -563,6 +582,16 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "der"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
|
||||
dependencies = [
|
||||
"const-oid",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.9"
|
||||
@@ -608,6 +637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer 0.10.4",
|
||||
"const-oid",
|
||||
"crypto-common",
|
||||
"subtle 2.4.1",
|
||||
]
|
||||
@@ -624,10 +654,24 @@ version = "0.14.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
|
||||
dependencies = [
|
||||
"der",
|
||||
"elliptic-curve",
|
||||
"rfc6979",
|
||||
"signature",
|
||||
"der 0.6.1",
|
||||
"elliptic-curve 0.12.3",
|
||||
"rfc6979 0.3.1",
|
||||
"signature 1.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ecdsa"
|
||||
version = "0.16.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
|
||||
dependencies = [
|
||||
"der 0.7.8",
|
||||
"digest 0.10.7",
|
||||
"elliptic-curve 0.13.7",
|
||||
"rfc6979 0.4.0",
|
||||
"signature 2.2.0",
|
||||
"spki 0.7.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -636,7 +680,7 @@ version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
|
||||
dependencies = [
|
||||
"signature",
|
||||
"signature 1.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -680,16 +724,35 @@ version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
|
||||
dependencies = [
|
||||
"base16ct",
|
||||
"crypto-bigint",
|
||||
"der",
|
||||
"base16ct 0.1.1",
|
||||
"crypto-bigint 0.4.9",
|
||||
"der 0.6.1",
|
||||
"digest 0.10.7",
|
||||
"ff",
|
||||
"ff 0.12.1",
|
||||
"generic-array 0.14.7",
|
||||
"group",
|
||||
"pkcs8",
|
||||
"group 0.12.1",
|
||||
"pkcs8 0.9.0",
|
||||
"rand_core 0.6.4",
|
||||
"sec1",
|
||||
"sec1 0.3.0",
|
||||
"subtle 2.4.1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "elliptic-curve"
|
||||
version = "0.13.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9775b22bc152ad86a0cf23f0f348b884b26add12bf741e7ffc4d4ab2ab4d205"
|
||||
dependencies = [
|
||||
"base16ct 0.2.0",
|
||||
"crypto-bigint 0.5.5",
|
||||
"digest 0.10.7",
|
||||
"ff 0.13.0",
|
||||
"generic-array 0.14.7",
|
||||
"group 0.13.0",
|
||||
"pkcs8 0.10.2",
|
||||
"rand_core 0.6.4",
|
||||
"sec1 0.7.3",
|
||||
"subtle 2.4.1",
|
||||
"zeroize",
|
||||
]
|
||||
@@ -714,36 +777,6 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
|
||||
dependencies = [
|
||||
"errno-dragonfly",
|
||||
"libc",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno-dragonfly"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ff"
|
||||
version = "0.12.1"
|
||||
@@ -755,10 +788,14 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
name = "ff"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
|
||||
dependencies = [
|
||||
"rand_core 0.6.4",
|
||||
"subtle 2.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
@@ -887,6 +924,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
"version_check",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -944,7 +982,18 @@ version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
|
||||
dependencies = [
|
||||
"ff",
|
||||
"ff 0.12.1",
|
||||
"rand_core 0.6.4",
|
||||
"subtle 2.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "group"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
|
||||
dependencies = [
|
||||
"ff 0.13.0",
|
||||
"rand_core 0.6.4",
|
||||
"subtle 2.4.1",
|
||||
]
|
||||
@@ -958,12 +1007,6 @@ dependencies = [
|
||||
"ahash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
|
||||
|
||||
[[package]]
|
||||
name = "hex"
|
||||
version = "0.4.3"
|
||||
@@ -1025,26 +1068,6 @@ dependencies = [
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
@@ -1085,23 +1108,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"ecdsa",
|
||||
"elliptic-curve",
|
||||
"ecdsa 0.14.8",
|
||||
"elliptic-curve 0.12.3",
|
||||
"sha2 0.10.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "k256"
|
||||
version = "0.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"ecdsa 0.16.9",
|
||||
"elliptic-curve 0.13.7",
|
||||
"once_cell",
|
||||
"sha2 0.10.6",
|
||||
"signature 2.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "keystream"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.146"
|
||||
@@ -1138,12 +1169,6 @@ dependencies = [
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
|
||||
|
||||
[[package]]
|
||||
name = "lioness"
|
||||
version = "0.1.2"
|
||||
@@ -1259,7 +1284,7 @@ dependencies = [
|
||||
name = "nym-contracts-common"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"bs58 0.5.0",
|
||||
"bs58 0.5.1",
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
"schemars",
|
||||
@@ -1271,7 +1296,7 @@ dependencies = [
|
||||
name = "nym-crypto"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"bs58 0.5.0",
|
||||
"bs58 0.5.1",
|
||||
"ed25519-dalek",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx-types",
|
||||
@@ -1282,36 +1307,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-ephemera"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
"cosmwasm-storage",
|
||||
"cw-controllers",
|
||||
"cw-multi-test",
|
||||
"cw-storage-plus",
|
||||
"cw4",
|
||||
"cw4-group",
|
||||
"lazy_static",
|
||||
"nym-ephemera-common",
|
||||
"nym-group-contract-common",
|
||||
"rusty-fork",
|
||||
"serde",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-ephemera-common"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmwasm-schema",
|
||||
"cosmwasm-std",
|
||||
"cw-utils",
|
||||
"nym-contracts-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-group-contract-common"
|
||||
version = "0.1.0"
|
||||
@@ -1520,9 +1515,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.17.1"
|
||||
version = "1.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
@@ -1571,8 +1566,18 @@ version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
|
||||
dependencies = [
|
||||
"der",
|
||||
"spki",
|
||||
"der 0.6.1",
|
||||
"spki 0.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkcs8"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
|
||||
dependencies = [
|
||||
"der 0.7.8",
|
||||
"spki 0.7.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1649,12 +1654,6 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.35"
|
||||
@@ -1745,15 +1744,6 @@ dependencies = [
|
||||
"rand_core 0.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.8.1"
|
||||
@@ -1775,11 +1765,21 @@ version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
|
||||
dependencies = [
|
||||
"crypto-bigint",
|
||||
"crypto-bigint 0.4.9",
|
||||
"hmac 0.12.1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rfc6979"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
|
||||
dependencies = [
|
||||
"hmac 0.12.1",
|
||||
"subtle 2.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rstest"
|
||||
version = "0.17.0"
|
||||
@@ -1815,38 +1815,12 @@ dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.37.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
|
||||
|
||||
[[package]]
|
||||
name = "rusty-fork"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"quick-error",
|
||||
"tempfile",
|
||||
"wait-timeout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.13"
|
||||
@@ -1855,9 +1829,9 @@ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
|
||||
|
||||
[[package]]
|
||||
name = "schemars"
|
||||
version = "0.8.12"
|
||||
version = "0.8.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f"
|
||||
checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
|
||||
dependencies = [
|
||||
"dyn-clone",
|
||||
"schemars_derive",
|
||||
@@ -1867,9 +1841,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "schemars_derive"
|
||||
version = "0.8.12"
|
||||
version = "0.8.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c"
|
||||
checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -1883,10 +1857,24 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
|
||||
dependencies = [
|
||||
"base16ct",
|
||||
"der",
|
||||
"base16ct 0.1.1",
|
||||
"der 0.6.1",
|
||||
"generic-array 0.14.7",
|
||||
"pkcs8",
|
||||
"pkcs8 0.9.0",
|
||||
"subtle 2.4.1",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sec1"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
|
||||
dependencies = [
|
||||
"base16ct 0.2.0",
|
||||
"der 0.7.8",
|
||||
"generic-array 0.14.7",
|
||||
"pkcs8 0.10.2",
|
||||
"subtle 2.4.1",
|
||||
"zeroize",
|
||||
]
|
||||
@@ -1993,6 +1981,16 @@ dependencies = [
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signature"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
|
||||
dependencies = [
|
||||
"digest 0.10.7",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.8"
|
||||
@@ -2033,7 +2031,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"der",
|
||||
"der 0.6.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spki"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"der 0.7.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2079,33 +2087,20 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"fastrand",
|
||||
"redox_syscall",
|
||||
"rustix",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.48"
|
||||
version = "1.0.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
|
||||
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.48"
|
||||
version = "1.0.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
|
||||
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2223,15 +2218,6 @@ version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "wait-timeout"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
@@ -2298,138 +2284,6 @@ version = "0.2.84"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.45.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
||||
dependencies = [
|
||||
"windows-targets 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.42.2",
|
||||
"windows_aarch64_msvc 0.42.2",
|
||||
"windows_i686_gnu 0.42.2",
|
||||
"windows_i686_msvc 0.42.2",
|
||||
"windows_x86_64_gnu 0.42.2",
|
||||
"windows_x86_64_gnullvm 0.42.2",
|
||||
"windows_x86_64_msvc 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.48.0",
|
||||
"windows_aarch64_msvc 0.48.0",
|
||||
"windows_i686_gnu 0.48.0",
|
||||
"windows_i686_msvc 0.48.0",
|
||||
"windows_x86_64_gnu 0.48.0",
|
||||
"windows_x86_64_gnullvm 0.48.0",
|
||||
"windows_x86_64_msvc 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
||||
|
||||
[[package]]
|
||||
name = "x25519-dalek"
|
||||
version = "1.1.1"
|
||||
|
||||
+11
-12
@@ -4,7 +4,6 @@ members = [
|
||||
"coconut-bandwidth",
|
||||
"coconut-dkg",
|
||||
"coconut-test",
|
||||
"ephemera",
|
||||
"mixnet",
|
||||
"mixnet-vesting-integration-tests",
|
||||
"multisig/cw3-flex-multisig",
|
||||
@@ -35,20 +34,20 @@ overflow-checks = true
|
||||
|
||||
[workspace.dependencies]
|
||||
bs58 = "0.4.0"
|
||||
cosmwasm-crypto = "=1.3.0"
|
||||
cosmwasm-derive = "=1.3.0"
|
||||
cosmwasm-schema = "=1.3.0"
|
||||
cosmwasm-std = "=1.3.0"
|
||||
cosmwasm-storage = "=1.3.0"
|
||||
cosmwasm-crypto = "=1.4.3"
|
||||
cosmwasm-derive = "=1.4.3"
|
||||
cosmwasm-schema = "=1.4.3"
|
||||
cosmwasm-std = "=1.4.3"
|
||||
cosmwasm-storage = "=1.4.3"
|
||||
cw-controllers = "=1.1.0"
|
||||
cw-multi-test = "=0.16.4"
|
||||
cw-storage-plus = "=1.1.0"
|
||||
cw-storage-plus = "=1.2.0"
|
||||
cw-utils = "=1.0.1"
|
||||
cw2 = "=1.1.0"
|
||||
cw3 = "=1.1.0"
|
||||
cw3-fixed-multisig = "=1.1.0"
|
||||
cw4 = "=1.1.0"
|
||||
cw20 = "=1.1.0"
|
||||
cw2 = "=1.1.2"
|
||||
cw3 = "=1.1.2"
|
||||
cw3-fixed-multisig = "=1.1.2"
|
||||
cw4 = "=1.1.2"
|
||||
cw20 = "=1.1.2"
|
||||
semver = "1.0.21"
|
||||
serde = "1.0.196"
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ mod tests {
|
||||
use crate::support::tests::fixtures::spend_credential_data_fixture;
|
||||
use crate::support::tests::helpers::{self, MULTISIG_CONTRACT, POOL_CONTRACT};
|
||||
use cosmwasm_std::testing::{mock_env, mock_info};
|
||||
use cosmwasm_std::{from_binary, Coin, CosmosMsg, WasmMsg};
|
||||
use cosmwasm_std::{from_binary, CosmosMsg, WasmMsg};
|
||||
use cw_controllers::AdminError;
|
||||
use nym_coconut_bandwidth_contract_common::msg::ExecuteMsg;
|
||||
use nym_multisig_contract_common::msg::ExecuteMsg as MultisigExecuteMsg;
|
||||
|
||||
@@ -206,13 +206,11 @@ pub fn try_commit_dealings_chunk(
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::epoch_state::storage::CURRENT_EPOCH;
|
||||
use crate::epoch_state::transactions::{try_advance_epoch_state, try_initiate_dkg};
|
||||
use crate::support::tests::fixtures::{dealing_metadata_fixture, partial_dealing_fixture};
|
||||
use crate::support::tests::helpers;
|
||||
use crate::support::tests::helpers::{add_current_dealer, re_register_dealer, ADMIN_ADDRESS};
|
||||
use cosmwasm_std::testing::{mock_env, mock_info};
|
||||
use cosmwasm_std::Addr;
|
||||
use nym_coconut_dkg_common::dealer::DealerDetails;
|
||||
use nym_coconut_dkg_common::types::{ContractSafeBytes, TimeConfiguration};
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ pub(crate) mod test {
|
||||
use crate::epoch_state::transactions::try_initiate_dkg;
|
||||
use crate::support::tests::helpers::{init_contract, ADMIN_ADDRESS};
|
||||
use cosmwasm_std::testing::{mock_env, mock_info};
|
||||
use nym_coconut_dkg_common::types::{EpochState, TimeConfiguration};
|
||||
use nym_coconut_dkg_common::types::TimeConfiguration;
|
||||
|
||||
#[test]
|
||||
fn query_state() {
|
||||
|
||||
@@ -92,7 +92,6 @@ pub(crate) mod tests {
|
||||
use crate::support::tests::helpers::{init_contract, ADMIN_ADDRESS};
|
||||
use cosmwasm_std::testing::{mock_env, mock_info};
|
||||
use cw_controllers::AdminError;
|
||||
use nym_coconut_dkg_common::types::EpochState;
|
||||
|
||||
#[test]
|
||||
fn initialising_dkg() {
|
||||
|
||||
@@ -69,7 +69,7 @@ pub(crate) mod test {
|
||||
use crate::support::tests::helpers::init_contract;
|
||||
use cosmwasm_std::testing::mock_env;
|
||||
use cosmwasm_std::Timestamp;
|
||||
use nym_coconut_dkg_common::types::{Epoch, TimeConfiguration};
|
||||
use nym_coconut_dkg_common::types::TimeConfiguration;
|
||||
|
||||
#[test]
|
||||
fn checking_state_completion() {
|
||||
|
||||
@@ -110,7 +110,7 @@ mod tests {
|
||||
use cosmwasm_std::Addr;
|
||||
use cw_controllers::AdminError;
|
||||
use nym_coconut_dkg_common::dealer::DealerDetails;
|
||||
use nym_coconut_dkg_common::types::{EpochState, TimeConfiguration};
|
||||
use nym_coconut_dkg_common::types::TimeConfiguration;
|
||||
|
||||
#[test]
|
||||
fn current_epoch_id() {
|
||||
|
||||
@@ -236,8 +236,7 @@ fn _try_head_kick_member(
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::families::queries::{get_family_by_head, get_family_by_label};
|
||||
use crate::families::storage::is_family_member;
|
||||
use crate::families::queries::get_family_by_head;
|
||||
use crate::mixnet_contract_settings::storage::minimum_mixnode_pledge;
|
||||
use crate::support::tests::fixtures;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
@@ -378,7 +377,6 @@ mod test {
|
||||
#[cfg(test)]
|
||||
mod creating_family {
|
||||
use super::*;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
#[test]
|
||||
fn fails_for_illegal_proxy() {
|
||||
@@ -412,7 +410,6 @@ mod test {
|
||||
#[cfg(test)]
|
||||
mod joining_family {
|
||||
use super::*;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
#[test]
|
||||
fn fails_for_illegal_proxy() {
|
||||
@@ -458,7 +455,6 @@ mod test {
|
||||
#[cfg(test)]
|
||||
mod leaving_family {
|
||||
use super::*;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
#[test]
|
||||
fn fails_for_illegal_proxy() {
|
||||
@@ -512,7 +508,6 @@ mod test {
|
||||
#[cfg(test)]
|
||||
mod kicking_family_member {
|
||||
use super::*;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
#[test]
|
||||
fn fails_for_illegal_proxy() {
|
||||
|
||||
@@ -250,10 +250,6 @@ pub mod tests {
|
||||
use super::*;
|
||||
use crate::contract::execute;
|
||||
use crate::gateways::queries;
|
||||
use crate::gateways::transactions::{
|
||||
try_add_gateway, try_add_gateway_on_behalf, try_remove_gateway_on_behalf,
|
||||
try_update_gateway_config, try_update_gateway_config_on_behalf,
|
||||
};
|
||||
use crate::interval::pending_events;
|
||||
use crate::mixnet_contract_settings::storage::minimum_gateway_pledge;
|
||||
use crate::support::tests;
|
||||
@@ -261,10 +257,7 @@ pub mod tests {
|
||||
use crate::support::tests::fixtures::{good_gateway_pledge, good_mixnode_pledge};
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
use cosmwasm_std::{Addr, BankMsg, Response, Uint128};
|
||||
use mixnet_contract_common::error::MixnetContractError;
|
||||
use mixnet_contract_common::events::new_gateway_unbonding_event;
|
||||
use mixnet_contract_common::gateway::GatewayConfigUpdate;
|
||||
use cosmwasm_std::Uint128;
|
||||
use mixnet_contract_common::ExecuteMsg;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -490,7 +490,7 @@ mod tests {
|
||||
#[cfg(test)]
|
||||
mod delegating {
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
use cosmwasm_std::{coin, to_binary, CosmosMsg, Decimal, WasmMsg};
|
||||
use cosmwasm_std::{coin, to_binary, CosmosMsg, WasmMsg};
|
||||
|
||||
use mixnet_contract_common::rewarding::helpers::truncate_reward_amount;
|
||||
|
||||
@@ -1984,9 +1984,6 @@ mod tests {
|
||||
#[cfg(test)]
|
||||
mod changing_mix_cost_params {
|
||||
use cosmwasm_std::coin;
|
||||
|
||||
use mixnet_contract_common::Percent;
|
||||
|
||||
use crate::support::tests::fixtures::TEST_COIN_DENOM;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -173,7 +173,6 @@ mod tests {
|
||||
use crate::support::tests::fixtures;
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
use cosmwasm_std::testing::mock_dependencies;
|
||||
use cosmwasm_std::Order;
|
||||
use rand_chacha::rand_core::RngCore;
|
||||
|
||||
fn read_entire_set(storage: &dyn Storage) -> HashMap<MixId, RewardedSetNodeStatus> {
|
||||
@@ -202,7 +201,7 @@ mod tests {
|
||||
assert_eq!(standby, current_set.get(&7).unwrap());
|
||||
assert_eq!(standby, current_set.get(&4).unwrap());
|
||||
assert_eq!(standby, current_set.get(&1).unwrap());
|
||||
assert!(current_set.get(&42).is_none());
|
||||
assert!(!current_set.contains_key(&42));
|
||||
|
||||
update_rewarded_set(store, 2, vec![2, 5, 6, 3, 4]).unwrap();
|
||||
let current_set = read_entire_set(store);
|
||||
@@ -213,8 +212,8 @@ mod tests {
|
||||
assert_eq!(standby, current_set.get(&3).unwrap());
|
||||
assert_eq!(standby, current_set.get(&4).unwrap());
|
||||
// those no longer are in the rewarded set
|
||||
assert!(current_set.get(&7).is_none());
|
||||
assert!(current_set.get(&1).is_none());
|
||||
assert!(!current_set.contains_key(&7));
|
||||
assert!(!current_set.contains_key(&1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -406,12 +406,11 @@ mod tests {
|
||||
mod performing_pending_epoch_actions {
|
||||
use super::*;
|
||||
use crate::support::tests::fixtures::TEST_COIN_DENOM;
|
||||
use cosmwasm_std::{coin, coins, wasm_execute, Addr, BankMsg, Empty, SubMsg};
|
||||
use cosmwasm_std::{coin, coins, wasm_execute, BankMsg, Empty, SubMsg};
|
||||
use mixnet_contract_common::events::{
|
||||
new_active_set_update_event, new_delegation_on_unbonded_node_event,
|
||||
new_undelegation_event,
|
||||
};
|
||||
use mixnet_contract_common::pending_events::PendingEpochEventKind;
|
||||
|
||||
#[test]
|
||||
fn without_limit_executes_all_actions() {
|
||||
@@ -1009,7 +1008,6 @@ mod tests {
|
||||
use mixnet_contract_common::events::{
|
||||
new_delegation_on_unbonded_node_event, new_rewarding_params_update_event,
|
||||
};
|
||||
use mixnet_contract_common::pending_events::PendingEpochEventKind;
|
||||
use mixnet_contract_common::reward_params::IntervalRewardingParamsUpdate;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -62,12 +62,9 @@ pub mod tests {
|
||||
use crate::constants::{INITIAL_GATEWAY_PLEDGE_AMOUNT, INITIAL_MIXNODE_PLEDGE_AMOUNT};
|
||||
use crate::mixnet_contract_settings::queries::query_rewarding_validator_address;
|
||||
use crate::mixnet_contract_settings::storage::rewarding_denom;
|
||||
use crate::mixnet_contract_settings::transactions::try_update_contract_settings;
|
||||
use crate::support::tests::test_helpers;
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
use cosmwasm_std::{Addr, Coin, Response, Uint128};
|
||||
use mixnet_contract_common::error::MixnetContractError;
|
||||
use mixnet_contract_common::ContractStateParams;
|
||||
use cosmwasm_std::{Addr, Coin, Uint128};
|
||||
|
||||
#[test]
|
||||
fn update_contract_rewarding_validtor_address() {
|
||||
|
||||
@@ -501,7 +501,7 @@ pub mod tests {
|
||||
|
||||
use mixnet_contract_common::mixnode::PendingMixNodeChanges;
|
||||
use mixnet_contract_common::{
|
||||
EpochState, EpochStatus, ExecuteMsg, Layer, LayerDistribution, Percent,
|
||||
EpochState, EpochStatus, ExecuteMsg, LayerDistribution, Percent,
|
||||
};
|
||||
|
||||
use crate::contract::execute;
|
||||
@@ -1188,13 +1188,9 @@ pub mod tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod increasing_mixnode_pledge {
|
||||
use mixnet_contract_common::mixnode::PendingMixNodeChanges;
|
||||
use mixnet_contract_common::{EpochState, EpochStatus};
|
||||
|
||||
use crate::mixnodes::helpers::tests::{
|
||||
setup_mix_combinations, OWNER_UNBONDED, OWNER_UNBONDED_LEFTOVER, OWNER_UNBONDING,
|
||||
};
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1496,13 +1492,9 @@ pub mod tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod decreasing_mixnode_pledge {
|
||||
use mixnet_contract_common::mixnode::PendingMixNodeChanges;
|
||||
use mixnet_contract_common::{EpochState, EpochStatus};
|
||||
|
||||
use crate::mixnodes::helpers::tests::{
|
||||
setup_mix_combinations, OWNER_UNBONDED, OWNER_UNBONDED_LEFTOVER, OWNER_UNBONDING,
|
||||
};
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -251,8 +251,6 @@ mod tests {
|
||||
use crate::mixnodes::transactions::try_remove_mixnode;
|
||||
use crate::support::tests::fixtures::TEST_COIN_DENOM;
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
use cosmwasm_std::{coin, Decimal};
|
||||
use mixnet_contract_common::rewarding::helpers::truncate_reward;
|
||||
|
||||
#[test]
|
||||
fn for_non_existent_node() {
|
||||
@@ -412,8 +410,7 @@ mod tests {
|
||||
use crate::support::tests::fixtures::TEST_COIN_DENOM;
|
||||
use crate::support::tests::test_helpers::get_bank_send_msg;
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
use cosmwasm_std::{coin, Decimal};
|
||||
use mixnet_contract_common::rewarding::helpers::truncate_reward;
|
||||
|
||||
|
||||
#[test]
|
||||
fn for_non_existent_delegation() {
|
||||
|
||||
@@ -404,8 +404,6 @@ pub mod tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod epoch_state_is_correctly_updated {
|
||||
use mixnet_contract_common::EpochState;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
@@ -1950,7 +1948,7 @@ pub mod tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod updating_active_set {
|
||||
use mixnet_contract_common::{EpochState, EpochStatus};
|
||||
use mixnet_contract_common::EpochStatus;
|
||||
|
||||
use crate::support::tests::test_helpers::TestSetup;
|
||||
|
||||
@@ -2157,7 +2155,7 @@ pub mod tests {
|
||||
mod updating_rewarding_params {
|
||||
use cosmwasm_std::Decimal;
|
||||
|
||||
use mixnet_contract_common::{EpochState, EpochStatus};
|
||||
use mixnet_contract_common::EpochStatus;
|
||||
|
||||
use crate::support::tests::test_helpers::{assert_decimals, TestSetup};
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ use mixnet_contract_common::{EpochState, EpochStatus, IdentityKeyRef, MixId, Mix
|
||||
use vesting_contract_common::messages::ExecuteMsg as VestingContractExecuteMsg;
|
||||
|
||||
// helper trait to attach `Msg` to a response if it's provided
|
||||
#[allow(dead_code)]
|
||||
pub(crate) trait AttachOptionalMessage<T> {
|
||||
fn add_optional_message(self, msg: Option<impl Into<CosmosMsg<T>>>) -> Self;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ mod tests {
|
||||
testing::{mock_dependencies, mock_env, mock_info},
|
||||
Addr, Coin,
|
||||
};
|
||||
use nym_name_service_common::{msg::ExecuteMsg, NameId, RegisteredName};
|
||||
use nym_name_service_common::{NameId, RegisteredName};
|
||||
|
||||
const DENOM: &str = "unym";
|
||||
|
||||
|
||||
@@ -159,12 +159,9 @@ mod tests {
|
||||
};
|
||||
use rstest::rstest;
|
||||
|
||||
use crate::{
|
||||
test_helpers::{
|
||||
fixture::{name_fixture, name_fixture_full},
|
||||
transactions::instantiate_test_contract,
|
||||
},
|
||||
NameServiceError,
|
||||
use crate::test_helpers::{
|
||||
fixture::{name_fixture, name_fixture_full},
|
||||
transactions::instantiate_test_contract,
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -125,7 +125,7 @@ mod tests {
|
||||
testing::{mock_dependencies, mock_env, mock_info},
|
||||
Addr, Coin,
|
||||
};
|
||||
use nym_service_provider_directory_common::{msg::ExecuteMsg, Service, ServiceId};
|
||||
use nym_service_provider_directory_common::{Service, ServiceId};
|
||||
|
||||
const DENOM: &str = "unym";
|
||||
|
||||
|
||||
@@ -127,12 +127,9 @@ mod tests {
|
||||
};
|
||||
use rstest::rstest;
|
||||
|
||||
use crate::{
|
||||
test_helpers::{
|
||||
fixture::{service_fixture, service_fixture_with_address},
|
||||
transactions::instantiate_test_contract,
|
||||
},
|
||||
SpContractError,
|
||||
use crate::test_helpers::{
|
||||
fixture::{service_fixture, service_fixture_with_address},
|
||||
transactions::instantiate_test_contract,
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -162,6 +162,7 @@ pub(crate) trait StorableVestingAccountExt: VestingAccount {
|
||||
storage: &mut dyn Storage,
|
||||
) -> Result<(), VestingContractError>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn total_delegations_for_mix(
|
||||
&self,
|
||||
mix_id: MixId,
|
||||
@@ -182,6 +183,7 @@ pub(crate) trait StorableVestingAccountExt: VestingAccount {
|
||||
Ok(amount)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn total_delegations_at_timestamp(
|
||||
&self,
|
||||
storage: &dyn Storage,
|
||||
|
||||
@@ -149,7 +149,7 @@ impl VestingAccount for Account {
|
||||
storage: &mut dyn Storage,
|
||||
) -> Result<(), VestingContractError> {
|
||||
delete_account(self.owner_address(), storage)?;
|
||||
self.owner_address = to_address.to_owned();
|
||||
to_address.clone_into(&mut self.owner_address);
|
||||
save_account(self, storage)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Vendored
+6
-6
@@ -41,10 +41,10 @@ where
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub(crate) fn get<Q: ?Sized>(&self, key: &Q) -> Option<V>
|
||||
pub(crate) fn get<Q>(&self, key: &Q) -> Option<V>
|
||||
where
|
||||
K: Borrow<Q>,
|
||||
Q: Hash + Eq,
|
||||
Q: ?Sized + Hash + Eq,
|
||||
{
|
||||
self.inner
|
||||
.get(key)
|
||||
@@ -63,19 +63,19 @@ where
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
pub(crate) fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V>
|
||||
pub(crate) fn remove<Q>(&mut self, key: &Q) -> Option<V>
|
||||
where
|
||||
K: Borrow<Q>,
|
||||
Q: Hash + Eq,
|
||||
Q: ?Sized + Hash + Eq,
|
||||
{
|
||||
self.inner.remove(key).map(|item| item.value)
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
pub(crate) fn remove_if_expired<Q: ?Sized>(&mut self, key: &Q) -> Option<V>
|
||||
pub(crate) fn remove_if_expired<Q>(&mut self, key: &Q) -> Option<V>
|
||||
where
|
||||
K: Borrow<Q>,
|
||||
Q: Hash + Eq,
|
||||
Q: ?Sized + Hash + Eq,
|
||||
{
|
||||
if self.inner.get(key)?.has_expired() {
|
||||
self.remove(key)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ authors = [
|
||||
]
|
||||
description = "Implementation of the Nym Mixnet Gateway"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.70"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ use nym_crypto::{
|
||||
};
|
||||
use nym_sphinx::params::{GatewayEncryptionAlgorithm, GatewaySharedKeyHkdfAlgorithm};
|
||||
use rand::{CryptoRng, RngCore};
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
use tungstenite::Message as WsMessage;
|
||||
|
||||
@@ -18,7 +18,7 @@ use nym_sphinx::params::packet_sizes::PacketSize;
|
||||
use nym_sphinx::params::{GatewayEncryptionAlgorithm, GatewayIntegrityHmacAlgorithm};
|
||||
use nym_sphinx::DestinationAddressBytes;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::string::FromUtf8Error;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -69,7 +69,6 @@ pub(crate) async fn execute(args: Cli) -> anyhow::Result<()> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::CommandFactory;
|
||||
|
||||
#[test]
|
||||
fn verify_cli() {
|
||||
|
||||
@@ -32,7 +32,7 @@ use nym_sphinx::forwarding::packet::MixPacket;
|
||||
use nym_task::TaskClient;
|
||||
use nym_validator_client::coconut::CoconutApiError;
|
||||
use rand::{CryptoRng, Rng};
|
||||
use std::{convert::TryFrom, process, time::Duration};
|
||||
use std::{process, time::Duration};
|
||||
use thiserror::Error;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio_tungstenite::tungstenite::{protocol::Message, Error as WsError};
|
||||
|
||||
@@ -20,7 +20,7 @@ use nym_gateway_requests::{
|
||||
use nym_mixnet_client::forwarder::MixForwardingSender;
|
||||
use nym_sphinx::DestinationAddressBytes;
|
||||
use rand::{CryptoRng, Rng};
|
||||
use std::{convert::TryFrom, sync::Arc, time::Duration};
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use thiserror::Error;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio_tungstenite::tungstenite::{protocol::Message, Error as WsError};
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ authors = [
|
||||
]
|
||||
description = "Implementation of a Loopix-based Mixnode"
|
||||
edition = "2021"
|
||||
rust-version = "1.58.1"
|
||||
rust-version = "1.70"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ fn try_load_current_config(id: &str) -> Result<Config, MixnodeError> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::CommandFactory;
|
||||
|
||||
#[test]
|
||||
fn verify_cli() {
|
||||
|
||||
@@ -10,7 +10,7 @@ use nym_bin_common::output_format::OutputFormat;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_types::helpers::ConsoleSigningOutput;
|
||||
use nym_validator_client::nyxd;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
|
||||
use super::version_check;
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ authors = [
|
||||
"Drazen Urch <durch@users.noreply.github.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.70.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ pub trait Client {
|
||||
dealer: String,
|
||||
) -> Result<DealerDealingsStatusResponse>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
async fn get_dealing_status(
|
||||
&self,
|
||||
epoch_id: EpochId,
|
||||
@@ -72,8 +73,10 @@ pub trait Client {
|
||||
dealing_index: DealingIndex,
|
||||
) -> Result<DealingStatusResponse>;
|
||||
|
||||
|
||||
async fn get_current_dealers(&self) -> Result<Vec<DealerDetails>>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
async fn get_dealing_metadata(
|
||||
&self,
|
||||
epoch_id: EpochId,
|
||||
|
||||
@@ -75,7 +75,6 @@ mod test {
|
||||
use super::*;
|
||||
use crate::coconut::tests::{tx_entry_fixture, voucher_fixture};
|
||||
use cosmwasm_std::coin;
|
||||
use nym_api_requests::coconut::BlindSignRequestBody;
|
||||
use nym_coconut::BlindSignRequest;
|
||||
use nym_coconut_bandwidth_contract_common::events::DEPOSITED_FUNDS_EVENT_TYPE;
|
||||
use nym_credentials::coconut::bandwidth::CredentialType;
|
||||
|
||||
@@ -125,7 +125,7 @@ impl<R: RngCore + CryptoRng> DkgController<R> {
|
||||
// update the state with the dealing information
|
||||
self.state
|
||||
.dealing_exchange_state_mut(epoch_id)?
|
||||
.generated_dealings = dealings.clone();
|
||||
.generated_dealings.clone_from(&dealings);
|
||||
|
||||
Ok(dealings)
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ impl<R: RngCore + CryptoRng> DkgController<R> {
|
||||
}
|
||||
|
||||
let votes = self.generate_votes(epoch_id).await?;
|
||||
self.state.key_validation_state_mut(epoch_id)?.votes = votes.clone();
|
||||
self.state.key_validation_state_mut(epoch_id)?.votes.clone_from(&votes);
|
||||
|
||||
// send the votes
|
||||
for (proposal, vote) in votes {
|
||||
|
||||
@@ -8,34 +8,6 @@ use thiserror::Error;
|
||||
|
||||
#[async_trait]
|
||||
pub trait CoconutStorageManagerExt {
|
||||
/// Creates new encrypted blinded signature response entry for a given deposit tx hash.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `tx_hash`: hash of the deposit transaction.
|
||||
/// * `blinded_signature_response`: the encrypted blinded signature response.
|
||||
#[deprecated]
|
||||
async fn insert_blinded_signature_response(
|
||||
&self,
|
||||
_tx_hash: &str,
|
||||
_blinded_signature_response: &str,
|
||||
) -> Result<(), sqlx::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Tries to obtain encrypted blinded signature response for a given transaction hash.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `tx_hash`: transaction hash of the deposit.
|
||||
#[deprecated]
|
||||
async fn get_blinded_signature_response(
|
||||
&self,
|
||||
_tx_hash: &str,
|
||||
) -> Result<Option<String>, sqlx::Error> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// Gets the information about all issued partial credentials in this (coconut) epoch.
|
||||
///
|
||||
/// # Arguments
|
||||
|
||||
@@ -23,6 +23,7 @@ pub trait CoconutStorageExt {
|
||||
epoch_id: EpochId,
|
||||
) -> Result<Option<EpochCredentials>, NymApiStorageError>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
async fn create_epoch_credentials_entry(
|
||||
&self,
|
||||
epoch_id: EpochId,
|
||||
|
||||
@@ -209,7 +209,7 @@ async fn issued_credentials() {
|
||||
let parsed_response: IssuedCredentialsResponse =
|
||||
serde_json::from_str(&response.into_string().await.unwrap()).unwrap();
|
||||
assert_eq!(parsed_response.credentials[&5], issued5);
|
||||
assert!(parsed_response.credentials.get(&13).is_none());
|
||||
assert!(!parsed_response.credentials.contains_key(&13));
|
||||
|
||||
let response = test_fixture
|
||||
.rocket
|
||||
|
||||
@@ -943,8 +943,7 @@ impl super::client::Client for DummyClient {
|
||||
if chain
|
||||
.multisig_contract
|
||||
.votes
|
||||
.get(&(voter.clone(), proposal_id))
|
||||
.is_some()
|
||||
.contains_key(&(voter.clone(), proposal_id))
|
||||
{
|
||||
todo!("already voted");
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use nym_sphinx::params::{PacketSize, PacketType};
|
||||
use nym_topology::{gateway, mix};
|
||||
use rand_07::{rngs::ThreadRng, seq::SliceRandom, thread_rng, Rng};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::convert::TryInto;
|
||||
|
||||
use std::fmt::{self, Display, Formatter};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user