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 6 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