-
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
New commit struct! #181
New commit struct! #181
Conversation
@liamsi There are rpc JSON tests here that are failing because of the new commit struct. I don't have pointers to the code that generated those files. Do you want to take it from here? Also, would appreciate your early review! |
Thanks @Shivani912! I'll review and look into the failing tests tomorrow! I'm also not sure from what they where generated; the problem is that a bunch of these aren't up to date with the latest tendermint even without the commit changes.
|
@liamsi Ahan! Time for more tests then, haha 🙃 |
Note: All the JSON files have been re-generated so they are compatible with the latest changes. Link to generator updated in code! |
It looks like the RPC tests where either copy & pasted from the documentation, or, dumped via a modified fork. I can't find any code that generated the RPC JSON tests either. @tarcieri can you confirm that these files weren't generated with some tool in tendermint/gaiad? |
@liamsi the JSON used in the original RPC unit tests was taken from a |
tendermint/tests/rpc.rs
Outdated
.is_none()); | ||
} | ||
// NOTE: Since the commit struct changed, the votes i.e. CommitSig no longer contains BlockID | ||
// TODO: Do we still need this test? |
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.
No, we don't need that exact test anymore. But it would we good to translate it into the new semantic. It tested that the blockId is none. Which looks suspiciously to saying BlockIDFlagAbsent
now. But I'll double check.
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.
The main changes in this PR look great and to the point. #182 will fix the failing tests and resolve a few open todos.
cc3aacc
to
b893a25
Compare
* initial new commit struct * update functions * fixed deserialization for new commit struct * updated links to generator + val_set_test file * Update tendermint/src/account.rs Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com> * fmt * clippy * rpc tests: grab latest example fro commit: - use https://docs.tendermint.com/master/rpc/#/Info/commit - update chain_id: cosmoshub-1 to cosmoshub-2 everywhere else - manually kept `id` a string in JSONrpc responses * Actually let's go cosmoshub-3: - grabbed from: https://rpc.cosmos.network/commit?height=2 * Fix commit test - regenerated commit.json via `curl -X GET "http://localhost:26657/commit?height=10" -H "accept: application/json"` * Fix block test - "regenerated" block.json via `curl -X GET "http://localhost:26657/block?height=10" -H "accept: application/json"` * Fix first_block test - "regenerated" block.json via `curl -X GET "http://localhost:26657/block?height=1" -H "accept: application/json" ` Co-authored-by: Shivani Joshi <joshi.shivani912@gmail.com> Co-authored-by: Shivani Joshi <46731446+Shivani912@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #181 +/- ##
========================================
- Coverage 42.0% 38.0% -4.1%
========================================
Files 88 98 +10
Lines 3051 3546 +495
Branches 470 563 +93
========================================
+ Hits 1283 1348 +65
- Misses 1431 1850 +419
- Partials 337 348 +11
Continue to review full report at Codecov.
|
Nice, the tests @greg-szabo added fired 👍 (integration tests against a tendermint node that is) |
I looked through the failing integration tests and found the following work to do so far:
|
After a discussion with @greg-szabo, I'm closing this pull request. Since Gaia is using Tendermint v0.32 and we don't want to give up compatibility with it, the master branch will stay as is i.e. compatible with Tendermint v0.32. So, all the v0.33 related upgrades will stay in a separate branch. That means, this branch will be compatible with Tendermint v0.33. |
@Shivani912 we reverted this decision right? We're going to update master to tendermint v0.33 and drop compatibility with current gaia? |
Yes, that's right @ebuchman. For a record, the progress is being posted in issue #184 |
closes #145
NOTE: I've updated the commit struct here but as a result we'll have to give up compatibility with current Gaia (assuming they're still using the older commit struct)