Skip to content

execution, rpc: exec/RPC robustness fixes - #22892

Merged
AskAlexSharov merged 3 commits into
mainfrom
mh/exec-rpc-robustness-fixes
Jul 31, 2026
Merged

execution, rpc: exec/RPC robustness fixes#22892
AskAlexSharov merged 3 commits into
mainfrom
mh/exec-rpc-robustness-fixes

Conversation

@mh0lt

@mh0lt mh0lt commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Independent correctness fixes split out of #21414 (per the request to break it up). Each stands alone on main.

  • eth_getProof: guard a nil header (no crash when the header is missing).
  • serial exec: don't persist a genesis changeset.
  • parallel exec: treat an empty apply-loop close as clean completion rather than "more work pending" (with a regression test).

No dependency on the background-commit work; part of the split recorded on #21414.

mh0lt added 3 commits July 30, 2026 16:40
HeaderByNumber can return (nil, nil); getProof used header.Root unchecked and
would panic during the publish-to-commit window when the raw tx lags the head.
Return an error instead. The broader fix — getProof reading the tip's state via
the published SharedDomains (consumer holds its own coordinated tx via
BeginCoordinatedRo, no SD-aware tx) — is tracked in #21314.

(cherry picked from commit f592b6d)
Serial exec gated SetChangesetAccumulator with `blockNum > 0` but gated the
matching SavePastChangesetAccumulator only on shouldGenerateChangeSets, which
is true for the genesis exec (blockNum==maxBlockNum==0, so
0+MaxReorgDepth >= 0). That saved an empty block-0 changeset; under background
commit it flushes to ChangeSets3, dragging ReadLowestUnwindableBlock to 0.
Genesis is never unwindable, so match the two guards.

(cherry picked from commit 1a7ecd2)
…-work

When the parallel apply loop's channel closes with no stop cause and the loop
executed nothing (no tx-results, no blockResult), the requested range was
already applied before this call — under background commit the async commit can
advance execution progress to a single-block fork-validation target before its
StateStep runs. The fallback classified that empty close as a partial batch and
returned ErrLoopExhausted, which the stage loop reported as "unexpected state
step has more work". Add applyLoopCloseIsClean so an empty loop is a clean end.

(cherry picked from commit 582b08d)
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 050ac8a Jul 31, 2026
111 checks passed
@AskAlexSharov
AskAlexSharov deleted the mh/exec-rpc-robustness-fixes branch July 31, 2026 04:15
@yperbasis yperbasis added the RPC label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants