-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
op-node: log mgasps across block building/inserting lifecycle #12907
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #12907 +/- ##
===========================================
- Coverage 68.78% 66.77% -2.02%
===========================================
Files 56 56
Lines 4665 4665
===========================================
- Hits 3209 3115 -94
- Misses 1274 1378 +104
+ Partials 182 172 -10
Flags with carried forward coverage won't be shown. Click here to find out more. |
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 am interested in @protolambda 's opinion regarding the pattern for extending Derivers. This wires new content through existing derivers and adds logic. For the scope of the changes, it's fine, but larger changes might warrant a whole new deriver
to work on the event data without being attached to existing process.
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.
Looks ok, just a few nits, then good to merge
@protolambda I'm confused by this log where
|
@bitwiseguy the verifier reproduces blocks from batch data in L1, which turns into block-inputs, and goes through the same block-building code-path, using the engine API and everything. |
Overview
In order to provide more visibility into the block processing performance of
op-node
+ its execution client, this pr attempts to add logs to surface data for plottingmgasps
(Mgas per second) for every block. I figured modifyingop-node
instead ofop-geth
would give us more consistent measurements when we measure other execution clients.This is similar to the log written by
op-geth
here, however this pr attempts to provide a more holistic view ofmgasps
by logging duration of the entire block processing lifecycle instead of just theengineApi.NewPayload
portion of block processing. The entire lifecycle consists of the following sequentialengineApi
calls:engineApi.ForkchoiceUpdate(attrs)
engineApi.GetPayload
engineApi.NewPayload
engineApi.ForkchoiceUpdate
Event-based block building+inserting codepath
Built new l2 block
seal_time
(covers GetPayload)build_time
(covers ForkchoiceUpdate + GetPayload)Inserted block
build_time
(ForkchoiceUpdate + GetPayload)insert_time
(NewPayload + ForkchoiceUpdate)total_time
mgasps
Legacy block inserting codepath
* emit ForkchoiceUpdateEvent
Questions
op-node
? Does that event handler only get triggered by a certain sync type (execution-layer
versusconsensus-layer
)?TryUpdateEngineEvent
processing time intotal_time
value?Testing
Example logs from
op-e2e-http
ci tests.sequencer:
verifier:
Metadata
Closes https://github.com/ethereum-optimism/platforms-team/issues/446
Alternative Design Considered
I considered an alternative implementation where I created a new
performance
deriver that subscribed to events and assembled block time metrics instead of threading data fields through events, but I did not like that I would have to periodically do garbage collection on incomplete blocks if they were interrupted or intentionally not part of a full block building/inserting flow.