Skip to content

Commit 0724820

Browse files
fix: Modify Evolve node logging to remove noise (#2496)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview After #2416 was merged, the logging in evolve node included logs from the headerSyncService's p2p module, store module, and sync module via the go-header library. This caused a lot of noise in evolve node logs and shouldn't be enabled by default. Also, made the `creating empty block` log back to INFO level so a user can see that evolve node is producing blocks when during no user activity and see what block height the node is at. Also, fixes formatting issues with DA submission log. https://www.loom.com/share/42b4be68bee74608b62cfdf07324a829?sid=4f889192-639b-477e-b5c6-fe941d6c7f70 Previously logging looked like this: <img width="2166" height="1066" alt="image" src="https://github.com/user-attachments/assets/1f0a0e16-e777-45c6-ab43-5ec0f65525fb" /> Logging now looks like this: <img width="1092" height="301" alt="image" src="https://github.com/user-attachments/assets/683604df-3e32-4fad-93c0-2d9e58c9feaa" /> <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> -->
1 parent d89b796 commit 0724820

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

block/manager.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ func (m *Manager) publishBlockInternal(ctx context.Context) error {
656656
m.logger.Info("no batch retrieved from sequencer, skipping block production")
657657
return nil
658658
}
659-
m.logger.Debug("creating empty block, height: ", newHeight)
659+
m.logger.Info("creating empty block, height: ", newHeight)
660660
} else {
661661
m.logger.Warn("failed to get transactions from batch", "error", err)
662662
return nil
@@ -665,8 +665,7 @@ func (m *Manager) publishBlockInternal(ctx context.Context) error {
665665
if batchData.Before(lastHeaderTime) {
666666
return fmt.Errorf("timestamp is not monotonically increasing: %s < %s", batchData.Time, m.getLastBlockTime())
667667
}
668-
m.logger.Info("creating and publishing block", "height", newHeight)
669-
m.logger.Debug("block info", "num_tx", len(batchData.Transactions))
668+
m.logger.Info("creating and publishing block", "height", newHeight, "num_tx", len(batchData.Transactions))
670669
}
671670

672671
header, data, err = m.createBlock(ctx, newHeight, lastSignature, lastHeaderHash, batchData)

block/submitter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func submitToDA[T any](
125125
// Record successful DA submission
126126
m.recordDAMetrics("submission", DAModeSuccess)
127127

128-
m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer", itemType), "gasPrice", gasPrice, "count", res.SubmittedCount)
128+
m.logger.Info(fmt.Sprintf("successfully submitted %s to DA layer with gasPrice %v and count %d", itemType, gasPrice, res.SubmittedCount))
129129
if res.SubmittedCount == uint64(remLen) {
130130
submittedAll = true
131131
}

pkg/cmd/run_node.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ func SetupLogger(config rollconf.LogConfig) logging.EventLogger {
6767

6868
logging.SetupLogging(logCfg)
6969

70+
// Suppress noisy external component logs by default, unless debug logging is enabled
71+
if logCfg.Level != logging.LevelDebug {
72+
_ = logging.SetLogLevel("header/store", "FATAL")
73+
_ = logging.SetLogLevel("header/sync", "FATAL")
74+
_ = logging.SetLogLevel("header/p2p", "FATAL")
75+
}
76+
7077
// Return a logger instance for the "main" subsystem
7178
return logging.Logger("main")
7279
}

0 commit comments

Comments
 (0)