From 3d135baa36c062c0d6a0eebe2cdcb14fcfe8000d Mon Sep 17 00:00:00 2001 From: CPerezz Date: Fri, 1 May 2026 02:08:12 +0200 Subject: [PATCH] core: clarify ProcessResultWithMetrics.Counts/Reads semantics --- core/parallel_state_processor.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/parallel_state_processor.go b/core/parallel_state_processor.go index c24043a2c8..409d70cdb2 100644 --- a/core/parallel_state_processor.go +++ b/core/parallel_state_processor.go @@ -23,11 +23,13 @@ type ProcessResultWithMetrics struct { // the time it took to execute all txs in the block ExecTime time.Duration PostProcessTime time.Duration - // Counts is the aggregate of per-tx, pre-tx and post-tx state-mutation - // counts. Plain-int snapshot, safe to copy. + // Counts is the per-StateDB sum of state-mutation counters across pre-tx, + // per-tx and post-tx phases. The caller may override AccountLoaded and + // StorageLoaded with deduplicated counts derived from block.AccessList() + // (per-StateDB sums over-count addresses touched by multiple phases). Counts state.StateCounts - // Reads is the aggregate of per-tx, pre-tx and post-tx state-read times. - // Sum-of-CPU-time, not wall-clock. + // Reads is the sum of per-StateDB read times across pre-tx, per-tx and + // post-tx phases. Sum-of-CPU-time, not wall-clock. Reads state.ReadDurations }