go-ethereum/eth
Felix Lange 1b19b21cb2
eth/downloader: separate state sync from queue
Scheduling of state node downloads hogged the downloader queue lock when
new requests were scheduled. This caused timeouts for other requests.
With this change, state sync is fully independent of all other downloads
and doesn't involve the queue at all.

State sync is started and checked on in processContent. This is slightly
awkward because processContent doesn't have a select loop. Instead, the
queue is closed by an auxiliary goroutine when state sync fails. We
tried several alternatives to this but settled on the current approach
because it's the least amount of change overall.

Handling of the pivot block has changed slightly: the queue previously
prevented import of pivot block receipts before the state of the pivot
block was available. In this commit, the receipt will be imported before
the state. This causes an annoyance where the pivot block is committed
as fast block head even when state downloads fail. Stay tuned for more
updates in this area ;)
2017-06-19 13:15:27 +03:00
..
downloader eth/downloader: separate state sync from queue 2017-06-19 13:15:27 +03:00
fetcher consensus, core: drop all the legacy custom core error types 2017-04-06 17:34:19 +03:00
filters core: refactor genesis handling 2017-03-23 15:58:43 +01:00
gasprice all: update license information 2017-04-14 10:29:00 +02:00
api.go eth: update default gas price when not mining too 2017-05-29 10:21:34 +03:00
api_backend.go consensus, core, ethstats: use engine specific block beneficiary (#14318) 2017-04-12 16:38:31 +03:00
api_test.go eth: add debug_storageRangeAt 2017-04-25 02:14:32 +02:00
backend.go eth: remove les server from protocol manager (#14625) 2017-06-15 15:28:57 +02:00
backend_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
bind.go internal/ethapi: add mutex around signing + nonce assignment 2017-05-30 16:43:38 +02:00
config.go cmd, core, eth: configurable txpool parameters 2017-05-29 11:29:46 +03:00
db_upgrade.go Logger updates 3 (#3730) 2017-03-02 14:06:16 +01:00
gen_config.go cmd, core, eth: configurable txpool parameters 2017-05-29 11:29:46 +03:00
handler.go eth: remove les server from protocol manager (#14625) 2017-06-15 15:28:57 +02:00
handler_test.go cmd/geth: add --config file flag (#13875) 2017-04-12 17:27:23 +03:00
helper_test.go cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
metrics.go eth, eth/downloader, eth/fetcher: delete eth/61 code 2016-07-22 13:17:19 +02:00
peer.go cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
protocol.go cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
protocol_test.go cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
sync.go eth: don't import propagated blocks during fastsync 2017-05-26 16:04:12 +03:00
sync_test.go cmd/geth: add --config file flag (#13875) 2017-04-12 17:27:23 +03:00