From 74ac8fdb1a24ea97332534111f83e6c153306be1 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 28 Oct 2025 22:09:09 +0800 Subject: [PATCH] core: fix the validation metrics --- core/blockchain.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index b7acd12aca..22df1e3662 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2136,14 +2136,12 @@ func (bc *BlockChain) ProcessBlock(parentRoot common.Hash, block *types.Block, s if statedb.StorageLoaded != 0 { storageReadSingleTimer.Update(statedb.StorageReads / time.Duration(statedb.StorageLoaded)) } - accountUpdateTimer.Update(statedb.AccountUpdates) // Account updates are complete(in validation) - storageUpdateTimer.Update(statedb.StorageUpdates) // Storage updates are complete(in validation) - accountHashTimer.Update(statedb.AccountHashes) // Account hashes are complete(in validation) - triehash := statedb.AccountHashes // The time spent on tries hashing - trieUpdate := statedb.AccountUpdates + statedb.StorageUpdates // The time spent on tries update - blockExecutionTimer.Update(ptime - (statedb.AccountReads + statedb.StorageReads)) // The time spent on EVM processing - blockValidationTimer.Update(vtime - (triehash + trieUpdate)) // The time spent on block validation - blockCrossValidationTimer.Update(xvtime) // The time spent on stateless cross validation + accountUpdateTimer.Update(statedb.AccountUpdates) // Account updates are complete(in validation) + storageUpdateTimer.Update(statedb.StorageUpdates) // Storage updates are complete(in validation) + accountHashTimer.Update(statedb.AccountHashes) // Account hashes are complete(in validation) + blockExecutionTimer.Update(ptime - (statedb.AccountReads + statedb.StorageReads)) // The time spent on EVM processing + blockValidationTimer.Update(vtime - (statedb.AccountHashes + statedb.AccountUpdates)) // The time spent on block validation + blockCrossValidationTimer.Update(xvtime) // The time spent on stateless cross validation // Write the block to the chain and get the status. var (