https://github.com/tendermint/tendermint
Revision 86adc2c89f80fa21579877d3f3e198f794e2ab9a authored by Anton Kaliaev on 13 January 2020, 07:56:48 UTC, committed by GitHub on 13 January 2020, 07:56:48 UTC
* rename adjusted to adjacent Refs https://github.com/tendermint/tendermint/pull/3989#discussion_r352140829 * rename ErrTooMuchChange to ErrNotEnoughVotingPowerSigned Refs https://github.com/tendermint/tendermint/pull/3989#discussion_r352142785 * verify commit is properly signed * remove no longer trusted headers * restore trustedHeader and trustedNextVals * check trustedHeader using options Refs https://github.com/tendermint/tendermint/pull/4209#issuecomment-562462165 * use correct var when checking if headers are adjacent in bisection func + replace TODO with a comment https://github.com/tendermint/tendermint/pull/3989#discussion_r352125455 * return header in VerifyHeaderAtHeight because that way we avoid DB call + add godoc comments + check if there are no headers yet in AutoClient https://github.com/tendermint/tendermint/pull/3989#pullrequestreview-315454506 * TestVerifyAdjacentHeaders: add 2 more test-cases + add TestVerifyReturnsErrorIfTrustLevelIsInvalid * lite: avoid overflow when parsing key in db store! * lite: rename AutoClient#Err to Errs * lite: add a test for AutoClient * lite: fix keyPattern and call itr.Next in db store * lite: add two tests for db store * lite: add TestClientRemovesNoLongerTrustedHeaders * lite: test Client#Cleanup * lite: test restoring trustedHeader https://github.com/tendermint/tendermint/pull/4209#issuecomment-562462165 * lite: comment out unused code in test_helpers * fix TestVerifyReturnsErrorIfTrustLevelIsInvalid after merge * change defaultRemoveNoLongerTrustedHeadersPeriod and add docs * write more doc * lite: uncomment testable examples * use stdlog.Fatal to stop AutoClient tests * make lll linter happy * separate errors for 2 cases - the validator set of a skipped header cannot be trusted, i.e. <1/3rd of h1 validator set has signed (new error, something like ErrNewValSetCantBeTrusted) - the validator set is trusted but < 2/3rds has signed (ErrNewHeaderCantBeTrusted) https://github.com/tendermint/tendermint/pull/4209#discussion_r360331253 * remove all headers (even the last one) that are outside of the trusting period. By doing this, we avoid checking the trustedHeader's hash in checkTrustedHeaderUsingOptions (case #1). https://github.com/tendermint/tendermint/pull/4209#discussion_r360332460 * explain restoreTrustedHeaderAndNextVals better https://github.com/tendermint/tendermint/pull/4209#discussion_r360602328 * add ConfirmationFunction option for optionally prompting for user input Y/n before removing headers Refs https://github.com/tendermint/tendermint/pull/4209#discussion_r360602945 * make cleaning optional https://github.com/tendermint/tendermint/pull/4209#discussion_r364838189 * return error when user refused to remove headers * check for double votes in VerifyCommitTrusting * leave only ErrNewValSetCantBeTrusted error to differenciate between h2Vals.VerifyCommit and h1NextVals.VerifyCommitTrusting * fix example tests * remove unnecessary if condition https://github.com/tendermint/tendermint/pull/4209#discussion_r365171847 It will be handled by the above switch. * verifyCommitBasic does not depend on vals Co-authored-by: Marko <marbar3778@yahoo.com>
1 parent db235c8
Tip revision: 86adc2c89f80fa21579877d3f3e198f794e2ab9a authored by Anton Kaliaev on 13 January 2020, 07:56:48 UTC
lite: follow up from #3989 (#4209)
lite: follow up from #3989 (#4209)
Tip revision: 86adc2c
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.1 KB |
CHANGELOG.md | -rw-r--r-- | 129.7 KB |
CHANGELOG_PENDING.md | -rw-r--r-- | 8.5 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 4.9 KB |
CONTRIBUTING.md | -rw-r--r-- | 10.4 KB |
LICENSE | -rw-r--r-- | 11.1 KB |
Makefile | -rw-r--r-- | 8.8 KB |
PHILOSOPHY.md | -rw-r--r-- | 7.5 KB |
README.md | -rw-r--r-- | 7.5 KB |
SECURITY.md | -rw-r--r-- | 1.7 KB |
UPGRADING.md | -rw-r--r-- | 17.1 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.5 KB |
go.sum | -rw-r--r-- | 32.0 KB |
tests.mk | -rw-r--r-- | 3.0 KB |
tools.mk | -rw-r--r-- | 2.8 KB |
Computing file changes ...