informalsystems / hermes

IBC Relayer in Rust
https://hermes.informal.systems
Apache License 2.0
439 stars 323 forks source link

Pitfalls in Cosmos-SDK versions detection logic #2309

Open mzabaluev opened 2 years ago

mzabaluev commented 2 years ago

Summary of Bug

The logic used to discover versions of Cosmos-SDK, IBC-go, and Tendermint used by a Cosmos node should be made more robust.

Version

0.15.0

Details

The relayer logic used to extract versions of modules the node is built on in chain::cosmos::version has several potential problems. It looks at the Go dependencies list as returned in the cosmos.base.tendermint.v1beta1.VersionInfo protobuf response, and finds matches with known names of the components. The versions are checked against compatibility requirements using the VersionReq API provided by the semver crate.

There are following issues with the present logic:

For Admin Use

adizere commented 2 years ago

perhaps, it's best to treat pre-release components specially and emit a log warning whenever they are encountered, but otherwise relax the compatibility check.

This is a great idea. We should definitely add a warning when encountering an RC/prerelease dependency, at the very least to flag to operators that the networks they're relaying on have (potentially) unstable software.