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

Do not merge this PR #1

Open
wants to merge 91 commits into
base: silei/v0.27.4
Choose a base branch
from
Open

Conversation

wukongcheng
Copy link
Owner

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG.md

alessio and others added 30 commits October 17, 2018 18:54
Add reteat last block interface for block store
R4R: automatically shutdown node and enter query-only mode
HaoyangLiu and others added 28 commits January 30, 2019 18:46
…trics

R4R: Add consensus failure to metrics
R4R: Add latest tx to the back of cache list
R4R: add stopMtx for FlushStop and OnStop
wukongcheng pushed a commit that referenced this pull request Jan 7, 2020
wukongcheng pushed a commit that referenced this pull request Mar 24, 2020
* rename adjusted to adjacent

Refs tendermint#3989 (comment)

* rename ErrTooMuchChange to ErrNotEnoughVotingPowerSigned

Refs tendermint#3989 (comment)

* verify commit is properly signed

* remove no longer trusted headers

* restore trustedHeader and trustedNextVals

* check trustedHeader using options

Refs tendermint#4209 (comment)

* use correct var when checking if headers are adjacent

in bisection func
+ replace TODO with a comment

tendermint#3989 (comment)

* return header in VerifyHeaderAtHeight

because that way we avoid DB call

+ add godoc comments
+ check if there are no headers yet in AutoClient

tendermint#3989 (review)

* 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

tendermint#4209 (comment)

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

tendermint#4209 (comment)

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

tendermint#4209 (comment)

* explain restoreTrustedHeaderAndNextVals better

tendermint#4209 (comment)

* add ConfirmationFunction option

for optionally prompting for user input Y/n before removing headers

Refs tendermint#4209 (comment)

* make cleaning optional

tendermint#4209 (comment)

* 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

tendermint#4209 (comment)

It will be handled by the above switch.

* verifyCommitBasic does not depend on vals

Co-authored-by: Marko <marbar3778@yahoo.com>
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.

7 participants