-
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
Light client: further trait impls, improvements, and tests #63
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is just the simplest way to move forward implementing the traits of the lite package. There are alternatives: We do not want a create a circular dependency between lite and tendermint (which does not even compile). To avoid this we could: 1) make lite a module of tendermint, or, 2) replicate a lot of the types of the tendermint crate in the lite package (e.g. Time, Ids etc), or 3) have a dependency from tendermint to the lite package only (but then the trait impls do need to live in the lite crate instead with the types in the tendermint crate directly).
respective amino types, and, directly encode some
2DC46AD76277039F1B65FE3C7F2064788B1C12FE701CFE7EC93F751586A48781) will add a test after #42 gets merged
- Consistency: Rename encode_bytes to bytes_enc - remove redundant return statement
and the signature
- work in progress as we might want to let an inner function for the recursion - also we might simply want to use From to consume (or create a Vec) instead of changing the method signature (as suggested here: #57 (comment))
…h_from_byte_slices' into lite_impl
direct vector initialization instead of going through &[&[u8]]
Signing bytes need to encoded with encode_length_delimited
and correctly compute header hash when block id is empty. Represent empty Hash with Option
Handle empty block id
liamsi
changed the title
trait impl Improvements for #36 after #59
Light client: trait impl improvements
Nov 27, 2019
liamsi
changed the title
Light client: trait impl improvements
Light client: further trait impls & improvements
Nov 27, 2019
add simple rpc test for light client
Represent `last_commit` as `Option<Commit>`
liamsi
changed the title
Light client: further trait impls & improvements
Light client: further trait impls, improvements, and tests
Nov 28, 2019
Implement several utility trait
accept iff +1/3 of the voting power signed
…code (lite2) and tests: - rename former verify method to verify_header_and_commit (might be obsolete) - make the expired method public to be able to use and test it from the outside - add some helpers to be able to deal with deserialization hickups - add a bunch of tests using @Shivani912's generator code (with minor modifications)
liamsi
force-pushed
the
lite_impl_simple_merkle_merged
branch
from
December 10, 2019 01:33
d2b3bc1
to
a53098c
Compare
With the last commit the build started failing with:
Probably related circle-ci catching up with the latest ed25519-dalek release? cc @tarcieri |
This needs rebasing onto master... |
…imple_merkle_merged # Conflicts: # tendermint/src/amino_types/block_id.rs # tendermint/src/amino_types/vote.rs # tendermint/src/block/commit.rs # tendermint/src/block/header.rs # tendermint/src/genesis.rs # tendermint/src/merkle.rs # tendermint/src/serializers.rs # tendermint/src/validator.rs # tendermint/src/vote.rs
replaced by #84 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#59 should be merged first
(hence a draft)ref #36
Update: Since this PR was opened (mostly to show the impact of #59), it grew to contain several further PRs added in by @yihuang (big thanks). These added 2 missing impls, resolved a few encoding edge cases and simple (json-based) tests.
Particularly:
last_commit
asOption<Commit>
#79Additionally this PR introduces a
TrustLevel
trait via bd26e74 and adds averify
method that is closer to the (current) spec / go-code in 017c1ba (with a few tests from JSON).