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

tendermint-0.33.4 migration #24

Open
wants to merge 400 commits into
base: master
Choose a base branch
from
Open

Conversation

slave5vw
Copy link
Contributor

Our consensus branch will be rebase to merged master from this pr.

tac0turtle and others added 30 commits December 20, 2019 11:42
* test:

- testing replacing syscall with os.FindProces

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* address pr comments
- fixed some links in the readme
- deleted some unused things from themakefile

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* cmd/debug: execute p.Signal when p is not nil

tendermint/tendermint#4266 (comment)

* replace else with else if
previous PR seems to have deleted the tools cmd, this adds it back in

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
…g a l… (#4279)

* pass `outCapacity` to `eventBus#Subscribe` when subscribing using a local client

Fixes #4256

* use outCap directly
* fix raw import sr25519

* add sr25519 to multisig codec

* bump go-schnorrkel

Co-authored-by: Marko <marbar3778@yahoo.com>

Fixes sr25519 pubkey generation and signing when importing from raw bytes
Bumps [github.com/go-logfmt/logfmt](https://github.com/go-logfmt/logfmt) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/go-logfmt/logfmt/releases)
- [Changelog](https://github.com/go-logfmt/logfmt/blob/master/CHANGELOG.md)
- [Commits](go-logfmt/logfmt@v0.4.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* added RPC method block_by_hash

* created hash => height

* changes typings

* block_by_hash changes

* Update store/store.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update store/store.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update store/store.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update store/store.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
The New* client functions return an error instead
of panicking when the remote address is invalid.

Fixes #3953
- follow up to #4263
- when a commit is nil, then it should be counted as a missed commit

Signed-off-by: Marko Baricevic marbar3778@yahoo.com
* evidence: introduce time.Duration to evidence params

- add time.duration to evidence
- this pr is taking pr #2606 and updating it to use both time and height

- closes #2565

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* fix testing and genesis cfg in signer harness

* remove debugging fmt

* change maxageheight to maxagenumblocks, rename other things to block instead of height

* further check of duration

* check duration to not send peers outdated evidence

* change some lines, onward and upward

* refactor evidence package

* add a changelog pending entry

* make mockbadevidence have time and use it

* add what could possibly be called a test case

* remove mockbadevidence and mockgoodevidence in favor of mockevidence

* add a comment for err that is returned

* add a changelog for removal of good & bad evidence

* add a test for adding evidence

* fix test

* add ev to types in testcase

* Update evidence/pool_test.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update evidence/pool_test.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* fix tests

* fix linting

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
* rename adjusted to adjacent

Refs tendermint/tendermint#3989 (comment)

* rename ErrTooMuchChange to ErrNotEnoughVotingPowerSigned

Refs tendermint/tendermint#3989 (comment)

* verify commit is properly signed

* remove no longer trusted headers

* restore trustedHeader and trustedNextVals

* check trustedHeader using options

Refs tendermint/tendermint#4209 (comment)

* use correct var when checking if headers are adjacent

in bisection func
+ replace TODO with a comment

tendermint/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/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/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/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/tendermint#4209 (comment)

* explain restoreTrustedHeaderAndNextVals better

tendermint/tendermint#4209 (comment)

* add ConfirmationFunction option

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

Refs tendermint/tendermint#4209 (comment)

* make cleaning optional

tendermint/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/tendermint#4209 (comment)

It will be handled by the above switch.

* verifyCommitBasic does not depend on vals

Co-authored-by: Marko <marbar3778@yahoo.com>
Bumps [github.com/pkg/errors](https://github.com/pkg/errors) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/pkg/errors/releases)
- [Commits](pkg/errors@v0.8.1...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* cmd/lite: switch to new lite2 package

* update changelog

* shorten the trusting period explanation
* dep: update tm-db to 0.4.0

- update 0.4.0 as it is a breaking change and cannot be handled by depndabot

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

*  more work towards error handling

* error and emtpy bytes handling

* work on tests

* add changelog entry, change some error handling

* address some pr comments

* panic in a few more places

* move error higher up

* redo some error handling

* fix some bz == nil to len(bz) == 0

* change statebytes
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* docs: add link for installing Tendermint

to Go guides

Refs #4286

* remind users to checkout latest release

when installing from github source
Bumps [github.com/pkg/errors](https://github.com/pkg/errors) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/pkg/errors/releases)
- [Commits](pkg/errors@v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* rc for 0.33

* address some pr comments

* some adds to upgrade.md

* undo version
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.6.1...v1.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* rpc: check nil blockmeta

- fixes #4319

- check if block meta is nil

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add changelog entry
* rpc: update urls to rpc website

* rpc: check blockMeta is not nil in Commit

Refs #4319
* Separate ADR Tendermint Mode from ADR-051

* Update docs/architecture/adr-052-tendermint-mode.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Marko <marbar3778@yahoo.com>

* Apply suggestions from code review

Co-Authored-By: Marko <marbar3778@yahoo.com>

* remove line of mode info of rpc

* Add link to ADR table of contents

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>


    Fullnode mode : fullnode mode does not have any capability to participate on consensus
    Validator mode : this mode is exactly same as existing state machine behavior. sync without voting on consensus, and participate consensus when fully synced
    Seed mode : lightweight seed mode only for maintain an address book, p2p like TenderSeed

Separate ADR Tendermint Mode from ADR-051 #4262
* 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
* lite2: advance to latest header

without any exponential steps

rename autoUpdate to autoUpdateRoutine

* lite2: wait in Cleanup until goroutines finished running
melekes and others added 22 commits April 14, 2020 14:58
…d (#4667)

for evidence to be considered expired. otherwise, a cabal group can
  manipulate block time to make a particular evidence too old.

Refs tendermint/tendermint#2565 (comment)
Refs tendermint/tendermint#2653
spec PR: tendermint/spec#87

______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
## Description

Fixes a bug where the reactor would broadcast a base with height=0.

______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [x] Re-reviewed `Files changed` in the Github PR explorer
Bumps [@vuepress/plugin-google-analytics](https://github.com/vuejs/vuepress/tree/HEAD/packages/@vuepress/plugin-google-analytics) from 1.3.1 to 1.4.1.
- [Release notes](https://github.com/vuejs/vuepress/releases)
- [Changelog](https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vuepress/commits/v1.4.1/packages/@vuepress/plugin-google-analytics)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
## Description

The minor release process is changing in order to not have major release changes sitting in the pull request tab.

This changes from taking master and releasing from master to creating a branch that you cherry-pick commits into. 

There are two options on labeling which pull requests to include in a minor release:
1. Use the label `R:minor` to know which pull requests to include then remove the label when those pull requests have been included in a release.
2. Create an Issue where pull request numbers are added. then the issue is closed when the release is done.

this process should be followed after 0.33.3

______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [x] Re-reviewed `Files changed` in the Github PR explorer
## Description

ADR to address the process for proving an amnesia attack (as a form of global evidence) from `PotentialAmnesiaEvidence` detected by light clients


______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
See #4588 for original change.

I believe this is appropriate. Anything else that needs to be updated?

______

For contributor use:

- [ ] ~Wrote tests~
- [x] Updated CHANGELOG_PENDING.md
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] ~Updated relevant documentation (`docs/`) and code comments~
- [x] Re-reviewed `Files changed` in the Github PR explorer
The service logging can be a bit unclear. For example, with state sync it would log:

```
I[2020-04-20|08:40:47.366] Starting StateSync     module=statesync impl=Reactor
I[2020-04-20|08:40:47.834] Starting state sync    module=statesync
```

Where the first message is the reactor service startup, and the second message is the start of the actual state sync process. This clarifies the first message by changing it to `Starting StateSync service`.

______

For contributor use:

- [ ] ~Wrote tests~
- [ ] ~Updated CHANGELOG_PENDING.md~
- [ ] ~Linked to Github issue with discussion and accepted design OR link to spec that describes this work.~
- [ ] ~Updated relevant documentation (`docs/`) and code comments~
- [x] Re-reviewed `Files changed` in the Github PR explorer
Followup from #4588. Allow the first `SaveBlock()` call in an empty block store to be at any height, to start from a truncated block history. Subsequent `SaveBlock()` calls must be for contiguous blocks.

______

For contributor use:

- [x] Wrote tests
- [ ] ~Updated CHANGELOG_PENDING.md~
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Updated relevant documentation (`docs/`) and code comments
- [x] Re-reviewed `Files changed` in the Github PR explorer
## Description

move tests for abci_cli, abci_app and app_tests to github actions


______

For contributor use:

- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
in TestPEXReactorDialsPeerUpToMaxAttemptsInSeedMode

Closes #4668

______

For contributor use:

- [x] Wrote tests
- [ ] ~~Updated CHANGELOG_PENDING.md~~
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] ~~Updated relevant documentation (`docs/`) and code comments~~
- [x] Re-reviewed `Files changed` in the Github PR explorer
Closes: #4695

Verify /block_results and /validators responses from an HTTP client using the light client.

Added count and total to /validators response.

Refs #3113
Prepare release 0.33.4
@slave5vw slave5vw requested a review from a team May 18, 2020 09:26
@slave5vw slave5vw changed the title tendermint-0.33.4 migration (WIP)tendermint-0.33.4 migration May 18, 2020
@slave5vw
Copy link
Contributor Author

Proto check / proto-checks (pull_request) failed. will be request review again after checked.

@slave5vw
Copy link
Contributor Author

slave5vw commented May 19, 2020

proto-check-breaking failed inside Proto check / proto-checks (pull_request).
proto-check-breaking is just compare between master and pr.
but, We haven't based master yet. because this migration pr included many version.

So, I think proto-check-breaking failure is just natural.

@hdac-io/developers plz review again

@slave5vw slave5vw changed the title (WIP)tendermint-0.33.4 migration tendermint-0.33.4 migration May 19, 2020
Copy link

@caramis caramis left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet