Skip to content

Conversation

@MariusVanDerWijden
Copy link
Member

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

Draft for now, looking for feedback on it

core/events.go Outdated

type ChainHeadEvent struct {
Header *types.Header
Time uint64
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be renamed to ProcessingTime or something, and the type should be time.Duration.

@fjl
Copy link
Contributor

fjl commented Nov 26, 2025

Overall, I like the idea, but it'd be good to implement OpenTelemetry tracing in the engine API as well.

@MariusVanDerWijden MariusVanDerWijden marked this pull request as ready for review December 11, 2025 19:03
@MariusVanDerWijden
Copy link
Member Author

cc @Savid

defer func() {
if lastCanon != nil && bc.CurrentBlock().Hash() == lastCanon.Hash() {
bc.chainHeadFeed.Send(ChainHeadEvent{Header: lastCanon.Header()})
bc.chainHeadFeed.Send(ChainHeadEvent{Header: lastCanon.Header(), ProcessingTime: mclock.Now().Sub(stats.startTime)})
Copy link
Member

Choose a reason for hiding this comment

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

I tested locally the other day and actually needed to add it to this one SetCanonical (which already has a start time too)

I'm wondering if we actually make a new ethstats event focused around engine_newPayloadVX calls and do the timing there?

The issue with existing block ethstats event is chainHeadFeed can be fired from 5+ different locations which would all require timing (which i think won't make sense in some cases) and the ethstats report also sends current head block which doesn't have timing value.

This new event block_new_payload (?) would only fire when valid block comes over the engine api. thoughts?

Copy link
Member

@Savid Savid Dec 12, 2025

Choose a reason for hiding this comment

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

i guess it's also fine if we accept block event sometimes returns no processingTime and just handle that on the ethstats server side

Copy link
Member

Choose a reason for hiding this comment

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

PoC #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