From 7e6feb0cd2765b024e97e32e20f6d1170ebe96bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Wed, 27 Mar 2024 15:41:28 +0000 Subject: [PATCH] fixed beta clippy: lints + updated cosmwasm to 1.4 --- Cargo.lock | 48 +- Cargo.toml | 18 +- clients/native/Cargo.toml | 2 +- clients/native/src/commands/mod.rs | 1 - .../native/websocket-requests/src/requests.rs | 2 +- .../websocket-requests/src/responses.rs | 2 +- clients/native/websocket-requests/src/text.rs | 2 +- clients/socks5/Cargo.toml | 2 +- clients/socks5/src/commands/mod.rs | 1 - .../src/client/transmission_buffer.rs | 2 + .../client-libs/gateway-client/src/client.rs | 2 +- .../gateway-client/src/socket_state.rs | 2 - .../client_traits/query_client.rs | 2 +- .../client_traits/signing_client.rs | 3 +- .../src/nyxd/cosmwasm_client/types.rs | 2 +- .../src/signing/direct_wallet.rs | 2 +- .../src/validator/account/send_multiple.rs | 3 +- .../mixnet-contract/src/events.rs | 7 +- .../src/rewarding/simulator/mod.rs | 7 +- common/crypto/src/hmac.rs | 1 - common/dkg/src/bte/proof_chunking.rs | 1 - common/exit-policy/src/lib.rs | 2 +- .../src/packet_processor/processor.rs | 2 +- common/mixnode-common/src/verloc/packet.rs | 2 +- common/nymcoconut/src/elgamal.rs | 4 +- common/nymcoconut/src/proofs/mod.rs | 2 +- common/nymcoconut/src/scheme/aggregation.rs | 1 - common/nymcoconut/src/scheme/double_use.rs | 4 +- common/nymcoconut/src/scheme/issuance.rs | 4 +- common/nymcoconut/src/scheme/keygen.rs | 4 +- common/nymcoconut/src/scheme/mod.rs | 4 +- common/nymcoconut/src/scheme/verification.rs | 4 +- common/nymcoconut/src/tests/helpers.rs | 1 - common/nymcoconut/src/traits.rs | 2 +- common/nymcoconut/src/utils.rs | 2 +- .../acknowledgements/src/surb_ack.rs | 2 +- common/nymsphinx/addressing/src/nodes.rs | 2 +- .../anonymous-replies/src/reply_surb.rs | 2 +- common/nymsphinx/chunking/src/fragment.rs | 2 +- common/nymsphinx/cover/src/lib.rs | 2 +- common/nymsphinx/forwarding/src/packet.rs | 2 +- common/nymsphinx/framing/src/codec.rs | 3 +- common/nymsphinx/framing/src/packet.rs | 2 +- common/nymsphinx/params/src/packet_sizes.rs | 2 +- common/nymsphinx/params/src/packet_types.rs | 2 +- common/nymsphinx/src/preparer/mod.rs | 2 +- common/pemstore/src/lib.rs | 2 +- common/socks5-client-core/src/socks/client.rs | 2 +- common/socks5-client-core/src/socks/mod.rs | 2 +- common/socks5/requests/src/request.rs | 2 +- common/topology/src/gateway.rs | 2 +- common/topology/src/lib.rs | 6 +- common/topology/src/mix.rs | 2 +- common/topology/src/serde.rs | 7 + common/types/src/currency.rs | 6 +- .../wasm/client-core/src/config/override.rs | 6 + contracts/Cargo.lock | 576 +++++++----------- contracts/Cargo.toml | 23 +- .../coconut-bandwidth/src/transactions.rs | 2 +- .../coconut-dkg/src/dealings/transactions.rs | 2 - .../coconut-dkg/src/epoch_state/queries.rs | 2 +- .../src/epoch_state/transactions/mod.rs | 1 - .../coconut-dkg/src/epoch_state/utils.rs | 2 +- .../verification_key_shares/transactions.rs | 2 +- contracts/mixnet/src/families/transactions.rs | 7 +- contracts/mixnet/src/gateways/transactions.rs | 9 +- .../mixnet/src/interval/pending_events.rs | 5 +- contracts/mixnet/src/interval/storage.rs | 7 +- contracts/mixnet/src/interval/transactions.rs | 4 +- .../mixnet_contract_settings/transactions.rs | 5 +- contracts/mixnet/src/mixnodes/transactions.rs | 10 +- contracts/mixnet/src/rewards/queries.rs | 5 +- contracts/mixnet/src/rewards/transactions.rs | 6 +- contracts/mixnet/src/support/helpers.rs | 1 + contracts/name-service/src/contract.rs | 2 +- contracts/name-service/src/state/names.rs | 9 +- .../src/contract.rs | 2 +- .../src/state/services.rs | 9 +- contracts/vesting/src/vesting/account/mod.rs | 2 + .../src/vesting/account/vesting_account.rs | 2 +- explorer-api/src/cache/mod.rs | 12 +- gateway/Cargo.toml | 2 +- .../src/registration/handshake/state.rs | 2 +- gateway/gateway-requests/src/types.rs | 2 +- gateway/src/commands/mod.rs | 1 - .../connection_handler/authenticated.rs | 2 +- .../websocket/connection_handler/fresh.rs | 2 +- mixnode/Cargo.toml | 2 +- mixnode/src/commands/mod.rs | 1 - mixnode/src/commands/sign.rs | 2 +- nym-api/Cargo.toml | 2 +- nym-api/src/coconut/client.rs | 3 + nym-api/src/coconut/deposit.rs | 1 - nym-api/src/coconut/dkg/dealing.rs | 2 +- nym-api/src/coconut/dkg/key_validation.rs | 2 +- nym-api/src/coconut/storage/manager.rs | 28 - nym-api/src/coconut/storage/mod.rs | 1 + .../src/coconut/tests/issued_credentials.rs | 2 +- nym-api/src/coconut/tests/mod.rs | 3 +- .../src/network_monitor/monitor/preparer.rs | 2 +- .../src/node_status_api/cache/node_sets.rs | 2 +- nym-api/src/node_status_api/models.rs | 2 +- nym-api/src/node_status_api/utils.rs | 2 +- nym-api/src/support/storage/manager.rs | 2 +- nym-connect/desktop/Cargo.lock | 362 ++++------- nym-connect/desktop/src-tauri/src/menu.rs | 1 + .../src-tauri/src/operations/help/storage.rs | 6 - nym-outfox/src/format.rs | 6 +- nym-outfox/src/packet.rs | 2 - nym-outfox/tests/unittests.rs | 2 - nym-validator-rewarder/src/cli/mod.rs | 1 - nym-wallet/Cargo.lock | 356 ++++------- nym-wallet/src-tauri/src/coin.rs | 4 +- nym-wallet/src-tauri/src/menu.rs | 1 + .../src/operations/mixnet/account.rs | 5 +- .../src-tauri/src/wallet_storage/mod.rs | 2 +- sdk/lib/socks5-listener/src/lib.rs | 1 - .../examples/libp2p_shared/connection.rs | 2 +- .../examples/libp2p_shared/transport.rs | 2 +- .../network-requester/Cargo.toml | 2 +- .../network-requester/src/cli/mod.rs | 1 - .../src/request_filter/allowed_hosts/group.rs | 2 +- tools/nymvisor/src/cli/init.rs | 4 +- tools/nymvisor/src/env.rs | 6 +- wasm/client/src/client.rs | 6 + wasm/client/src/config.rs | 6 + wasm/client/src/encoded_payload_helper.rs | 7 +- wasm/client/src/helpers.rs | 20 +- wasm/mix-fetch/src/config.rs | 5 + wasm/mix-fetch/src/fetch.rs | 6 + wasm/mix-fetch/src/go_bridge.rs | 1 - wasm/node-tester/src/tester.rs | 5 + 132 files changed, 661 insertions(+), 1150 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28efbd69ef..aeef9d78ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/Cargo.toml b/Cargo.toml index 6e322cc32a..0c28c45480 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index a85b73e5a4..0da4860a7e 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -4,7 +4,7 @@ version = "1.1.33" authors = ["Dave Hrycyszyn ", "Jędrzej Stuczyński "] 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 diff --git a/clients/native/src/commands/mod.rs b/clients/native/src/commands/mod.rs index ff1b8087fd..907869c72d 100644 --- a/clients/native/src/commands/mod.rs +++ b/clients/native/src/commands/mod.rs @@ -247,7 +247,6 @@ fn try_load_current_config(id: &str) -> Result { #[cfg(test)] mod tests { use super::*; - use clap::CommandFactory; #[test] fn verify_cli() { diff --git a/clients/native/websocket-requests/src/requests.rs b/clients/native/websocket-requests/src/requests.rs index 645f2edf9c..ba364df7d3 100644 --- a/clients/native/websocket-requests/src/requests.rs +++ b/clients/native/websocket-requests/src/requests.rs @@ -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)] diff --git a/clients/native/websocket-requests/src/responses.rs b/clients/native/websocket-requests/src/responses.rs index f3ac08a4bd..5917203fe3 100644 --- a/clients/native/websocket-requests/src/responses.rs +++ b/clients/native/websocket-requests/src/responses.rs @@ -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)] diff --git a/clients/native/websocket-requests/src/text.rs b/clients/native/websocket-requests/src/text.rs index a87a0fb32d..faa0706a55 100644 --- a/clients/native/websocket-requests/src/text.rs +++ b/clients/native/websocket-requests/src/text.rs @@ -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 diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index 2665f6355c..7be3a3e876 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -4,7 +4,7 @@ version = "1.1.33" authors = ["Dave Hrycyszyn "] description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address" edition = "2021" -rust-version = "1.56" +rust-version = "1.70" license.workspace = true [dependencies] diff --git a/clients/socks5/src/commands/mod.rs b/clients/socks5/src/commands/mod.rs index da3166fd7e..63e656faea 100644 --- a/clients/socks5/src/commands/mod.rs +++ b/clients/socks5/src/commands/mod.rs @@ -313,7 +313,6 @@ fn try_load_current_config(id: &str) -> Result { #[cfg(test)] mod tests { use super::*; - use clap::CommandFactory; #[test] fn verify_cli() { diff --git a/common/client-core/src/client/transmission_buffer.rs b/common/client-core/src/client/transmission_buffer.rs index 326cfa7f53..d6ee86e861 100644 --- a/common/client-core/src/client/transmission_buffer.rs +++ b/common/client-core/src/client/transmission_buffer.rs @@ -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; } diff --git a/common/client-libs/gateway-client/src/client.rs b/common/client-libs/gateway-client/src/client.rs index 77d28ca2a7..fac2f92f45 100644 --- a/common/client-libs/gateway-client/src/client.rs +++ b/common/client-libs/gateway-client/src/client.rs @@ -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; diff --git a/common/client-libs/gateway-client/src/socket_state.rs b/common/client-libs/gateway-client/src/socket_state.rs index e58ebbcabd..44396a9dd3 100644 --- a/common/client-libs/gateway-client/src/socket_state.rs +++ b/common/client-libs/gateway-client/src/socket_state.rs @@ -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; diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs index 7d389adafb..f63399ce18 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs @@ -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}, diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs index d5baa96499..59f510df22 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs @@ -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; diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/types.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/types.rs index 757c8ed201..b1e91efa39 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/types.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/types.rs @@ -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; diff --git a/common/client-libs/validator-client/src/signing/direct_wallet.rs b/common/client-libs/validator-client/src/signing/direct_wallet.rs index 3de09502ae..daeb4bc447 100644 --- a/common/client-libs/validator-client/src/signing/direct_wallet.rs +++ b/common/client-libs/validator-client/src/signing/direct_wallet.rs @@ -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}; diff --git a/common/commands/src/validator/account/send_multiple.rs b/common/commands/src/validator/account/send_multiple.rs index 9bac94f070..f19b1b6760 100644 --- a/common/commands/src/validator/account/send_multiple.rs +++ b/common/commands/src/validator/account/send_multiple.rs @@ -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(); diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs index 67b4ffd96d..444bfc31d7 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/events.rs @@ -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 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}") } } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs index c6575661fd..e723988c91 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs @@ -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 diff --git a/common/crypto/src/hmac.rs b/common/crypto/src/hmac.rs index a997b56359..c2678eb0bd 100644 --- a/common/crypto/src/hmac.rs +++ b/common/crypto/src/hmac.rs @@ -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? diff --git a/common/dkg/src/bte/proof_chunking.rs b/common/dkg/src/bte/proof_chunking.rs index d438793275..27bc04894a 100644 --- a/common/dkg/src/bte/proof_chunking.rs +++ b/common/dkg/src/bte/proof_chunking.rs @@ -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 diff --git a/common/exit-policy/src/lib.rs b/common/exit-policy/src/lib.rs index 4c54e575b9..ebd236deec 100644 --- a/common/exit-policy/src/lib.rs +++ b/common/exit-policy/src/lib.rs @@ -63,7 +63,7 @@ fn parse_address_policy_rule(rule: &str) -> Result // 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}; diff --git a/common/nymcoconut/src/scheme/keygen.rs b/common/nymcoconut/src/scheme/keygen.rs index 50d735ef92..823bc65759 100644 --- a/common/nymcoconut/src/scheme/keygen.rs +++ b/common/nymcoconut/src/scheme/keygen.rs @@ -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; diff --git a/common/nymcoconut/src/scheme/mod.rs b/common/nymcoconut/src/scheme/mod.rs index 58c1ca0f5e..4ccec89b18 100644 --- a/common/nymcoconut/src/scheme/mod.rs +++ b/common/nymcoconut/src/scheme/mod.rs @@ -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; diff --git a/common/nymcoconut/src/scheme/verification.rs b/common/nymcoconut/src/scheme/verification.rs index 652a02a04e..ee389deb62 100644 --- a/common/nymcoconut/src/scheme/verification.rs +++ b/common/nymcoconut/src/scheme/verification.rs @@ -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; diff --git a/common/nymcoconut/src/tests/helpers.rs b/common/nymcoconut/src/tests/helpers.rs index 9b3b16d44c..b8bcb6893d 100644 --- a/common/nymcoconut/src/tests/helpers.rs +++ b/common/nymcoconut/src/tests/helpers.rs @@ -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; diff --git a/common/nymcoconut/src/traits.rs b/common/nymcoconut/src/traits.rs index d521b133ac..bfeec703ec 100644 --- a/common/nymcoconut/src/traits.rs +++ b/common/nymcoconut/src/traits.rs @@ -7,7 +7,7 @@ use crate::CoconutError; use bls12_381::{G1Affine, G1Projective, Scalar}; use group::GroupEncoding; -use std::convert::TryInto; + pub trait Bytable where diff --git a/common/nymcoconut/src/utils.rs b/common/nymcoconut/src/utils.rs index c2fcd4da3f..fe4a288087 100644 --- a/common/nymcoconut/src/utils.rs +++ b/common/nymcoconut/src/utils.rs @@ -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}; diff --git a/common/nymsphinx/acknowledgements/src/surb_ack.rs b/common/nymsphinx/acknowledgements/src/surb_ack.rs index 732f84b9ba..a9311be597 100644 --- a/common/nymsphinx/acknowledgements/src/surb_ack.rs +++ b/common/nymsphinx/acknowledgements/src/surb_ack.rs @@ -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; diff --git a/common/nymsphinx/addressing/src/nodes.rs b/common/nymsphinx/addressing/src/nodes.rs index d1ed9d1790..9569d4bbc8 100644 --- a/common/nymsphinx/addressing/src/nodes.rs +++ b/common/nymsphinx/addressing/src/nodes.rs @@ -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; diff --git a/common/nymsphinx/anonymous-replies/src/reply_surb.rs b/common/nymsphinx/anonymous-replies/src/reply_surb.rs index d38b16fc13..deac5f532d 100644 --- a/common/nymsphinx/anonymous-replies/src/reply_surb.rs +++ b/common/nymsphinx/anonymous-replies/src/reply_surb.rs @@ -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; diff --git a/common/nymsphinx/chunking/src/fragment.rs b/common/nymsphinx/chunking/src/fragment.rs index 6dccfa053a..b112bdb47f 100644 --- a/common/nymsphinx/chunking/src/fragment.rs +++ b/common/nymsphinx/chunking/src/fragment.rs @@ -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 diff --git a/common/nymsphinx/cover/src/lib.rs b/common/nymsphinx/cover/src/lib.rs index 66142a4cee..23c83c3ed1 100644 --- a/common/nymsphinx/cover/src/lib.rs +++ b/common/nymsphinx/cover/src/lib.rs @@ -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; diff --git a/common/nymsphinx/forwarding/src/packet.rs b/common/nymsphinx/forwarding/src/packet.rs index 13026a3aaf..97b1419aa1 100644 --- a/common/nymsphinx/forwarding/src/packet.rs +++ b/common/nymsphinx/forwarding/src/packet.rs @@ -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; diff --git a/common/nymsphinx/framing/src/codec.rs b/common/nymsphinx/framing/src/codec.rs index c579bc2491..ef7b412fbc 100644 --- a/common/nymsphinx/framing/src/codec.rs +++ b/common/nymsphinx/framing/src/codec.rs @@ -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 diff --git a/common/nymsphinx/framing/src/packet.rs b/common/nymsphinx/framing/src/packet.rs index 3f6953566b..aaae18252e 100644 --- a/common/nymsphinx/framing/src/packet.rs +++ b/common/nymsphinx/framing/src/packet.rs @@ -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 { diff --git a/common/nymsphinx/params/src/packet_sizes.rs b/common/nymsphinx/params/src/packet_sizes.rs index aabfbc26f8..17d85a4efa 100644 --- a/common/nymsphinx/params/src/packet_sizes.rs +++ b/common/nymsphinx/params/src/packet_sizes.rs @@ -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; diff --git a/common/nymsphinx/params/src/packet_types.rs b/common/nymsphinx/params/src/packet_types.rs index 6e6925fc68..9d85b0dbfd 100644 --- a/common/nymsphinx/params/src/packet_types.rs +++ b/common/nymsphinx/params/src/packet_types.rs @@ -6,7 +6,7 @@ use crate::PacketSize; use serde::{Deserialize, Serialize}; -use std::convert::TryFrom; + use std::fmt; use thiserror::Error; diff --git a/common/nymsphinx/src/preparer/mod.rs b/common/nymsphinx/src/preparer/mod.rs index f6e19dec7d..b116cdadf9 100644 --- a/common/nymsphinx/src/preparer/mod.rs +++ b/common/nymsphinx/src/preparer/mod.rs @@ -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; diff --git a/common/pemstore/src/lib.rs b/common/pemstore/src/lib.rs index e883ed60c0..a89bc628c5 100644 --- a/common/pemstore/src/lib.rs +++ b/common/pemstore/src/lib.rs @@ -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}; diff --git a/common/socks5-client-core/src/socks/client.rs b/common/socks5-client-core/src/socks/client.rs index eb1e2db2f6..cca9cd6b53 100644 --- a/common/socks5-client-core/src/socks/client.rs +++ b/common/socks5-client-core/src/socks/client.rs @@ -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 { diff --git a/common/socks5-client-core/src/socks/mod.rs b/common/socks5-client-core/src/socks/mod.rs index 36cc580480..4b6cc169f0 100644 --- a/common/socks5-client-core/src/socks/mod.rs +++ b/common/socks5-client-core/src/socks/mod.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use std::convert::TryFrom; + use self::types::SocksProxyError; diff --git a/common/socks5/requests/src/request.rs b/common/socks5/requests/src/request.rs index 72241f7ef2..23e844db87 100644 --- a/common/socks5/requests/src/request.rs +++ b/common/socks5/requests/src/request.rs @@ -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; diff --git a/common/topology/src/gateway.rs b/common/topology/src/gateway.rs index 9d10b8d2a0..e8b61eedf6 100644 --- a/common/topology/src/gateway.rs +++ b/common/topology/src/gateway.rs @@ -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; diff --git a/common/topology/src/lib.rs b/common/topology/src/lib.rs index 039e30eb94..54791b26ea 100644 --- a/common/topology/src/lib.rs +++ b/common/topology/src/lib.rs @@ -1,6 +1,9 @@ // Copyright 2021-2023 - Nym Technologies SA // 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 { diff --git a/common/topology/src/mix.rs b/common/topology/src/mix.rs index 0481d5bc16..a4311b1205 100644 --- a/common/topology/src/mix.rs +++ b/common/topology/src/mix.rs @@ -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; diff --git a/common/topology/src/serde.rs b/common/topology/src/serde.rs index 84770a4868..78990d2f11 100644 --- a/common/topology/src/serde.rs +++ b/common/topology/src/serde.rs @@ -1,6 +1,12 @@ // Copyright 2023 - Nym Technologies SA // 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; diff --git a/common/types/src/currency.rs b/common/types/src/currency.rs index 4d381bc10c..1e9cceb521 100644 --- a/common/types/src/currency.rs +++ b/common/types/src/currency.rs @@ -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 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 { diff --git a/common/wasm/client-core/src/config/override.rs b/common/wasm/client-core/src/config/override.rs index e8d66169cf..ed89174539 100644 --- a/common/wasm/client-core/src/config/override.rs +++ b/common/wasm/client-core/src/config/override.rs @@ -1,6 +1,12 @@ // Copyright 2023 - Nym Technologies SA // 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, diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 1b7383f41f..026e514e9c 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -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" diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml index 74e6e4bb07..245c083ae4 100644 --- a/contracts/Cargo.toml +++ b/contracts/Cargo.toml @@ -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" diff --git a/contracts/coconut-bandwidth/src/transactions.rs b/contracts/coconut-bandwidth/src/transactions.rs index ecfc524773..8a55ec832f 100644 --- a/contracts/coconut-bandwidth/src/transactions.rs +++ b/contracts/coconut-bandwidth/src/transactions.rs @@ -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; diff --git a/contracts/coconut-dkg/src/dealings/transactions.rs b/contracts/coconut-dkg/src/dealings/transactions.rs index 0780f1cfd1..694ce7f3f7 100644 --- a/contracts/coconut-dkg/src/dealings/transactions.rs +++ b/contracts/coconut-dkg/src/dealings/transactions.rs @@ -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}; diff --git a/contracts/coconut-dkg/src/epoch_state/queries.rs b/contracts/coconut-dkg/src/epoch_state/queries.rs index 45eb3bcaf5..e15dcc34bf 100644 --- a/contracts/coconut-dkg/src/epoch_state/queries.rs +++ b/contracts/coconut-dkg/src/epoch_state/queries.rs @@ -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() { diff --git a/contracts/coconut-dkg/src/epoch_state/transactions/mod.rs b/contracts/coconut-dkg/src/epoch_state/transactions/mod.rs index 2409ae558c..8922abc1ca 100644 --- a/contracts/coconut-dkg/src/epoch_state/transactions/mod.rs +++ b/contracts/coconut-dkg/src/epoch_state/transactions/mod.rs @@ -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() { diff --git a/contracts/coconut-dkg/src/epoch_state/utils.rs b/contracts/coconut-dkg/src/epoch_state/utils.rs index 46fa44a885..c468e2af8b 100644 --- a/contracts/coconut-dkg/src/epoch_state/utils.rs +++ b/contracts/coconut-dkg/src/epoch_state/utils.rs @@ -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() { diff --git a/contracts/coconut-dkg/src/verification_key_shares/transactions.rs b/contracts/coconut-dkg/src/verification_key_shares/transactions.rs index 9d65e11a89..f8f4534a60 100644 --- a/contracts/coconut-dkg/src/verification_key_shares/transactions.rs +++ b/contracts/coconut-dkg/src/verification_key_shares/transactions.rs @@ -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() { diff --git a/contracts/mixnet/src/families/transactions.rs b/contracts/mixnet/src/families/transactions.rs index 912cbc7146..732acddb43 100644 --- a/contracts/mixnet/src/families/transactions.rs +++ b/contracts/mixnet/src/families/transactions.rs @@ -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() { diff --git a/contracts/mixnet/src/gateways/transactions.rs b/contracts/mixnet/src/gateways/transactions.rs index bc5a90494e..f747c4c7ba 100644 --- a/contracts/mixnet/src/gateways/transactions.rs +++ b/contracts/mixnet/src/gateways/transactions.rs @@ -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] diff --git a/contracts/mixnet/src/interval/pending_events.rs b/contracts/mixnet/src/interval/pending_events.rs index 03e0ea2c46..6ba77faa6d 100644 --- a/contracts/mixnet/src/interval/pending_events.rs +++ b/contracts/mixnet/src/interval/pending_events.rs @@ -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::*; diff --git a/contracts/mixnet/src/interval/storage.rs b/contracts/mixnet/src/interval/storage.rs index 04f3aa999a..24666db431 100644 --- a/contracts/mixnet/src/interval/storage.rs +++ b/contracts/mixnet/src/interval/storage.rs @@ -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 { @@ -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] diff --git a/contracts/mixnet/src/interval/transactions.rs b/contracts/mixnet/src/interval/transactions.rs index 0392368389..0eae4fed7b 100644 --- a/contracts/mixnet/src/interval/transactions.rs +++ b/contracts/mixnet/src/interval/transactions.rs @@ -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] diff --git a/contracts/mixnet/src/mixnet_contract_settings/transactions.rs b/contracts/mixnet/src/mixnet_contract_settings/transactions.rs index 72f5226e1f..5aed1d45ea 100644 --- a/contracts/mixnet/src/mixnet_contract_settings/transactions.rs +++ b/contracts/mixnet/src/mixnet_contract_settings/transactions.rs @@ -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() { diff --git a/contracts/mixnet/src/mixnodes/transactions.rs b/contracts/mixnet/src/mixnodes/transactions.rs index bfd1508cf7..00b000a43e 100644 --- a/contracts/mixnet/src/mixnodes/transactions.rs +++ b/contracts/mixnet/src/mixnodes/transactions.rs @@ -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::*; diff --git a/contracts/mixnet/src/rewards/queries.rs b/contracts/mixnet/src/rewards/queries.rs index 8b7ae13b4e..59f3799b56 100644 --- a/contracts/mixnet/src/rewards/queries.rs +++ b/contracts/mixnet/src/rewards/queries.rs @@ -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() { diff --git a/contracts/mixnet/src/rewards/transactions.rs b/contracts/mixnet/src/rewards/transactions.rs index 19ca0e8c83..9aa417ae7c 100644 --- a/contracts/mixnet/src/rewards/transactions.rs +++ b/contracts/mixnet/src/rewards/transactions.rs @@ -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}; diff --git a/contracts/mixnet/src/support/helpers.rs b/contracts/mixnet/src/support/helpers.rs index 094d96eaba..12c02a675a 100644 --- a/contracts/mixnet/src/support/helpers.rs +++ b/contracts/mixnet/src/support/helpers.rs @@ -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 { fn add_optional_message(self, msg: Option>>) -> Self; } diff --git a/contracts/name-service/src/contract.rs b/contracts/name-service/src/contract.rs index 35294382c8..43a560450b 100644 --- a/contracts/name-service/src/contract.rs +++ b/contracts/name-service/src/contract.rs @@ -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"; diff --git a/contracts/name-service/src/state/names.rs b/contracts/name-service/src/state/names.rs index 813a2fe85e..8d552a8626 100644 --- a/contracts/name-service/src/state/names.rs +++ b/contracts/name-service/src/state/names.rs @@ -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::*; diff --git a/contracts/service-provider-directory/src/contract.rs b/contracts/service-provider-directory/src/contract.rs index 9a760c7788..886ea79826 100644 --- a/contracts/service-provider-directory/src/contract.rs +++ b/contracts/service-provider-directory/src/contract.rs @@ -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"; diff --git a/contracts/service-provider-directory/src/state/services.rs b/contracts/service-provider-directory/src/state/services.rs index d88ebf6722..f7c4697b45 100644 --- a/contracts/service-provider-directory/src/state/services.rs +++ b/contracts/service-provider-directory/src/state/services.rs @@ -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::*; diff --git a/contracts/vesting/src/vesting/account/mod.rs b/contracts/vesting/src/vesting/account/mod.rs index 7d016fd130..c09b6057b5 100644 --- a/contracts/vesting/src/vesting/account/mod.rs +++ b/contracts/vesting/src/vesting/account/mod.rs @@ -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, diff --git a/contracts/vesting/src/vesting/account/vesting_account.rs b/contracts/vesting/src/vesting/account/vesting_account.rs index 1cb51aae19..6406df460d 100644 --- a/contracts/vesting/src/vesting/account/vesting_account.rs +++ b/contracts/vesting/src/vesting/account/vesting_account.rs @@ -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(()) } diff --git a/explorer-api/src/cache/mod.rs b/explorer-api/src/cache/mod.rs index 74448f4417..b951073ed1 100644 --- a/explorer-api/src/cache/mod.rs +++ b/explorer-api/src/cache/mod.rs @@ -41,10 +41,10 @@ where .collect() } - pub(crate) fn get(&self, key: &Q) -> Option + pub(crate) fn get(&self, key: &Q) -> Option where K: Borrow, - Q: Hash + Eq, + Q: ?Sized + Hash + Eq, { self.inner .get(key) @@ -63,19 +63,19 @@ where } #[allow(unused)] - pub(crate) fn remove(&mut self, key: &Q) -> Option + pub(crate) fn remove(&mut self, key: &Q) -> Option where K: Borrow, - Q: Hash + Eq, + Q: ?Sized + Hash + Eq, { self.inner.remove(key).map(|item| item.value) } #[allow(unused)] - pub(crate) fn remove_if_expired(&mut self, key: &Q) -> Option + pub(crate) fn remove_if_expired(&mut self, key: &Q) -> Option where K: Borrow, - Q: Hash + Eq, + Q: ?Sized + Hash + Eq, { if self.inner.get(key)?.has_expired() { self.remove(key) diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index 90ef9195ca..01d1aaf9c8 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -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 diff --git a/gateway/gateway-requests/src/registration/handshake/state.rs b/gateway/gateway-requests/src/registration/handshake/state.rs index 046f523f76..6212a919b5 100644 --- a/gateway/gateway-requests/src/registration/handshake/state.rs +++ b/gateway/gateway-requests/src/registration/handshake/state.rs @@ -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; diff --git a/gateway/gateway-requests/src/types.rs b/gateway/gateway-requests/src/types.rs index 58e82c0221..04fcb0c8a8 100644 --- a/gateway/gateway-requests/src/types.rs +++ b/gateway/gateway-requests/src/types.rs @@ -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; diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index f3b1adac7c..4f9d46d7df 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -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() { diff --git a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs index 7a06f36697..24e0393f9d 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs @@ -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}; diff --git a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs index 93ef0508fd..539026ad5a 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs @@ -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}; diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index db0b3786db..af2442fd02 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -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 diff --git a/mixnode/src/commands/mod.rs b/mixnode/src/commands/mod.rs index 706bbab77d..34b75e701a 100644 --- a/mixnode/src/commands/mod.rs +++ b/mixnode/src/commands/mod.rs @@ -152,7 +152,6 @@ fn try_load_current_config(id: &str) -> Result { #[cfg(test)] mod tests { use super::*; - use clap::CommandFactory; #[test] fn verify_cli() { diff --git a/mixnode/src/commands/sign.rs b/mixnode/src/commands/sign.rs index 2604a72d1c..8225649707 100644 --- a/mixnode/src/commands/sign.rs +++ b/mixnode/src/commands/sign.rs @@ -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; diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 10baf737d5..68b94fdc0a 100644 --- a/nym-api/Cargo.toml +++ b/nym-api/Cargo.toml @@ -11,7 +11,7 @@ authors = [ "Drazen Urch ", ] 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 diff --git a/nym-api/src/coconut/client.rs b/nym-api/src/coconut/client.rs index 45ebe7758e..3b65d83649 100644 --- a/nym-api/src/coconut/client.rs +++ b/nym-api/src/coconut/client.rs @@ -65,6 +65,7 @@ pub trait Client { dealer: String, ) -> Result; + #[allow(dead_code)] async fn get_dealing_status( &self, epoch_id: EpochId, @@ -72,8 +73,10 @@ pub trait Client { dealing_index: DealingIndex, ) -> Result; + async fn get_current_dealers(&self) -> Result>; + #[allow(dead_code)] async fn get_dealing_metadata( &self, epoch_id: EpochId, diff --git a/nym-api/src/coconut/deposit.rs b/nym-api/src/coconut/deposit.rs index 8448342c08..985e9fadaa 100644 --- a/nym-api/src/coconut/deposit.rs +++ b/nym-api/src/coconut/deposit.rs @@ -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; diff --git a/nym-api/src/coconut/dkg/dealing.rs b/nym-api/src/coconut/dkg/dealing.rs index 6c4074af72..7cbd4fa80f 100644 --- a/nym-api/src/coconut/dkg/dealing.rs +++ b/nym-api/src/coconut/dkg/dealing.rs @@ -125,7 +125,7 @@ impl DkgController { // 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) } diff --git a/nym-api/src/coconut/dkg/key_validation.rs b/nym-api/src/coconut/dkg/key_validation.rs index 68068d30b6..4daa0da601 100644 --- a/nym-api/src/coconut/dkg/key_validation.rs +++ b/nym-api/src/coconut/dkg/key_validation.rs @@ -234,7 +234,7 @@ impl DkgController { } 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 { diff --git a/nym-api/src/coconut/storage/manager.rs b/nym-api/src/coconut/storage/manager.rs index 313a2db047..8cea9ef898 100644 --- a/nym-api/src/coconut/storage/manager.rs +++ b/nym-api/src/coconut/storage/manager.rs @@ -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, sqlx::Error> { - Ok(None) - } - /// Gets the information about all issued partial credentials in this (coconut) epoch. /// /// # Arguments diff --git a/nym-api/src/coconut/storage/mod.rs b/nym-api/src/coconut/storage/mod.rs index 45cecf1f23..1b29f51b43 100644 --- a/nym-api/src/coconut/storage/mod.rs +++ b/nym-api/src/coconut/storage/mod.rs @@ -23,6 +23,7 @@ pub trait CoconutStorageExt { epoch_id: EpochId, ) -> Result, NymApiStorageError>; + #[allow(dead_code)] async fn create_epoch_credentials_entry( &self, epoch_id: EpochId, diff --git a/nym-api/src/coconut/tests/issued_credentials.rs b/nym-api/src/coconut/tests/issued_credentials.rs index ef64c38da8..fadfdad4e8 100644 --- a/nym-api/src/coconut/tests/issued_credentials.rs +++ b/nym-api/src/coconut/tests/issued_credentials.rs @@ -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 diff --git a/nym-api/src/coconut/tests/mod.rs b/nym-api/src/coconut/tests/mod.rs index 0cdb60a1b5..c89d30ee3d 100644 --- a/nym-api/src/coconut/tests/mod.rs +++ b/nym-api/src/coconut/tests/mod.rs @@ -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"); } diff --git a/nym-api/src/network_monitor/monitor/preparer.rs b/nym-api/src/network_monitor/monitor/preparer.rs index b9a585033b..4e9cfda0fd 100644 --- a/nym-api/src/network_monitor/monitor/preparer.rs +++ b/nym-api/src/network_monitor/monitor/preparer.rs @@ -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; diff --git a/nym-api/src/node_status_api/cache/node_sets.rs b/nym-api/src/node_status_api/cache/node_sets.rs index ed20298887..872b532d2a 100644 --- a/nym-api/src/node_status_api/cache/node_sets.rs +++ b/nym-api/src/node_status_api/cache/node_sets.rs @@ -135,7 +135,7 @@ pub(super) async fn annotate_nodes_with_details( compute_apy_from_reward(&mixnode, reward_estimate, current_interval); let family = mix_to_family - .get(&mixnode.bond_information.identity().to_string()) + .get(mixnode.bond_information.identity()) .cloned(); annotated.push(MixNodeBondAnnotated { diff --git a/nym-api/src/node_status_api/models.rs b/nym-api/src/node_status_api/models.rs index ca5e4fd6d1..7d13d81522 100644 --- a/nym-api/src/node_status_api/models.rs +++ b/nym-api/src/node_status_api/models.rs @@ -21,7 +21,7 @@ use schemars::gen::SchemaGenerator; use schemars::schema::{InstanceType, Schema}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use std::convert::TryFrom; + use thiserror::Error; use time::OffsetDateTime; diff --git a/nym-api/src/node_status_api/utils.rs b/nym-api/src/node_status_api/utils.rs index 54d5b50d9a..598fba5679 100644 --- a/nym-api/src/node_status_api/utils.rs +++ b/nym-api/src/node_status_api/utils.rs @@ -6,7 +6,7 @@ use crate::node_status_api::{FIFTEEN_MINUTES, ONE_HOUR}; use crate::storage::models::NodeStatus; use log::warn; use nym_mixnet_contract_common::MixId; -use std::convert::TryInto; + use time::OffsetDateTime; // A temporary helper structs used to produce reports for active nodes. diff --git a/nym-api/src/support/storage/manager.rs b/nym-api/src/support/storage/manager.rs index 298f0c04a2..953483d9c1 100644 --- a/nym-api/src/support/storage/manager.rs +++ b/nym-api/src/support/storage/manager.rs @@ -7,7 +7,7 @@ use crate::support::storage::models::{ ActiveGateway, ActiveMixnode, NodeStatus, RewardingReport, TestingRoute, }; use nym_mixnet_contract_common::{EpochId, IdentityKey, MixId}; -use std::convert::TryFrom; + #[derive(Clone)] pub(crate) struct StorageManager { diff --git a/nym-connect/desktop/Cargo.lock b/nym-connect/desktop/Cargo.lock index 8a87804f61..dd19626732 100644 --- a/nym-connect/desktop/Cargo.lock +++ b/nym-connect/desktop/Cargo.lock @@ -301,7 +301,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -318,7 +318,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -392,12 +392,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -439,7 +433,7 @@ checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ "bs58 0.5.0", "hmac 0.12.1", - "k256 0.13.1", + "k256", "once_cell", "pbkdf2", "rand_core 0.6.4", @@ -564,8 +558,8 @@ version = "0.8.0" source = "git+https://github.com/jstuczyn/bls12_381?branch=feature/gt-serialization-0.8.0#c4543fde7d02efea6ecfcf22e14476ddb516b483" dependencies = [ "digest 0.9.0", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "pairing", "rand_core 0.6.4", "subtle 2.4.1", @@ -574,9 +568,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 = "brotli" @@ -860,7 +854,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1034,9 +1028,9 @@ source = "git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-valida dependencies = [ "bip32", "cosmos-sdk-proto", - "ecdsa 0.16.8", + "ecdsa", "eyre", - "k256 0.13.1", + "k256", "rand_core 0.6.4", "serde", "serde_json", @@ -1049,31 +1043,32 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" +checksum = "9934c79e58d9676edfd592557dee765d2a6ef54c09d5aa2edb06156b00148966" dependencies = [ "digest 0.10.7", + "ecdsa", "ed25519-zebra", - "k256 0.11.6", + "k256", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.3.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" +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", @@ -1084,9 +1079,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", @@ -1095,11 +1090,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", @@ -1199,18 +1194,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.2" @@ -1278,7 +1261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1347,7 +1330,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1380,9 +1363,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", @@ -1399,30 +1382,31 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.18", + "semver 1.0.22", "serde", "thiserror", ] [[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.22", "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", @@ -1433,9 +1417,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", @@ -1448,9 +1432,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", @@ -1480,7 +1464,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1491,7 +1475,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1523,16 +1507,6 @@ dependencies = [ "uuid 1.4.1", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "der" version = "0.7.8" @@ -1708,31 +1682,19 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", + "elliptic-curve", + "rfc6979", "serdect", "signature 2.1.0", - "spki 0.7.2", + "spki", ] [[package]] @@ -1751,7 +1713,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ - "pkcs8 0.10.2", + "pkcs8", "signature 2.1.0", ] @@ -1804,41 +1766,21 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "serdect", "subtle 2.4.1", "zeroize", @@ -1890,7 +1832,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1983,16 +1925,6 @@ dependencies = [ "log", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "ff" version = "0.13.0" @@ -2219,7 +2151,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -2576,24 +2508,13 @@ dependencies = [ "system-deps 6.1.1", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "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", + "ff", "rand_core 0.6.4", "subtle 2.4.1", ] @@ -3254,18 +3175,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" -dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "k256" version = "0.13.1" @@ -3273,9 +3182,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", + "once_cell", "sha2 0.10.8", + "signature 2.1.0", ] [[package]] @@ -3751,7 +3662,7 @@ dependencies = [ "bs58 0.5.0", "cosmrs", "cosmwasm-std", - "ecdsa 0.16.8", + "ecdsa", "getset", "nym-credentials-interface", "nym-crypto", @@ -3858,9 +3769,9 @@ dependencies = [ "bls12_381", "bs58 0.5.0", "digest 0.9.0", - "ff 0.13.0", + "ff", "getrandom 0.2.10", - "group 0.13.0", + "group", "itertools", "nym-dkg", "nym-pemstore", @@ -4041,8 +3952,8 @@ dependencies = [ "bitvec", "bls12_381", "bs58 0.5.0", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "lazy_static", "nym-pemstore", "rand 0.8.5", @@ -4744,7 +4655,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4804,7 +4715,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group 0.13.0", + "group", ] [[package]] @@ -4982,7 +4893,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5111,7 +5022,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5126,24 +5037,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "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.2", + "der", + "spki", ] [[package]] @@ -5282,9 +5183,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -5324,7 +5225,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5374,9 +5275,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -5625,17 +5526,6 @@ dependencies = [ "winreg 0.50.0", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -5714,7 +5604,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.28", + "syn 2.0.55", "walkdir", ] @@ -5741,7 +5631,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.22", ] [[package]] @@ -5864,9 +5754,9 @@ dependencies = [ [[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", "indexmap 1.9.3", @@ -5877,9 +5767,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", @@ -5909,30 +5799,16 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "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", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.10.2", + "pkcs8", "serdect", "subtle 2.4.1", "zeroize", @@ -5992,9 +5868,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -6140,9 +6016,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -6167,13 +6043,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -6206,7 +6082,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -6256,7 +6132,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -6265,7 +6141,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "base16ct 0.2.0", + "base16ct", "serde", ] @@ -6375,10 +6251,6 @@ name = "signature" version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] [[package]] name = "signature" @@ -6504,16 +6376,6 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" version = "0.7.2" @@ -6521,7 +6383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] @@ -6733,9 +6595,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -6904,7 +6766,7 @@ dependencies = [ "regex", "reqwest", "rfd", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "serde_repr", @@ -6937,7 +6799,7 @@ dependencies = [ "cargo_toml", "heck 0.4.1", "json-patch", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "tauri-utils", @@ -6959,7 +6821,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "sha2 0.10.8", @@ -7044,7 +6906,7 @@ dependencies = [ "phf 0.10.1", "proc-macro2", "quote", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "serde_with", @@ -7099,7 +6961,7 @@ dependencies = [ "ed25519-consensus", "flex-error", "futures", - "k256 0.13.1", + "k256", "num-traits", "once_cell", "prost", @@ -7164,7 +7026,7 @@ dependencies = [ "peg", "pin-project", "reqwest", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_bytes", "serde_json", @@ -7210,22 +7072,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[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", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -7311,7 +7173,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -7468,7 +7330,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -7544,7 +7406,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "termcolor", ] @@ -7842,7 +7704,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -7876,7 +7738,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8557,7 +8419,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] diff --git a/nym-connect/desktop/src-tauri/src/menu.rs b/nym-connect/desktop/src-tauri/src/menu.rs index 0bc007838b..f98c01debb 100644 --- a/nym-connect/desktop/src-tauri/src/menu.rs +++ b/nym-connect/desktop/src-tauri/src/menu.rs @@ -9,6 +9,7 @@ pub const SHOW_LOG_WINDOW: &str = "show_log_window"; pub const CLEAR_STORAGE: &str = "clear_storage"; pub trait AddDefaultSubmenus { + #[allow(dead_code)] fn add_default_app_submenus(self) -> Self; } diff --git a/nym-connect/desktop/src-tauri/src/operations/help/storage.rs b/nym-connect/desktop/src-tauri/src/operations/help/storage.rs index 7e7ca7e3d9..e6b349cacb 100644 --- a/nym-connect/desktop/src-tauri/src/operations/help/storage.rs +++ b/nym-connect/desktop/src-tauri/src/operations/help/storage.rs @@ -1,15 +1,9 @@ use std::sync::Arc; use crate::{error::BackendError, state::State}; -use serde::Serialize; use tauri::Manager; use tokio::sync::RwLock; -#[derive(Debug, Serialize, Clone)] -struct ClearStorageEvent { - kind: String, -} - #[tauri::command] pub fn help_clear_storage(app_handle: tauri::AppHandle) -> Result<(), BackendError> { log::info!("Clearing user data"); diff --git a/nym-outfox/src/format.rs b/nym-outfox/src/format.rs index 1d0a3681c5..86ac52305d 100644 --- a/nym-outfox/src/format.rs +++ b/nym-outfox/src/format.rs @@ -63,7 +63,7 @@ use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE; use curve25519_dalek::montgomery::MontgomeryPoint; use curve25519_dalek::scalar::Scalar; -use std::convert::TryInto; + use std::ops::Range; use std::u8; @@ -78,7 +78,7 @@ use crate::constants::ROUTING_INFORMATION_LENGTH_BY_STAGE; use crate::constants::TAGBYTES; use crate::error::OutfoxError; use crate::lion::*; -use std::convert::TryFrom; + /// A structure that holds mix packet construction parameters. These incluse the length /// of the routing information at each hop, the number of hops, and the payload length. @@ -317,7 +317,7 @@ impl MixStageParameters { #[cfg(test)] mod test { use super::MixCreationParameters; - use std::convert::TryFrom; + #[test] fn test_to_bytes() { diff --git a/nym-outfox/src/packet.rs b/nym-outfox/src/packet.rs index ed0b16ad33..48fbb6728c 100644 --- a/nym-outfox/src/packet.rs +++ b/nym-outfox/src/packet.rs @@ -1,8 +1,6 @@ use std::{ array::TryFromSliceError, collections::VecDeque, - convert::{TryFrom, TryInto}, - iter::FromIterator, ops::Range, }; diff --git a/nym-outfox/tests/unittests.rs b/nym-outfox/tests/unittests.rs index 02851b881a..d89f6f85fe 100644 --- a/nym-outfox/tests/unittests.rs +++ b/nym-outfox/tests/unittests.rs @@ -18,8 +18,6 @@ mod tests { use sphinx_packet::route::DestinationAddressBytes; use sphinx_packet::route::Node; use sphinx_packet::route::NodeAddressBytes; - use std::convert::TryFrom; - use std::convert::TryInto; use nym_outfox::format::*; use nym_outfox::lion::*; diff --git a/nym-validator-rewarder/src/cli/mod.rs b/nym-validator-rewarder/src/cli/mod.rs index f9572442e1..9a68701f7a 100644 --- a/nym-validator-rewarder/src/cli/mod.rs +++ b/nym-validator-rewarder/src/cli/mod.rs @@ -4,7 +4,6 @@ use crate::config::Config; use crate::error::NymRewarderError; use clap::{Parser, Subcommand}; -use humantime_serde::re::humantime; use nym_bin_common::bin_info; use nym_validator_client::nyxd::Coin; use std::path::PathBuf; diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index 14883122c9..c93b176e63 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -186,7 +186,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -261,12 +261,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -299,7 +293,7 @@ checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ "bs58 0.5.0", "hmac 0.12.1", - "k256 0.13.1", + "k256", "once_cell", "pbkdf2", "rand_core 0.6.4", @@ -404,8 +398,8 @@ version = "0.8.0" source = "git+https://github.com/jstuczyn/bls12_381?branch=feature/gt-serialization-0.8.0#c4543fde7d02efea6ecfcf22e14476ddb516b483" dependencies = [ "digest 0.9.0", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "pairing", "rand_core 0.6.4", "subtle 2.4.1", @@ -414,9 +408,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 = "brotli" @@ -661,7 +655,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -832,9 +826,9 @@ checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea" dependencies = [ "bip32", "cosmos-sdk-proto 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ecdsa 0.16.8", + "ecdsa", "eyre", - "k256 0.13.1", + "k256", "rand_core 0.6.4", "serde", "serde_json", @@ -851,9 +845,9 @@ source = "git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-valida dependencies = [ "bip32", "cosmos-sdk-proto 0.20.0 (git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-validator-features)", - "ecdsa 0.16.8", + "ecdsa", "eyre", - "k256 0.13.1", + "k256", "rand_core 0.6.4", "serde", "serde_json", @@ -866,31 +860,32 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" +checksum = "9934c79e58d9676edfd592557dee765d2a6ef54c09d5aa2edb06156b00148966" dependencies = [ "digest 0.10.7", + "ecdsa", "ed25519-zebra", - "k256 0.11.6", + "k256", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.3.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" +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", @@ -901,9 +896,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", @@ -912,11 +907,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", @@ -967,18 +962,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.2" @@ -1046,7 +1029,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1115,7 +1098,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -1148,9 +1131,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", @@ -1167,30 +1150,31 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.18", + "semver 1.0.22", "serde", "thiserror", ] [[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.22", "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", @@ -1201,9 +1185,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", @@ -1216,9 +1200,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", @@ -1275,16 +1259,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "der" version = "0.7.8" @@ -1459,31 +1433,19 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", + "elliptic-curve", + "rfc6979", "serdect", "signature 2.1.0", - "spki 0.7.2", + "spki", ] [[package]] @@ -1502,7 +1464,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ - "pkcs8 0.10.2", + "pkcs8", "signature 2.1.0", ] @@ -1555,41 +1517,21 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "serdect", "subtle 2.4.1", "zeroize", @@ -1685,16 +1627,6 @@ dependencies = [ "log", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "ff" version = "0.13.0" @@ -1862,7 +1794,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -2168,24 +2100,13 @@ dependencies = [ "system-deps 6.1.1", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "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", + "ff", "rand_core 0.6.4", "subtle 2.4.1", ] @@ -2714,18 +2635,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" -dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "k256" version = "0.13.1" @@ -2733,8 +2642,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.8", "signature 2.1.0", @@ -3086,7 +2995,7 @@ dependencies = [ "bs58 0.5.0", "cosmrs 0.15.0 (git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-validator-features)", "cosmwasm-std", - "ecdsa 0.16.8", + "ecdsa", "getset", "nym-credentials-interface", "nym-crypto", @@ -3121,9 +3030,9 @@ dependencies = [ "bls12_381", "bs58 0.5.0", "digest 0.9.0", - "ff 0.13.0", + "ff", "getrandom 0.2.10", - "group 0.13.0", + "group", "itertools 0.10.5", "nym-dkg", "nym-pemstore", @@ -3215,8 +3124,8 @@ dependencies = [ "bitvec", "bls12_381", "bs58 0.5.0", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "lazy_static", "nym-pemstore", "rand 0.8.5", @@ -3545,7 +3454,7 @@ dependencies = [ "fern", "futures", "itertools 0.10.5", - "k256 0.13.1", + "k256", "log", "nym-config", "nym-contracts-common", @@ -3677,7 +3586,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -3716,7 +3625,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group 0.13.0", + "group", ] [[package]] @@ -3874,7 +3783,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4003,7 +3912,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4018,24 +3927,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "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.2", + "der", + "spki", ] [[package]] @@ -4159,9 +4058,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -4186,7 +4085,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4221,9 +4120,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -4447,17 +4346,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -4527,7 +4415,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.22", ] [[package]] @@ -4624,9 +4512,9 @@ dependencies = [ [[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", "indexmap 1.9.3", @@ -4637,9 +4525,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", @@ -4669,30 +4557,16 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "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", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.10.2", + "pkcs8", "serdect", "subtle 2.4.1", "zeroize", @@ -4752,9 +4626,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -4770,9 +4644,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -4797,13 +4671,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4836,7 +4710,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -4888,7 +4762,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "base16ct 0.2.0", + "base16ct", "serde", ] @@ -4971,10 +4845,6 @@ name = "signature" version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] [[package]] name = "signature" @@ -5091,16 +4961,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" version = "0.7.2" @@ -5108,7 +4968,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] @@ -5199,7 +5059,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5242,9 +5102,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -5397,7 +5257,7 @@ dependencies = [ "raw-window-handle", "regex", "rfd", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "serde_repr", @@ -5430,7 +5290,7 @@ dependencies = [ "cargo_toml", "heck 0.4.1", "json-patch", - "semver 1.0.18", + "semver 1.0.22", "serde_json", "tauri-utils", "winres", @@ -5451,7 +5311,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "sha2 0.10.8", @@ -5534,7 +5394,7 @@ dependencies = [ "phf 0.10.1", "proc-macro2", "quote", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", "serde_with", @@ -5569,7 +5429,7 @@ dependencies = [ "ed25519-consensus", "flex-error", "futures", - "k256 0.13.1", + "k256", "num-traits", "once_cell", "prost", @@ -5634,7 +5494,7 @@ dependencies = [ "peg", "pin-project", "reqwest", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_bytes", "serde_json", @@ -5680,22 +5540,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[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", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5781,7 +5641,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5887,7 +5747,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] @@ -5963,7 +5823,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "termcolor", ] @@ -6155,7 +6015,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -6189,7 +6049,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6738,7 +6598,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.55", ] [[package]] diff --git a/nym-wallet/src-tauri/src/coin.rs b/nym-wallet/src-tauri/src/coin.rs index 8c3ab07ee5..40c0b54000 100644 --- a/nym-wallet/src-tauri/src/coin.rs +++ b/nym-wallet/src-tauri/src/coin.rs @@ -3,7 +3,7 @@ use crate::error::BackendError; use crate::network::Network; use serde::{Deserialize, Serialize}; -use std::convert::TryFrom; + use std::str::FromStr; use strum::IntoEnumIterator; use nym_validator_client::nyxd::CosmosCoin; @@ -161,7 +161,7 @@ mod test { use super::*; use crate::error::BackendError; use serde_json::json; - use std::convert::TryFrom; + use std::str::FromStr; #[test] diff --git a/nym-wallet/src-tauri/src/menu.rs b/nym-wallet/src-tauri/src/menu.rs index 1aaa78c7fe..b38e73a639 100644 --- a/nym-wallet/src-tauri/src/menu.rs +++ b/nym-wallet/src-tauri/src/menu.rs @@ -8,6 +8,7 @@ pub trait AddDefaultSubmenus { } impl AddDefaultSubmenus for Menu { + #[allow(dead_code)] fn add_default_app_submenus(self) -> Self { if ::std::env::var("NYM_WALLET_ENABLE_LOG").is_ok() { let submenu = Submenu::new( diff --git a/nym-wallet/src-tauri/src/operations/mixnet/account.rs b/nym-wallet/src-tauri/src/operations/mixnet/account.rs index 6704009cb3..3750e21aee 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/account.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/account.rs @@ -640,10 +640,7 @@ mod tests { use std::path::PathBuf; use std::str::FromStr; - use crate::wallet_storage::{ - self, - account_data::{MnemonicAccount, WalletAccount}, - }; + use crate::wallet_storage::account_data::{MnemonicAccount, WalletAccount}; use super::*; diff --git a/nym-wallet/src-tauri/src/wallet_storage/mod.rs b/nym-wallet/src-tauri/src/wallet_storage/mod.rs index ba6e5e7172..01b2461982 100644 --- a/nym-wallet/src-tauri/src/wallet_storage/mod.rs +++ b/nym-wallet/src-tauri/src/wallet_storage/mod.rs @@ -470,7 +470,7 @@ fn rename_account_in_login_at_file( #[cfg(test)] mod tests { - use crate::wallet_storage::account_data::{MnemonicAccount, WalletAccount}; + use crate::wallet_storage::account_data::WalletAccount; use super::*; use nym_config::defaults::COSMOS_DERIVATION_PATH; diff --git a/sdk/lib/socks5-listener/src/lib.rs b/sdk/lib/socks5-listener/src/lib.rs index 0c9e2f7771..4f36f53f86 100644 --- a/sdk/lib/socks5-listener/src/lib.rs +++ b/sdk/lib/socks5-listener/src/lib.rs @@ -14,7 +14,6 @@ use nym_config_common::defaults::setup_env; use nym_socks5_client_core::NymClient as Socks5NymClient; use rand::rngs::OsRng; use safer_ffi::char_p::char_p_boxed; -use std::marker::Send; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; diff --git a/sdk/rust/nym-sdk/examples/libp2p_shared/connection.rs b/sdk/rust/nym-sdk/examples/libp2p_shared/connection.rs index 04c166ce59..d562d634de 100644 --- a/sdk/rust/nym-sdk/examples/libp2p_shared/connection.rs +++ b/sdk/rust/nym-sdk/examples/libp2p_shared/connection.rs @@ -123,7 +123,7 @@ impl Connection { // creates a new substream instance with the given ID. fn new_substream(&mut self, id: SubstreamId) -> Result { // check we don't already have a substream with this ID - if self.substream_inbound_txs.get(&id).is_some() { + if self.substream_inbound_txs.contains_key(&id) { return Err(Error::SubstreamIdExists(id)); } diff --git a/sdk/rust/nym-sdk/examples/libp2p_shared/transport.rs b/sdk/rust/nym-sdk/examples/libp2p_shared/transport.rs index 6fde934bf8..938acd68e1 100644 --- a/sdk/rust/nym-sdk/examples/libp2p_shared/transport.rs +++ b/sdk/rust/nym-sdk/examples/libp2p_shared/transport.rs @@ -227,7 +227,7 @@ impl NymTransport { } // ensure we don't already have a conn with the same id - if self.connections.get(&msg.id).is_some() { + if self.connections.contains_key(&msg.id) { return Err(Error::ConnectionIDExists); } diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index 03923f46ad..968dc79b5f 100644 --- a/service-providers/network-requester/Cargo.toml +++ b/service-providers/network-requester/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" version = "1.1.33" authors.workspace = true edition.workspace = true -rust-version = "1.65" +rust-version = "1.70" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/service-providers/network-requester/src/cli/mod.rs b/service-providers/network-requester/src/cli/mod.rs index cd5e84071e..6e1851f188 100644 --- a/service-providers/network-requester/src/cli/mod.rs +++ b/service-providers/network-requester/src/cli/mod.rs @@ -325,7 +325,6 @@ fn version_check(cfg: &Config) -> bool { #[cfg(test)] mod tests { use super::*; - use clap::CommandFactory; #[test] fn verify_cli() { diff --git a/service-providers/network-requester/src/request_filter/allowed_hosts/group.rs b/service-providers/network-requester/src/request_filter/allowed_hosts/group.rs index 099d46cdf2..2c2da2732a 100644 --- a/service-providers/network-requester/src/request_filter/allowed_hosts/group.rs +++ b/service-providers/network-requester/src/request_filter/allowed_hosts/group.rs @@ -34,7 +34,7 @@ impl HostsGroup { } pub(crate) fn contains_domain(&self, host: &str) -> bool { - self.domains.contains(&host.to_string()) + self.domains.contains(host) } pub(super) fn contains_ip_address(&self, address: IpAddr) -> bool { diff --git a/tools/nymvisor/src/cli/init.rs b/tools/nymvisor/src/cli/init.rs index 40003eff36..1382a6d1b3 100644 --- a/tools/nymvisor/src/cli/init.rs +++ b/tools/nymvisor/src/cli/init.rs @@ -133,7 +133,7 @@ pub(crate) struct Args { impl Args { pub(crate) fn override_config(&self, config: &mut Config) { if let Some(nymvisor_id) = &self.id { - config.nymvisor.id = nymvisor_id.clone(); + config.nymvisor.id.clone_from(nymvisor_id); } if let Some(upstream) = &self.upstream_base_upgrade_url { config.nymvisor.debug.upstream_base_upgrade_url = upstream.clone() @@ -149,7 +149,7 @@ impl Args { Some(nymvisor_upgrade_data_directory.clone()); } if let Some(daemon_home) = &self.daemon_home { - config.daemon.home = daemon_home.clone(); + config.daemon.home.clone_from(daemon_home); } if let Some(upstream) = &self.daemon_absolute_upstream_upgrade_url { config.daemon.debug.absolute_upstream_upgrade_url = Some(upstream.clone()) diff --git a/tools/nymvisor/src/env.rs b/tools/nymvisor/src/env.rs index 24357e13ae..dc9bf65c7e 100644 --- a/tools/nymvisor/src/env.rs +++ b/tools/nymvisor/src/env.rs @@ -68,7 +68,7 @@ pub(crate) struct Env { impl Env { pub(crate) fn override_config(&self, config: &mut Config) { if let Some(nymvisor_id) = &self.nymvisor_id { - config.nymvisor.id = nymvisor_id.clone(); + config.nymvisor.id.clone_from(nymvisor_id); } if let Some(upstream) = &self.nymvisor_upstream_base_upgrade_url { config.nymvisor.debug.upstream_base_upgrade_url = upstream.clone() @@ -84,10 +84,10 @@ impl Env { Some(nymvisor_upgrade_data_directory.clone()); } if let Some(daemon_name) = &self.daemon_name { - config.daemon.name = daemon_name.clone(); + config.daemon.name.clone_from(daemon_name); } if let Some(daemon_home) = &self.daemon_home { - config.daemon.home = daemon_home.clone(); + config.daemon.home.clone_from(daemon_home); } if let Some(upstream) = &self.daemon_absolute_upstream_upgrade_url { config.daemon.debug.absolute_upstream_upgrade_url = Some(upstream.clone()) diff --git a/wasm/client/src/client.rs b/wasm/client/src/client.rs index 0db708d074..ad54cb5e6f 100644 --- a/wasm/client/src/client.rs +++ b/wasm/client/src/client.rs @@ -1,6 +1,12 @@ // Copyright 2021-2023 - Nym Technologies SA // 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::config::{ClientConfig, ClientConfigOpts}; use crate::error::WasmClientError; use crate::helpers::{InputSender, WasmTopologyExt}; diff --git a/wasm/client/src/config.rs b/wasm/client/src/config.rs index da33746d34..3efe9bb2e5 100644 --- a/wasm/client/src/config.rs +++ b/wasm/client/src/config.rs @@ -1,6 +1,12 @@ // Copyright 2022-2023 - Nym Technologies SA // 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::error::WasmClientError; use serde::{Deserialize, Serialize}; use tsify::Tsify; diff --git a/wasm/client/src/encoded_payload_helper.rs b/wasm/client/src/encoded_payload_helper.rs index b39e578c46..71600ed5ce 100644 --- a/wasm/client/src/encoded_payload_helper.rs +++ b/wasm/client/src/encoded_payload_helper.rs @@ -1,10 +1,15 @@ // Copyright 2022 - Nym Technologies SA // 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 wasm_bindgen +#![allow(clippy::empty_docs)] + use anyhow::bail; use serde::{Deserialize, Serialize}; use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; #[wasm_bindgen(typescript_custom_section)] const TS_DEFS: &'static str = r#" diff --git a/wasm/client/src/helpers.rs b/wasm/client/src/helpers.rs index 16650294c7..e8570d02b9 100644 --- a/wasm/client/src/helpers.rs +++ b/wasm/client/src/helpers.rs @@ -9,7 +9,7 @@ use wasm_client_core::client::base_client::{ClientInput, ClientState}; use wasm_client_core::client::inbound_messages::InputMessage; use wasm_client_core::error::WasmCoreError; use wasm_client_core::topology::SerializableNymTopology; -use wasm_client_core::{MixLayer, NymTopology}; +use wasm_client_core::NymTopology; use wasm_utils::error::simple_js_error; use wasm_utils::{check_promise_result, console_log}; @@ -82,9 +82,6 @@ pub(crate) trait WasmTopologyExt { /// Returns the current network topology. fn current_topology(&self) -> Promise; - - /// Checks whether the provided node exists in the known network topology and if so, returns its layer. - fn check_for_mixnode_existence(&self, mixnode_identity: String) -> Promise; } #[cfg(feature = "node-tester")] @@ -124,21 +121,6 @@ impl WasmTopologyExt for Arc { } }) } - - /// Checks whether the target mixnode exists in the known network topology and returns its layer. - fn check_for_mixnode_existence(&self, mixnode_identity: String) -> Promise { - let this = Arc::clone(self); - future_to_promise(async move { - let Some(current_topology) = this.topology_accessor.current_topology().await else { - return Err(WasmCoreError::UnavailableNetworkTopology.into()); - }; - - match current_topology.find_mix_by_identity(&mixnode_identity) { - None => Err(WasmCoreError::NonExistentMixnode { mixnode_identity }.into()), - Some(node) => Ok(JsValue::from(MixLayer::from(node.layer))), - } - }) - } } #[cfg(feature = "node-tester")] diff --git a/wasm/mix-fetch/src/config.rs b/wasm/mix-fetch/src/config.rs index 3d8087e169..621e041913 100644 --- a/wasm/mix-fetch/src/config.rs +++ b/wasm/mix-fetch/src/config.rs @@ -1,8 +1,13 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +#![allow(unknown_lints)] +// clippy::empty_docs is not on stable as of 1.77 + // due to expansion of #[wasm_bindgen] macro on `MixFetch` Config struct #![allow(clippy::drop_non_drop)] +// due to the code generated by Tsify +#![allow(clippy::empty_docs)] use crate::error::MixFetchError; use serde::{Deserialize, Serialize}; diff --git a/wasm/mix-fetch/src/fetch.rs b/wasm/mix-fetch/src/fetch.rs index 2fd8da80dc..459270e621 100644 --- a/wasm/mix-fetch/src/fetch.rs +++ b/wasm/mix-fetch/src/fetch.rs @@ -1,6 +1,12 @@ // Copyright 2023 - Nym Technologies SA // 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::client::MixFetchClient; use crate::config::{MixFetchConfig, MixFetchConfigOpts, MixFetchDebugOverride}; use crate::error::MixFetchError; diff --git a/wasm/mix-fetch/src/go_bridge.rs b/wasm/mix-fetch/src/go_bridge.rs index 2069572b8e..6ea8f0704d 100644 --- a/wasm/mix-fetch/src/go_bridge.rs +++ b/wasm/mix-fetch/src/go_bridge.rs @@ -5,7 +5,6 @@ use crate::error::MixFetchError; use crate::mix_fetch_client; use js_sys::Promise; use wasm_bindgen::prelude::*; -use wasm_bindgen::JsValue; use wasm_bindgen_futures::future_to_promise; use wasm_utils::error::{simple_rejected_promise, PromisableResult}; diff --git a/wasm/node-tester/src/tester.rs b/wasm/node-tester/src/tester.rs index 1da2ee7a4f..4a6694e46b 100644 --- a/wasm/node-tester/src/tester.rs +++ b/wasm/node-tester/src/tester.rs @@ -1,6 +1,11 @@ // Copyright 2023 - Nym Technologies SA // 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::ephemeral_receiver::EphemeralTestReceiver; use crate::error::NodeTesterError; use crate::helpers::{GatewayReconnection, ReceivedReceiverWrapper, TestMarker};