https://github.com/tendermint/tendermint
Revision fb8b00f1d85144a6a5b6c064be3efc1a1d731269 authored by Anton Kaliaev on 25 November 2019, 15:07:40 UTC, committed by GitHub on 25 November 2019, 15:07:40 UTC
Refs #1771 ADR: https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-044-lite-client-with-weak-subjectivity.md ## Commits: * add Verifier and VerifyCommitTrusting * add two more checks make trustLevel an option * float32 for trustLevel * check newHeader time * started writing lite Client * unify Verify methods * ensure h2.Header.bfttime < h1.Header.bfttime + tp * move trust checks into Verify function * add more comments * more docs * started writing tests * unbonding period failures * tests are green * export ErrNewHeaderTooFarIntoFuture * make golangci happy * test for non-adjusted headers * more precision * providers and stores * VerifyHeader and VerifyHeaderAtHeight funcs * fix compile errors * remove lastVerifiedHeight, persist new trusted header * sequential verification * remove TrustedStore option * started writing tests for light client * cover basic cases for linear verification * bisection tests PASS * rename BisectingVerification to SkippingVerification * refactor the code * add TrustedHeader method * consolidate sequential verification tests * consolidate skipping verification tests * rename trustedVals to trustedNextVals * start writing docs * ValidateTrustLevel func and ErrOldHeaderExpired error * AutoClient and example tests * fix errors * update doc * remove ErrNewHeaderTooFarIntoFuture This check is unnecessary given existing a) ErrOldHeaderExpired b) h2.Time > now checks. * return an error if we're at more recent height * add comments * add LastSignedHeaderHeight method to Store I think it's fine if Store tracks last height * copy over proxy from old lite package * make TrustedHeader return latest if height=0 * modify LastSignedHeaderHeight to return an error if no headers exist * copy over proxy impl * refactor proxy and start http lite client * Tx and BlockchainInfo methods * Block method * commit method * code compiles again * lite client compiles * extract updateLiteClientIfNeededTo func * move final parts * add placeholder for tests * force usage of lite http client in proxy * comment out query tests for now * explicitly mention tp: trusting period * verify nextVals in VerifyHeader * refactor bisection * move the NextValidatorsHash check into updateTrustedHeaderAndVals + update the comment * add ConsensusParams method to RPC client * add ConsensusParams to rpc/mock/client * change trustLevel type to a new cmn.Fraction type + update SkippingVerification comment * stress out trustLevel is only used for non-adjusted headers * fixes after Fede's review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * compare newHeader with a header from an alternative provider * save pivot header Refs https://github.com/tendermint/tendermint/pull/3989#discussion_r349122824 * check header can still be trusted in TrustedHeader Refs https://github.com/tendermint/tendermint/pull/3989#discussion_r349101424 * lite: update Validators and Block endpoints - Block no longer contains BlockMeta - Validators now accept two additional params: page and perPage * make linter happy
1 parent ceb1053
Tip revision: fb8b00f1d85144a6a5b6c064be3efc1a1d731269 authored by Anton Kaliaev on 25 November 2019, 15:07:40 UTC
lite2: light client with weak subjectivity (#3989)
lite2: light client with weak subjectivity (#3989)
Tip revision: fb8b00f
File | Mode | Size |
---|---|---|
.circleci | ||
.github | ||
DOCKER | ||
abci | ||
behaviour | ||
blockchain | ||
cmd | ||
config | ||
consensus | ||
crypto | ||
docs | ||
evidence | ||
libs | ||
lite | ||
lite2 | ||
mempool | ||
mock | ||
networks | ||
node | ||
p2p | ||
privval | ||
proxy | ||
rpc | ||
scripts | ||
state | ||
store | ||
test | ||
tools | ||
types | ||
version | ||
.editorconfig | -rw-r--r-- | 280 bytes |
.gitignore | -rw-r--r-- | 528 bytes |
.golangci.yml | -rw-r--r-- | 1.6 KB |
CHANGELOG.md | -rw-r--r-- | 129.7 KB |
CHANGELOG_PENDING.md | -rw-r--r-- | 3.9 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 4.9 KB |
CONTRIBUTING.md | -rw-r--r-- | 8.9 KB |
LICENSE | -rw-r--r-- | 11.1 KB |
Makefile | -rw-r--r-- | 8.9 KB |
PHILOSOPHY.md | -rw-r--r-- | 7.5 KB |
README.md | -rw-r--r-- | 7.6 KB |
SECURITY.md | -rw-r--r-- | 1.7 KB |
UPGRADING.md | -rw-r--r-- | 17.2 KB |
Vagrantfile | -rw-r--r-- | 2.0 KB |
appveyor.yml | -rw-r--r-- | 251 bytes |
codecov.yml | -rw-r--r-- | 330 bytes |
docker-compose.yml | -rw-r--r-- | 1.3 KB |
dredd.yml | -rw-r--r-- | 700 bytes |
go.mod | -rw-r--r-- | 1.3 KB |
go.sum | -rw-r--r-- | 27.3 KB |
tests.mk | -rw-r--r-- | 3.0 KB |
tools.mk | -rw-r--r-- | 2.9 KB |
Computing file changes ...