Gustavo Chaín
c9966cd6be
p2p: Fix "Unknown Channel" bug on CustomReactors ( #6297 )
4 years ago
mergify[bot]
b00cac9368
rpc: index block events to support block event queries (bp #6226 ) ( #6261 )
4 years ago
mergify[bot]
4e25703d58
rpc/jsonrpc/server: return an error in WriteRPCResponseHTTP(Error) (bp #6204 ) ( #6230 )
* rpc/jsonrpc/server: return an error in WriteRPCResponseHTTP(Error) (#6204 )
instead of panicking
Closes #5529
(cherry picked from commit 00b9524168
)
# Conflicts:
# CHANGELOG_PENDING.md
# rpc/jsonrpc/server/http_json_handler.go
# rpc/jsonrpc/server/http_server.go
# rpc/jsonrpc/server/http_server_test.go
# rpc/jsonrpc/server/http_uri_handler.go
* resolve conflicts
* fix linting
* fix conflict
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
4 years ago
mergify[bot]
52b1d90f56
rpc/jsonrpc: Unmarshal RPCRequest correctly (bp #6191 ) ( #6193 )
* rpc/jsonrpc: Unmarshal RPCRequest correctly (#6191 )
i.e. without double pointer. With double pointer, it was possible to
submit `null` value, which will crash the server.
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x189ddc0]
goroutine 1 [running]:
github.com/tendermint/tendermint/rpc/jsonrpc/types.(*RPCRequest).UnmarshalJSON(0xc0000147e0, 0xc00029f201, 0x4, 0x1ff, 0x883baa0, 0xc0000147e0)
/Users/anton/go/src/github.com/tendermint/tendermint/rpc/jsonrpc/types/types.go:70 +0x100
encoding/json.(*decodeState).literalStore(0xc000216bb0, 0xc00029f201, 0x4, 0x1ff, 0x1998800, 0xc0000147e0, 0x199, 0xc000231700, 0x10e0a5e, 0x197)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:860 +0x30ce
encoding/json.(*decodeState).value(0xc000216bb0, 0x1998800, 0xc0000147e0, 0x199, 0x1998800, 0xc0000147e0)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:384 +0x40c
encoding/json.(*decodeState).array(0xc000216bb0, 0x18df040, 0xc0001be540, 0x16, 0xc000216bd8, 0x10e405b)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:558 +0x365
encoding/json.(*decodeState).value(0xc000216bb0, 0x18df040, 0xc0001be540, 0x16, 0x16, 0x6e)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:360 +0x22f
encoding/json.(*decodeState).unmarshal(0xc000216bb0, 0x18df040, 0xc0001be540, 0xc000216bd8, 0x0)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:180 +0x2c9
encoding/json.Unmarshal(0xc00029f200, 0x6, 0x200, 0x18df040, 0xc0001be540, 0x0, 0x0)
/usr/local/Cellar/go/1.16/libexec/src/encoding/json/decode.go:107 +0x15d
```
(cherry picked from commit fe4e97afe0
)
# Conflicts:
# CHANGELOG_PENDING.md
* fix conflict
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
4 years ago
Tess Rinearson
dea73e08b3
changelog: update for 0.34.8 ( #6181 )
4 years ago
mergify[bot]
28ce355656
libs/log: [JSON format] include timestamp (bp #6174 ) ( #6179 )
Closes #6146
4 years ago
Tess Rinearson
efd9d07257
changelog: fix changelog pending version numbering ( #6149 )
4 years ago
mergify[bot]
8d3c36ccc3
abci: Fix ReCheckTx for Socket Client (bp #6124 ) ( #6125 )
4 years ago
Tess Rinearson
4a0fab041b
changelog: update for v0.34.4 ( #6096 )
4 years ago
Anton Kaliaev
f48b154751
evidence: terminate broadcastEvidenceRoutine when peer is stopped ( #6068 )
4 years ago
Callum Waters
3c22ed8320
light: fix panic with RPC calls to commit and validator when height is nil ( #6040 )
4 years ago
Anton Kaliaev
7f02d8971c
light/provider/http: fix Validators ( #6024 )
Closes #6010
4 years ago
Tess Rinearson
6b2ab0f0e1
changelog: update for 0.34.3 ( #5926 )
4 years ago
Tess Rinearson
23c8a7a93d
changelog: prepare 0.34.2 release ( #5894 )
4 years ago
Callum Waters
cf3a720988
state sync: correctly set last consensus params height ( #5889 )
4 years ago
Callum Waters
ad552b2bb1
evidence: buffer evidence from consensus ( #5890 )
4 years ago
Erik Grinaker
fca7c6449a
libs/os: EnsureDir now returns IO errors and checks file type ( #5852 )
Fixes #5839 .
4 years ago
Tess Rinearson
2924d41f8b
changelog: update changelog for v0.34.1 ( #5872 )
4 years ago
Erik Grinaker
13833cba9e
p2p: fix MConnection inbound traffic statistics and rate limiting ( #5868 ) ( #5870 )
Fixes #5866 . Inbound traffic monitoring (and by extension inbound rate limiting) was inadvertently removed in 660e72a
.
4 years ago
Tess Rinearson
17ce2ccc92
CHANGELOG: prepare 0.34.1-rc1 ( #5832 )
4 years ago
Anton Kaliaev
dc101f2eff
mempool: disable MaxBatchBytes ( #5800 )
@p4u from vocdoni.io reported that the mempool might behave incorrectly under a
high load. The consequences can range from pauses between blocks to the peers
disconnecting from this node.
My current theory is that the flowrate lib we're using to control flow
(multiplex over a single TCP connection) was not designed w/ large blobs
(1MB batch of txs) in mind.
I've tried decreasing the Mempool reactor priority, but that did not
have any visible effect. What actually worked is adding a time.Sleep
into mempool.Reactor#broadcastTxRoutine after an each successful send ==
manual control flow of sort.
As a temporary remedy (until the mempool package
is refactored), the max-batch-bytes was disabled. Transactions will be sent
one by one without batching
Closes #5796
4 years ago
Anton Kaliaev
dc90cf60d5
mempool: introduce KeepInvalidTxsInCache config option ( #5813 )
When set to true, an invalid transaction will be kept in the cache (this may help some applications to protect against spam).
NOTE: this is a temporary config option. The more correct solution would be to add a TTL to each transaction (i.e. CheckTx may return a TTL in ResponseCheckTx).
Closes : #5751
4 years ago
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