7920 Commits

Author SHA1 Message Date
Thane Thomson
174783220e docs: Update v0.33.x to prepare for v0.37 (#9248)
* Ignore E2E and fuzz test folders

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync DOCS_README with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs versions with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs redirects with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync vuepress config with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs package-lock.json with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update OpenAPI version to v0.33

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all docs/code on v0.33.x to reflect master to main change

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix linter errors

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Bump golangci-lint to latest version

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all docs.tendermint.com links to point to v0.33

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Reorder versions in nav to have latest on top

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update README links to spec

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add spec as of latest v0.33 release

The latest v0.33 release was
https://github.com/tendermint/tendermint/releases/tag/v0.33.9 on Nov 16,
2020.

The spec was copied across from the old spec repo as of this commit:
32b811a1fb

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Migrate spec links to GitHub repo from docs site

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-08-19 08:32:50 -04:00
Thane Thomson
4700103f86 Sync codeowners with main (#9247) 2022-08-13 13:47:08 -04:00
mergify[bot]
86b89e4ae1 Revert "Remove master from versions and copy it from the latest." (backport #8053) (#8055)
This reverts commit f939f962b1.

A lot of inbound links are still broken, so we will need to find a different
approach to suppressing unreleased docs.

(cherry picked from commit 59eaa4dba0)
2022-03-02 09:01:38 -08:00
mergify[bot]
39c703ce4a docs: point docs/master to the same content as the latest release (backport #7980) (#7999)
* Remove master from versions and copy it from the latest. (#7980)

(cherry picked from commit f939f962b1)
2022-02-24 16:15:45 -08:00
M. J. Fromberger
e690338b75 Restore building docs for master on docs.tendermint.com. (#7969) (#7972)
A manual cherry-pick of 926c469fcc.
2022-02-22 10:43:06 -08:00
M. J. Fromberger
be5baf9b9e docs: fix cosmos theme version. (#7968)
The various package locks got out of sync, reunify them.
2022-02-22 08:37:12 -08:00
Callum Waters
903c389b76 docs: remove spec section from v0.33 docs (#7941) 2022-02-22 07:56:39 -08:00
M. J. Fromberger
544cf26ee9 docs: redirect master links to the latest release version (#7936) (#7959) 2022-02-22 07:21:29 -08:00
M. J. Fromberger
41cb130a2d docs: Pin the RPC docs to v0.35 instead of master (#7909) (#7912) 2022-02-21 08:14:03 -08:00
M. J. Fromberger
9140860462 (backport) Remove master from the docs site version config. (#7874) (#7905)
A manual cherry-pick of 351adf8ddb.
2022-02-21 07:40:16 -08:00
M. J. Fromberger
6f28dd89fd Update absolute links in v0.33.x to reference that branch. (#7887) 2022-02-21 05:06:13 -08:00
M. J. Fromberger
a341fc8c2e Remove ADR docs from the v0.33.x backport branch. (#7879)
Note that there were no RFCs at this point in history.
2022-02-19 17:15:13 +01:00
Callum Waters
84904ecef1 lint: update and appease the linter (#6101)
Closes: #5775
2021-02-16 12:41:36 +04:00
Anton Kaliaev
2e406e0d78 evidence: terminate broadcastEvidenceRoutine when peer is stopped (#6069) 2021-02-15 11:11:55 +04:00
Erik Grinaker
99b337c5d8 test: don't use foo-bar.net in TestHTTPClientMakeHTTPDialer (#5997)
This test relied on connecting to the external site `foo-bar.net`, and (predictably) the site went down and broke all of our CI runs. This changes it to use local HTTP servers instead.
2021-02-11 22:50:02 +01:00
Marko
42db397a9f docs: recreate package-lock.json (#5951)
Co-authored-by: Cyrus Goh <hello@lovincyrus.com>
2021-01-22 20:03:44 +00:00
Marko
f32207db15 docs: bump vuepress theme (#5946)
Co-authored-by: Cyrus Goh <hello@lovincyrus.com>
2021-01-22 19:06:16 +00:00
Anton Kaliaev
07113abd9e proxy: improve ABCI app connection handling (#5078)
Closes #5074

Old code does not work when --consensus.create_empty_blocks=false
(because it only calls tmos.Kill when ApplyBlock fails). New code is
listening ABCI clients for Quit and kills TM process if there were any
errors.
2020-12-23 18:44:59 +04:00
Anton Kaliaev
0aaaa34038 evidence: omit bytes field (#5745)
Follow-up to https://github.com/tendermint/tendermint/pull/5743
2020-12-10 23:21:54 +01:00
Tess Rinearson
ed6fd81fbf reactors: omit incoming message bytes from reactor logs (#5743)
After a reactor has failed to parse an incoming message, it shouldn't output the "bad" data into the logs, as that data is unfiltered and could have anything in it. (We also don't think this information is helpful to have in the logs anyways.)
2020-12-10 23:21:54 +01:00
Anton Kaliaev
4cc4a882f6 blockchain/v1: fix deadlock (#5711)
I introduced a new variable - syncEnded, which is now used to prevent
sending new events to channels (which would block otherwise) if reactor
is finished syncing

Closes #4591
2020-12-10 16:49:48 +04:00
Anton Kaliaev
b0d431cc08 blockchain/v1: handle peers without blocks (#5701)
Closes #5444

Now we record the fact that a peer does not have a requested block and later use this information to make a new request for the same block from another peer.
2020-12-10 16:49:48 +04:00
Marko
26f3211a8a blockchain/v1: add noBlockResponse handling (#5401)
Add simple `NoBlockResponse` handling to blockchain reactor v1. I tested before and after with erik's e2e testing and was not able to reproduce the inability to sync after the changes were applied

Closes: #5394
2020-12-10 16:49:48 +04:00
Marko
059d43f626 backport ci migration (#5759) 2020-12-09 16:00:29 +01:00
Anton Kaliaev
1baf670c60 use fmt.Sprint for string to int conversion v0.33.9 2020-11-16 16:49:41 +04:00
Anton Kaliaev
b59ecd68ab bump version and update changelog 2020-11-16 16:49:41 +04:00
Anton Kaliaev
24193dd817 privval: increase read/write timeout to 5s and calculate ping interval based on it (#5638)
Partially closes #5550
2020-11-16 16:49:41 +04:00
Anton Kaliaev
b1de0c24f6 consensus: only call privValidator.GetPubKey once per block (#5143)
Closes #4865
2020-11-16 16:49:41 +04:00
Joe Bowman
6e375c2923 only retrieve pubkey once for all validators (partially fixes #4865) (#4895)
in consensus/state.go, when calulating metrics, retrieve address (ergo, pubkey) once prior to iterating over validatorset to ensure we do not make excessive calls to signer.

Partially closes: #4865
2020-11-16 16:49:41 +04:00
Marko
1a8e42d41e changelog: rc0/33.8 (#5222) v0.33.8 2020-08-11 13:35:25 +02:00
Erik Grinaker
1b1fe4d7cc prepare 0.33.7 release (#5202) v0.33.7 2020-08-04 13:21:05 +02:00
Anton Kaliaev
8026fd3cc9 privval: if remote signer errors, don't retry (#5140)
Closes #5112
2020-08-04 13:21:05 +02:00
Tess Rinearson
606d0a89cc changelog: tweak 0.33.6 entry v0.33.6 2020-07-02 15:41:49 +02:00
Anton Kaliaev
cefeab0fbb update changelog and bump version 2020-07-02 15:41:49 +02:00
Anton Kaliaev
8ccfdb96d0 consensus: Do not allow signatures for a wrong block in commits
Closes #4926

The dump consensus state had this:

      "last_commit": {
        "votes": [
          "Vote{0:04CBBF43CA3E 385085/00/2(Precommit) 1B73DA9FC4C8 42C97B86D89D @ 2020-05-27T06:46:51.042392895Z}",
          "Vote{1:055799E028FA 385085/00/2(Precommit) 652B08AD61EA 0D507D7FA3AB @ 2020-06-28T04:57:29.20793209Z}",
          "Vote{2:056024CFA910 385085/00/2(Precommit) 652B08AD61EA C8E95532A4C3 @ 2020-06-28T04:57:29.452696998Z}",
          "Vote{3:0741C95814DA 385085/00/2(Precommit) 652B08AD61EA 36D567615F7C @ 2020-06-28T04:57:29.279788593Z}",

Note there's a precommit in there from the first val from May (2020-05-27) while the rest are from today (2020-06-28). It suggests there's a validator from an old instance of the network at this height (they're using the same chain-id!). Obviously a single bad validator shouldn't be an issue. But the Commit refactor work introduced a bug.

When we propose a block, we get the block.LastCommit by calling MakeCommit on the set of precommits we saw for the last height. This set may include precommits for a different block, and hence the block.LastCommit we propose may include precommits that aren't actually for the last block (but of course +2/3 will be). Before v0.33, we just skipped over these precommits during verification. But in v0.33, we expect all signatures for a blockID to be for the same block ID! Thus we end up proposing a block that we can't verify.
2020-07-02 15:41:49 +02:00
Anton Kaliaev
5e52a6ec55 types: verify commit fully
Since the light client work introduced in v0.33 it appears full nodes
are no longer fully verifying commit signatures during block execution -
they stop after +2/3. See in VerifyCommit:
0c7fd316eb/types/validator_set.go (L700-L703)

This means proposers can propose blocks that contain valid +2/3
signatures and then the rest of the signatures can be whatever they
want. They can claim that all the other validators signed just by
including a CommitSig with arbitrary signature data. While this doesn't
seem to impact safety of Tendermint per se, it means that Commits may
contain a lot of invalid data. This is already true of blocks, since
they can include invalid txs filled with garbage, but in that case the
application knows they they are invalid and can punish the proposer. But
since applications dont verify commit signatures directly (they trust
tendermint to do that), they won't be able to detect it.

This can impact incentivization logic in the application that depends on
the LastCommitInfo sent in BeginBlock, which includes which validators
signed. For instance, Gaia incentivizes proposers with a bonus for
including more than +2/3 of the signatures. But a proposer can now claim
that bonus just by including arbitrary data for the final -1/3 of
validators without actually waiting for their signatures. There may be
other tricks that can be played because of this.

In general, the full node should be a fully verifying machine. While
it's true that the light client can avoid verifying all signatures by
stopping after +2/3, the full node can not. Thus the light client and
full node should use distinct VerifyCommit functions if one is going to
stop after +2/3 or otherwise perform less validation (for instance light
clients can also skip verifying votes for nil while full nodes can not).

See a commit with a bad signature that verifies here: 56367fd. From what
I can tell, Tendermint will go on to think this commit is valid and
forward this data to the app, so the app will think the second validator
actually signed when it clearly did not.
2020-07-02 15:41:49 +02:00
Tess Rinearson
e22acc0f45 prepare v0.33.5 RC2 v0.33.5 2020-05-28 12:41:32 +02:00
Marko
d9c2f01bb5 proto: add proto files for ibc unblock (#4853) (#4906)
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.
2020-05-28 12:41:32 +02:00
Callum Waters
64c7771966 lite2: fix pivot height during bisection
fix bug with assigning the new pivot height during bisection. PR: #4850
2020-05-28 12:41:32 +02:00
Anton Kaliaev
e40602502f p2p: return masked IP (not the actual IP) in addrbook#groupKey
Closes #4846 
Spec https://github.com/tendermint/spec/pull/96
2020-05-28 12:41:32 +02:00
Anton Kaliaev
69b6e0eccb rpc/core: do not lock ConsensusState mutex
in /validators, /consensus_params and /status

Closes #3161
2020-05-28 12:41:32 +02:00
Anton Kaliaev
e8b4226b17 rpc: refactor lib folder (#4836)
Closes https://github.com/tendermint/tendermint/issues/3857

Moves `lib/` folder to `jsonrpc/`.

Renames:

**packages**

`rpc` package -> `jsonrpc` package
`rpcclient` package -> `client` package
`rpcserver` package -> `server` package

**structs and interfaces**

```
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
```

**functions**

```
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS

rpc/jsonrpc/client: rename NewURIClient to NewURI

NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
```

**misc**

- unexpose `ResponseWriterWrapper`
- remove unused http_params.go
2020-05-28 12:41:32 +02:00
Anton Kaliaev
7772cdc4a4 rpc: use a struct to wrap all the global objects
Closes #3433
2020-05-28 12:41:32 +02:00
Anton Kaliaev
cba24382ac privval: retry GetPubKey/SignVote/SignProposal N times before
returning an error

Closes #4707
2020-05-28 12:41:32 +02:00
Anton Kaliaev
e4e4bf6d6d pex: use highwayhash for pex bucket
Closes #2998

Spec PR: https://github.com/tendermint/spec/pull/94
2020-05-28 12:41:32 +02:00
Anton Kaliaev
62018d90df mempool: allow ReapX and CheckTx functions to run in parallel
allow ReapX and CheckTx functions to run in parallel, making it not possible to block certain proposers from creating a new block.

Closes: #2972
2020-05-28 12:41:32 +02:00
Erik Grinaker
29035985c6 rpc: handle panics during panic handling (#4888)
Fixes #4802. The Go HTTP server has a global panic handler for requests, so it was not as severe as first thought.

This fix can still panic, since we try to send a `500` response - if that happens, the Go HTTP server will terminate the connection. Otherwise, the client will get a 200 response, which we should avoid. I'm sort of torn on whether it's even necessary to include this fix, instead of just letting the HTTP server deal with it.
2020-05-28 12:41:32 +02:00
Anton Kaliaev
e1b3903a7f types: return an error if voting power overflows
in VerifyCommitTrusting

Closes #4755
2020-05-28 12:41:32 +02:00
Erik Grinaker
901ce19cc6 blockchain/v2: backport fixes (#4887)
* blockchain/v2: fix excessive CPU usage due to spinning on closed channels (#4761)

The event loop uses a `select` on multiple channels. However, reading from a closed channel in Go always yields the channel's zero value. The processor and scheduler close their channels when done, and since these channels are always ready to receive, the event loop keeps spinning on them.

This changes `routine.terminate()` to not close the channel, and also removes `stopDemux` and instead uses `events` channel closure to signal event loop termination.

Fixes #4687.

* blockchain/v2: respect fast_sync option (#4772)

Not thoroughly tested, but seems to work. Will do further testing as this is integrated with state sync.

Fixes #4688.
2020-05-28 12:41:32 +02:00
Anton Kaliaev
e080280d34 privval: remove deprecated OldFilePV (#4889)
* privval: remove deprecated `OldFilePV`

The old format was deprecated in v0.28. It's time we remove it.

* fix changelog
2020-05-28 12:41:32 +02:00