From 7bce2634797b46a8af5d41c0fd3e67af42b6e1de Mon Sep 17 00:00:00 2001 From: Luca Joss <43531661+ljoss17@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:45:09 +0200 Subject: [PATCH] Set CompatMode fallback to v0.34 when the version query fails (#3663) * Set CompatMode fallback to v0.34 when the version query fails * Add changelog entry * Update changelog entry Signed-off-by: Romain Ruetschi --------- Signed-off-by: Romain Ruetschi Co-authored-by: Romain Ruetschi --- .../ibc-relayer/3666-default-compat-mode-to-v034.md | 2 ++ crates/relayer-cli/src/commands/listen.rs | 4 ++-- crates/relayer/src/chain/cosmos.rs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changelog/unreleased/improvements/ibc-relayer/3666-default-compat-mode-to-v034.md diff --git a/.changelog/unreleased/improvements/ibc-relayer/3666-default-compat-mode-to-v034.md b/.changelog/unreleased/improvements/ibc-relayer/3666-default-compat-mode-to-v034.md new file mode 100644 index 0000000000..b018b03a95 --- /dev/null +++ b/.changelog/unreleased/improvements/ibc-relayer/3666-default-compat-mode-to-v034.md @@ -0,0 +1,2 @@ +- Change fallback compatibility version for CometBFT from v0.37 to v0.34 + ([\#3666](https://github.com/informalsystems/hermes/issues/3666)) \ No newline at end of file diff --git a/crates/relayer-cli/src/commands/listen.rs b/crates/relayer-cli/src/commands/listen.rs index 1806fc310d..1b108cbf5d 100644 --- a/crates/relayer-cli/src/commands/listen.rs +++ b/crates/relayer-cli/src/commands/listen.rs @@ -172,8 +172,8 @@ fn detect_compatibility_mode( let client = HttpClient::new(config.rpc_addr.clone())?; let status = rt.block_on(client.status())?; let compat_mode = CompatMode::from_version(status.node_info.version).unwrap_or_else(|e| { - warn!("Unsupported tendermint version, will use v0.37 compatibility mode but relaying might not work as desired: {e}"); - CompatMode::V0_37 + warn!("Unsupported tendermint version, will use v0.34 compatibility mode but relaying might not work as desired: {e}"); + CompatMode::V0_34 }); Ok(compat_mode) } diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index 7c10fcae42..f03a13eaaa 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -876,8 +876,8 @@ impl ChainEndpoint for CosmosSdkChain { let node_info = rt.block_on(fetch_node_info(&rpc_client, &config))?; let compat_mode = CompatMode::from_version(node_info.version).unwrap_or_else(|e| { - warn!("Unsupported tendermint version, will use v0.37 compatibility mode but relaying might not work as desired: {e}"); - CompatMode::V0_37 + warn!("Unsupported tendermint version, will use v0.34 compatibility mode but relaying might not work as desired: {e}"); + CompatMode::V0_34 }); rpc_client.set_compat_mode(compat_mode);