cosmos / ibc-proto-rs

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

Re-export the `ics23.cosmos.v1` Protobuf definitions from the `ics23` crate #92

Closed romac closed 1 year ago

romac commented 1 year ago

Closes: #10

The proto definitions are exported both under the ibc_proto::cosmos::ics23::v1 module and under the ibc_proto::ics23 module for backward source compatiblity.

This is nonetheless a breaking change as it may break compilation or trigger warnings in code which relied on these definitions being different than the ones in ics23.

Warning Note that because the code generated by pbjson-build is not no_std compatible, the serde annotations on the generated protos are only emitted when the std feature of ibc-proto is enabled, which is unfortunate but I didn't find a way around that.

erwanor commented 1 year ago

Thanks for your work on this @romac.

Re: pbjson, that seems like a necessary tradeoff, and we can help with getting upstream to get no_std compliance. It would be great to merge this soon because our ICS23 support hinges on this + a release, and we're already a little behind schedule 🙏

romac commented 1 year ago

Before merging this and doing a release, I would just like to get some feedback from @plafer or @Farhad-Shabani on whether or not they use the JSON impls on no_std or are aware of anyone using those. Either way this shouldn't prevent us from doing a release on Monday, but maybe then as an alpha to give some time to find an alternative solution (eg. no_std support in pbjson) before the final release.

plafer commented 1 year ago

I don't have time to do a thorough analysis of this right now, but we do not use the JSON impls internally. Off the top of my head, I do not know of anyone that does.

romac commented 1 year ago

I am told we have a potential user of JSON serialization in no_std context, so let's do an alpha release and then try to find a way to restore no_std compat for the generated code.

romac commented 1 year ago

@erwanor ibc-proto v0.31.0-alpha.1 is out: https://github.com/cosmos/ibc-proto-rs/releases/tag/v0.31.0-alpha.1