go-ethereum/eth
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
..
catalyst eth/catalyst: fix tests for getPayload change (#33322) 2025-11-28 15:06:11 +01:00
downloader eth/downloader: remove dead proc counter (#33309) 2025-11-28 10:42:22 +08:00
ethconfig core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
fetcher eth/fetcher: remove dangling peers from alternates (#32947) 2025-10-20 10:26:55 +08:00
filters eth/filters: further optimize tx hash map in #32965 (#33108) 2025-11-13 14:48:26 +08:00
gasestimator eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348) 2025-08-05 19:51:16 +08:00
gasprice core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
protocols eth/protocols/eth: reject message containing duplicated txs and drop peer (#32728) 2025-10-15 10:24:48 +02:00
syncer eth/syncer: advance safe and finalized block (#33038) 2025-11-13 15:06:27 +08:00
tracers internal/ethapi: change default tx type to 0x2 (#33058) 2025-11-28 15:32:40 +01:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go internal/ethapi: add eth_SendRawTransactionSync (#32830) 2025-10-16 17:34:47 +02:00
api_backend_test.go core/txpool: add eip2681 check for incoming transactions (#32726) 2025-09-25 13:15:12 +02:00
api_debug.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
api_debug_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
api_miner.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
backend.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
dropper.go eth: fix panic in randomDuration when min equals max (#33193) 2025-11-19 01:54:53 +08:00
handler.go eth: do not warn on switching from snap sync to full sync (#32900) 2025-10-14 11:03:31 +08:00
handler_eth.go eth: check blob transaction validity on the peer goroutine when received (#31219) 2025-03-01 14:10:38 +01:00
handler_eth_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
peer.go eth/protocols/eth: implement eth/69 (#29158) 2025-05-16 17:10:47 +02:00
peerset.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
state_accessor.go core, eth, triedb: serve historical states over RPC (#31161) 2025-06-25 16:50:54 +08:00
sync.go core/txpool/blobpool: filter blob txs with sidecar version (#32577) 2025-09-15 20:48:59 +08:00
sync_test.go eth: replace hardcoded sleep with polling loop in snap sync test (#32499) 2025-08-27 09:49:47 +08:00