• Felix Lange's avatar
    core: move TxPool reorg and events to background goroutine (#19705) · 60c062e1
    Felix Lange authored
    * 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
    60c062e1
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
consensus Loading commit data...
console Loading commit data...
core Loading commit data...
crypto Loading commit data...
dashboard Loading commit data...
docs/audits Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
ethstats Loading commit data...
event Loading commit data...
graphql Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
log Loading commit data...
metrics Loading commit data...
miner Loading commit data...
mobile Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
signer Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
vendor Loading commit data...
whisper Loading commit data...
.dockerignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Dockerfile.alltools Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...