Repository navigation
evmonlyapp: time FinalizeBlock's stages around the executor - #4259
Conversation
…ders, prepare, execute, tx_results) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
PR SummaryLow Risk Overview A Measurement only—no consensus or execution behavior change. A new test wires a manual OTel reader and asserts all four phases are recorded after one finalize/commit. Reviewed by Cursor Bugbot for commit c419b39. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## giga-1 #4259 +/- ##
===========================================
+ Coverage 65.55% 86.17% +20.61%
===========================================
Files 2081 2 -2079
Lines 157460 405 -157055
===========================================
- Hits 103222 349 -102873
+ Misses 54097 56 -54041
+ Partials 141 0 -141
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Measurement-only change that adds a FinalizeBlock phase timer; the instrumentation is correct and the new test genuinely covers all four phases. One minor issue: the deferred Reset runs after the executor mutex is released, so the comment's "only touched with that lock held" invariant does not hold.
Findings: 0 blocking | 1 non-blocking | 1 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
- 1 suggestion(s)/nit(s) flagged inline on specific lines.
…s released Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ei-protocol#4330) ## Summary - Backport Autobahn execute-loop phase metrics from giga-1 (`sei-protocol#4172` Go path, plus `sei-protocol#4263` storage-tail split) so `/metrics` can show consensus / execution / storage, then vault commit / app commit / push app hash / prune. - Count txs packed into locally produced lane blocks (`tendermint_internal_autobahn_avail_produced_txs`, `sei-protocol#4180`). - Time `FinalizeBlock` stages around the EVM-only executor (`sei-protocol#4259`). Rebased onto current `main`. Regenerated `sei-tendermint/internal/autobahn/avail/metrics/metrics.gen.go`; it was already in sync. ## Test plan - [x] `go test ./giga/metrics/... ./giga/evmonly/...` - [x] `go test ./internal/autobahn/avail/... ./internal/evmonlyapp/...` (from `sei-tendermint`) - [ ] On an Autobahn node, confirm `sei_chain_autobahn_main_loop_phase_duration_seconds_total`, `sei_chain_autobahn_storage_tail_phase_duration_seconds_total`, and `tendermint_internal_autobahn_avail_produced_txs` appear on `/metrics` Made with [Cursor](https://cursor.com) Closes CON-426 Closes PLT-1309 Closes PLT-1308 --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: FromTheRain <bdchatham@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Philip Su <philip@seinetwork.io>
Describe your changes and provide context
On giga-testnet-2 the Autobahn main loop's
executionshare is ~81% of wall, but the executor's own phase timer (evmonly_block_phase_duration_seconds_total: open_view, occ_, encode_, commit_state, ...) accounts for only ~51%. The remaining ~30% is spent inFinalizeBlockoutsideExecutePreparedBlock— and today nothing measures it.This adds a
PhaseTimertoevmOnlyApplicationthat charges every stage ofFinalizeBlockto a phase, published asevmonly_finalize_phase_duration_seconds_total{phase=...}:take_senders— keccak of every raw tx + lookup of the senders CheckTx already recoveredprepare—Executor.PrepareBlock: RLP decode + ECDSA recovery for every sender this validator did not admit (~39/40 of txs at 40 validators)execute—Executor.ExecutePreparedBlock(the executor timer breaks this one down further)tx_results— building the ABCITxResultsReset()at return closes the last phase, so the gap between blocks is charged to nothing.FinalizeBlockis serialized by theexecutormutex, so a single timer is safe.Measurement only, no behaviour change. It decides whether pipelining
PrepareBlockfor block n+1 while n executes (the second half of #4219's loadtest design, which the node does not do) is worth building: ifprepareis the bulk of the unaccounted ~30%, it is.Testing performed to validate your change
TestEVMOnlyApplicationTimesEveryFinalizeBlockPhase: binds the timer to a manual OTel reader and asserts all four phases are recorded by one FinalizeBlock.scripts/ramtest.sh ./sei-tendermint/internal/evmonlyapp/... -racegreen;golangci-lint run(v2.13.2) 0 issues on the package;make fmtcheckclean.Link to Devin session: https://app.devin.ai/sessions/ff612badcded4aa5914ea408dbb41888
Open in Devin Desktop: https://app.devin.ai/desktop/session/ff612badcded4aa5914ea408dbb41888?variant=devin
Requested by: @bdchatham