bsc/miner
setunapo 77c8372cc4 Trie prefetch on state pretch (#996)
* feature: do trie prefetch on state prefetch

Currently, state prefetch just pre execute the transactions and discard the results.
It is helpful to increase the snapshot cache hit rate.
It would be more helpful, if it can do trie prefetch at the same time, since the it will
preload the trie node and build the trie tree in advance.
This patch is to implement it, by reusing the main trie prefetch and doing finalize after
transaction is executed.

* some code improvements for trie prefetch

** increase pendingSize before dispatch tasks
** use throwaway StateDB for TriePrefetchInAdvance and remove the prefetcherLock
** remove the necessary drain operation in trie prefetch mainloop,
   trie prefetcher won't be used after close.
2022-08-01 17:41:50 +08:00
..
stress all: separate catalyst package (#24280) 2022-01-31 14:22:35 +02:00
miner_test.go eth, miner: use miner for post-merge block production (#23256) 2022-01-24 09:19:52 +02:00
miner.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
unconfirmed_test.go all: remove redundant conversions and import names (#21903) 2020-11-25 21:00:23 +01:00
unconfirmed.go all: replace RWMutex with Mutex in places where RLock is not used (#21622) 2020-10-13 10:58:41 +02:00
worker_test.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
worker.go Trie prefetch on state pretch (#996) 2022-08-01 17:41:50 +08:00