diff --git a/Cargo.lock b/Cargo.lock index 9c25c39827..bcbf5df4be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,7 +473,7 @@ dependencies = [ "axum-macros", "bytes", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "http-body-util", "hyper 1.4.1", @@ -534,7 +534,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "http-body-util", "mime", @@ -557,7 +557,7 @@ dependencies = [ "bytes", "futures-util", "headers", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "http-body-util", "mime", @@ -592,7 +592,7 @@ dependencies = [ "axum 0.7.7", "bytes", "cookie", - "http 1.2.0", + "http 1.1.0", "http-body-util", "hyper 1.4.1", "hyper-util", @@ -1100,9 +1100,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.42" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a7e468e750fa4b6be660e8b5651ad47372e8fb114030b594c2d75d48c5ffd0" +checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" dependencies = [ "clap", ] @@ -1309,12 +1309,12 @@ dependencies = [ [[package]] name = "cosmos-sdk-proto" -version = "0.22.0-pre" -source = "git+https://github.com/cosmos/cosmos-rust?rev=4b1332e6d8258ac845cef71589c8d362a669675a#4b1332e6d8258ac845cef71589c8d362a669675a" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "462e1f6a8e005acc8835d32d60cbd7973ed65ea2a8d8473830e675f050956427" dependencies = [ - "prost 0.12.6", - "prost-types 0.12.6", - "tendermint-proto 0.37.0", + "prost 0.13.4", + "tendermint-proto 0.40.1", ] [[package]] @@ -1339,11 +1339,12 @@ dependencies = [ [[package]] name = "cosmrs" -version = "0.17.0-pre" -source = "git+https://github.com/cosmos/cosmos-rust?rev=4b1332e6d8258ac845cef71589c8d362a669675a#4b1332e6d8258ac845cef71589c8d362a669675a" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210fbe6f98594963b46cc980f126a9ede5db9a3848ca65b71303bebdb01afcd9" dependencies = [ "bip32", - "cosmos-sdk-proto 0.22.0-pre", + "cosmos-sdk-proto 0.26.1", "ecdsa", "eyre", "k256", @@ -1352,7 +1353,7 @@ dependencies = [ "serde_json", "signature", "subtle-encoding", - "tendermint 0.37.0", + "tendermint 0.40.1", "tendermint-rpc", "thiserror 1.0.69", ] @@ -3036,7 +3037,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http 1.2.0", + "http 1.1.0", "httpdate", "mime", "sha1", @@ -3048,7 +3049,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.2.0", + "http 1.1.0", ] [[package]] @@ -3168,9 +3169,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -3195,7 +3196,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.2.0", + "http 1.1.0", ] [[package]] @@ -3206,7 +3207,7 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "pin-project-lite", ] @@ -3303,7 +3304,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "httparse", "httpdate", @@ -3335,7 +3336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", - "http 1.2.0", + "http 1.1.0", "hyper 1.4.1", "hyper-util", "rustls 0.22.4", @@ -3366,7 +3367,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "hyper 1.4.1", "pin-project-lite", @@ -4041,9 +4042,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.25" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "loom" @@ -4709,7 +4710,7 @@ name = "nym-api-requests" version = "0.1.0" dependencies = [ "bs58", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "ecdsa", "getset", @@ -4728,7 +4729,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "tendermint 0.37.0", + "tendermint 0.40.1", "thiserror 1.0.69", "time", "ts-rs", @@ -4856,7 +4857,7 @@ name = "nym-bity-integration" version = "0.1.0" dependencies = [ "anyhow", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "eyre", "k256", "nym-cli-commands", @@ -4903,7 +4904,7 @@ dependencies = [ "clap", "colored", "comfy-table", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "csv", "cw-utils", @@ -5069,7 +5070,7 @@ name = "nym-client-core-gateways-storage" version = "0.1.0" dependencies = [ "async-trait", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "log", "nym-crypto", "nym-gateway-requests", @@ -5389,7 +5390,7 @@ version = "0.1.0" dependencies = [ "bincode", "bls12_381", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "log", "nym-api-requests", "nym-credentials-interface", @@ -5741,7 +5742,7 @@ name = "nym-http-api-client" version = "0.1.0" dependencies = [ "async-trait", - "http 1.2.0", + "http 1.1.0", "nym-bin-common", "reqwest 0.12.4", "serde", @@ -6362,7 +6363,7 @@ dependencies = [ "dotenvy", "futures", "hex", - "http 1.2.0", + "http 1.1.0", "httpcodec", "log", "nym-bandwidth-controller", @@ -6805,7 +6806,7 @@ name = "nym-types" version = "1.0.0" dependencies = [ "base64 0.22.1", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "eyre", "hmac", @@ -6839,7 +6840,7 @@ dependencies = [ "bip32", "bip39", "colored", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "cw-controllers", "cw-utils", @@ -6864,7 +6865,7 @@ dependencies = [ "nym-network-defaults", "nym-serde-helpers", "nym-vesting-contract-common", - "prost 0.12.6", + "prost 0.13.4", "reqwest 0.12.4", "serde", "serde_json", @@ -7112,14 +7113,14 @@ version = "0.1.0" dependencies = [ "async-trait", "const_format", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "eyre", "futures", "humantime 2.1.0", "serde", "sha2 0.10.8", "sqlx", - "tendermint 0.37.0", + "tendermint 0.40.1", "tendermint-rpc", "thiserror 1.0.69", "time", @@ -7555,18 +7556,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", @@ -7575,9 +7576,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -7837,6 +7838,16 @@ dependencies = [ "prost-derive 0.12.6", ] +[[package]] +name = "prost" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +dependencies = [ + "bytes", + "prost-derive 0.13.4", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -7863,6 +7874,19 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "prost-derive" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "prost-types" version = "0.11.9" @@ -8167,7 +8191,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "http-body-util", "hyper 1.4.1", @@ -9747,9 +9771,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954496fbc9716eb4446cdd6d00c071a3e2f22578d62aa03b40c7e5b4fda3ed42" +checksum = "d9703e34d940c2a293804752555107f8dbe2b84ec4c6dd5203831235868105d2" dependencies = [ "bytes", "digest 0.10.7", @@ -9760,8 +9784,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.12.6", - "prost-types 0.12.6", + "prost 0.13.4", "ripemd", "serde", "serde_bytes", @@ -9771,21 +9794,21 @@ dependencies = [ "signature", "subtle 2.5.0", "subtle-encoding", - "tendermint-proto 0.37.0", + "tendermint-proto 0.40.1", "time", "zeroize", ] [[package]] name = "tendermint-config" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84b11b57d20ee4492a1452faff85f5c520adc36ca9fe5e701066935255bb89f" +checksum = "89cc3ea9a39b7ee34eefcff771cc067ecaa0c988c1c5ac08defd878471a06f76" dependencies = [ "flex-error", "serde", "serde_json", - "tendermint 0.37.0", + "tendermint 0.40.1", "toml 0.8.19", "url", ] @@ -9810,14 +9833,13 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc87024548c7f3da479885201e3da20ef29e85a3b13d04606b380ac4c7120d87" +checksum = "9ae9e1705aa0fa5ecb2c6aa7fb78c2313c4a31158ea5f02048bf318f849352eb" dependencies = [ "bytes", "flex-error", - "prost 0.12.6", - "prost-types 0.12.6", + "prost 0.13.4", "serde", "serde_bytes", "subtle-encoding", @@ -9826,9 +9848,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc2281e271277fda184d96d874a6fe59f569b130b634289257baacfc95aa85" +checksum = "835a52aa504c63ec05519e31348d3f4ba2fe79493c588e2cad5323d5e81b161a" dependencies = [ "async-trait", "async-tungstenite", @@ -9846,9 +9868,9 @@ dependencies = [ "serde_json", "subtle 2.5.0", "subtle-encoding", - "tendermint 0.37.0", + "tendermint 0.40.1", "tendermint-config", - "tendermint-proto 0.37.0", + "tendermint-proto 0.40.1", "thiserror 1.0.69", "time", "tokio", @@ -10341,7 +10363,7 @@ dependencies = [ "bitflags 2.5.0", "bytes", "futures-util", - "http 1.2.0", + "http 1.1.0", "http-body 1.0.0", "http-body-util", "http-range-header", @@ -10607,7 +10629,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http 1.1.0", "httparse", "log", "rand", diff --git a/Cargo.toml b/Cargo.toml index 3acb477c94..ebc238cdc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -386,13 +386,11 @@ cw-controllers = { version = "=1.1.0" } # cosmrs-related bip32 = { version = "0.5.2", default-features = false } -# temporarily using a fork again (yay.) because we need staking and slashing support (which are already on main but not released) -# plus response message parsing (which is, as of the time of writing this message, waiting to get merged) -#cosmrs = { path = "../cosmos-rust-fork/cosmos-rust/cosmrs" } -cosmrs = { git = "https://github.com/cosmos/cosmos-rust", rev = "4b1332e6d8258ac845cef71589c8d362a669675a" } # unfortuntely we need a fork by yours truly to get the staking support -tendermint = "0.37.0" # same version as used by cosmrs -tendermint-rpc = "0.37.0" # same version as used by cosmrs -prost = { version = "0.12", default-features = false } + +cosmrs = { version = "0.21.0" } +tendermint = "0.40.0" +tendermint-rpc = "0.40.0" +prost = { version = "0.13", default-features = false } # wasm-related dependencies gloo-utils = "0.2.0" 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 8feceebdbf..0a13537643 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 @@ -153,13 +153,20 @@ pub trait CosmWasmClient: TendermintRpcClient { let req = QueryAllBalancesRequest { address: address.to_string(), pagination, + resolve_denom: false, }; let mut res = self .make_abci_query::<_, QueryAllBalancesResponse>(path.clone(), req) .await?; + let early_break = res.balances.is_empty(); raw_balances.append(&mut res.balances); + + if early_break { + break; + } + if let Some(next_key) = next_page_key(res.pagination) { pagination = Some(create_pagination(next_key)) } else { @@ -187,7 +194,13 @@ pub trait CosmWasmClient: TendermintRpcClient { .make_abci_query::<_, QueryTotalSupplyResponse>(path.clone(), req) .await?; + let early_break = res.supply.is_empty(); supply.append(&mut res.supply); + + if early_break { + break; + } + if let Some(next_key) = next_page_key(res.pagination) { pagination = Some(create_pagination(next_key)) } else { @@ -328,7 +341,13 @@ pub trait CosmWasmClient: TendermintRpcClient { .make_abci_query::<_, QueryCodesResponse>(path.clone(), req) .await?; + let early_break = res.code_infos.is_empty(); raw_codes.append(&mut res.code_infos); + + if early_break { + break; + } + if let Some(next_key) = next_page_key(res.pagination) { pagination = Some(create_pagination(next_key)) } else { @@ -373,7 +392,13 @@ pub trait CosmWasmClient: TendermintRpcClient { .make_abci_query::<_, QueryContractsByCodeResponse>(path.clone(), req) .await?; + let early_break = res.contracts.is_empty(); raw_contracts.append(&mut res.contracts); + + if early_break { + break; + } + if let Some(next_key) = next_page_key(res.pagination) { pagination = Some(create_pagination(next_key)) } else { @@ -429,7 +454,13 @@ pub trait CosmWasmClient: TendermintRpcClient { .make_abci_query::<_, QueryContractHistoryResponse>(path.clone(), req) .await?; + let early_break = res.entries.is_empty(); raw_entries.append(&mut res.entries); + + if early_break { + break; + } + if let Some(next_key) = next_page_key(res.pagination) { pagination = Some(create_pagination(next_key)) } else { diff --git a/common/client-libs/validator-client/src/rpc/reqwest.rs b/common/client-libs/validator-client/src/rpc/reqwest.rs index e20764d162..09312b28c3 100644 --- a/common/client-libs/validator-client/src/rpc/reqwest.rs +++ b/common/client-libs/validator-client/src/rpc/reqwest.rs @@ -4,9 +4,11 @@ use crate::rpc::TendermintRpcClient; use async_trait::async_trait; use base64::Engine; +use cosmrs::tendermint; use cosmrs::tendermint::{block::Height, evidence::Evidence, Hash}; use reqwest::header::HeaderMap; use reqwest::{header, RequestBuilder}; +use tendermint_rpc::dialect::{v0_34, v0_37, v0_38, LatestDialect}; use tendermint_rpc::{ client::CompatMode, dialect::{self, Dialect}, @@ -21,8 +23,21 @@ macro_rules! perform_with_compat { ($self:expr, $request:expr) => {{ let request = $request; match $self.compat { - CompatMode::V0_37 => $self.perform_v0_37(request).await, - CompatMode::V0_34 => $self.perform_v0_34(request).await, + CompatMode::V0_38 => { + $self + .perform_request_with_dialect(request, dialect::v0_38::Dialect) + .await + } + CompatMode::V0_37 => { + $self + .perform_request_with_dialect(request, dialect::v0_37::Dialect) + .await + } + CompatMode::V0_34 => { + $self + .perform_request_with_dialect(request, dialect::v0_34::Dialect) + .await + } } }}; } @@ -70,7 +85,11 @@ impl ReqwestRpcClient { .headers(headers) } - async fn perform_request(&self, request: R) -> Result + async fn perform_request_with_dialect( + &self, + request: R, + _dialect: S, + ) -> Result where R: SimpleRequest, S: Dialect, @@ -81,26 +100,25 @@ impl ReqwestRpcClient { .send() .await .map_err(TendermintRpcErrorMap::into_rpc_err)?; + let response_status = response.status(); let bytes = response .bytes() .await .map_err(TendermintRpcErrorMap::into_rpc_err)?; + + // Successful JSON-RPC requests are expected to return a 200 OK HTTP status. + // Otherwise, this means that the HTTP request failed as a whole, + // as opposed to the JSON-RPC request returning an error, + // and we cannot expect the response body to be a valid JSON-RPC response. + if response_status != reqwest::StatusCode::OK { + // hehe, that's so nasty but we have to somehow convert between different versions of the same lib + return Err(Error::http_request_failed( + response_status.as_u16().try_into().unwrap(), + )); + } + R::Response::from_string(bytes).map(Into::into) } - - async fn perform_v0_34(&self, request: R) -> Result - where - R: SimpleRequest, - { - self.perform_request(request).await - } - - async fn perform_v0_37(&self, request: R) -> Result - where - R: SimpleRequest, - { - self.perform_request(request).await - } } trait TendermintRpcErrorMap { @@ -120,18 +138,50 @@ impl TendermintRpcClient for ReqwestRpcClient { where R: SimpleRequest, { - self.perform_request(request).await + self.perform_request_with_dialect(request, LatestDialect) + .await } - async fn block_results(&self, height: H) -> Result + async fn block(&self, height: H) -> Result where H: Into + Send, { - perform_with_compat!(self, block_results::Request::new(height.into())) + perform_with_compat!(self, endpoint::block::Request::new(height.into())) } - async fn latest_block_results(&self) -> Result { - perform_with_compat!(self, block_results::Request::default()) + async fn block_by_hash( + &self, + hash: tendermint::Hash, + ) -> Result { + perform_with_compat!(self, endpoint::block_by_hash::Request::new(hash)) + } + + async fn latest_block(&self) -> Result { + perform_with_compat!(self, endpoint::block::Request::default()) + } + + async fn block_results(&self, height: H) -> Result + where + H: Into + Send, + { + perform_with_compat!(self, endpoint::block_results::Request::new(height.into())) + } + + async fn latest_block_results(&self) -> Result { + perform_with_compat!(self, endpoint::block_results::Request::default()) + } + + async fn block_search( + &self, + query: Query, + page: u32, + per_page: u8, + order: Order, + ) -> Result { + perform_with_compat!( + self, + endpoint::block_search::Request::new(query, page, per_page, order) + ) } async fn header(&self, height: H) -> Result @@ -140,11 +190,26 @@ impl TendermintRpcClient for ReqwestRpcClient { { let height = height.into(); match self.compat { - CompatMode::V0_37 => self.perform(endpoint::header::Request::new(height)).await, + CompatMode::V0_38 => { + self.perform_request_with_dialect( + endpoint::header::Request::new(height), + v0_38::Dialect, + ) + .await + } + CompatMode::V0_37 => { + self.perform_request_with_dialect( + endpoint::header::Request::new(height), + v0_37::Dialect, + ) + .await + } CompatMode::V0_34 => { // Back-fill with a request to /block endpoint and // taking just the header from the response. - let resp = self.perform_v0_34(block::Request::new(height)).await?; + let resp = self + .perform_request_with_dialect(block::Request::new(height), v0_34::Dialect) + .await?; Ok(resp.into()) } } @@ -152,12 +217,25 @@ impl TendermintRpcClient for ReqwestRpcClient { async fn header_by_hash(&self, hash: Hash) -> Result { match self.compat { - CompatMode::V0_37 => self.perform(header_by_hash::Request::new(hash)).await, + CompatMode::V0_38 => { + self.perform_request_with_dialect( + header_by_hash::Request::new(hash), + v0_38::Dialect, + ) + .await + } + CompatMode::V0_37 => { + self.perform_request_with_dialect( + header_by_hash::Request::new(hash), + v0_37::Dialect, + ) + .await + } CompatMode::V0_34 => { // Back-fill with a request to /block_by_hash endpoint and // taking just the header from the response. let resp = self - .perform_v0_34(block_by_hash::Request::new(hash)) + .perform_request_with_dialect(block_by_hash::Request::new(hash), v0_34::Dialect) .await?; Ok(resp.into()) } @@ -167,8 +245,18 @@ impl TendermintRpcClient for ReqwestRpcClient { /// `/broadcast_evidence`: broadcast an evidence. async fn broadcast_evidence(&self, e: Evidence) -> Result { match self.compat { - CompatMode::V0_37 => self.perform(evidence::Request::new(e)).await, - CompatMode::V0_34 => self.perform_v0_34(evidence::Request::new(e)).await, + CompatMode::V0_38 => { + self.perform_request_with_dialect(evidence::Request::new(e), v0_38::Dialect) + .await + } + CompatMode::V0_37 => { + self.perform_request_with_dialect(evidence::Request::new(e), v0_37::Dialect) + .await + } + CompatMode::V0_34 => { + self.perform_request_with_dialect(evidence::Request::new(e), v0_34::Dialect) + .await + } } } diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index f5a8574b0e..1bdfa8c154 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -806,19 +806,19 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ - "prost", + "prost 0.12.3", "prost-types", "tendermint-proto 0.34.0", ] [[package]] name = "cosmos-sdk-proto" -version = "0.22.0-pre" -source = "git+https://github.com/cosmos/cosmos-rust?rev=4b1332e6d8258ac845cef71589c8d362a669675a#4b1332e6d8258ac845cef71589c8d362a669675a" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "462e1f6a8e005acc8835d32d60cbd7973ed65ea2a8d8473830e675f050956427" dependencies = [ - "prost", - "prost-types", - "tendermint-proto 0.37.0", + "prost 0.13.4", + "tendermint-proto 0.40.1", ] [[package]] @@ -843,11 +843,12 @@ dependencies = [ [[package]] name = "cosmrs" -version = "0.17.0-pre" -source = "git+https://github.com/cosmos/cosmos-rust?rev=4b1332e6d8258ac845cef71589c8d362a669675a#4b1332e6d8258ac845cef71589c8d362a669675a" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210fbe6f98594963b46cc980f126a9ede5db9a3848ca65b71303bebdb01afcd9" dependencies = [ "bip32", - "cosmos-sdk-proto 0.22.0-pre", + "cosmos-sdk-proto 0.26.1", "ecdsa", "eyre", "k256", @@ -856,7 +857,7 @@ dependencies = [ "serde_json", "signature", "subtle-encoding", - "tendermint 0.37.0", + "tendermint 0.40.1", "tendermint-rpc", "thiserror 1.0.64", ] @@ -3072,7 +3073,7 @@ name = "nym-api-requests" version = "0.1.0" dependencies = [ "bs58", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "ecdsa", "getset", @@ -3090,7 +3091,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "tendermint 0.37.0", + "tendermint 0.40.1", "thiserror 1.0.64", "time", "utoipa", @@ -3405,7 +3406,7 @@ name = "nym-types" version = "1.0.0" dependencies = [ "base64 0.22.1", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "eyre", "hmac", @@ -3438,7 +3439,7 @@ dependencies = [ "bip32", "bip39", "colored 2.0.4", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "cw-controllers", "cw-utils", @@ -3463,7 +3464,7 @@ dependencies = [ "nym-network-defaults", "nym-serde-helpers", "nym-vesting-contract-common", - "prost", + "prost 0.13.4", "reqwest 0.12.4", "serde", "serde_json", @@ -3546,7 +3547,7 @@ dependencies = [ "bip39", "cfg-if", "colored 2.0.4", - "cosmrs 0.17.0-pre", + "cosmrs 0.21.0", "cosmwasm-std", "dirs 4.0.0", "dotenvy", @@ -4186,7 +4187,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.3", +] + +[[package]] +name = "prost" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +dependencies = [ + "bytes", + "prost-derive 0.13.4", ] [[package]] @@ -4202,13 +4213,26 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "prost-derive" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.85", +] + [[package]] name = "prost-types" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "prost", + "prost 0.12.3", ] [[package]] @@ -5628,7 +5652,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost", + "prost 0.12.3", "prost-types", "ripemd", "serde", @@ -5646,9 +5670,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954496fbc9716eb4446cdd6d00c071a3e2f22578d62aa03b40c7e5b4fda3ed42" +checksum = "d9703e34d940c2a293804752555107f8dbe2b84ec4c6dd5203831235868105d2" dependencies = [ "bytes", "digest 0.10.7", @@ -5659,8 +5683,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost", - "prost-types", + "prost 0.13.4", "ripemd", "serde", "serde_bytes", @@ -5670,21 +5693,21 @@ dependencies = [ "signature", "subtle 2.5.0", "subtle-encoding", - "tendermint-proto 0.37.0", + "tendermint-proto 0.40.1", "time", "zeroize", ] [[package]] name = "tendermint-config" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84b11b57d20ee4492a1452faff85f5c520adc36ca9fe5e701066935255bb89f" +checksum = "89cc3ea9a39b7ee34eefcff771cc067ecaa0c988c1c5ac08defd878471a06f76" dependencies = [ "flex-error", "serde", "serde_json", - "tendermint 0.37.0", + "tendermint 0.40.1", "toml 0.8.19", "url", ] @@ -5699,7 +5722,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost", + "prost 0.12.3", "prost-types", "serde", "serde_bytes", @@ -5709,14 +5732,13 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc87024548c7f3da479885201e3da20ef29e85a3b13d04606b380ac4c7120d87" +checksum = "9ae9e1705aa0fa5ecb2c6aa7fb78c2313c4a31158ea5f02048bf318f849352eb" dependencies = [ "bytes", "flex-error", - "prost", - "prost-types", + "prost 0.13.4", "serde", "serde_bytes", "subtle-encoding", @@ -5725,9 +5747,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc2281e271277fda184d96d874a6fe59f569b130b634289257baacfc95aa85" +checksum = "835a52aa504c63ec05519e31348d3f4ba2fe79493c588e2cad5323d5e81b161a" dependencies = [ "async-trait", "bytes", @@ -5744,9 +5766,9 @@ dependencies = [ "serde_json", "subtle 2.5.0", "subtle-encoding", - "tendermint 0.37.0", + "tendermint 0.40.1", "tendermint-config", - "tendermint-proto 0.37.0", + "tendermint-proto 0.40.1", "thiserror 1.0.64", "time", "tokio", diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index fcf0f6417e..11f39c81b1 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -50,7 +50,7 @@ base64 = "0.13" zeroize = { version = "1.5", features = ["zeroize_derive", "serde"] } cosmwasm-std = "1.3.0" -cosmrs = { git = "https://github.com/cosmos/cosmos-rust", rev = "4b1332e6d8258ac845cef71589c8d362a669675a" } +cosmrs = { version = "0.21.0" } nym-node-requests = { path = "../../nym-node/nym-node-requests" } nym-validator-client = { path = "../../common/client-libs/validator-client" }