cosmos / ibc-proto-rs

Rust Protobuf definitions and gRPC clients for interacting with Cosmos SDK, IBC and Interchain Security
Apache License 2.0
42 stars 25 forks source link

Use the CometBFT v0.34 definition of `tendermint.abci.Event` which does not enforce valid UTF-8 data #181

Closed romac closed 5 months ago

romac commented 6 months ago

While investigating an issue in Hermes where it failed to relay ICS-04 packets containing non-UTF-8 data, we realized that ibc-go emits event attributes which are not valid UTF-8 strings, specifically the packet_data and packet_ack event attributes.

Such events fail to decode from Protobuf, because the tendermint.abci.Event proto that we use is the one from CometBFT v0.37+ which specifies that the key and value fields be valid UTF-8 strings.

I suggest we change the version of tendermint.abci.Event to v0.34, where attributes are allowed to be any byte array. In Protobuf, bytes and string are wire-compatible, so doing this would strictly increase the amount fo data we can parse.

See this Hermes PR for background information: https://github.com/informalsystems/hermes/pull/3768