cosmos-rust icon indicating copy to clipboard operation
cosmos-rust copied to clipboard

Remove IBC protos in favour of the `ibc-proto` crate

Open romac opened this issue 1 year ago • 0 comments

Closes: https://github.com/cosmos/cosmos-rust/issues/458 Closes: https://github.com/cosmos/cosmos-rust/issues/442 Closes: https://github.com/cosmos/cosmos-rust/issues/83

As promised, here is my follow-up to https://github.com/cosmos/cosmos-rust/issues/458 and its corresponding issue in the ibc-proto-rs repository.

Here is the corresponding PR in ibc-proto which removes the generated Cosmos SDK protos and uses them via cosmos-sdk-proto instead: https://github.com/cosmos/ibc-proto-rs/pull/187

Changes

  • Remove ibc-go submodule and the corresponding generated proto definitions
  • Update Cosmos SDK protos to v0.47.0
  • Re-export ICS 23 proto definitions from the ics23 crate instead of bundling them in cosmos-sdk-proto
  • Add no-std compatible ProtoJSON (de)serialization to all Protobuf definitions, via Informal's fork of pbjson.

TODO

  • [x] Use ics23 v0.11.1 once released (needed for informalsystems-pbjson v0.7.0)
    • [x] PR: https://github.com/cosmos/ics23/pull/274
    • [x] Release PR: https://github.com/cosmos/ics23/pull/275
  • [ ] Use tendermint-proto v0.34.1 once released (needed for missing serde annotations on some protos)
    • [ ] PR: https://github.com/informalsystems/tendermint-rs/pull/1389
    • [ ] Release PR: TBD

Questions

  • [ ] Do we want to update the Cosmos SDK protos further, eg. to v0.50.x?
  • [ ] What's the best name for the feature guarding the ProtoJSON serialization code? Right now it's serde to match the corresponding feature in ibc-proto, but perhaps pbjson or protojson is a better name?

This PR is probably best reviewed commit by commit.

@tony-iqlusion This is by no mean the definitive way to go about deduplicating the work, so I am eager to hear what you think about this and to discuss further with you how best to proceeded.

romac avatar Jan 30 '24 08:01 romac