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

SignedHeader should contain commit #42

Merged
merged 5 commits into from
Oct 3, 2019
Merged

SignedHeader should contain commit #42

merged 5 commits into from
Oct 3, 2019

Conversation

liamsi
Copy link
Member

@liamsi liamsi commented Sep 23, 2019

resolves #38 and #41

@liamsi liamsi marked this pull request as ready for review September 23, 2019 21:19
liamsi added a commit that referenced this pull request Sep 25, 2019
 2DC46AD76277039F1B65FE3C7F2064788B1C12FE701CFE7EC93F751586A48781)

will add a test after #42 gets merged
liamsi added a commit that referenced this pull request Sep 25, 2019
 2DC46AD76277039F1B65FE3C7F2064788B1C12FE701CFE7EC93F751586A48781)

will add a test after #42 gets merged
ebuchman
ebuchman previously approved these changes Oct 3, 2019
Copy link
Member

@ebuchman ebuchman left a comment

Choose a reason for hiding this comment

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

Great thanks

tendermint/src/block/commit.rs Outdated Show resolved Hide resolved
@ebuchman ebuchman merged commit 9d454d8 into master Oct 3, 2019
@ebuchman ebuchman deleted the ismail/rpc_commit branch October 3, 2019 01:59
liamsi added a commit that referenced this pull request Dec 10, 2019
* Use concrete basic types for time, hash, bytes, validator id

* cargo fmt

* into_iter unnecessarily moves the Vec (clippy)

* Resolve a bunch of clippy warnings about:
https://rust-lang.github.io/rust-clippy/master/#try_err

* make the lite client a module instead of a separate crate:

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

* add amino type for header Version

* working towards hashing the header: conversion between fields and their
respective amino types, and, directly encode some

* Header::hash works now (tested against JSON fixture only and yields:
 2DC46AD76277039F1B65FE3C7F2064788B1C12FE701CFE7EC93F751586A48781)

will add a test after #42 gets merged

* remove todo

* implement lite::Validator trait

* implement lite::ValidatorSet trait

* implement lite::Vote trait

* bring back BufMut; fix clippy warnings

* Address some review comments:

 - Consistency: Rename encode_bytes to bytes_enc
 - remove redundant return statement

* Consistency: From<&vote::Vote> same order as the fields in the struct

* deduplicate encoding a hash: add a helper

* deduplicate encoding hashes and varints: add a helper for each

* simplify sign_bytes to return Vec<u8> instead of passing in a BufMut

* Add test for lite::Header.hash() in rpc tests

* wrap the CanonicalVote in a struct that contains the validator ID
and the signature
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.

RPC incompatibility: SignedHeader does not contain Commit
2 participants