Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Util] Log verification progress #6834

Open
wants to merge 1 commit into
base: v0.37
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions engine/verification/verifier/verifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/onflow/flow-go/module"
"github.com/onflow/flow-go/module/chunks"
"github.com/onflow/flow-go/module/metrics"
"github.com/onflow/flow-go/module/util"
"github.com/onflow/flow-go/state/protocol"
"github.com/onflow/flow-go/storage"
storagepebble "github.com/onflow/flow-go/storage/pebble"
Expand Down Expand Up @@ -125,6 +126,14 @@ func verifyConcurrently(
var lowestErrHeight uint64 = ^uint64(0) // Initialize to max value of uint64
var mu sync.Mutex // To protect access to lowestErr and lowestErrHeight

lg := util.LogProgress(
log.Logger,
util.DefaultLogProgressConfig(
fmt.Sprintf("verifying heights progress for [%v:%v]", from, to),
int(to+1-from),
),
)

// Worker function
worker := func() {
for {
Expand Down Expand Up @@ -154,6 +163,8 @@ func verifyConcurrently(
} else {
log.Info().Uint64("height", height).Msg("verified height successfully")
}

lg(1) // log progress
}
}
}
Expand Down
Loading