From 6552cbaedafe97cb73a332893a80641168e1c231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 5 Oct 2023 14:50:08 +0100 Subject: [PATCH 1/9] Updated cosmrs-related dependencies --- Cargo.toml | 38 +++++++++++-------- .../client-libs/validator-client/Cargo.toml | 6 ++- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a7d470c6a7..3747cffa69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,21 +140,6 @@ bip39 = { version = "2.0.0", features = ["zeroize"] } boringtun = { git = "https://github.com/cloudflare/boringtun", rev = "e1d6360d6ab4529fc942a078e4c54df107abe2ba" } clap = "4.4.7" cfg-if = "1.0.0" -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 -# (and ideally we don't want to pull the same dependency twice) -serde-json-wasm = "=0.5.0" -cosmwasm-storage = "=1.3.0" -cosmrs = "=0.14.0" -# same version as used by cosmrs -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-controllers = { version = "=1.1.0" } dashmap = "5.5.3" dotenvy = "0.15.6" futures = "0.3.28" @@ -172,7 +157,6 @@ schemars = "0.8.1" serde = "1.0.152" serde_json = "1.0.91" tap = "1.0.1" -tendermint-rpc = "0.32" # same version as used by cosmrs thiserror = "1.0.48" tokio = "1.24.1" tokio-tungstenite = "0.20.1" @@ -184,6 +168,28 @@ utoipa-swagger-ui = "3.1.5" url = "2.4" zeroize = "1.6.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 +# (and ideally we don't want to pull the same dependency twice) +serde-json-wasm = "=0.5.0" +cosmwasm-storage = "=1.3.0" +# 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-controllers = { version = "=1.1.0" } + +# cosmrs-related +bip32 = "0.5.1" +cosmrs = "=0.15.0" +tendermint-rpc = "0.34" # same version as used by cosmrs +prost = "0.12" + # wasm-related dependencies gloo-utils = "0.1.7" js-sys = "0.3.63" diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index e16345f446..808bacaad6 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -45,13 +45,17 @@ cosmrs = { workspace = true, features = ["bip32", "cosmwasm"] } # import it just for the `Client` trait tendermint-rpc = { workspace = true } +# this is an extremely nasty import. we're explicitly bringing in bip32 so that via the magic (or curse, pick your poison) +# of cargo's feature unification we'd get `bip32/std` meaning we'd get `std::error::Error` for the re-exported (via cosmrs) bip32::Error type +bip32 = { workspace = true, default-features = false, features = ["std"] } + eyre = { version = "0.6" } cw-utils = { workspace = true } cw2 = { workspace = true } cw3 = { workspace = true } cw4 = { workspace = true } cw-controllers = { workspace = true } -prost = { version = "0.11", default-features = false } +prost = { workspace = true, default-features = false } flate2 = { version = "1.0.20" } sha2 = { version = "0.9.5" } itertools = { version = "0.10" } From 1aa12886dbc866825c8ef2cedbd6271770bdf035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 5 Oct 2023 14:50:37 +0100 Subject: [PATCH 2/9] 'deliver_tx' => 'tx_result' --- .../validator-client/src/nyxd/cosmwasm_client/helpers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs index b639b223e3..1718ab2f02 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs @@ -20,12 +20,12 @@ impl CheckResponse for broadcast::tx_commit::Response { }); } - if self.deliver_tx.code.is_err() { + if self.tx_result.code.is_err() { return Err(NyxdError::BroadcastTxErrorDeliverTx { hash: self.hash, height: Some(self.height), - code: self.deliver_tx.code.value(), - raw_log: self.deliver_tx.log, + code: self.tx_result.code.value(), + raw_log: self.tx_result.log, }); } From 002c04051a171f0f5eb4f72582cfe88446400286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 5 Oct 2023 14:50:47 +0100 Subject: [PATCH 3/9] Changing from 034 compat mode to 037 --- common/client-libs/validator-client/src/rpc/mod.rs | 2 +- common/client-libs/validator-client/src/rpc/reqwest.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/client-libs/validator-client/src/rpc/mod.rs b/common/client-libs/validator-client/src/rpc/mod.rs index fd3f7991ba..78f5476b48 100644 --- a/common/client-libs/validator-client/src/rpc/mod.rs +++ b/common/client-libs/validator-client/src/rpc/mod.rs @@ -28,7 +28,7 @@ where U: TryInto, { HttpRpcClient::builder(url.try_into()?) - .compat_mode(CompatMode::V0_34) + .compat_mode(CompatMode::V0_37) .build() } diff --git a/common/client-libs/validator-client/src/rpc/reqwest.rs b/common/client-libs/validator-client/src/rpc/reqwest.rs index ffad7dd815..973fb63376 100644 --- a/common/client-libs/validator-client/src/rpc/reqwest.rs +++ b/common/client-libs/validator-client/src/rpc/reqwest.rs @@ -36,7 +36,8 @@ pub struct ReqwestRpcClient { impl ReqwestRpcClient { pub fn new(url: Url) -> Self { ReqwestRpcClient { - compat: CompatMode::V0_34, + // after updating to nyxd 0.42 and thus updating to cometbft, the compat mode changed + compat: CompatMode::V0_37, inner: reqwest::Client::new(), url, } From a4cf3b916669cbf9551366fbb209865d1e787ca8 Mon Sep 17 00:00:00 2001 From: Tommy Verrall Date: Fri, 6 Oct 2023 11:10:18 +0200 Subject: [PATCH 4/9] amend gas adjustment otherwise we have no gas :( --- common/client-libs/validator-client/src/nyxd/fee/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/client-libs/validator-client/src/nyxd/fee/mod.rs b/common/client-libs/validator-client/src/nyxd/fee/mod.rs index ee30d1ffe5..747375ac6e 100644 --- a/common/client-libs/validator-client/src/nyxd/fee/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/fee/mod.rs @@ -11,7 +11,7 @@ pub mod gas_price; pub type GasAdjustment = f32; -pub const DEFAULT_SIMULATED_GAS_MULTIPLIER: GasAdjustment = 1.3; +pub const DEFAULT_SIMULATED_GAS_MULTIPLIER: GasAdjustment = 1.35; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AutoFeeGrant { From 6ac38f80c7ef3f96312346a3be05da8bb34fd2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Fri, 6 Oct 2023 11:39:33 +0100 Subject: [PATCH 5/9] fixed coconut test fixture --- common/client-libs/validator-client/src/nyxd/mod.rs | 4 +++- nym-api/src/coconut/tests.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/client-libs/validator-client/src/nyxd/mod.rs b/common/client-libs/validator-client/src/nyxd/mod.rs index e7d6650052..c9c27370e2 100644 --- a/common/client-libs/validator-client/src/nyxd/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/mod.rs @@ -34,7 +34,9 @@ pub use crate::nyxd::fee::Fee; pub use crate::rpc::TendermintRpcClient; pub use coin::Coin; pub use cosmrs::bank::MsgSend; -pub use cosmrs::tendermint::abci::{response::DeliverTx, Event, EventAttribute}; +pub use cosmrs::tendermint::abci::{ + response::DeliverTx, types::ExecTxResult, Event, EventAttribute, +}; pub use cosmrs::tendermint::block::Height; pub use cosmrs::tendermint::hash::{self, Algorithm, Hash}; pub use cosmrs::tendermint::validator::Info as TendermintValidatorInfo; diff --git a/nym-api/src/coconut/tests.rs b/nym-api/src/coconut/tests.rs index 37153f1370..4316523182 100644 --- a/nym-api/src/coconut/tests.rs +++ b/nym-api/src/coconut/tests.rs @@ -29,7 +29,7 @@ use nym_validator_client::nym_api::routes::{ }; use nym_validator_client::nyxd::Coin; use nym_validator_client::nyxd::{ - AccountId, Algorithm, DeliverTx, Event, EventAttribute, Fee, Hash, TxResponse, + AccountId, Algorithm, Event, EventAttribute, ExecTxResult, Fee, Hash, TxResponse, }; use crate::coconut::State; @@ -490,7 +490,7 @@ pub fn tx_entry_fixture(tx_hash: &str) -> TxResponse { hash: Hash::from_str(tx_hash).unwrap(), height: Default::default(), index: 0, - tx_result: DeliverTx { + tx_result: ExecTxResult { code: Default::default(), data: Default::default(), log: Default::default(), From 3f243f111ac4cb7547587ea51381ed33e71f6fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Tue, 10 Oct 2023 09:50:20 +0100 Subject: [PATCH 6/9] fixed cosmrs version used in the wallet --- Cargo.lock | 193 +++++++++--------- .../tutorials/cosmos-service/preparing-env.md | 2 +- nym-connect/desktop/Cargo.lock | 162 +++++++-------- nym-wallet/nym-wallet-types/Cargo.toml | 2 +- nym-wallet/src-tauri/Cargo.toml | 2 +- 5 files changed, 163 insertions(+), 198 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 943d8d6ebf..afb6091274 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1554,8 +1554,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "tonic", "tracing-core", ] @@ -1572,7 +1572,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime 2.1.0", - "prost-types", + "prost-types 0.11.9", "serde", "serde_json", "thread_local", @@ -1661,30 +1661,30 @@ dependencies = [ [[package]] name = "cosmos-sdk-proto" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" +checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ - "prost", - "prost-types", + "prost 0.12.1", + "prost-types 0.12.1", "tendermint-proto", ] [[package]] name = "cosmrs" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af13955d6f356272e6def9ff5e2450a7650df536d8934f47052a20c76513d2f6" +checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea" dependencies = [ "bip32", "cosmos-sdk-proto", "ecdsa 0.16.8", "eyre", - "getrandom 0.2.10", "k256", "rand_core 0.6.4", "serde", "serde_json", + "signature 2.1.0", "subtle-encoding", "tendermint", "tendermint-rpc", @@ -2009,15 +2009,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - [[package]] name = "ctor" version = "0.1.26" @@ -3696,30 +3687,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64 0.21.4", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - [[package]] name = "heck" version = "0.3.3" @@ -3957,41 +3924,18 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "tower-service", - "webpki 0.21.4", -] - [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ - "ct-logs", "futures-util", + "http", "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs", + "rustls 0.21.7", "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", - "webpki-roots 0.21.1", + "tokio-rustls 0.24.1", ] [[package]] @@ -4649,7 +4593,7 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "pin-project", - "prost", + "prost 0.11.9", "prost-build", "rand 0.8.5", "rw-stream-sink 0.3.0 (git+https://github.com/ChainSafe/rust-libp2p.git?rev=e3440d25681df380c9f0f8cfdcfd5ecc0a4f2fb6)", @@ -4735,7 +4679,7 @@ dependencies = [ "libp2p-swarm 0.42.0", "log", "prometheus-client", - "prost", + "prost 0.11.9", "prost-build", "prost-codec", "rand 0.8.5", @@ -4793,7 +4737,7 @@ dependencies = [ "libp2p-swarm 0.42.0", "log", "lru 0.9.0", - "prost", + "prost 0.11.9", "prost-build", "prost-codec", "smallvec", @@ -4943,7 +4887,7 @@ dependencies = [ "libp2p-core 0.39.0", "log", "once_cell", - "prost", + "prost 0.11.9", "prost-build", "rand 0.8.5", "sha2 0.10.8", @@ -5195,7 +5139,7 @@ dependencies = [ "libp2p-noise 0.42.0", "log", "multihash", - "prost", + "prost 0.11.9", "prost-build", "prost-codec", "rand 0.8.5", @@ -7481,6 +7425,7 @@ version = "0.1.0" dependencies = [ "async-trait", "base64 0.13.1", + "bip32", "bip39", "colored", "cosmrs", @@ -7511,7 +7456,7 @@ dependencies = [ "nym-service-provider-directory-common", "nym-vesting-contract-common", "openssl", - "prost", + "prost 0.12.1", "reqwest", "serde", "serde_json", @@ -8388,7 +8333,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +dependencies = [ + "bytes", + "prost-derive 0.12.1", ] [[package]] @@ -8405,8 +8360,8 @@ dependencies = [ "multimap", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", @@ -8420,7 +8375,7 @@ source = "git+https://github.com/ChainSafe/rust-libp2p.git?rev=e3440d25681df380c dependencies = [ "asynchronous-codec", "bytes", - "prost", + "prost 0.11.9", "thiserror", "unsigned-varint", ] @@ -8438,13 +8393,35 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" +dependencies = [ + "prost 0.12.1", ] [[package]] @@ -8956,6 +8933,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -8965,12 +8943,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite 0.2.13", + "rustls 0.21.7", + "rustls-native-certs", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls 0.24.1", "tokio-socks", "tower-service", "url", @@ -9370,12 +9352,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls 0.19.1", + "rustls-pemfile", "schannel", "security-framework", ] @@ -10576,9 +10558,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" +checksum = "bc2294fa667c8b548ee27a9ba59115472d0a09c2ba255771092a7f1dcf03a789" dependencies = [ "bytes", "digest 0.10.7", @@ -10589,8 +10571,8 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost", - "prost-types", + "prost 0.12.1", + "prost-types 0.12.1", "ripemd", "serde", "serde_bytes", @@ -10607,9 +10589,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71a72dbbea6dde12045d261f2c70c0de039125675e8a026c8d5ad34522756372" +checksum = "5a25dbe8b953e80f3d61789fbdb83bf9ad6c0ef16df5ca6546f49912542cc137" dependencies = [ "flex-error", "serde", @@ -10621,16 +10603,16 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" +checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" dependencies = [ "bytes", "flex-error", "num-derive", "num-traits", - "prost", - "prost-types", + "prost 0.12.1", + "prost-types 0.12.1", "serde", "serde_bytes", "subtle-encoding", @@ -10639,21 +10621,18 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d83a130537fc4a98c3c9eb6899ebe857fea4860400a61675bfb5f0b35129" +checksum = "dfbf0a4753b46a190f367337e0163d0b552a2674a6bac54e74f9f2cdcde2969b" dependencies = [ "async-trait", "bytes", "flex-error", "futures", "getrandom 0.2.10", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", "peg", "pin-project", + "reqwest", "semver 1.0.20", "serde", "serde_bytes", @@ -10877,6 +10856,16 @@ dependencies = [ "webpki 0.22.4", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.7", + "tokio", +] + [[package]] name = "tokio-socks" version = "0.5.1" @@ -11068,7 +11057,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.11.9", "tokio", "tokio-stream", "tower", diff --git a/documentation/dev-portal/src/tutorials/cosmos-service/preparing-env.md b/documentation/dev-portal/src/tutorials/cosmos-service/preparing-env.md index 9192903001..e970821148 100644 --- a/documentation/dev-portal/src/tutorials/cosmos-service/preparing-env.md +++ b/documentation/dev-portal/src/tutorials/cosmos-service/preparing-env.md @@ -29,7 +29,7 @@ cargo new nym-cosmos-service ``` [dependencies] clap = { version = "4.0", features = ["derive"] } -cosmrs = "=0.14.0" +cosmrs = "=0.15.0" tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } serde = "1.0.152" serde_json = "1.0.91" diff --git a/nym-connect/desktop/Cargo.lock b/nym-connect/desktop/Cargo.lock index e3a9fce4c2..4e4dc04bf5 100644 --- a/nym-connect/desktop/Cargo.lock +++ b/nym-connect/desktop/Cargo.lock @@ -1068,9 +1068,9 @@ dependencies = [ [[package]] name = "cosmos-sdk-proto" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" +checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ "prost", "prost-types", @@ -1079,19 +1079,19 @@ dependencies = [ [[package]] name = "cosmrs" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af13955d6f356272e6def9ff5e2450a7650df536d8934f47052a20c76513d2f6" +checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea" dependencies = [ "bip32", "cosmos-sdk-proto", "ecdsa 0.16.8", "eyre", - "getrandom 0.2.10", "k256 0.13.1", "rand_core 0.6.4", "serde", "serde_json", + "signature 2.1.0", "subtle-encoding", "tendermint", "tendermint-rpc", @@ -1347,15 +1347,6 @@ dependencies = [ "syn 2.0.28", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - [[package]] name = "ctor" version = "0.1.26" @@ -2883,31 +2874,6 @@ dependencies = [ "hashbrown 0.14.0", ] -[[package]] -name = "headers" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" -dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - [[package]] name = "heck" version = "0.3.3" @@ -3119,41 +3085,18 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "tower-service", - "webpki 0.21.4", -] - [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ - "ct-logs", "futures-util", + "http", "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs", + "rustls 0.21.7", "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", - "webpki-roots 0.21.1", + "tokio-rustls 0.24.1", ] [[package]] @@ -3468,9 +3411,7 @@ dependencies = [ "cfg-if", "ecdsa 0.16.8", "elliptic-curve 0.13.5", - "once_cell", "sha2 0.10.8", - "signature 2.1.0", ] [[package]] @@ -4761,6 +4702,7 @@ version = "0.1.0" dependencies = [ "async-trait", "base64 0.13.1", + "bip32", "bip39", "colored 2.0.4", "cosmrs", @@ -5488,9 +5430,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" dependencies = [ "bytes", "prost-derive", @@ -5498,22 +5440,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" dependencies = [ "prost", ] @@ -5770,6 +5712,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -5779,12 +5722,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.7", + "rustls-native-certs", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls 0.24.1", "tokio-socks", "tokio-util", "tower-service", @@ -5967,14 +5914,26 @@ dependencies = [ "webpki 0.22.2", ] +[[package]] +name = "rustls" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls 0.19.1", + "rustls-pemfile", "schannel", "security-framework", ] @@ -5988,6 +5947,16 @@ dependencies = [ "base64 0.21.4", ] +[[package]] +name = "rustls-webpki" +version = "0.101.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +dependencies = [ + "ring", + "untrusted 0.7.1", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -7340,9 +7309,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" +checksum = "bc2294fa667c8b548ee27a9ba59115472d0a09c2ba255771092a7f1dcf03a789" dependencies = [ "bytes", "digest 0.10.7", @@ -7371,9 +7340,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71a72dbbea6dde12045d261f2c70c0de039125675e8a026c8d5ad34522756372" +checksum = "5a25dbe8b953e80f3d61789fbdb83bf9ad6c0ef16df5ca6546f49912542cc137" dependencies = [ "flex-error", "serde", @@ -7385,9 +7354,9 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" +checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" dependencies = [ "bytes", "flex-error", @@ -7403,21 +7372,18 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d83a130537fc4a98c3c9eb6899ebe857fea4860400a61675bfb5f0b35129" +checksum = "dfbf0a4753b46a190f367337e0163d0b552a2674a6bac54e74f9f2cdcde2969b" dependencies = [ "async-trait", "bytes", "flex-error", "futures", "getrandom 0.2.10", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", "peg", "pin-project", + "reqwest", "semver 1.0.18", "serde", "serde_bytes", @@ -7599,6 +7565,16 @@ dependencies = [ "webpki 0.22.2", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.7", + "tokio", +] + [[package]] name = "tokio-socks" version = "0.5.1" @@ -7922,9 +7898,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", diff --git a/nym-wallet/nym-wallet-types/Cargo.toml b/nym-wallet/nym-wallet-types/Cargo.toml index ca422a9832..924d8168e9 100644 --- a/nym-wallet/nym-wallet-types/Cargo.toml +++ b/nym-wallet/nym-wallet-types/Cargo.toml @@ -12,7 +12,7 @@ strum = { version = "0.23", features = ["derive"] } ts-rs = "7.0.0" cosmwasm-std = "1.3.0" -cosmrs = "=0.14.0" +cosmrs = "=0.15.0" nym-config = { path = "../../common/config" } nym-network-defaults = { path = "../../common/network-defaults" } diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index eaced888a4..0405e76ad4 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -49,7 +49,7 @@ base64 = "0.13" zeroize = { version = "1.5", features = ["zeroize_derive", "serde"] } cosmwasm-std = "1.3.0" -cosmrs = "=0.14.0" +cosmrs = "=0.15.0" nym-validator-client = { path = "../../common/client-libs/validator-client" } nym-crypto = { path = "../../common/crypto", features = ["asymmetric"] } From 5eda5cc35dff2be3de735b9f7225bea3d7d5f2b5 Mon Sep 17 00:00:00 2001 From: Tommy Verrall Date: Wed, 25 Oct 2023 16:06:03 +0200 Subject: [PATCH 7/9] amending gas adjustment to prevent tx broadcast errors --- common/client-libs/validator-client/src/nyxd/fee/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/client-libs/validator-client/src/nyxd/fee/mod.rs b/common/client-libs/validator-client/src/nyxd/fee/mod.rs index 747375ac6e..f062dfdb49 100644 --- a/common/client-libs/validator-client/src/nyxd/fee/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/fee/mod.rs @@ -11,7 +11,7 @@ pub mod gas_price; pub type GasAdjustment = f32; -pub const DEFAULT_SIMULATED_GAS_MULTIPLIER: GasAdjustment = 1.35; +pub const DEFAULT_SIMULATED_GAS_MULTIPLIER: GasAdjustment = 1.5; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AutoFeeGrant { From d682bc45735947082ea3068ac91d863fe6f6361a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 17 Nov 2023 09:06:12 +0100 Subject: [PATCH 8/9] Upgrade to safer-ffi 0.1.4 for clippy --- Cargo.lock | 8 ++++---- sdk/lib/socks5-listener/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index afb6091274..892862e27d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9416,9 +9416,9 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safer-ffi" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c1d19b288ca9898cd421c7b105fb7269918a7f8e9253a991e228981ca421ad" +checksum = "395ace5aff9629c7268ca8255aceb945525b2cb644015f3caec5131a6a537c11" dependencies = [ "inventory", "libc", @@ -9433,9 +9433,9 @@ dependencies = [ [[package]] name = "safer_ffi-proc_macros" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d7a04caa3ca2224f5ea4ddd850e2629c3b36b2b83621f87a8303bf41020110" +checksum = "9255504d5467bae9e07d58b8de446ba6739b29bf72e1fa35b2387e30d29dcbfe" dependencies = [ "macro_rules_attribute", "prettyplease", diff --git a/sdk/lib/socks5-listener/Cargo.toml b/sdk/lib/socks5-listener/Cargo.toml index 462ce33b20..16c8bacf5a 100644 --- a/sdk/lib/socks5-listener/Cargo.toml +++ b/sdk/lib/socks5-listener/Cargo.toml @@ -28,7 +28,7 @@ tokio = { workspace = true, features = ["sync", "time"] } log = "0.4.17" rand = "0.7.3" -safer-ffi = { version = "0.1.0-rc1" } +safer-ffi = { version = "0.1.4" } [target.'cfg(target_os="android")'.dependencies] jni = { version = "0.21", default-features = false } From acc62252be102f1797dd50de0d2e0e2b514dd320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 17 Nov 2023 09:15:42 +0100 Subject: [PATCH 9/9] Fix clippy in ephemera --- ephemera/src/block/manager.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ephemera/src/block/manager.rs b/ephemera/src/block/manager.rs index 7fd056f6cf..c125fed228 100644 --- a/ephemera/src/block/manager.rs +++ b/ephemera/src/block/manager.rs @@ -580,7 +580,9 @@ mod test { } #[tokio::test] - #[should_panic] + #[should_panic( + expected = "Received committed block which isn't last produced block, this is a bug!" + )] async fn test_on_committed_with_invalid_pending_block() { let (mut manager, _) = block_manager_with_defaults();