Erik Grinaker
4988877f19
crypto: fix infinite recursion in Secp256k1 string formatting ( #5707 )
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
Anton Kaliaev
3ad1157451
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.
4 years ago
Tess Rinearson
6bee97160f
changelog: squash changelog from 0.34 RCs into one ( #5691 )
"Squashes" the changelog from RCs 2-6 into one changelog message for 0.34.0, and adds the changelog pending.
4 years ago
Erik Grinaker
e3728e7709
p2p: remove unused MakePoWTarget() ( #5684 )
4 years ago
Callum Waters
909da42789
light: make fraction parts uint64, ensuring that it is always positive ( #5655 )
4 years ago
Aleksandr Bezobchuk
8aa47c7da5
rpc: fix content-type header ( #5661 )
4 years ago
Alessio Treglia
8bd3d5105f
libs/os: remove unused aliases, add test cases ( #5654 )
Remove unused ReadFile (unused) and
WriteFile (almost unused, alias of ioutil.WriteFile).
Add testcases for Must{Read,Write}File.
4 years ago
Anton Kaliaev
fa522ca323
privval: increase read/write timeout to 5s and calculate ping interval based on it ( #5638 )
Partially closes #5550
4 years ago
Marko
e7d7ad85d5
crypto: adopt zip215 ed25519 verification ( #5632 )
4 years ago
Marko
bf35cc6443
cmd: add support for --key ( #5612 )
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
4 years ago
Tess Rinearson
a65c23a526
CHANGELOG: update to reflect v0.34.0-rc6 ( #5622 )
Note that this also deletes everything from CHANGELOG_PENDING that was included in RC6.
4 years ago
Callum Waters
3922dde05d
evidence: structs can independently form abci evidence ( #5610 )
4 years ago
Erik Grinaker
886235311f
p2p: remove p2p.FuzzedConnection and its config settings ( #5598 )
Removes `p2p.FuzzedConnection`, since it does not appear to be in use. While these sorts of test wrappers may be useful, they should be injected directly instead of bleeding through into the main application configuration. We'll implement something similar if and when necessary, for the new P2P abstractions in #2067 .
4 years ago
Anton Kaliaev
bcf9b0aa39
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
651d8f087b
evidence: don't send committed evidence and ignore inbound evidence that is already committed ( #5574 )
4 years ago
Erik Grinaker
17383be202
consensus: open target WAL as read/write during autorepair ( #5536 )
Fixes #5422 . That turned out to be a whole lot easier than expected.
4 years ago
Anton Kaliaev
b4adeab8b9
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
d785036e0b
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
047267bbc8
abci/grpc: return async responses in order ( #5520 )
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
Marko
a5d3e19b4a
types: rename json parts to part_set_header ( #5523 )
4 years ago
Erik Grinaker
e7184c499d
statesync: check all necessary heights when adding snapshot to pool ( #5516 )
Fixes #5511 .
4 years ago
Marko
1a74e01d18
update changelog for rc5 ( #5501 )
## Description
update changelog with updates in rc5
Closes: #XXX
4 years ago
Marko
82e4693cc5
abci: remove setOption ( #5447 )
Remove Response/Request SetOption from ABCI.
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
4 years ago
Callum Waters
302aec6dcc
evidence: use bytes instead of quantity to limit size ( #5449 )
## Description
Closes : #5432
4 years ago
Erik Grinaker
08708046a7
privval: fix ping message encoding ( #5441 )
Fixes #5371 .
4 years ago
Erik Grinaker
2a0fa665fd
config: set statesync.rpc_servers when generating config file ( #5433 )
Required for #5291 , to generate configuration files with state sync RPC servers.
4 years ago
Erik Grinaker
b0130b4661
privval: allow passing options to NewSignerDialerEndpoint ( #5434 )
Required for #5291 to set timeouts for remote signers.
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