Skip to content

Commit

Permalink
Set CompatMode fallback to v0.34 when the version query fails (#3663)
Browse files Browse the repository at this point in the history
* Set CompatMode fallback to v0.34 when the version query fails

* Add changelog entry

* Update changelog entry

Signed-off-by: Romain Ruetschi <[email protected]>

---------

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
  • Loading branch information
ljoss17 and romac authored Oct 19, 2023
1 parent 5767001 commit 7bce263
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Change fallback compatibility version for CometBFT from v0.37 to v0.34
([\#3666](https://github.com/informalsystems/hermes/issues/3666))
4 changes: 2 additions & 2 deletions crates/relayer-cli/src/commands/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7bce263

Please sign in to comment.