op-node: log mgasps across block building/inserting lifecycle#12907
op-node: log mgasps across block building/inserting lifecycle#12907protolambda merged 13 commits intodevelopfrom
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. |
axelKingsley
left a comment
There was a problem hiding this comment.
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.
protolambda
left a comment
There was a problem hiding this comment.
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-nodeinstead ofop-gethwould give us more consistent measurements when we measure other execution clients.This is similar to the log written by
op-gethhere, however this pr attempts to provide a more holistic view ofmgaspsby logging duration of the entire block processing lifecycle instead of just theengineApi.NewPayloadportion of block processing. The entire lifecycle consists of the following sequentialengineApicalls:engineApi.ForkchoiceUpdate(attrs)engineApi.GetPayloadengineApi.NewPayloadengineApi.ForkchoiceUpdateEvent-based block building+inserting codepath
Built new l2 blockseal_time(covers GetPayload)build_time(covers ForkchoiceUpdate + GetPayload)Inserted blockbuild_time(ForkchoiceUpdate + GetPayload)insert_time(NewPayload + ForkchoiceUpdate)total_timemgaspsLegacy block inserting codepath
* emit ForkchoiceUpdateEvent
Questions
op-node? Does that event handler only get triggered by a certain sync type (execution-layerversusconsensus-layer)?TryUpdateEngineEventprocessing time intotal_timevalue?Testing
Example logs from
op-e2e-httpci 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
performancederiver 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.