go-ethereum/eth
Felix Lange d6c5f2417c
eth: improve shutdown synchronization (#20695)
* eth: improve shutdown synchronization

Most goroutines started by eth.Ethereum didn't have any shutdown sync at
all, which lead to weird error messages when quitting the client.

This change improves the clean shutdown path by stopping all internal
components in dependency order and waiting for them to actually be
stopped before shutdown is considered done. In particular, we now stop
everything related to peers before stopping 'resident' parts such as
core.BlockChain.

* eth: rewrite sync controller

* eth: remove sync start debug message

* eth: notify chainSyncer about new peers after handshake

* eth: move downloader.Cancel call into chainSyncer

* eth: make post-sync block broadcast synchronous

* eth: add comments

* core: change blockchain stop message

* eth: change closeBloomHandler channel type
2020-03-27 15:03:20 +02:00
..
downloader eth/downloader: fix possible data race by inconsistent field protection (#20690) 2020-02-25 11:44:21 +02:00
fetcher eth/fetcher: remove randomness from test data 2020-02-24 14:59:02 +02:00
filters eth/filters: remove use of event.TypeMux for pending logs (#20312) 2019-12-10 12:39:14 +01:00
gasprice cmd, core, eth, miner, params: configurable gas floor and ceil 2018-08-29 12:40:12 +03:00
tracers core/state/snapshot, tests: sync snap gen + snaps in consensus tests 2020-03-03 09:17:13 +02:00
api.go eth, internal/web3ext: add optional first and last arguments to the `admin_exportChain` RPC. (#20107) 2019-12-17 12:10:14 +01:00
api_backend.go internal/ethapi: don't set sender-balance to maxuint, fixes #16999 (#20783) 2020-03-23 18:21:23 +01:00
api_test.go core: initial version of state snapshots 2020-02-25 12:51:04 +02:00
api_tracer.go core: initial version of state snapshots 2020-02-25 12:51:04 +02:00
backend.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
bloombits.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
config.go core/rawdb, core/state/snapshot: runtime snapshot generation 2020-02-25 12:51:08 +02:00
discovery.go cmd/geth: enable DNS discovery by default (#20660) 2020-02-13 15:38:30 +02:00
gen_config.go cmd/geth: enable DNS discovery by default (#20660) 2020-02-13 15:38:30 +02:00
handler.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
handler_test.go Merge pull request #20152 from karalabe/snapshot-5 2020-03-23 12:57:31 +02:00
helper_test.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
peer.go eth: fix transaction announce/broadcast goroutine leak 2020-03-13 23:47:15 +02:00
protocol.go eth: rework tx fetcher to use O(1) ops + manage network requests 2020-02-13 15:27:15 +02:00
protocol_test.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
sync.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
sync_test.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00