Skip to content

feat(node): reduce log spamming#11450

Merged
muXxer merged 3 commits intodevelopfrom
feat/node-reduce-log-spamming
May 7, 2026
Merged

feat(node): reduce log spamming#11450
muXxer merged 3 commits intodevelopfrom
feat/node-reduce-log-spamming

Conversation

@muXxer
Copy link
Copy Markdown
Contributor

@muXxer muXxer commented May 6, 2026

Description of change

This PR massively reduces the log spamming in the iota-node on "info" level.
It introduces a periodic status message that is printed every second, that reports about progress of synced and pruned checkpoints, instead of prints per every single received, executed and pruned checkpoint.

It also removes the log spam if peers don't have the range of checkpoints we want to sync, which was repeatedly 400 lines every 10s.

The lowest available checkpoint is now calculated based on the information from the connected peers on the same chain. Before it was based on all connected peers, which was wrong.

We reduced the log level from info to debug for "scheduling pruning for checkpoint", "executing checkpoint" and "received synced checkpoint". The Log message "Finished syncing and executing checkpoint" was removed and replace by the CheckpointProgressTracker message.

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes): Added periodic checkpoint progress status message and reduced log spam
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • gRPC:

@muXxer muXxer requested review from a team as code owners May 6, 2026 20:03
@iota-ci iota-ci added core-protocol node Issues related to the Core Node team labels May 6, 2026
Comment on lines +594 to +595
if total_checkpoints_pruned > 0 {
if let Some(tracker) = progress_tracker {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it latest rust you can write something like if let Some(x) = var && var2 > 0 {...}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

checkpoint_pruned_seq_number.saturating_sub(prev_ckpt_pruned);

if exec_delta > 0 || object_prune_delta > 0 || checkpoint_prune_delta > 0 {
let exec_time_delta =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to subtract those times? can we take the value and swap with 0 and always print what we've taken from the atomic? that way we don't ever risk overflows or anything.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Copy Markdown
Contributor

@roman1e2f5p8s roman1e2f5p8s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we also mention in the PR description (maybe even in release notes) that:

  • log level for some events changed from info to debug
  • some public APIs in iota-core got an extra optional parameter

Comment thread crates/iota-core/src/checkpoint_progress_tracker.rs Outdated
Comment thread crates/iota-core/src/checkpoint_progress_tracker.rs Outdated
Comment thread crates/iota-core/src/authority/authority_store_pruner.rs
Comment thread crates/iota-network/src/state_sync/mod.rs
@muXxer muXxer force-pushed the feat/node-reduce-log-spamming branch from e8ca563 to b92aa4e Compare May 7, 2026 11:39
@muXxer
Copy link
Copy Markdown
Contributor Author

muXxer commented May 7, 2026

could we also mention in the PR description (maybe even in release notes) that:

  • log level for some events changed from info to debug
  • some public APIs in iota-core got an extra optional parameter
    Thanks for the review!

I added in the description for the log messages that were changed.
This should not be part of the release notes IMO, otherwise we spam the release notes with unnecessary information.

The public API's in iota-core don't matter. iota-core is not a public API.

@muXxer muXxer merged commit 13d8f7c into develop May 7, 2026
35 checks passed
@muXxer muXxer deleted the feat/node-reduce-log-spamming branch May 7, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-protocol node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants