go-ethereum
go-ethereum copied to clipboard
core/state: expose the state reader stats
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.