Skip to content

fix: use Display formatting for tracing fields instead of Debug formatting#255

Merged
tac0turtle merged 3 commits into
mainfrom
cian/sanitize-telemetry-output
Jun 4, 2026
Merged

fix: use Display formatting for tracing fields instead of Debug formatting#255
tac0turtle merged 3 commits into
mainfrom
cian/sanitize-telemetry-output

Conversation

@chatton
Copy link
Copy Markdown
Contributor

@chatton chatton commented Jun 3, 2026

Description

Type of Change

Some telemetry outputs were using Debug formatting, so were repesented as Some(1000) rather than "1000". This PR updates the outputs to be non-rust specific for easier parsing.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Related Issues

Fixes #(issue)

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

Additional Notes

Summary by CodeRabbit

  • Chores
    • Standardized and improved internal logging and tracing output for better readability and consistency across mint, node, payload builder, executor, and validator components. No functional behavior, public interfaces, or state changes were made.

Switch tracing fields from Debug (?) to Display (%) for Address, B256,
and error types so trace output is consumer-friendly (0x-prefixed hex,
human-readable error messages) rather than Rust-specific (raw bytes,
enum variants). Unwrap Option<u64> gas_limit to emit a plain number
instead of Some(...). Remove full struct Debug dump of config.
@chatton chatton requested a review from a team as a code owner June 3, 2026 11:08
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 53cc35e5-5057-4305-820d-6e754f0cecd3

📥 Commits

Reviewing files that changed from the base of the PR and between e410640 and 5a5115a.

📒 Files selected for processing (2)
  • crates/ev-precompiles/src/mint.rs
  • crates/node/src/builder.rs
✅ Files skipped from review due to trivial changes (1)
  • crates/ev-precompiles/src/mint.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/node/src/builder.rs

📝 Walkthrough

Walkthrough

Standardizes tracing field formatting by replacing debug-style (?) with display-style (%) and emitting structured fields for selected mint precompile logs; changes touch builder, payload service, executor, validator, and mint logging only, without behavior or API changes.

Changes

Tracing Field Formatting Standardization

Layer / File(s) Summary
Mint precompile authorization and invocation logging
crates/ev-precompiles/src/mint.rs
ensure_authorized, is_allowlisted, and call entry logs now use structured/display fields (caller = %caller, addr = %addr) instead of debug/shorthand formatting.
EvolvePayloadBuilder tracing updates
crates/node/src/builder.rs
Base-fee redirect and suggested fee-recipient logs use %sink; build_payload span records concrete gas_limit via attributes.gas_limit.unwrap_or(0); transaction-failure logs use % for err and tx_hash; final block log uses %sealed_block.hash(); chainspec error logs use %err.
Payload service and executor fee sink formatting
crates/node/src/payload_service.rs, crates/node/src/executor.rs
Simplified constructor logging in payload service; fee-sink and related error fields reformatted from ?sink/?err to %sink/%err.
Validator error log formatting
crates/node/src/validator.rs
Validation debug/info logs changed from debug-style ?err formatting to display-style %err formatting in two places.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • randygrok

Poem

🐰 Hopped through code with whiskers twitching bright,

Swapped ? for % to make logs polite,
Structured fields now dance in a row,
Traces clearer as they quietly glow,
A little rabbit cheers: "Logs just right!"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: converting tracing field formatting from Debug to Display style, which aligns with all the file summaries.
Description check ✅ Passed The description covers the primary motivation (removing Rust-specific debug formatting for easier parsing) and marks the change as a bug fix, but lacks specifics like testing verification and related issue links.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cian/sanitize-telemetry-output

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatton chatton marked this pull request as draft June 3, 2026 11:29
GasOutput is a struct without Display/Value impls, so it must stay as
Debug. Use shorthand %caller/%addr syntax in mint precompile instead
of redundant caller = %caller.
@chatton chatton marked this pull request as ready for review June 3, 2026 13:09
@tac0turtle tac0turtle merged commit 0e613d1 into main Jun 4, 2026
19 checks passed
@tac0turtle tac0turtle deleted the cian/sanitize-telemetry-output branch June 4, 2026 12:40
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