Author | SHA1 | Message | Date |
---|---|---|---|
Callum Waters |
bb7a80ec7e
|
lite2: fetch missing headers (#4362)
Closes #4328 When TrustedHeader(height) is called, if the height is less than the trusted height but the header is not in the trusted store then a function finds the previous lowest height with a trusted header and performs a forwards sequential verification to the header of the height that was given. If no error is found it updates the trusted store with the header and validator set for that height and can then return them to the user. Commits: * drafted trusted header * created function to find previous trusted height * updates missing headers less than the trusted height * minor cosmetic tweaks * incorporated suggestions * lite2: implement Backwards verification and add SignedHeaderAfter func to Store interface Refs https://github.com/tendermint/tendermint/issues/4328#issuecomment-581878549 * remove unused method * write tests * start with next height in SignedHeaderAfter func * fix linter errors * address Callum's comments Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> |
5 years ago |
Anton Kaliaev |
f95409e070
|
lite2: move AutoClient into Client (#4326)
* lite2: move AutoClient into Client Most of the users will want auto update feature, so it makes sense to move it into the Client itself, rather than having a separate abstraction (it makes the code cleaner, but introduces an extra thing the user will need to learn). Also, add `FirstTrustedHeight` func to Client to get first trusted height. * fix db store tests * separate examples for auto and manual clients * AutoUpdate tries to update to latest state NOT 1 header at a time * fix errors * lite2: make Logger an option remove SetLogger func * fix lite cmd * lite2: make concurrency assumptions explicit * fixes after my own review * no need for nextHeightFn sequence func will download intermediate headers * correct comment |
5 years ago |