snapcfg: load preverified hashes for single chain only#19785
Merged
Conversation
LoadPreverified now takes a chainName parameter and calls LoadRemotePreverifiedForChain instead of LoadRemotePreverified, avoiding unnecessary HTTP fetches for all 10 chains when only one is needed. Remove LoadRemotePreverified, registry.All, registry.ResetRaw, and GetAllCurrentPreverified which are no longer used. Refactor webseeds.Verify to load preverified per-chain inside the iteration loop instead of bulk-loading all chains upfront.
AskAlexSharov
approved these changes
Mar 11, 2026
wmitsuda
added a commit
that referenced
this pull request
Mar 11, 2026
## Summary Part 3 of optimizing remote preverified hash loading (after #19641, #19722). - `LoadPreverified` now takes a `chainName` parameter and calls `LoadRemotePreverified` instead of the old bulk variant that fetched all 10 chains - Refactored `webseeds.Verify` to load preverified per-chain inside the iteration loop instead of bulk-loading all chains upfront - Removed unused functions: old bulk `LoadRemotePreverified`, `registry.All`, `registry.ResetRaw`, `GetAllCurrentPreverified` - Renamed `LoadRemotePreverifiedForChain` → `LoadRemotePreverified` since it's now the only variant ## Test plan - [x] Built `erigon` and `downloader` binaries - [x] Tested `erigon seg reset --dry-run` with mainnet and hoodi ephemeral datadirs - [x] Tested `downloader verify_webseeds --chain=chiado --preverified=embedded` to completion - [x] Verified only the requested chain is fetched (confirmed via log output) ## Tasks - [ ] Cherry-pick merge commit to `release/3.4`
This was referenced Mar 11, 2026
wmitsuda
added a commit
that referenced
this pull request
Mar 11, 2026
## Summary - Add skill that cleans up local worktrees and branches for merged GitHub PRs - Automatically handles cherry-pick instructions found in PR body (e.g., `- [ ] Cherry-pick merge commit to release/3.4`) - Creates cherry-pick PR, updates original PR to mark the task done ## Test plan - [x] Tested end-to-end against PR #19785 — worktree removed, branch deleted, cherry-pick PR #19786 created, original PR updated
This was referenced May 12, 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.
Summary
Part 3 of optimizing remote preverified hash loading (after #19641, #19722).
LoadPreverifiednow takes achainNameparameter and callsLoadRemotePreverifiedinstead of the old bulk variant that fetched all 10 chainswebseeds.Verifyto load preverified per-chain inside the iteration loop instead of bulk-loading all chains upfrontLoadRemotePreverified,registry.All,registry.ResetRaw,GetAllCurrentPreverifiedLoadRemotePreverifiedForChain→LoadRemotePreverifiedsince it's now the only variantTest plan
erigonanddownloaderbinarieserigon seg reset --dry-runwith mainnet and hoodi ephemeral datadirsdownloader verify_webseeds --chain=chiado --preverified=embeddedto completionTasks
release/3.4— [cherry-pick] [r3.4] snapcfg: load preverified hashes for single chain only #19786