-
Notifications
You must be signed in to change notification settings - Fork 99
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
Make Msg*
structs pub(crate)
#324
Comments
After further analysis, this is a pretty big change that will affect our core API. We currently expect the user to construct a A better API would be to ask the users to pass in the protobuf This being said, we should wait until we have fully removed the legacy blocked: #279 |
Note that the proto struct definitions can sometimes have a field that changes name from one version to the next, since protobuf's encoding is based on field numbers (i.e. the field names can change without changing what the struct serializes to). This actually happened with One possible solution is to have a thin wrapper around these structs that only keeps the naming constant; whenever a field name changes in the protobuf struct, we map that new name to the analogous field with the "old name". |
Another reason why I am in favor of making the domain For example, in On top of all this, in light of recent experiments, we might change the Hopefully this example succeeds in conveying my intuition for why I believe the domain types we use internally should be private. That being said, we could also export some "convenience domain types" for users who just want a general-purpose representation of IBC's raw message types, and don't care about it being perfectly tailored to their use case, as we do in ibc-rs. |
I for some time now no longer this to be a good idea, and forgot to update the issue. The idea as presented here (i.e. using raw messages types in the public API) doesn't work because API-breaking but protocol-backwards-compatible changes to the raw types are possible and do happen (e.g. adding a field to a struct). Then, we have to deal with breaking changes anyway, so might as well use the domain types in our public API. |
This will allow us to make changes to our message domain types on breaking change.
The text was updated successfully, but these errors were encountered: