-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add a blanket Serialize
, Deserialize
impl to IBC domain types
#7
Comments
This is unblocked now that cosmos/ibc-proto-rs#95 landed. |
github-project-automation
bot
moved this from Future
to Testnet 53: Himalia
in Testnets
May 31, 2023
Much of this work has been completed via recent PR into ibc-types. Still a few more to go before we can close. |
conorsch
moved this from Next (Steal from here)
to In Progress (Already claimed)
in Testnets
Aug 7, 2023
conorsch
moved this from In Progress (Already claimed)
to Next (Steal from here)
in Testnets
Aug 7, 2023
hdevalence
changed the title
Restore
Add a blanket Oct 3, 2023
Serialize
impls for all IBC domain typesSerialize
, Deserialize
impl to IBC domain types
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The original
ibc-rs
code we forked from used#[derive(Serialize, Deserialize)]
to derive serialization formats from the domain types. However, this is dangerous from an interoperability and protocol compatibility standpoint, because it means that:To fix this, we need to ensure that:
Serialize
andDeserialize
implementations for protobuf messages always serialize through the Proto-derived serialization format (by forwarding to theibc-proto
type, which is compiled with ProtoJSON support)Serialize
andDeserialize
implementations are audited and justified against some external format.One way to do this could be to use a blanket impl on the
ibc-types-domain-type
DomainType
crate, something that's not possible for thepenumbra-proto
DomainType
(which has implementations on foreign types, some of which haveSerialize
impls already). This would ensure that anyDomainType
would beSerialize
, and (by disallowing conflicting impls) that it was not serialized other than by conversion through a proto type.The remaining
Serialize
/Deserialize
impls would then be easily findable using ripgrep or some other search tool.The text was updated successfully, but these errors were encountered: