Skip to content
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

Add missing serializer for TrustThresholdFraction fields #210

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

romac
Copy link
Member

@romac romac commented Apr 10, 2020

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGES.md

@romac romac requested a review from liamsi April 10, 2020 09:50
@romac romac mentioned this pull request Apr 10, 2020
5 tasks
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @romac 👍

@liamsi liamsi merged commit 2993d23 into tendermint/v0.33 Apr 10, 2020
@liamsi liamsi deleted the v0.33/fix-serialize-threshold branch April 10, 2020 10:35
liamsi added a commit that referenced this pull request Apr 21, 2020
* initial new commit struct

* update functions

* fixed deserialization for new commit struct

* updated links to generator + val_set_test file

* Ismail/commit struct followup (#182)

* 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>

* fix error

* more json bisection tests

* abci_info struct app_version implemented

* Fixed fmt

* Updated integration tests to tendermint v0.33 node

* update block result response

* changes to abci_info and block_results

* Removed CircleCI reference and added codecov reference to Cargo

* removing unwanted Option from DeliverTx struct fields

* last_block_app_hash is now Option<Vec<u8>>

* AbciInfo.last_block_app_hash is base64 encoded instead of hex

* last_block_app_hash changed to Vec<u8>

* Cherry-pick from 87e888b (Liamsi)
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

* [88] Fix JSON ID

* [192] Fix abci_info compatibility for v0.33

* [4] block_results test fix

* [184][120] Tendermint v0.33 compatibility fixes + integration tests for CI

* Added one abci_query test

* FMT + get rid of warnings

* Relaxed genesis struct AppHash requirements from strict hex to anything

* Removed unused Protocol struct

* Removed unused Protocol struct

* IdType removed and JSON ID made as enum

* Duration looks better now

* fix fmt

* Update tendermint/src/lite_impl/signed_header.rs

Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Update tendermint/src/lite_impl/signed_header.rs

Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Removed AsRef from JSON ID

* Update Proof and ProofOp (#206)

* 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)?

* Add missing serializer for TrustThresholdFraction fields (#210)

* commit followup (#199)

* 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)

Co-authored-by: Shivani Joshi <joshi.shivani912@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Shivani Joshi <46731446+Shivani912@users.noreply.github.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
liamsi added a commit that referenced this pull request May 23, 2020
* initial new commit struct

* update functions

* fixed deserialization for new commit struct

* updated links to generator + val_set_test file

* Ismail/commit struct followup (#182)

* 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>

* fix error

* more json bisection tests

* abci_info struct app_version implemented

* Fixed fmt

* Updated integration tests to tendermint v0.33 node

* update block result response

* changes to abci_info and block_results

* Removed CircleCI reference and added codecov reference to Cargo

* removing unwanted Option from DeliverTx struct fields

* last_block_app_hash is now Option<Vec<u8>>

* AbciInfo.last_block_app_hash is base64 encoded instead of hex

* last_block_app_hash changed to Vec<u8>

* Cherry-pick from 87e888b (Liamsi)
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

* [88] Fix JSON ID

* [192] Fix abci_info compatibility for v0.33

* [4] block_results test fix

* [184][120] Tendermint v0.33 compatibility fixes + integration tests for CI

* Added one abci_query test

* FMT + get rid of warnings

* Relaxed genesis struct AppHash requirements from strict hex to anything

* Removed unused Protocol struct

* Removed unused Protocol struct

* IdType removed and JSON ID made as enum

* Duration looks better now

* fix fmt

* Update tendermint/src/lite_impl/signed_header.rs

Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Update tendermint/src/lite_impl/signed_header.rs

Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Removed AsRef from JSON ID

* Update Proof and ProofOp (#206)

* 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)?

* Add missing serializer for TrustThresholdFraction fields (#210)

* commit followup (#199)

* 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)

* Initial support for websocket subscriptions

* Websocker error

* Fix formatting

* Intitial integration test

* Fmt

* Missed adding file

* Fix url scheme

* fix url scheme

* Format

* Debugged event subscription with unit tests

* Fix clippy lint

* Add back in the integration test ignore

* Refactor the websocket listener into a seperate struct from the RPC client

* Cargo fmt

* Cargo fmt

* Fix integration tests

* Remove the Box<Errors>

* Update tendermint/src/rpc/endpoint/subscribe.rs

Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Fix the doc comment for subscribe

* Moved a TODO comment to correct place

* Create a more specific type for JSON RPC TX Result responses

* Add a convinience function for extracting the event hashmap

* add an an additional query for helping type the event responses

* switch to borrowed types

* Remove extra borrow

* Remove borrow

* Fmt and fix clippy issues

* Improve the extract events function so that we treat any matching query in the vectors as valid

* Derive Clone for the Event type

* Prevent panics in extract events

* Fix module query

* Type events only on message.action

* Ensures all that events end up in the hashmap. A little unclear if this was happening

* Revert "Type events only on message.action"

This reverts commit 97f5c9b.

* Revert "Type events only on message.action"

This reverts commit 97f5c9b.

* accept periods in the chain-id

* Fmt and clippy

* review comments

* fix build: dbg! macro and catch up with renaming

* simplify match in integration test

* Fix typo in doc comment

* Make queries an enum

handle block events and tx events

* Refactor Enum to remove data field

* Update tendermint/src/rpc/event_listener.rs

Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Explain why we throw away subscription responses

* DRY the top level JSON response type

* Update tendermint/src/rpc/endpoint/subscribe.rs

Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* DRY some of the Block types

* Fmt

* return `Box<dyn stdError>` instead of `&'static str`

* Fix clippy warnings and errs

* Fix typo

* DRY Block, BlockData, Evidence, Parts

* Remove raw json responses from the public API

* Please clippy

* Box large variant

* Box the other variant

* Update the RPCTxResult to the new api

* clarify some local var names

* use rpc::response::Response and improve err handling

- unexport Wrapper fields

* Fix hyperlink in doc comment

* Update link on error codes

* Make error codes symmetric

* Fix panic string

* Add some debug output

* Add some more debug output

* Type alias instead of wrapping the wrapper

* Revert "DRY Block, BlockData, Evidence, Parts"

This reverts commit 3269d58

* DRY Block, BlockData, Evidence, Parts

* Let's try an Option

* Another Option?

* These events are actually optional

* typo

* Let it be

* Fix match arm

Co-authored-by: Shivani Joshi <joshi.shivani912@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Shivani Joshi <46731446+Shivani912@users.noreply.github.com>
Co-authored-by: Greg Szabo <greg@philosobear.com>
Co-authored-by: Greg Szabo <16846635+greg-szabo@users.noreply.github.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants