Skip to content

Conversation

@ncitron
Copy link
Collaborator

@ncitron ncitron commented Jun 13, 2025

Summary

This PR improves the logging system in Helios to provide more uniform and cleaner logging output for block updates.

Changes

  • Unified logging location: Moved block sync logging from individual consensus modules to helios-core for consistency
  • Cleaner log format:
    • Latest blocks: latest block number=X age=Xs
    • Finalized blocks: finalized block number=X
  • Reduced noise: Changed consensus module logs from info to debug level
  • Deduplication: Added tracking to prevent duplicate finalized block logs
  • Better alignment: Block numbers are aligned between latest and finalized logs for easier reading

Before

INFO helios::consensus: finalized slot             slot=10406016  confidence=100.0%  age=00:00:04:00
INFO helios::consensus: updated head               slot=10406048  confidence=100.0%  age=00:00:00:00
INFO helios::consensus::op_stack: unsafe head updated: block=22681448 age=0s

After

INFO helios::client: latest block     number=22681448 age=0s
INFO helios::client: finalized block  number=22681416

The new logging provides a cleaner, more consistent view of block updates across all consensus implementations (Ethereum, OpStack, Linea), making it easier to monitor Helios's sync status.

- Move block sync logging from consensus modules to helios-core for uniformity
- Add info-level logs in node.rs when latest or finalized blocks are received
- Change existing consensus module logs from info to debug level
- Latest block logs show: "latest block     number=X age=Xs"
- Finalized block logs show: "finalized block  number=X"
- Prevent duplicate finalized block logs by tracking last logged block number
- Block numbers are aligned between latest and finalized logs for readability
@ncitron ncitron changed the title feat: improve logging system for block updates chore: improve logging system for block updates Jun 13, 2025
@ncitron ncitron merged commit 5fc93bc into master Jun 13, 2025
10 of 11 checks passed
@ncitron ncitron deleted the feat/improve-logging-system branch June 13, 2025 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants