You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
M1.2 Headers-first sync to tip with full PoW + difficulty validation #8
Using the engine's HeaderEngine, sync all mainnet headers to chaintip via the bridge (#? M1.1), validating prev-link, proof of work, timestamps, version rules, and the 2016-block retarget.
Benchmark / acceptance
Sync mainnet headers to tip; report total time and peak memory.
validateChain passes for the entire chain.
Tip hash matches a public block explorer.
Notes
No signatures here, so it is fast and honest: it is real consensus validation of the header chain. This is the Tier 0 backbone.
Done on testnet4 (the agreed first target; mainnet is a network-param flip).
src/sync-testnet4.js connects to a live testnet4 peer over TCP, syncs the header chain from genesis with a per-batch connectivity check, and fully validates it via HeaderEngine.validateChain (PoW, difficulty, BIP 94 timewarp, the 20-minute min-difficulty walk-back).
Measured: ~140k headers downloaded in ~3-9s, all valid, tip confirmed by 2/2 independent p2p peers (no third-party API). Validation runs ~15-21k headers/sec on the pure-JS engine, single core.
Acceptance met: validateChain passes for the whole chain; tip cross-checked. Resume + reorg + most-work across peers continues in #9 (M1.3).
Activity
melvincarvalho commentedon Jun 18, 2026
Done on testnet4 (the agreed first target; mainnet is a network-param flip).
src/sync-testnet4.jsconnects to a live testnet4 peer over TCP, syncs the header chain from genesis with a per-batch connectivity check, and fully validates it viaHeaderEngine.validateChain(PoW, difficulty, BIP 94 timewarp, the 20-minute min-difficulty walk-back).Measured: ~140k headers downloaded in ~3-9s, all valid, tip confirmed by 2/2 independent p2p peers (no third-party API). Validation runs ~15-21k headers/sec on the pure-JS engine, single core.
Acceptance met: validateChain passes for the whole chain; tip cross-checked. Resume + reorg + most-work across peers continues in #9 (M1.3).