-
Notifications
You must be signed in to change notification settings - Fork 231
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
Tendermint/v0.33 #196
Tendermint/v0.33 #196
Conversation
* 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Shivani Joshi <[email protected]>
fix /abci_info & /genesis: - add app_version & use #[serde(default)] to deal with omitted fields in JSON - make app_state in /genesis reply optional - fix string in abci_info test (kvstore wont reply with "GaiaApp") verify tests pass via running `tendermint node --proxy_app=kvstore` and `cargo test -- --nocapture --ignored
…int-rs into tendermint/v0.33
Codecov Report
@@ Coverage Diff @@
## master #196 +/- ##
======================================
Coverage 39.1% 39.1%
======================================
Files 99 99
Lines 3610 3610
Branches 580 580
======================================
Hits 1413 1413
Misses 1800 1800
Partials 397 397 Continue to review full report at Codecov.
|
* manually update Proof and introduce ProofOp to match the actual JSON encoding * 0.33 branch seems out of date with master, committing to switch back * Fix test * Fix rpc endpoint test (how wasn't this detected before by the integration tests)?
I'll go through the changes again and collect everything in a followup issue. I think we can merge this later today. |
FYI there are missing serializers for Also, I just ran the relayer (which depends on this branch) against a Tendermint 0.33.3 node and got an RPC error saying |
I tried with gaia nodes running IBC and get |
* rename iter -> signed_votes and add validation checks - add basic validation to validate method (depending on `BlockIDFlag`) - move check for unknown validator to validate method (for CommitSig)
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.
This PR is becoming way too large... I put some of the outstanding issues in #211 and would recommend merging this instead of adding more to it. I'd also recommend another pair of eyes here though as I authored parts of this PR too.
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.
@@ -52,42 +45,109 @@ impl lite::Commit for block::signed_header::SignedHeader { | |||
} | |||
|
|||
fn validate(&self, vals: &Self::ValidatorSet) -> Result<(), Error> { | |||
if self.commit.precommits.len() != vals.validators().len() { | |||
// TODO: self.commit.block_id cannot be zero in the same way as in go |
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.
only the very first block (height: 1) is allowed (actually required) to have 0 signatures
self | ||
); | ||
} | ||
// TODO: this last check is only necessary if we do full verification (2/3) but the |
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.
seems to me this should not be the concern of Commit to validate if it's a part of some validator set, but it should be rather the job of external object, who's probably holding a validator set to make sure commit signatures match validator set. that's how it's done in Go. It's interesting that you've decided to revert this relationship.
@liamsi I think it'd be good to cut a final Happy to help with that. |
Merging this now. Whenever we want, we can now release this as |
* Drop redundant prefixes in BlockIDFlag enum variants - #196 (comment) * improve error message
This is a minimum viable product for Tendermint v0.33 compatibility. Lots of improvements can be made (more tests, further optimizations) but most probably those should be added as new issues and PRs.
I'm writing an ADR that should address the decisions made in updating/implementing the RPC structs.