-
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
Find and replace all amino encoding with protobuf #504
Comments
I think we have our work cut out for us here. There are 11 files in the These structs are implemented in proto, currently in the Note, that only the struct definitions are implemented using proto. The implementation details (traits and additional functions) are implemented on the amino struct directly. This cannot be done on a proto struct if it's defined in a separate crate. One option is to copy the auto-generated proto Rust structs into the Tendermint source code and implement functionality on them directly. This has the short-term benefit of getting the overhaul done slightly quicker. Another option is keeping them in the separate crate and using the pattern we started with CommitSig in this repo and with the ibc_proto package implementation in the ibc-rs repo: I believe I should implement one such struct to show how it would look like. I'm going to try to do that with I'm taking all these notes because I'm interested in feedback for other methods. Maybe I'm overcomplicating this and there's an Occam's razor somewhere that I'm missing. Feel free to add notes to this issue. |
Thanks for the exhaustive write-up, this is great to onboard someone on the context and the challenges. In essence we can't really fight Rusts orphan rules and going down the past where we manually copy code over and slab things on it sounds like a recipe for disaster. While it's not the most effective option having safe conversions into properly typed domain types sounds appealing as the serialisation artifacts are pushed to the edge and we can with greater care craft our native entities. If we go down such a route we have to start thinking about the conract we provide through these shapes, i.e. what would it mean changing those and advancing them. Will they be subject to versioning? How can a user safely integrate against them? etc. |
for Tendermint 0.34 compatibility. Maybe it's worth identifying all places first and opening smaller issues to updates parts separately.
#305
The text was updated successfully, but these errors were encountered: