go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

core/state: expose the state reader stats

Open rjl493456442 opened this issue 10 months ago • 1 comments

This pull request introduces a mechanism to expose statistics from the state reader, specifically related to cache utilization during state prefetching.

To improve state access performance, a pair of state readers is constructed with a shared local cache. One reader to execute transactions ahead of time to warm up the cache. The other reader is used by the actual chain processing logic, which can benefit from the prefetched states.

This PR adds visibility into how effective the cache is by exposing relevant usage statistics.

rjl493456442 avatar Jun 10 '25 06:06 rjl493456442

截屏2025-06-10 14 40 24

rjl493456442 avatar Jun 10 '25 06:06 rjl493456442

@rjl493456442 If there are no objections, I would merge the stats part, and split out the prefetch aggressiveness part.

cskiraly avatar Jun 20 '25 18:06 cskiraly