-
Notifications
You must be signed in to change notification settings - Fork 21.7k
ethstats: report newPayload processing time to stats server #33395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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
|
@Savid I pushed a commit on top, ptal |
|
lgtm thanks! |
MariusVanDerWijden
left a comment
There was a problem hiding this 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
core/blockchain_reader.go
Outdated
|
|
||
| // / SubscribeNewPayloadEvent registers a subscription for NewPayloadEvent. | ||
| func (bc *BlockChain) SubscribeNewPayloadEvent(ch chan<- NewPayloadEvent) event.Subscription { | ||
| return bc.newPayloadFeed.Subscribe(ch) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
jrhea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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
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