Skip to content

feat(observability): add phase-level observability to newPayload processing #18187

@yongkangc

Description

@yongkangc

Problem

Currently lacks granular timing metrics for newPayload processing phases, making it difficult to identify performance bottlenecks.

Cannot measure:

  • Time until execution starts
  • Prewarming effectiveness
  • Individual phase durations (validation, execution, state root)
  • State root algorithm performance

Current implementation:
https://github.com/paradigmxyz/reth/blob/main/crates/engine/tree/src/tree/mod.rs#L504-L600

Solution

do we have enough observability for the entire newPayload process?

what would help us is like a time diagram to see

  • Phase A: Pre-execution (entry → execution start)
  • Phase B: Prewarming initialization
  • Phase C: Block execution
  • Phase D: Post-execution validation
  • Phase E: State root computation
  • Phase F: Post-processing

Implementation locations

  • crates/engine/tree/src/tree/metrics.rs - Add NewPayloadPhaseMetrics struct
  • crates/engine/tree/src/tree/mod.rs#L504 - Instrument on_new_payload
  • crates/engine/tree/src/tree/payload_validator.rs#L288 - Instrument validation phases

Expected outcome

  • Enable time diagram generation for analysis
  • Metrics

Additional context

Metadata

Metadata

Assignees

Labels

A-executionRelated to the Execution and EVMA-rpcRelated to the RPC implementationC-enhancementNew feature or requestC-perfA change motivated by improving speed, memory usage or disk footprintD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions