erigon-pulse/eth
Martin Holst Swende 0d23ff42aa eth/downloader: fix peer idleness tracking when restarting state sync (#21260)
This fixes two issues with state sync restarts:

When sync restarts with a new root, some peers can have in-flight requests.
Since all peers with active requests were marked idle when exiting sync,
the new sync would schedule more requests for those peers. When the
response for the earlier request arrived, the new sync would reject it and
mark the peer idle again, rendering the peer useless until it disconnected.

The other issue was that peers would not be marked idle when they had
delivered a response, but the response hadn't been processed before
restarting the state sync. This also made the peer useless because it
would be permanently marked busy.

Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	eth/downloader/downloader.go
#	eth/downloader/statesync.go
2020-08-07 12:52:02 +02:00
..
downloader eth/downloader: fix peer idleness tracking when restarting state sync (#21260) 2020-08-07 12:52:02 +02:00
fetcher remove eth/63, add tests for eth/65 (#823) 2020-07-30 11:16:55 +01:00
filters remove BoltDatabase, BadgerDatabase, RemoteDatabase classes (replaced by objectDb) (#794) 2020-07-27 22:59:54 +01:00
gasprice eth/gasprice: lighter gas price oracle for light client (#20409) 2020-08-07 12:29:19 +02:00
stagedsync Fix some snags in stage 6 2020-08-05 11:31:41 +01:00
tracers Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
api_backend.go rpc, internal/ethapi: default rpc gascap at 25M + better error message (#21229) 2020-08-07 12:27:17 +02:00
api_test.go Account range (#781) 2020-07-27 07:09:50 +01:00
api_tracer.go eth: returned revert reason in traceTx (#21195) 2020-08-07 11:23:14 +02:00
api.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
backend.go Migrations: use stage name as db key (#868) 2020-08-05 17:13:35 +07:00
bloombits.go geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
config.go eth/gasprice: lighter gas price oracle for light client (#20409) 2020-08-07 12:29:19 +02:00
debug.go Call bufio.Flash() in tester (#407) 2020-03-26 21:52:05 +00:00
discovery.go Make cmd/tester initiate staged sync, remove some pools and caches (#746) 2020-07-15 07:15:48 +01:00
firehose.go Parity only supports 3 letter capabilities 2020-01-07 16:34:44 +00:00
gen_config.go rpc, internal/ethapi: default rpc gascap at 25M + better error message (#21229) 2020-08-07 12:27:17 +02:00
handler_test.go eth: increase timeout in TestBroadcastBlock (#21299) 2020-08-07 12:49:19 +02:00
handler.go eth: don't block if transaction broadcast loop fails (#21255) 2020-08-07 11:22:09 +02:00
helper_test.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
peer.go eth: don't block if transaction broadcast loop fails (#21255) 2020-08-07 11:22:09 +02:00
protocol_test.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
protocol.go remove eth/63, add tests for eth/65 (#823) 2020-07-30 11:16:55 +01:00
sync_test.go remove eth/63, add tests for eth/65 (#823) 2020-07-30 11:16:55 +01:00
sync.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00