Skip to content

execution: share prune timeout budget - #20860

Merged
AskAlexSharov merged 4 commits into
mainfrom
jklondon/prune-features/quickprunetocondfixes
Jun 21, 2026
Merged

AskAlexSharov merged 4 commits into
mainfrom
jklondon/prune-features/quickprunetocondfixes

Conversation

@JkLondon

@JkLondon JkLondon commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Related to #20854

Simplifies execution prune timeout handling by using one shared stage-level budget across changeset pruning, block access list pruning, and small-batch pruning.

On chain tip, the quick timeout is no longer refreshed per prune step, so Ethereum execution prune uses one shared 2s budget instead of up to 2s per operation. Initial-cycle pruning keeps the long aggressive budget.

Comment thread execution/stagedsync/stage_execute.go

@Giulio2002 Giulio2002 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM \u2014 obviously small/trivial change (119 meaningful diff lines across 1 files)

@Giulio2002 Giulio2002 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM \u2014 trivial, obviously correct change (119 meaningful diff lines across 1 file(s)).

@JkLondon

Copy link
Copy Markdown
Contributor Author

This PR doesn't fully resolve #20854. The ">2s after restart" case comes from the initial-cycle prune path, which still runs on the long aggressive budget by design, and the ottersync stage isn't touched here at all.

That said, the change is worth landing on its own: it consolidates the three chain-tip execution-prune steps (changesets, block access list, small batches) onto a single shared stagePruneTimeout budget instead of giving each step its own ~2s. That bounds total steady-state execution-prune time to one budget rather than up to 3×, which is a genuine improvement.

So I'd like to merge it as a standalone improvement and keep #20854 open for the actual after-restart fix. (I've switched the description from closes #20854 to a plain reference so the issue isn't auto-closed on merge.)

@JkLondon
JkLondon requested a review from AskAlexSharov June 15, 2026 10:03
@AskAlexSharov

Copy link
Copy Markdown
Collaborator

@JkLondon i added 1 fix 95b2fa5

@JkLondon

Copy link
Copy Markdown
Contributor Author

lgtm overall @AskAlexSharov would we merge?

@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Jun 21, 2026
Merged via the queue into main with commit ea05504 Jun 21, 2026
92 checks passed
@AskAlexSharov
AskAlexSharov deleted the jklondon/prune-features/quickprunetocondfixes branch June 21, 2026 09:26
AskAlexSharov added a commit that referenced this pull request Jul 1, 2026
…-fold fix #21945) (#22129)

Refreshes `bal-devnet-7_warmup` onto `bal-devnet-7`, pulling in the
parallel deep-storage-fold trie-root fix #21945 (and its feature line
#21709, #21941).

### `sstore_bloated` MGas/s

| variant | base (par-kvi, BAL) | ethrex | now (+#21945) |
|---|--:|--:|--:|
| `sstore_bloated` (F) — new slots | 92 | 461 | 399 |
| `sstore_bloated` (T) — existing slots | 7 | 82 | 30 |

### Notes

Rendered as a merge, so review the conflict resolutions rather than the
upstream commits:

- `commitment_convert.go` / `_blackbox_test.go`: took bal-devnet-7's
merged form (#21933) over the pre-merge draft.
- `db/seg/decompress.go`: comment-only, took bal-devnet-7 (#21927).
- `rawdbreset/reset_stages.go`: combined out-of-tx `ClearTables` with
bal-devnet-7's branchCache invalidation.
- `stage_execute.go`: kept warmup's `PruneExecutionStage` (`haveMore`
signature, required by callers). bal-devnet-7's #20860 prune-timeout
budget-sharing is **not** carried into this function.
- `cmd/integration/commands/stages.go`: took bal-devnet-7's `stageExec`
(drops the removed `--no-commit` flag), adapted its prune calls to the
`haveMore` signature.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: lystopad <oleksandr.lystopad@erigon.tech>
Co-authored-by: kewei <kewei.train@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>
Co-authored-by: Mark Holt <135143369+mh0lt@users.noreply.github.com>
Co-authored-by: Mark Holt <erigon@dev-bm-e3-ethmainnet-n4.erigon.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: awskii <awskii@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: erigon-copilot[bot] <265817861+erigon-copilot[bot]@users.noreply.github.com>
Co-authored-by: erigon-copilot[bot] <erigon-copilot[bot]@users.noreply.github.com>
Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
Co-authored-by: Ilya Mikheev <54912776+JkLondon@users.noreply.github.com>
Co-authored-by: JkLondon <me@ilyamikheev.com>
Co-authored-by: bloxster <bloxster@proton.me>
Co-authored-by: Bloxster <gianni.morselli@erigon.tech>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
Co-authored-by: noop <noop@noop>
Co-authored-by: Sudeep Kumar <sudeep.kumar@erigon.tech>
Co-authored-by: bloxster <bloxster@users.noreply.github.com>
Co-authored-by: info@weblogix.biz <admin@10gbps.weblogix.it>
Co-authored-by: Sahil Sojitra <88416181+Sahil-4555@users.noreply.github.com>
Co-authored-by: awskii <artem.tsskiy@gmail.com>
Co-authored-by: Michelangelo Riccobene <michelangelo.riccobene@gmail.com>
Co-authored-by: Matt Joiner <anacrolix@gmail.com>
Co-authored-by: milen <94537774+taratorio@users.noreply.github.com>
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.

4 participants