-
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
Re-built tendermint-proto with serialization annotations #639
Conversation
All right, I think this research is a success. In this PR you can see the following:
If I get a "hey this works" from the team, I'll start revamping other types too, focusing on the types listed in #638 for IBC. |
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
I gave up on trying to organize JSON serialization for now. I've implemented a bunch of extra domain type conversions and moved a lot of the serialization into tendermint-proto, but we'll have to get back and do more structued thinking about JSON serialization. I need to fix the light-client test failures and I'll implement the last domaintype conversion for Anca and wrap it up for review. |
The last test that fails is the model-based single-step tests. There were a few changes in the JSON encoding that doesn't seem to be in testgen. The most prominent one is that the "parts" field was renamed to "part_set_header" both in Go and in this branch in Rust but testgen still seem to generate "parts". I've added time serialization annotation to some of the testgen tests where I saw it's having a hard time deserializing. Validator sets now contain a new "total_voting_power" field, but I think testgen doesn't generate that either. I also found error messages missing "description" and "model" fields in the testgen structs but I don't know exactly what's missing there. I'll need @andrey-kuprianov 's help to fix the remaining issues. |
Codecov Report
@@ Coverage Diff @@
## master #639 +/- ##
========================================
- Coverage 45.2% 38.9% -6.4%
========================================
Files 175 184 +9
Lines 12113 12800 +687
Branches 2724 2929 +205
========================================
- Hits 5480 4984 -496
- Misses 6350 7572 +1222
+ Partials 283 244 -39
Continue to review full report at Codecov.
|
Right now we need to allow for compatibility with the latest version of Tendermint, as well as v0.34.0-rc5. Between these versions, the `parts` field was renamed to `part_set_header` in the JSON serialization. We need to support both field names deserializing into the same data structures. Signed-off-by: Thane Thomson <connect@thanethomson.com>
I've added some changes that Anca made and have tweaked a few tests to get them to pass (the serialization was breaking, so I fixed the fixtures). Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Can we specify the revision to a commit hash in the proto-compiler?. Current ref used by gaia and go relayer stargate-4 release is: |
Missed this one: tendermint-rs/proto/src/prost/tendermint.crypto.rs Lines 34 to 47 in 820b634
And similar here: tendermint-rs/tendermint/src/merkle/proof.rs Lines 9 to 29 in 820b634
Could tendermint use the proto ones? Or impl the domain types? |
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
…sts) This pulls in the latest changes from master, but ignores the single-step tests because I think we need to regenerate them. Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
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.
So, a lot of work and thought and deliberation have gone into this PR and what the next steps from here should be. We're not yet where we need to be yet for v0.17.0, but I think it's important to at least push out a v0.17.0-rc2 release with the disclaimer that some more data structure changes are coming in v0.17.0-rc3. At the very least, rc2 will cater to IBC's immediate needs. Other consumers may want to wait until rc3 to upgrade.
The main thing that'd be good to fix right now before the v0.17.0-rc2 release is to get the Light Client's model-based single-step tests working with the new data structures introduced in this PR. cc @Shivani912 and @andrey-kuprianov
I'm keeping this branch around for a bit until IBC can base off of v0.17.0-rc2 (or master).
FYI -- ibc-rs master no longer depends on branch |
Closes #634.
This is a research for #638 that adds Serialization support for protobuf structs.