go-ethereum/core
rjl493456442 042c47ce1a
core: log detailed statistics for slow block (#32812)
This PR introduces a new debug feature, logging the slow blocks with
detailed performance statistics, such as state read, EVM execution and
so on.

Notably, the detailed performance statistics of slow blocks won't be
logged during the sync to not overwhelm users. Specifically, the statistics
are only logged if there is a single block processed.

Example output

```
########## SLOW BLOCK #########
Block: 23537063 (0xa7f878611c2dd27f245fc41107d12ebcf06b4e289f1d6acf44d49a169554ee09) txs: 248, mgasps: 202.99

EVM execution: 63.295ms
Validation: 1.130ms
Account read: 6.634ms(648)
Storage read: 17.391ms(1434)
State hash: 6.722ms
DB commit: 3.260ms
Block write: 1.954ms
Total: 99.094ms

State read cache: account (hit: 622, miss: 26), storage (hit: 1325, miss: 109)
##############################
```
2025-12-02 14:43:51 +01:00
..
filtermaps beacon: update beacon light client for fusaka (#33272) 2025-11-26 11:07:56 +01:00
forkid params: set osaka and BPO1 & BPO2 mainnet dates (#33063) 2025-11-03 17:41:22 +01:00
history core: initialize history pruning in BlockChain (#31636) 2025-04-15 14:32:46 +02:00
overlay core/overlay: copy BaseRoot in TransitionState.Copy (#32613) 2025-09-15 15:26:16 +08:00
rawdb core/rawdb: fix underflow in freezer inspect for empty ancients (#33203) 2025-11-25 10:24:17 +08:00
state core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
stateless core/stateless: add vmwitnessstats cli flag to report leaf stats + log to console (#32619) 2025-09-17 15:06:39 +02:00
tracing core/tracing: remove unnecessary 'copy' field skip in TestAllHooksCalled (#32622) 2025-09-16 19:58:37 +08:00
txpool core/txpool/blobpool: auto-start next conversion batch after completion (#33301) 2025-11-27 19:43:37 +08:00
types core/types: optimize modernSigner.Equal (#32971) 2025-10-27 16:04:06 +01:00
vm core/vm: improve memory resize (#33056) 2025-11-26 16:50:16 +01:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go core: using testing.B.Loop (#32662) 2025-09-19 17:06:27 -06:00
bintrie_witness_test.go cmd/evm/internal/t8ntool, trie: support for verkle-at-genesis, use UBT, and move the transition tree to its own package (#32445) 2025-11-14 15:25:30 +01:00
block_validator.go core,miner: implement EIP-7934 - RLP Execution Block Size Limit (#31990) 2025-07-09 11:24:44 +02:00
block_validator_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
blockchain.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
blockchain_insert.go core: remove unused peek function in insertIterator (#33155) 2025-11-12 15:30:16 +08:00
blockchain_reader.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
blockchain_repair_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
blockchain_sethead_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
blockchain_snapshot_test.go triedb/pathdb, eth: use double-buffer mechanism in pathdb (#30464) 2025-06-22 20:40:54 +08:00
blockchain_stats.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
blockchain_test.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
chain_makers.go cmd/evm/internal/t8ntool, trie: support for verkle-at-genesis, use UBT, and move the transition tree to its own package (#32445) 2025-11-14 15:25:30 +01:00
chain_makers_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
dao_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
error.go core, params: add limit for max blobs in blob transaction (#32246) 2025-07-21 16:26:24 +02:00
events.go eth/filters: add transactionReceipts subscription (#32697) 2025-10-09 14:14:53 +02:00
evm.go core: refactor StateProcessor to accept ChainContext interface (#32739) 2025-10-02 14:34:06 +02:00
gaspool.go core, miner: revert block gas counter in case of invalid transaction (#26799) 2023-03-07 05:23:52 -05:00
gen_genesis.go core: go fmt (#29544) 2024-04-16 15:42:16 +03:00
genesis.go core: use scheme-aware empty root in flushAlloc (#33168) 2025-11-13 16:15:44 +08:00
genesis_alloc.go params: add hoodi testnet definition (#31406) 2025-03-18 12:07:49 +01:00
genesis_test.go cmd/evm/internal/t8ntool, trie: support for verkle-at-genesis, use UBT, and move the transition tree to its own package (#32445) 2025-11-14 15:25:30 +01:00
headerchain.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
headerchain_test.go all: nuke total difficulty (#30744) 2025-01-28 18:55:41 +01:00
mkalloc.go accounts, cmd/geth, core: close opened files (#29598) 2024-04-30 15:47:21 +02:00
rlp_test.go core: using testing.B.Loop (#32662) 2025-09-19 17:06:27 -06:00
sender_cacher.go core: use sync.Once for SenderCacher initialization (#31029) 2025-01-16 14:36:45 +01:00
state_prefetcher.go trie, core/state: introduce trie Prefetch for optimizing preload (#32134) 2025-08-20 21:45:27 +08:00
state_processor.go core: initialize tracer before DAO fork logic (#33214) 2025-11-19 19:00:31 +01:00
state_processor_test.go params: update tx gas limit cap (#32230) 2025-07-18 13:22:59 +08:00
state_transition.go internal/ethapi: skip tx gas limit check for calls (#32641) 2025-09-19 13:29:17 +02:00
stateless.go core: refactor StateProcessor to accept ChainContext interface (#32739) 2025-10-02 14:34:06 +02:00
txindexer.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
txindexer_test.go core/rawdb: integrate eradb backend for RPC (#31604) 2025-06-03 10:47:38 +02:00
types.go all: implement flat deposit requests encoding (#30425) 2024-10-09 12:24:58 +02:00