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.2 #3709

Merged
merged 10 commits into from
Nov 28, 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,3 @@
- Added metric `client_updates_skipped` to track the number of client
update messages skipped due to the conscensus state existing already.
([\#3707](https://github.com/informalsystems/hermes/issues/3707))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Add a new metric `broadcast_errors` which
records the number of times a specific error is observed by Hermes when broadcasting transactions
([\#3708](https://github.com/informalsystems/hermes/issues/3708))
7 changes: 7 additions & 0 deletions .changelog/v1.7.2/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*November 28th, 2023*

This patch release of Hermes adds a metric to improve monitoring errors and one
to measure the efficiency of the client update skip feature released in patch v1.7.1.

* `broadcast_errors` records the number of times a specific error is observed by Hermes when broadcasting transactions.
* `client_updates_skipped` records the number of client updates skipped due to the consensus states already existing.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# CHANGELOG

## v1.7.2

*November 28th, 2023*

This patch release of Hermes adds a metric to improve monitoring errors and one
to measure the efficiency of the client update skip feature released in patch v1.7.1.

* `broadcast_errors` records the number of times a specific error is observed by Hermes when broadcasting transactions.
* `client_updates_skipped` records the number of client updates skipped due to the consensus states already existing.

### FEATURES

- [Telemetry & Metrics](telemetry)
- Added metric `client_updates_skipped` to track the number of client
update messages skipped due to the conscensus state existing already.
([\#3707](https://github.com/informalsystems/hermes/issues/3707))
- Add a new metric `broadcast_errors` which
records the number of times a specific error is observed by Hermes when broadcasting transactions
([\#3708](https://github.com/informalsystems/hermes/issues/3708))

ljoss17 marked this conversation as resolved.
Show resolved Hide resolved
## v1.7.1

*November 13th, 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.1"
version = "0.26.2"
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.1", path = "../relayer-types" }
ibc-relayer-types = { version = "0.26.2", 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.1"
version = "1.7.2"
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.1", path = "../relayer-types" }
ibc-relayer = { version = "0.26.1", path = "../relayer" }
ibc-telemetry = { version = "0.26.1", path = "../telemetry", optional = true }
ibc-relayer-rest = { version = "0.26.1", path = "../relayer-rest", optional = true }
ibc-chain-registry = { version = "0.26.1" , path = "../chain-registry" }
ibc-relayer-types = { version = "0.26.2", path = "../relayer-types" }
ibc-relayer = { version = "0.26.2", path = "../relayer" }
ibc-telemetry = { version = "0.26.2", path = "../telemetry", optional = true }
ibc-relayer-rest = { version = "0.26.2", path = "../relayer-rest", optional = true }
ibc-chain-registry = { version = "0.26.2" , 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.1"
version = "0.26.2"
authors = ["Informal Systems <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -14,8 +14,8 @@ description = """
"""

[dependencies]
ibc-relayer-types = { version = "0.26.1", path = "../relayer-types" }
ibc-relayer = { version = "0.26.1", path = "../relayer" }
ibc-relayer-types = { version = "0.26.2", path = "../relayer-types" }
ibc-relayer = { version = "0.26.2", 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.1".to_string(),
version: "0.26.2".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.1"
version = "0.26.2"
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.1"
version = "0.26.2"
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.1", path = "../telemetry", optional = true }
ibc-relayer-types = { version = "0.26.1", path = "../relayer-types", features = ["mocks"] }
ibc-telemetry = { version = "0.26.2", path = "../telemetry", optional = true }
ibc-relayer-types = { version = "0.26.2", 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.1", path = "../relayer-types", features = ["mocks"] }
ibc-relayer-types = { version = "0.26.2", 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
19 changes: 19 additions & 0 deletions crates/relayer/src/chain/cosmos/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,23 @@ async fn do_send_tx_with_account_sequence_retry(
}

// Gas estimation succeeded but broadcast_tx_sync failed with a retry-able error.
// NOTE: The error code could potentially overlap between Cosmos SDK and Ibc-go channel
// error codes. This is currently not the case of incorrect account sequence error
//which is the Cosmos SDK code 32 and Ibc-go channel errors only go up to 25.
Ok(ref response) if response.code == Code::from(INCORRECT_ACCOUNT_SEQUENCE_ERR) => {
warn!(
?response,
"failed to broadcast tx because of a mismatched account sequence number, \
refreshing account sequence number and retrying once"
);

telemetry!(
broadcast_errors,
&account.address.to_string(),
response.code.into(),
&response.log,
);

refresh_account_and_retry_send_tx_with_account_sequence(
rpc_client, config, key_pair, account, tx_memo, messages,
)
Expand All @@ -119,6 +129,8 @@ async fn do_send_tx_with_account_sequence_retry(
debug!("gas estimation succeeded");

// Gas estimation and broadcast_tx_sync were successful.
// NOTE: The error code could potentially overlap between Cosmos SDK and Ibc-go channel
// error codes.
match response.code {
Code::Ok => {
let old_account_sequence = account.sequence;
Expand Down Expand Up @@ -147,6 +159,13 @@ async fn do_send_tx_with_account_sequence_retry(
"failed to broadcast tx with unrecoverable error"
);

telemetry!(
broadcast_errors,
&account.address.to_string(),
code.into(),
&response.log
);

Ok(response)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/chain/cosmos/types/events/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl TryFrom<RawObject<'_>> for WriteAcknowledgement {
.into_bytes();

let mut packet = Packet::try_from(obj)?;
packet.data = Vec::from(data_str.as_str().as_bytes());
packet.data = Vec::from(data_str.as_bytes());

Ok(Self { packet, ack })
}
Expand Down
7 changes: 7 additions & 0 deletions crates/relayer/src/foreign_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,13 @@ impl<DstChain: ChainHandle, SrcChain: ChainHandle> ForeignClient<DstChain, SrcCh

// If the client already stores a consensus state for the target height,
// there is no need to update the client
telemetry!(
client_updates_skipped,
&self.src_chain.id(),
&self.dst_chain.id(),
&self.id,
1,
);
return Ok(vec![]);
}

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/0.2.0/
//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.7.2/

extern crate alloc;

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.1"
version = "0.26.2"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ description = """
"""

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

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