cosmos / relayer

An IBC relayer for ibc-go
Apache License 2.0
390 stars 1.71k forks source link

feat: introduce cometbft client wrapper to eliminate forked repo #1384

Closed jtieri closed 10 months ago

jtieri commented 10 months ago

This PR introduces a CometBFT client wrapper, see cometbft-client. This allows us to handle breaking changes in CometBFT without being limited by the Go module system or having to introduce a forked repo, like we have been using.

The imported cometbft-client library wraps the Comet RPC client and mutates the returned data with one of the current main goals being to handle the breakage in ResultBlockResults, see #1273. Our client will also internally handle the base64 decoding of events so that we can handle all events as strings regardless of what version of CometBFT a chain is using.

On the relayer side we also introduce a wrapper around this new client. This allows us to satisfy the CometRPC interface by making calls into our client and adapting the returned types to the appropriate upstream CometBFT types.

I updated the conformance tests to run against current versions of the Cosmos Hub and Osmosis and don't see the errors described in #1354 with these changes, but we may want to also test against a live network to be sure.

Closes #1354