Skip to content

Commit

Permalink
Merge pull request #6342 from onflow/petera/reduce-version-control-lo…
Browse files Browse the repository at this point in the history
…gging

[Access] Reduce logging from version control
  • Loading branch information
peterargue authored Aug 15, 2024
2 parents 31007f0 + d3a3b05 commit 39ae577
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions engine/common/version/version_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,10 @@ func (v *VersionControl) initBoundaries(

if vb == nil {
// no version beacon found
// this is unexpected on a live network as there should always be at least the
// starting version beacon, but not fatal.
// It can happen on new or test networks if the node starts before bootstrap is finished.
// TODO: remove when we can guarantee that there will always be a version beacon
// this is only expected when a node starts up on a network that has never had a version beacon event.
v.log.Info().
Uint64("height", processedHeight).
Msg("No version beacon found for version control")
Msg("No initial version beacon found")

return nil
}
Expand Down Expand Up @@ -296,7 +293,7 @@ func (v *VersionControl) blockFinalized(
if err != nil {
v.log.Err(err).
Uint64("height", height).
Msg("Failed to get highest version beacon for version control")
Msg("Failed to get highest version beacon")

ctx.Throw(
fmt.Errorf(
Expand All @@ -305,20 +302,17 @@ func (v *VersionControl) blockFinalized(
return
}

v.lastProcessedHeight.Store(height)

if vb == nil {
// no version beacon found
// this is unexpected as there should always be at least the
// starting version beacon, but not fatal.
// It can happen if the node starts before bootstrap is finished.
// TODO: remove when we can guarantee that there will always be a version beacon
v.log.Info().
// this is only expected when a node starts up on a network that has never had a version beacon event.
v.log.Debug().
Uint64("height", height).
Msg("No version beacon found for version control")
Msg("No version beacon found at height")
continue
}

v.lastProcessedHeight.Store(height)

previousEndHeight := v.endHeight.Load()

if previousEndHeight != NoHeight && height > previousEndHeight {
Expand Down

0 comments on commit 39ae577

Please sign in to comment.