go-ethereum/core
Felix Lange 60c062e17d core: move TxPool reorg and events to background goroutine (#19705)
* core: move TxPool reorg and events to background goroutine

This change moves internal queue re-shuffling work in TxPool to a
background goroutine, TxPool.runReorg. Requests to execute runReorg are
accumulated by the new scheduleReorgLoop. The new loop also accumulates
transaction events.

The motivation for this change is making sends to txFeed synchronous
instead of sending them in one-off goroutines launched by 'add' and
'promoteExecutables'. If a downstream consumer of txFeed is blocked for
a while, reorg requests and events will queue up.

* core: remove homestead check in TxPool

This change removes tracking of the homestead block number from TxPool.
The homestead field was used to enforce minimum gas of 53000 for
contract creations after the homestead fork, but not before it. Since
nobody would want configure a non-homestead chain nowadays and contract
creations usually take more than 53000 gas, the extra correctness is
redundant and can be removed.

* core: fixes for review comments

* core: remove BenchmarkPoolInsert

This is useless now because there is no separate code path for
individual transactions anymore.

* core: fix pending counter metric

* core: fix pool tests

* core: dedup txpool announced events, discard stales

* core: reorg tx promotion/demotion to avoid weird pending gaps
2019-06-21 11:29:14 +03:00
..
asm asm: remove unused parameter for function Lex (#18058) 2019-03-14 10:35:55 +01:00
bloombits core/bloombits, light: fix typos (#17235) 2018-07-24 11:24:27 +03:00
rawdb core, ethdb, metrics, p2p: expose various counter metrics for grafana 2019-06-11 09:49:13 +03:00
state core/state: unified function receiver names (#19615) 2019-05-26 00:52:10 +03:00
types core/types: document RawSignatureValues (#19695) 2019-06-12 10:22:33 +03:00
vm core/state: fix state iterator (#19127) 2019-04-05 09:44:02 +03:00
.gitignore Renamed `chain` => `core` 2014-12-04 10:28:02 +01:00
bench_test.go core, eth, les, light: scope receipt functionality a bit cleaner 2019-04-15 13:42:26 +03:00
block_validator.go core: use headers only where blocks are unnecessary 2019-03-13 12:32:47 +02:00
block_validator_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
blockchain.go core, ethdb, metrics, p2p: expose various counter metrics for grafana 2019-06-11 09:49:13 +03:00
blockchain_insert.go all: simplify timestamps to uint64 (#19372) 2019-04-02 23:28:48 +03:00
blockchain_test.go les, les/flowcontrol: implement LES/3 (#19329) 2019-05-30 20:51:13 +02:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
chain_indexer.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
chain_indexer_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
chain_makers.go core: fix import errors on clique crashes + empty blocks (#19544) 2019-05-10 17:04:10 +03:00
chain_makers_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
dao_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
error.go core: move error variable to error.go (#19560) 2019-05-13 13:23:32 +03:00
events.go miner: regenerate mining work every 3 seconds (#17413) 2018-08-16 14:14:33 +03:00
evm.go all: simplify timestamps to uint64 (#19372) 2019-04-02 23:28:48 +03:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis.go all: regenerate codecs with gencodec commit 90983d99de (#15830) 2018-01-08 15:13:22 +02:00
gen_genesis_account.go all: regenerate codecs with gencodec commit 90983d99de (#15830) 2018-01-08 15:13:22 +02:00
genesis.go core, cmd, vendor: fixes and database inspection tool (#15) 2019-05-16 10:39:34 +03:00
genesis_alloc.go cmd, core, params: add support for Goerli 2019-02-04 14:53:12 +02:00
genesis_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
headerchain.go core, ethdb, metrics, p2p: expose various counter metrics for grafana 2019-06-11 09:49:13 +03:00
helper_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
mkalloc.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00
state_prefetcher.go core: prefetch next block state concurrently 2019-04-01 11:06:15 +03:00
state_processor.go consensus,core,miner: avoid overhead of creating a new block (#19301) 2019-04-30 16:42:36 +03:00
state_transition.go core: fix comment typo (#17236) 2018-07-24 13:17:12 +03:00
tx_cacher.go Comment error (#18303) 2018-12-14 11:15:31 +01:00
tx_journal.go core: fix typos in comment (#17531) 2018-08-28 10:04:33 +03:00
tx_list.go core, ethdb, metrics, p2p: expose various counter metrics for grafana 2019-06-11 09:49:13 +03:00
tx_list_test.go all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02:00
tx_pool.go core: move TxPool reorg and events to background goroutine (#19705) 2019-06-21 11:29:14 +03:00
tx_pool_test.go core: move TxPool reorg and events to background goroutine (#19705) 2019-06-21 11:29:14 +03:00
types.go core: prefetch next block state concurrently 2019-04-01 11:06:15 +03:00