Skip to content

Commit

Permalink
Merge pull request #2033 from OffchainLabs/metrics-arbitrator-validat…
Browse files Browse the repository at this point in the history
…ion-steps

Add a metric for steps taken in arbitrator validation
  • Loading branch information
PlasmaPower authored Dec 19, 2023
2 parents f7dc9de + 74504fe commit 894d7fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions validator/server_arb/validator_spawner.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
)

var arbitratorValidationSteps = metrics.NewRegisteredHistogram("arbitrator/validation/steps", nil, metrics.NewBoundedHistogramSample())

type ArbitratorSpawnerConfig struct {
Workers int `koanf:"workers" reload:"hot"`
OutputPath string `koanf:"output-path" reload:"hot"`
Expand Down Expand Up @@ -146,6 +149,7 @@ func (v *ArbitratorSpawner) execute(
}
steps += count
}
arbitratorValidationSteps.Update(int64(mach.GetStepCount()))
if mach.IsErrored() {
log.Error("machine entered errored state during attempted validation", "block", entry.Id)
return validator.GoGlobalState{}, errors.New("machine entered errored state during attempted validation")
Expand Down

0 comments on commit 894d7fc

Please sign in to comment.