execution, rpc: exec/RPC robustness fixes - #22892
Merged
Merged
Conversation
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
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Independent correctness fixes split out of #21414 (per the request to break it up). Each stands alone on
main.No dependency on the background-commit work; part of the split recorded on #21414.