SEC-130: Harden attended snapshot bootstrap downloads#530
Open
huangminghuang wants to merge 8 commits into
Open
SEC-130: Harden attended snapshot bootstrap downloads#530huangminghuang wants to merge 8 commits into
huangminghuang wants to merge 8 commits into
Conversation
huangminghuang
marked this pull request as ready for review
July 20, 2026 23:46
heifner
requested changes
Jul 21, 2026
heifner
reviewed
Jul 22, 2026
heifner
reviewed
Jul 22, 2026
heifner
left a comment
Contributor
There was a problem hiding this comment.
Three low-severity cleanup notes on the bounded download path — none blocking. The size ceiling, disk-headroom checks, cancellation, and stale-connection retry all look correct and are well covered by the new tests.
heifner
reviewed
Jul 22, 2026
heifner
approved these changes
Jul 22, 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.
Problem
Remote snapshot bootstrap previously buffered an unbounded response in memory and lacked explicit response-size, disk-capacity, and partial-file guarantees. The first hardening pass added network deadlines, but request-write coverage was incomplete and fixed time limits do not fit the trusted, attended bootstrap model.
Solution
need_buffernormalization, and byte accountingchain-state-db-size-mbvalue as the response-size ceiling; add no snapshot-specific timeout, size, or disk-reserve optionsContent-Lengthis available.downloadingfiles on failure or cancellationpost_to_fileoverloadValidation
test_chain_pluginsuite: 14 cases passedsnapshot_api_testcoverage for latest and block-specific snapshot bootstrap; Python syntax validation passed after removing the obsolete optiongit diff --checkThe system-contract e2e gate is not applicable because the PR diff does not change
contracts/sysio.*.Operational note
The selected snapshot endpoint is trusted and bootstrap is attended. Network phases therefore have no automatic deadline; a stalled provider waits for the operator to press Ctrl+C. Response bytes and disk usage remain bounded independently of that policy.