Skip to content

Commit

Permalink
Release Hermes v1.7.4 (#3729)
Browse files Browse the repository at this point in the history
* Improve `broadcast_errors` metric (#3719)

* Use short description for 'broadcast_errors' metric

* Add changelog entry

* Fix hyperlink in doc comment

Signed-off-by: Romain Ruetschi <github@romac.me>

* Fix hyperlink in doc comment

---------

Signed-off-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Fetch the light block at trusted_height + 1 when detecting misbehavior (#3727)

* fetch the light block at trusted_height+1 when detecting misbehaviour

* Add changelog entry

* Fix typo

---------

Co-authored-by: beer-1 <147697694+beer-1@users.noreply.github.com>

* Initialise v1.7.4 release

* Avoid retrieving a worker which is being removed by the idle worker clean-up process (#3725)

* prevent returning stopping workers

* clear only the specific worker

* Add ibc-go v8 to integration tests (#3694)

* Add simapp v8 to CI jobs

* Add simapp v8 to nix flake

* Handle CLI breaking changes of Cosmos SDK v0.50 in test bootstrap

* Handle genesis config 'voting_perdiod' and CLI 'query txs' changes for Cosmos SDK v0.50.1

* Use 'MsgSubmitProposal' instead of deprecated 'UpgradeProposal' to initiate a chain upgrade

* Update 'tx upgrade-chain' CLI template

* Fix 'tx chain-upgrade' tests

* Update chain upgrade for compatibility between different ibc-go versions

* Improve assertion for client upgrade tests

* Update ibc-proto-rs to v0.39.0

* Add changelog entry

* Fix and improve guide section for client upgrade

* Wait before querying client state for client upgrade tests

* Apply suggestions from code review

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>

* Rename method 'ibc_version()' to 'version_specs'

* Extract the verification of legacy version in a method

* Implement 'FromStr' instead of 'TryFrom<String>' for 'ProposalStatus'

* Fix cargo-doc warning

* Add changelog entry for CLI

* Change the '--gov-account' flag as optional but will fail if trying to upgrade a chain with ibc-go v8+

* Update guide

* Move and update changelog entry for CLI

* Return a 'Specs' struct in 'version_specs()' method

* Fix clippy errors

---------

Signed-off-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Update Gaia used in tests from v12 to v13 & v14 (#3700)

* Update Gaia v12 to v13 and v14 in tests

* Fix Celestia CI job

* Replace Gaia v12 with v13 and v14 in multi-chain tests (#3701)

* Add changelog entry

---------

Signed-off-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: beer-1 <147697694+beer-1@users.noreply.github.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Add PR 3703 to patch release

* Improve `backlog` metrics (#3722)

* Update backlog metric when packet clearing is triggered

* Fix update backlog and add unit tests

* Uncomment conditional compilation from telemetry tests

* Add changelog entry

* Update guide section regarding 'backlog_*' metrics

* Correctly update the backlog when querying commitments on chain

* Update backlog_oldest_timestamp to backlog_latest_update_timestamp

* Update changelog entry

* Fix bug in backlog update

* Guard tests module by test cfg

Signed-off-by: Romain Ruetschi <github@romac.me>

* Update from GitHub suggestions

---------

Signed-off-by: Romain Ruetschi <github@romac.me>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Update changelog

* Update release summary

---------

Signed-off-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: beer-1 <147697694+beer-1@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 15, 2023
1 parent e529d25 commit ab73266
Show file tree
Hide file tree
Showing 29 changed files with 796 additions and 82 deletions.
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

0 comments on commit ab73266

Please sign in to comment.