Skip to content

Commit

Permalink
block delay metric (#10404)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed May 18, 2024
1 parent 0a66f29 commit bb3685a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth/stagedsync/exec3.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/c2h5oh/datasize"
"github.com/erigontech/mdbx-go/mdbx"
metrics2 "github.com/ledgerwatch/erigon-lib/common/metrics"
"github.com/ledgerwatch/erigon-lib/config3"
"github.com/ledgerwatch/log/v3"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -628,6 +629,7 @@ Loop:
// TODO: panic here and see that overall process deadlock
return fmt.Errorf("nil block %d", blockNum)
}
metrics2.UpdateBlockConsumerPreExecutionDelay(b.Time(), blockNum, logger)
txs := b.Transactions()
header := b.HeaderNoCopy()
skipAnalysis := core.SkipAnalysis(chainConfig, blockNum)
Expand Down Expand Up @@ -839,6 +841,7 @@ Loop:

// MA commitTx
if !parallel {
metrics2.UpdateBlockConsumerPostExecutionDelay(b.Time(), blockNum, logger)
//if blockNum%1000 == 0 {
// if ok, err := flushAndCheckCommitmentV3(ctx, b.HeaderNoCopy(), applyTx, doms, cfg, execStage, stageProgress, parallel, logger, u); err != nil {
// return err
Expand Down

0 comments on commit bb3685a

Please sign in to comment.