Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MsgUpdateClient domain type does not faithfully represent the IBC protocol messages #628

Closed
Tracked by #608
hdevalence opened this issue Apr 15, 2023 · 1 comment · Fixed by #643
Closed
Tracked by #608
Assignees
Milestone

Comments

@hdevalence
Copy link

Bug Summary

#584 broke the representation of IBC protocol messages, by creating a single domain type, MsgUpdateClient, that represents multiple IBC protocol messages (both MsgUpdateClient and MsgSubmitMisbehavior).

The domain types should faithfully represent the IBC protocol messages, rather than forcing downstream clients to re-parse them to figure out what message they actually got.

This also breaks the use of the ibc_proto traits, forcing callers to write code like

let msg = <MsgUpdateClient as ibc_proto::protobuf::Protobuf<
    ibc_proto::ibc::core::client::v1::MsgUpdateClient,
>>::decode(raw_action_bytes)?;

or

<ibc::core::ics02_client::msgs::update_client::MsgUpdateClient as Protobuf<
    ibc_proto::ibc::core::client::v1::MsgUpdateClient,
>>::encode_vec(&msg)

just to encode or decode messages.

@plafer
Copy link
Contributor

plafer commented Apr 20, 2023

Thank you for bringing this up; I think I found a way to not break them in this way and still implement ibc-go's ADR 6 (our original intent). Will submit a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants