diff --git a/.changelog/v1.8.3/bug-fixes/ibc-relayer-cli/3999-duplicate-vote-fix-query.md b/.changelog/v1.8.3/bug-fixes/ibc-relayer-cli/3999-duplicate-vote-fix-query.md new file mode 100644 index 0000000000..a248e67ca2 --- /dev/null +++ b/.changelog/v1.8.3/bug-fixes/ibc-relayer-cli/3999-duplicate-vote-fix-query.md @@ -0,0 +1,2 @@ +- Fix the trusted height consensus state query when submitting the double vote evidence + ([\#3999](https://github.com/informalsystems/hermes/issues/3999)) diff --git a/.changelog/v1.8.3/summary.md b/.changelog/v1.8.3/summary.md new file mode 100644 index 0000000000..0495f558c3 --- /dev/null +++ b/.changelog/v1.8.3/summary.md @@ -0,0 +1 @@ +This patch release fixes a bug that may happen prevent the relayer from submitting the evidence for a duplicate vote in some cases. diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd396a273..b7a677c621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG +## v1.8.3 + +*May 28th, 2024* + +This patch release fixes a bug that may happen prevent the relayer from submitting the evidence for a duplicate vote in some cases. + +### BUG FIXES + +- [Relayer CLI](relayer-cli) + - Fix the trusted height consensus state query when submitting the double vote evidence + ([\#3999](https://github.com/informalsystems/hermes/issues/3999)) + ## v1.8.2 *March 12th, 2024* diff --git a/Cargo.lock b/Cargo.lock index 11893755c4..78294b1325 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "ibc-chain-registry" -version = "0.27.2" +version = "0.27.3" dependencies = [ "async-trait", "flex-error", @@ -1463,7 +1463,7 @@ dependencies = [ [[package]] name = "ibc-integration-test" -version = "0.27.2" +version = "0.27.3" dependencies = [ "byte-unit", "http", @@ -1501,7 +1501,7 @@ dependencies = [ [[package]] name = "ibc-relayer" -version = "0.27.2" +version = "0.27.3" dependencies = [ "anyhow", "async-stream", @@ -1570,7 +1570,7 @@ dependencies = [ [[package]] name = "ibc-relayer-cli" -version = "1.8.2" +version = "1.8.3" dependencies = [ "abscissa_core", "clap", @@ -1611,7 +1611,7 @@ dependencies = [ [[package]] name = "ibc-relayer-rest" -version = "0.27.2" +version = "0.27.3" dependencies = [ "axum", "crossbeam-channel 0.5.11", @@ -1626,7 +1626,7 @@ dependencies = [ [[package]] name = "ibc-relayer-types" -version = "0.27.2" +version = "0.27.3" dependencies = [ "bytes", "derive_more", @@ -1657,7 +1657,7 @@ dependencies = [ [[package]] name = "ibc-telemetry" -version = "0.27.2" +version = "0.27.3" dependencies = [ "axum", "dashmap", @@ -1676,7 +1676,7 @@ dependencies = [ [[package]] name = "ibc-test-framework" -version = "0.27.2" +version = "0.27.3" dependencies = [ "color-eyre", "crossbeam-channel 0.5.11", diff --git a/crates/chain-registry/Cargo.toml b/crates/chain-registry/Cargo.toml index 3207ec5c86..fde84780bc 100644 --- a/crates/chain-registry/Cargo.toml +++ b/crates/chain-registry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-chain-registry" -version = "0.27.2" +version = "0.27.3" edition = "2021" license = "Apache-2.0" keywords = ["cosmos", "ibc", "relayer", "chain", "registry"] @@ -12,7 +12,7 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types" } ibc-proto = { version = "0.42.0", features = ["serde"] } tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } diff --git a/crates/relayer-cli/Cargo.toml b/crates/relayer-cli/Cargo.toml index 6a90246bf7..03d25244d6 100644 --- a/crates/relayer-cli/Cargo.toml +++ b/crates/relayer-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-cli" -version = "1.8.2" +version = "1.8.3" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -25,11 +25,11 @@ telemetry = ["ibc-relayer/telemetry", "ibc-telemetry"] rest-server = ["ibc-relayer-rest"] [dependencies] -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } -ibc-relayer = { version = "0.27.2", path = "../relayer" } -ibc-telemetry = { version = "0.27.2", path = "../telemetry", optional = true } -ibc-relayer-rest = { version = "0.27.2", path = "../relayer-rest", optional = true } -ibc-chain-registry = { version = "0.27.2" , path = "../chain-registry" } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types" } +ibc-relayer = { version = "0.27.3", path = "../relayer" } +ibc-telemetry = { version = "0.27.3", path = "../telemetry", optional = true } +ibc-relayer-rest = { version = "0.27.3", path = "../relayer-rest", optional = true } +ibc-chain-registry = { version = "0.27.3" , path = "../chain-registry" } clap = { version = "3.2", features = ["cargo"] } clap_complete = "3.2" diff --git a/crates/relayer-cli/src/commands/evidence.rs b/crates/relayer-cli/src/commands/evidence.rs index c034d7318e..fa54be707b 100644 --- a/crates/relayer-cli/src/commands/evidence.rs +++ b/crates/relayer-cli/src/commands/evidence.rs @@ -329,11 +329,12 @@ fn submit_duplicate_vote_evidence( // ie. retrieve the consensus state at the highest height smaller than the infraction height. // // Note: The consensus state heights are sorted in increasing order. - let consensus_state_heights = - chain.query_consensus_state_heights(QueryConsensusStateHeightsRequest { + let consensus_state_heights = counterparty_chain_handle.query_consensus_state_heights( + QueryConsensusStateHeightsRequest { client_id: counterparty_client_id.clone(), pagination: Some(PageRequest::all()), - })?; + }, + )?; // Retrieve the consensus state at the highest height smaller than the infraction height. let consensus_state_height_before_infraction_height = consensus_state_heights diff --git a/crates/relayer-cli/src/commands/query/packet/commitment.rs b/crates/relayer-cli/src/commands/query/packet/commitment.rs index 57a45282f1..4c4edd911b 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitment.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitment.rs @@ -1,5 +1,4 @@ use abscissa_core::clap::Parser; -use serde::Serialize; use subtle_encoding::{Encoding, Hex}; use ibc_relayer::chain::handle::ChainHandle; @@ -13,12 +12,6 @@ use crate::conclude::{exit_with_unrecoverable_error, Output}; use crate::error::Error; use crate::prelude::*; -#[derive(Serialize, Debug)] -struct PacketSeqs { - height: Height, - seqs: Vec, -} - #[derive(Clone, Command, Debug, Parser, PartialEq, Eq)] pub struct QueryPacketCommitmentCmd { #[clap( diff --git a/crates/relayer-rest/Cargo.toml b/crates/relayer-rest/Cargo.toml index 1c4655b065..e994335451 100644 --- a/crates/relayer-rest/Cargo.toml +++ b/crates/relayer-rest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-rest" -version = "0.27.2" +version = "0.27.3" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" @@ -14,8 +14,8 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } -ibc-relayer = { version = "0.27.2", path = "../relayer" } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types" } +ibc-relayer = { version = "0.27.3", path = "../relayer" } crossbeam-channel = "0.5" serde = "1.0" diff --git a/crates/relayer-rest/tests/mock.rs b/crates/relayer-rest/tests/mock.rs index c26a225215..eeeffd3f84 100644 --- a/crates/relayer-rest/tests/mock.rs +++ b/crates/relayer-rest/tests/mock.rs @@ -64,7 +64,7 @@ async fn version() { let rest_api_version = VersionInfo { name: "ibc-relayer-rest".to_string(), - version: "0.27.2".to_string(), + version: "0.27.3".to_string(), }; let result: JsonResult<_, ()> = JsonResult::Success(vec![version.clone(), rest_api_version]); diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 5237d234bd..9424afbea5 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-types" -version = "0.27.2" +version = "0.27.3" edition = "2021" license = "Apache-2.0" readme = "README.md" diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index d18f04c463..987ba15ab6 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer" -version = "0.27.2" +version = "0.27.3" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -21,8 +21,8 @@ telemetry = ["ibc-telemetry"] [dependencies] ibc-proto = { version = "0.42.0", features = ["serde"] } -ibc-telemetry = { version = "0.27.2", path = "../telemetry", optional = true } -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types", features = ["mocks"] } +ibc-telemetry = { version = "0.27.3", path = "../telemetry", optional = true } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types", features = ["mocks"] } subtle-encoding = "0.5" humantime-serde = "1.1.1" @@ -110,7 +110,7 @@ version = "0.34.0" default-features = false [dev-dependencies] -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types", features = ["mocks"] } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types", features = ["mocks"] } serial_test = "3.0.0" env_logger = "0.11.1" test-log = { version = "0.2.14", features = ["trace"] } diff --git a/crates/relayer/src/lib.rs b/crates/relayer/src/lib.rs index eb0ea4dd40..e57f50158c 100644 --- a/crates/relayer/src/lib.rs +++ b/crates/relayer/src/lib.rs @@ -14,7 +14,7 @@ //! //! For the IBC relayer binary, please see [Hermes] (`ibc-relayer-cli` crate). //! -//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.2/ +//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.3/ extern crate alloc; diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml index 5e065264c7..9a61a0c36b 100644 --- a/crates/telemetry/Cargo.toml +++ b/crates/telemetry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-telemetry" -version = "0.27.2" +version = "0.27.3" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -13,7 +13,7 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "0.27.2", path = "../relayer-types" } +ibc-relayer-types = { version = "0.27.3", path = "../relayer-types" } once_cell = "1.19.0" opentelemetry = { version = "0.19.0", features = ["metrics"] } diff --git a/guide/README.md b/guide/README.md index 8491178669..f3cda2122f 100644 --- a/guide/README.md +++ b/guide/README.md @@ -10,7 +10,7 @@ mdBook is a utility to create modern online books from Markdown files. This guide should be permanently deployed at its latest stable version at [hermes.informal.systems](https://hermes.informal.systems). -Current version: `v1.8.2`. +Current version: `v1.8.3`. The version of this guide is aligned with the [versioning of the ibc crates](../README.md). diff --git a/tools/integration-test/Cargo.toml b/tools/integration-test/Cargo.toml index f817feefde..0067ee0d34 100644 --- a/tools/integration-test/Cargo.toml +++ b/tools/integration-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-integration-test" -version = "0.27.2" +version = "0.27.3" edition = "2021" rust-version = "1.71" license = "Apache-2.0" diff --git a/tools/test-framework/Cargo.toml b/tools/test-framework/Cargo.toml index b36199cbde..787a2a4be7 100644 --- a/tools/test-framework/Cargo.toml +++ b/tools/test-framework/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-test-framework" -version = "0.27.2" +version = "0.27.3" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -14,9 +14,9 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "=0.27.2", path = "../../crates/relayer-types" } -ibc-relayer = { version = "=0.27.2", path = "../../crates/relayer" } -ibc-relayer-cli = { version = "=1.8.2", path = "../../crates/relayer-cli" } +ibc-relayer-types = { version = "=0.27.3", path = "../../crates/relayer-types" } +ibc-relayer = { version = "=0.27.3", path = "../../crates/relayer" } +ibc-relayer-cli = { version = "=1.8.3", path = "../../crates/relayer-cli" } ibc-proto = { version = "0.42.0", features = ["serde"] } tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] }