Skip to content

Conversation

@Savid
Copy link
Member

@Savid Savid commented Dec 12, 2025

Add NewPayloadEvent to track engine API newPayload block processing times and report them to ethstats. This enables monitoring of block processing performance.

https://notes.ethereum.org/@savid/block-observability

related: #33231

Add NewPayloadEvent to track engine API newPayload block processing times
and report them to ethstats. This enables monitoring of block processing
performance on the stats dashboard.

- Add NewPayloadEvent type in core/events.go
- Add event feed and subscription methods to Ethereum struct
- Emit event from catalyst API after successful block insertion
- Subscribe and report payload stats in ethstats service
@MariusVanDerWijden
Copy link
Member

@Savid I pushed a commit on top, ptal
Otherwise lgtm

@Savid
Copy link
Member Author

Savid commented Dec 18, 2025

lgtm thanks!

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

LGTM, would like a second review on it though


// / SubscribeNewPayloadEvent registers a subscription for NewPayloadEvent.
func (bc *BlockChain) SubscribeNewPayloadEvent(ch chan<- NewPayloadEvent) event.Subscription {
return bc.newPayloadFeed.Subscribe(ch)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think SubscribeNewPayloadEvent should track subscriptions in bc.scope, like the other BlockChain.Subscribe* methods, so they’re cleaned up on shutdown.

Minor nit: there’s an extra / in the comment for SubscribeNewPayloadEvent.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated, thanks!

Wrap SubscribeNewPayloadEvent with bc.scope.Track() to ensure
subscriptions are properly cleaned up on shutdown, consistent
with other BlockChain subscription methods. Also fix typo in
the method's doc comment.
Copy link
Contributor

@jrhea jrhea left a comment

Choose a reason for hiding this comment

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

lgtm

Savid added a commit to Savid/nethermind that referenced this pull request Dec 23, 2025
Add NewPayloadEvent to track engine API newPayload block processing
times and report them to ethstats. This enables monitoring of block
processing performance.

Related: ethereum/go-ethereum#33395
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.

3 participants