Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Hermes v1.7.4 #3729

Merged
merged 8 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Fix a bug in the `evidence` command which would sometimes
prevent the detected misbehaviour evidence from being submitted,
instead erroring out with a validator set hash mismatch.
([\#3697](https://github.com/informalsystems/hermes/pull/3697))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Avoid retrieving a worker which is being removed by the idle worker clean-up
process.
process ([\#3703](https://github.com/informalsystems/hermes/issues/3703))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Fix the issue where `broadcast_errors` metric would not correctly batch
the same errors together.
together ([\#3720](https://github.com/informalsystems/hermes/issues/3720))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Update the values of `backlog` metrics when clearing packets.
Change the `backlog_oldest_timestamp` to `backlog_latest_update_timestamp`
which shows the last time the `backlog` metrics have been updated.
([\#3723](https://github.com/informalsystems/hermes/issues/3723))
9 changes: 9 additions & 0 deletions .changelog/v1.7.4/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*December 15th, 2023*

This release improves the monitoring of Hermes instances by fixing the `broadcast_errors` metric so
that it correctly batches the same errors together. It also improves the metrics `backlog_*` by
updating them whenever Hermes queries pending packets.

This release also improves the reliability of the idle worker clean-up and
fixes a bug within the `evidence` command which would sometimes prevent
the misbehaviour evidence from being reported.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# CHANGELOG

## v1.7.4

*December 15th, 2023*

Special thanks to Yun Yeo (@beer-1) for his contributions ([#3697] and [#3703]).

This release improves the monitoring of Hermes instances by fixing the `broadcast_errors` metric so
that it correctly batches the same errors together. It also improves the metrics `backlog_*` by
updating them whenever Hermes queries pending packets.

This release also improves the reliability of the idle worker clean-up and
fixes a bug within the `evidence` command which would sometimes prevent
the misbehaviour evidence from being reported.

### BUG FIXES

- [Relayer Library](relayer)
- Avoid retrieving a worker which is being removed by the idle worker clean-up
process.
process ([\#3703](https://github.com/informalsystems/hermes/issues/3703))
- [Relayer CLI](relayer-cli)
- Fix a bug in the `evidence` command which would sometimes
prevent the detected misbehaviour evidence from being submitted,
instead erroring out with a validator set hash mismatch.
([\#3697](https://github.com/informalsystems/hermes/pull/3697))
- [Telemetry & Metrics](telemetry)
- Fix the issue where `broadcast_errors` metric would not correctly batch
the same errors together.
together ([\#3720](https://github.com/informalsystems/hermes/issues/3720))
- Update the values of `backlog` metrics when clearing packets.
Change the `backlog_oldest_timestamp` to `backlog_latest_update_timestamp`
which shows the last time the `backlog` metrics have been updated.
([\#3723](https://github.com/informalsystems/hermes/issues/3723))

[#3697]: https://github.com/informalsystems/hermes/issues/3697
[#3703]: https://github.com/informalsystems/hermes/issues/3703

## v1.7.3

*November 29th, 2023*
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/chain-registry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-chain-registry"
version = "0.26.3"
version = "0.26.4"
edition = "2021"
license = "Apache-2.0"
keywords = ["cosmos", "ibc", "relayer", "chain", "registry"]
Expand All @@ -12,7 +12,7 @@ description = """
"""

[dependencies]
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types" }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types" }
ibc-proto = { version = "0.38.0", features = ["serde"] }
tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] }

Expand Down
12 changes: 6 additions & 6 deletions crates/relayer-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-relayer-cli"
version = "1.7.3"
version = "1.7.4"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -25,11 +25,11 @@ telemetry = ["ibc-relayer/telemetry", "ibc-telemetry"]
rest-server = ["ibc-relayer-rest"]

[dependencies]
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types" }
ibc-relayer = { version = "0.26.3", path = "../relayer" }
ibc-telemetry = { version = "0.26.3", path = "../telemetry", optional = true }
ibc-relayer-rest = { version = "0.26.3", path = "../relayer-rest", optional = true }
ibc-chain-registry = { version = "0.26.3" , path = "../chain-registry" }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types" }
ibc-relayer = { version = "0.26.4", path = "../relayer" }
ibc-telemetry = { version = "0.26.4", path = "../telemetry", optional = true }
ibc-relayer-rest = { version = "0.26.4", path = "../relayer-rest", optional = true }
ibc-chain-registry = { version = "0.26.4" , path = "../chain-registry" }

clap = { version = "3.2", features = ["cargo"] }
clap_complete = "3.2"
Expand Down
6 changes: 3 additions & 3 deletions crates/relayer-rest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-relayer-rest"
version = "0.26.3"
version = "0.26.4"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -14,8 +14,8 @@ description = """
"""

[dependencies]
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types" }
ibc-relayer = { version = "0.26.3", path = "../relayer" }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types" }
ibc-relayer = { version = "0.26.4", path = "../relayer" }

crossbeam-channel = "0.5"
serde = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-rest/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async fn version() {

let rest_api_version = VersionInfo {
name: "ibc-relayer-rest".to_string(),
version: "0.26.3".to_string(),
version: "0.26.4".to_string(),
};

let result: JsonResult<_, ()> = JsonResult::Success(vec![version.clone(), rest_api_version]);
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-relayer-types"
version = "0.26.3"
version = "0.26.4"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand Down
8 changes: 4 additions & 4 deletions crates/relayer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-relayer"
version = "0.26.3"
version = "0.26.4"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -21,8 +21,8 @@ telemetry = ["ibc-telemetry"]

[dependencies]
ibc-proto = { version = "0.38.0", features = ["serde"] }
ibc-telemetry = { version = "0.26.3", path = "../telemetry", optional = true }
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types", features = ["mocks"] }
ibc-telemetry = { version = "0.26.4", path = "../telemetry", optional = true }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types", features = ["mocks"] }

subtle-encoding = "0.5"
humantime-serde = "1.1.1"
Expand Down Expand Up @@ -104,7 +104,7 @@ version = "0.34.0"
default-features = false

[dev-dependencies]
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types", features = ["mocks"] }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types", features = ["mocks"] }
serial_test = "2.0.0"
env_logger = "0.10.0"
tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"] }
Expand Down
14 changes: 14 additions & 0 deletions crates/relayer/src/chain/counterparty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use crate::channel::ChannelError;
use crate::client_state::IdentifiedAnyClientState;
use crate::path::PathIdentifiers;
use crate::supervisor::Error;
use crate::telemetry;

pub fn counterparty_chain_from_connection(
src_chain: &impl ChainHandle,
Expand Down Expand Up @@ -502,6 +503,19 @@ pub fn unreceived_packets(
&path.counterparty_channel_id,
)?;

telemetry!(
update_backlog,
commit_sequences
.iter()
.map(|s| u64::from(*s))
.collect::<Vec<u64>>()
.clone(),
&counterparty_chain.id(),
&path.counterparty_channel_id,
&path.counterparty_port_id,
&chain.id()
);

let packet_seq_nrs =
unreceived_packets_sequences(chain, &path.port_id, &path.channel_id, commit_sequences)?;

Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
//! For the IBC relayer binary, please see [Hermes] (`ibc-relayer-cli` crate).
//!
//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.7.2/
//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.7.4/

extern crate alloc;

Expand Down
3 changes: 2 additions & 1 deletion crates/relayer/src/light_client/tendermint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ impl super::LightClient<CosmosSdkChain> for LightClient {
provider: self.peer_id,
};

let trusted_block = self.fetch(update_header.trusted_height)?;
// Get the light block at trusted_height + 1 from chain.
let trusted_block = self.fetch(update_header.trusted_height.increment())?;
if trusted_block.validators.hash() != update_header.trusted_validator_set.hash() {
return Err(Error::misbehaviour(format!(
"mismatch between the trusted validator set of the update \
Expand Down
12 changes: 11 additions & 1 deletion crates/relayer/src/worker/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,17 @@ impl WorkerMap {
config: &Config,
) -> &WorkerHandle {
if self.workers.contains_key(&object) {
&self.workers[&object]
if self.workers[&object].shutdown_stopped_tasks() {
self.remove_stopped(
self.workers[&object].id(),
self.workers[&object].object().clone(),
);

let worker = self.spawn_worker(src, dst, &object, config);
self.workers.entry(object).or_insert(worker)
} else {
&self.workers[&object]
}
} else {
let worker = self.spawn_worker(src, dst, &object, config);
self.workers.entry(object).or_insert(worker)
Expand Down
4 changes: 2 additions & 2 deletions crates/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-telemetry"
version = "0.26.3"
version = "0.26.4"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ description = """
"""

[dependencies]
ibc-relayer-types = { version = "0.26.3", path = "../relayer-types" }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types" }

once_cell = "1.17.0"
opentelemetry = { version = "0.19.0", features = ["metrics"] }
Expand Down
Loading
Loading