db/snapcfg, cmd/utils/app: drop github.com/erigontech/erigon-snapshot dep#21197
Conversation
|
Merged latest However, CI is red on
Root causeThis PR makes
The Options
|
Replaces the minimal 5-entry fixture with the full mainnet.toml copied from erigon-snapshot v1.3.1-0.20260402120223-7bb412bc89cd — the version pinned on main when the Go-module dep was dropped. Needed because new tests added on main (TestBlackListForPruning* from #21342) consult snapcfg.KnownCfg(mainnet) and assert against state-history step ranges and 20M+ block tx segments that the minimal fixture doesn't cover. Updates TestMain doc to explain the prior implicit coupling to the embedded module and why we froze a copy.
c7e153a to
24e32c0
Compare
|
monorepoooo 🚀 |
Fixes #21154. Fixes #19732. Sub-task of #21047.
Summary
github.com/erigontech/erigon-snapshotGo-module import. The embedded TOMLs it ships were loaded at startup, immediately overwritten by a runtime fetch, and discarded — they have been unused on every daemon path since Check availability ofpreverified.tomlcontents #12415 made remote-fetch failure fatal.--preverified=embeddedflag value (a dev convenience from Support snapshot reset with symlinks #18273);remoteandlocalremain.preverifiedRegistry.Resetmethod (dead since snapcfg, downloader: lazy-parse registry, per-chain remote loading #19641 switched to per-chain loading), promote the immutable supported-chain set to a package-levelknownChainsvar, and inline its only membership-check consumer inSetToml.Runtime fetch source (
raw.githubusercontent.com/erigontech/erigon-snapshot+ R2 mirror) and fail-fast behaviour are unchanged. Binary size: −2,973,120 bytes uncompressed (−2.0%) / −1,015,102 bytes gzipped (−1.6%) ondarwin/arm64, measured by building before/after a stubbed-emptyerigon-snapshot.Test plan
make lint && make erigon integrationcleango test ./db/snapcfg/... ./db/downloader/downloadercfg/...pass--chain=hoodiwith both CDN hosts unreachable (HTTPS_PROXYpointed at a dead local port) exits non-zero with the same fail-fast[CRIT] Snapshot hashes for supported networks was not loaded …startup trace--chain=hoodiwith normal network logsLoading remote snapshot hashes chain=hoodi, noFailed to loadwarning, no[CRIT], and progresses into the downloader (segments begin downloading)--chain=hoodiagainst a fresh datadir prepopulated with a real<datadir>/snapshots/preverified.toml(fetched out-of-band) starts cleanly with HTTPS_PROXY pointed at a dead local port — noLoading remote snapshot hasheslog line, no[CRIT], downloader brings up — confirming the local-file path bypasses remote fetcherigon snapshots reset --datadir=<dd> --preverified=embedded --dry-runexits 1 withError: invalid preverified flag value "embedded"; the--helpoutput shows(remote, local);--preverified=remoteand--preverified=localcontinue to work