Callum Waters
9f0d71e81f
cmd: hyphen-case cli v0.34.1 ( #5786 )
4 years ago
Erik Grinaker
15b70373cc
crypto: fix infinite recursion in Secp256k1 string formatting ( #5707 ) ( #5709 )
This caused stack overflow panics in E2E tests, e.g.:
```
2020-11-24T02:37:17.6085640Z [35mvalidator04 |[0m runtime: goroutine stack exceeds 1000000000-byte limit
2020-11-24T02:37:17.6087818Z [35mvalidator04 |[0m runtime: sp=0xc0234b23c0 stack=[0xc0234b2000, 0xc0434b2000]
2020-11-24T02:37:17.6088920Z [35mvalidator04 |[0m fatal error: stack overflow
2020-11-24T02:37:17.6089776Z [35mvalidator04 |[0m
2020-11-24T02:37:17.6090569Z [35mvalidator04 |[0m runtime stack:
2020-11-24T02:37:17.6091677Z [35mvalidator04 |[0m runtime.throw(0x12dc476, 0xe)
2020-11-24T02:37:17.6093123Z [35mvalidator04 |[0m /usr/local/go/src/runtime/panic.go:1116 +0x72
2020-11-24T02:37:17.6094320Z [35mvalidator04 |[0m runtime.newstack()
2020-11-24T02:37:17.6095374Z [35mvalidator04 |[0m /usr/local/go/src/runtime/stack.go:1067 +0x78d
2020-11-24T02:37:17.6096381Z [35mvalidator04 |[0m runtime.morestack()
2020-11-24T02:37:17.6097657Z [35mvalidator04 |[0m /usr/local/go/src/runtime/asm_amd64.s:449 +0x8f
2020-11-24T02:37:17.6098505Z [35mvalidator04 |[0m
2020-11-24T02:37:17.6099328Z [35mvalidator04 |[0m goroutine 88 [running]:
2020-11-24T02:37:17.6100470Z [35mvalidator04 |[0m runtime.heapBitsSetType(0xc009565380, 0x20, 0x18, 0x1137e00)
2020-11-24T02:37:17.6101961Z [35mvalidator04 |[0m /usr/local/go/src/runtime/mbitmap.go:911 +0xaa5 fp=0xc0234b23d0 sp=0xc0234b23c8 pc=0x432625
2020-11-24T02:37:17.6103906Z [35mvalidator04 |[0m runtime.mallocgc(0x20, 0x1137e00, 0x117b601, 0x11e9240)
2020-11-24T02:37:17.6105179Z [35mvalidator04 |[0m /usr/local/go/src/runtime/malloc.go:1090 +0x5a5 fp=0xc0234b2470 sp=0xc0234b23d0 pc=0x428b25
2020-11-24T02:37:17.6106540Z [35mvalidator04 |[0m runtime.convTslice(0xc002743710, 0x21, 0x21, 0xc0234b24e8)
2020-11-24T02:37:17.6107861Z [35mvalidator04 |[0m /usr/local/go/src/runtime/iface.go:385 +0x59 fp=0xc0234b24a0 sp=0xc0234b2470 pc=0x426379
2020-11-24T02:37:17.6109315Z [35mvalidator04 |[0m github.com/tendermint/tendermint/crypto/secp256k1.PubKey.String(...)
2020-11-24T02:37:17.6151692Z [35mvalidator04 |[0m /src/tendermint/crypto/secp256k1/secp256k1.go:161
2020-11-24T02:37:17.6153872Z [35mvalidator04 |[0m github.com/tendermint/tendermint/crypto/secp256k1.(*PubKey).String(0xc009565360, 0x11e9240, 0xc009565360)
2020-11-24T02:37:17.6157421Z [35mvalidator04 |[0m <autogenerated>:1 +0x65 fp=0xc0234b24f8 sp=0xc0234b24a0 pc=0x656965
2020-11-24T02:37:17.6159134Z [35mvalidator04 |[0m fmt.(*pp).handleMethods(0xc00956c680, 0x58, 0xc0234b2801)
2020-11-24T02:37:17.6161462Z [35mvalidator04 |[0m /usr/local/go/src/fmt/print.go:630 +0x30a fp=0xc0234b2768 sp=0xc0234b24f8 pc=0x518b8a
[...]
2020-11-24T02:37:17.6649685Z [35mvalidator04 |[0m /usr/local/go/src/fmt/print.go:630 +0x30a fp=0xc0234b7f48 sp=0xc0234b7cd8 pc=0x518b8a
2020-11-24T02:37:17.6651177Z [35mvalidator04 |[0m created by github.com/tendermint/tendermint/node.startStateSync
2020-11-24T02:37:17.6652521Z [35mvalidator04 |[0m /src/tendermint/node/node.go:587 +0x150
```
4 years ago
Tess Rinearson
fe94825985
changelog: squash changelog from 0.34 RCs into one ( #5687 )
"Squashes" the changelog from RCs 2-6 into one changelog message for 0.34.0, and adds the changelog pending.
4 years ago
Callum Waters
4ed0fddc37
light: make fraction parts uint64, ensuring that it is always positive ( #5655 )
4 years ago
Aleksandr Bezobchuk
53463b3fef
rpc: fix content-type header
4 years ago
Anton Kaliaev
9567477d55
privval: increase read/write timeout to 5s and calculate ping interva… ( #5666 )
…l based on it (#5638 )
Partially closes #5550
4 years ago
Anton Kaliaev
25fafb30b5
blockchain/v2: make the removal of an already removed peer a noop ( #5553 )
also, since multiple StopPeerForError calls may be executed in parallel,
only execute StopPeerForError once
Closes #5541
4 years ago
Callum Waters
9d354c842e
evidence: structs can independently form abci evidence ( #5610 )
4 years ago
Marko
ad4f54e9b2
privval: make response values non nullable ( #5583 )
make response values non nullable in privval
Does this need a changelog for master?
Closes : #5581
cc @tarcieri
4 years ago
Callum Waters
5cfe035362
evidence: don't send committed evidence and ignore inbound evidence that is already committed ( #5574 )
4 years ago
Callum Waters
c4f1b2d7db
block: fix max commit sig size ( #5567 )
4 years ago
Erik Grinaker
7c17fa115a
consensus: open target WAL as read/write during autorepair ( #5536 ) ( #5547 )
Fixes #5422 . That turned out to be a whole lot easier than expected.
Backport of #5536 .
4 years ago
Anton Kaliaev
020edbc11d
blockchain/v2: fix panic: processed height X+1 but expected height X ( #5530 )
Before: scheduler receives psBlockProcessed event, but does not mark block as processed because peer timed out (or was removed for other reasons) and all associated blocks were rescheduled.
After: scheduler receives psBlockProcessed event and marks block as processed in any case (even if peer who provided this block errors).
Closes #5387
4 years ago
Anton Kaliaev
79d535dd67
blockchain/v2: fix "panic: duplicate block enqueued by processor" ( #5499 )
When a peer is stopped due to some network issue, the Reactor calls scheduler#handleRemovePeer, which removes the peer from the scheduler. BUT the peer stays in the processor, which sometimes could lead to "duplicate block enqueued by processor" panic WHEN the same block is requested by the scheduler again from a different peer. The solution is to return scPeerError, which will be propagated to the processor. The processor will clean up the blocks associated with the peer in purgePeer.
Closes #5513 , #5517
4 years ago
Erik Grinaker
29ca7de63c
abci/grpc: return async responses in order ( #5520 ) ( #5531 )
Fixes #5439 . This is really a workaround for #5519 (unless we require async implementations to return ordered responses, but that kind of defeats the purpose of having an async API).
4 years ago
Erik Grinaker
b3238cdcd9
statesync: check all necessary heights when adding snapshot to pool ( #5516 ) ( #5518 )
Fixes #5511 .
4 years ago
Callum Waters
7d5d417dc9
evidence: use bytes instead of quantity to limit size ( #5449 )( #5476 )
4 years ago
Marko
dac18d73a7
fix RPC blockresults return ( #5459 ) ( #5463 )
4 years ago
Erik Grinaker
e74176ad1a
privval: fix ping message encoding ( #5442 )
Fixes #5371 .
4 years ago
Erik Grinaker
6149f21cd6
privval: allow passing options to NewSignerDialerEndpoint ( #5434 ) ( #5437 )
Required for #5291 to set timeouts for remote signers.
4 years ago
Erik Grinaker
1a2cc933a0
config: set statesync.rpc_servers when generating config file ( #5433 ) ( #5438 )
Required for #5291 , to generate configuration files with state sync RPC servers.
4 years ago
Tess Rinearson
c50c33e4e9
CHANGELOG: update for 0.34.0-rc4 ( #5400 )
4 years ago
Erik Grinaker
f83ecdad1d
config: add state sync discovery_time setting ( #5399 )
Reduces the state sync discovery time from 20 to 15 seconds, and makes it configurable.
4 years ago
Erik Grinaker
ebfe0cbb8c
abci: fix socket client error for state sync responses ( #5395 )
This caused the node to crash whenever any state sync-related request was called via the ABCI UNIX socket client.
4 years ago
Erik Grinaker
a2bbc2984b
changelog: minor tweaks ( #5389 )
Clean up some inconsistent formatting and missing PR numbers.
4 years ago
Anton Kaliaev
ffe2742a6c
mempool: batch txs per peer in broadcastTxRoutine ( #5321 )
Closes #625
4 years ago
Erik Grinaker
58b4deca86
blockstore: fix race conditions when loading data ( #5382 )
Fixes #5377 and comments in #4588 (review).
4 years ago
Erik Grinaker
3502901dd8
docker: fix incorrect time_iota_ms configuration ( #5385 )
4 years ago
Anton Kaliaev
85a4be87a7
rpc/client: take context as first param ( #5347 )
Closes #5145
also applies to light/client
4 years ago
Callum Waters
ed002cea7e
evidence: introduction of LightClientAttackEvidence and refactor of evidence lifecycle ( #5361 )
evidence: modify evidence types (#5342 )
light: detect light client attacks (#5344 )
evidence: refactor evidence pool (#5345 )
abci: application evidence prepared by evidence pool (#5354 )
4 years ago
Marko
56911ee352
state: define interface for state store ( #5348 )
## Description
Make an interface for the state store.
Closes : #5213
4 years ago
Marko
6ab2a19088
header: check block protocol ( #5340 )
## Description
Check block protocol version in header validate basic.
I tried searching for where we check the P2P protocol version but was unable to find it. When we check compatibility with a node we check we both have the same block protocol and are on the same network, but we do not check if we are on the same P2P protocol. It makes sense if there is a handshake change because we would not be able to establish a secure connection, but a p2p protocol version bump may be because of a p2p message change, which would go unnoticed until that message is sent over the wire. Is this purposeful?
Closes : #4790
4 years ago
Erik Grinaker
39d2ac4dbc
statesync: fix the validator set heights (again) ( #5330 )
This reverts the "fix" in #5311 , after the real fix in #5328 .
4 years ago
Erik Grinaker
63ea4f1d26
consensus: fix wrong proposer schedule for `InitChain` validators ( #5329 )
Fixes #5328 .
4 years ago
Callum Waters
c752e2e586
abci: update evidence ( #5324 )
4 years ago
Marko
710a97d850
evidence: remove amnesia & POLC ( #5319 )
## Description
remove unneeded types
![](https://media1.giphy.com/media/fSAyceY3BCgtiQGnJs/giphy.gif )
ref #5288
4 years ago
Erik Grinaker
2f4c1f60c7
statesync: broadcast snapshot request to all peers on startup ( #5320 )
On startup, the peer-to-peer stack may have peers connected before the state sync process begins, causing these to not trigger `AddPeer` events and thus not be used for snapshot discovery. Broadcasting a snapshot request to these explicitly makes sure we discover snapshots from existing peers as well.
4 years ago
Marko
82011ee7ab
evidence: remove lunatic ( #5318 )
## Description
remove lunaticEvidence
4 years ago
Marko
e0140e4beb
evidence: remove ConflictingHeaders type ( #5317 )
## Description
Remove ConflictingHeaders & compositeEvidence types
Ref #5288
4 years ago
Callum Waters
2b58a62721
light: implement light block ( #5298 )
4 years ago
Marko
b6a5f7b126
rpc: add private & unconditional to /dial_peer ( #5293 )
## Description
Allow dialing of private and unconditional peers through the RPC
Closes : #1705
4 years ago
Anton Kaliaev
43c3e4265b
config: rename prof_laddr to pprof_laddr and move it to rpc ( #5315 )
* config: rename prof_laddr to pprof_laddr and move it to rpc
also, remove `/unsafe_start_cpu_profiler`, `/unsafe_stop_cpu_profiler`
and `/unsafe_write_heap_profile` in favor of pprof server functionality.
Closes #5303
* update changelog
* log start
4 years ago
Erik Grinaker
686361ff3e
statesync: fix valset off-by-one causing consensus failures ( #5311 )
4 years ago
Callum Waters
86707862d4
fix validator set proposer priorities in light client provider ( #5307 )
4 years ago
Erik Grinaker
49efd44faa
node: fix genesis state propagation to state sync ( #5302 )
State sync broke in #5231 since the genesis state is not propagated explicitly from `NewNode()` to `Node.OnStart()` and further into the state sync initialization. This is a hack until we can clean up the node startup process.
4 years ago
dongsam
e30b125725
consensus: double-sign risk reduction (ADR-51) ( #5147 )
Implementation spec of Double Signing Risk Reduction [ADR-51](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-051-double-signing-risk-reduction.md ) by B-Harvest
- Add `DoubleSignCheckHeight` config variable to ConsensusConfig for "How many blocks looks back to check existence of the node's consensus votes when before joining consensus"
- Add `consensus.double_sign_check_height` to `config.toml` and `tendermint node` as flag for set `DoubleSignCheckHeight`
- Set default `consensus.double_sign_check_height` to `0` ( it could be adjustable in this PR, disable when 0 )
Refs
- [ADR-51](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-051-double-signing-risk-reduction.md )
- [https://github.com/tendermint/tendermint/issues/4059 ](https://github.com/tendermint/tendermint/issues/4059 )
- [https://github.com/tendermint/tendermint/pull/4262 ](https://github.com/tendermint/tendermint/pull/4262 )
4 years ago
Marko
135ac0400e
blockchain: verify +2/3 ( #5278 )
## Description
Verify only +2/3 of the commit.
Closes : #5259
4 years ago
Marko
1b961d021f
crypto: remove secp256k1 ( #5280 )
## Description
Remove secp256k1 as discussed in the tendermint dev call. The implementation has been moved to the [Cosmos-SDK](443e0c1f89/crypto/keys/secp256k1)
Closes: #XXX
4 years ago
Marko
42e4e8b58e
lint: add markdown linter ( #5254 )
4 years ago
Marko
8cdaa7f515
privval: add chainID to requests ( #5239 )
## Description
Add chainid to requests to privval. This is a non-breaking change and hardware devices can opt to ignore the field.
Closes : #4503
Took the approach of passing chainID to the client instead of modifying `GetPubKey` because it would lead to a larger change throughout the codebase and in some places it could get tricky to get chainID.
4 years ago