-
Notifications
You must be signed in to change notification settings - Fork 224
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
Domain types for protobuf structs #537
Conversation
Would definitely recommend an "extension trait" with a blanket impl for |
tendermint/Cargo.toml
Outdated
prost-amino-derive = "0.6" | ||
prost = "0.6" | ||
prost-derive = "0.6" | ||
prost-types = "0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
tendermint/Cargo.toml
Outdated
prost-amino-derive = "0.6" | ||
prost = "0.6" | ||
prost-derive = "0.6" | ||
prost-types = "0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this due to using the well known type for time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. If you refer to me removing TimeMsg, it's because its implementation was the same or very similar to the built-in prost::Timestamp implementation. We might reintroduce it as a domain-type, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think I understand your question! You are asking why the prost-types
crate was added!?
It's for Timestamp
, but I think we might not need it. I'll double-check and remove before we merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was wondering why the Prost-types dependency was added. Thanks for the clarification.
* Domain types * DomainType derive macro * DomainType added to all amino_types
* Ripped out amino types and replaced them with protobuf types. * Vote and proposal serialization fix * fmt fix * As close as test_validator_set gets without issue #506 * sad fmt noises * Domain types for protobuf structs (#537) * Domain types * DomainType derive macro * DomainType added to all amino_types * Minor fixes and cleanup * Fixed voting and proposals * Updated CHANGELOG * Documentation update
Closes #535
domain types with TryFrom(protobuf struct) and From(domaintype) for the protobuf structs
DomainType trait for direct
.encode
/.decode
functionality from the protobuf typesDomainType derive macro
Referenced an issue explaining the need for the change
Updated all relevant documentation in docs
Updated all code comments where relevant
Wrote tests
Updated CHANGELOG.md