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
Tracking issue for the build/sync modernization effort. It consolidates the root cause of the long-standing "won't compile / won't sync past the fork" problems, the fixes (already written as PRs), the release strategy, and live consensus-validation results. It cross-links the cluster of related issues so anyone landing on one of them finds the plan.
TL;DR
The infamous sync stall at block 450,947 is not a data/network problem — it's a toolchain miscompile. Modern GCC mis-optimizes the LYRA2REv2 / BMW256 hash, so a source-built node computes a wrong PoW hash at the multi-algorithm fork and dead-ends.
There are also build breakages (Boost 1.74+, Berkeley DB 4.8, blake2 alignment) and an OpenSSL 3.x signature-parsing break (stall at 605,359).
Plan: pin a single reproducible Docker build on Ubuntu 24.04 LTS, consensus-validate it by full reindex, then release. 26.04 / Boost 1.90 native is a separate later track.
Root cause of the stall (the important part)
Same source, different compiler → different consensus result. Specifically, GCC 13+ at -O2 miscompiles BMW256 (part of the LYRA2REv2 hash chain), producing wrong PoW hashes for LYRA2REv2 blocks. The node then rejects valid blocks at the multi-algorithm activation (block 450,947) and stalls.
Community confirmation: builds work with default flags but break with -Ofast -march=native, which overrides the protective per-file -O1.
⚠️Build with default optimization. Do NOT use -Ofast or -march=native — they re-break the LYRA2REv2 hash and reintroduce the stall.
Pin a reproducible build on Ubuntu 24.04 LTS. A settled toolchain whose consensus-affecting bugs are already fixed; the resulting binary also runs on 22.04 / 26.04. Newer toolchains carry higher consensus-miscompile risk for this old code, so we deliberately do not chase the newest OS for the canonical build.
Consensus-validate every build by full reindex against the existing chain — building is not the same as correct.
Release prebuilt binaries / AppImage so users need not compile — follow-up.
26.04 / Boost 1.90 native — separate experimental track (Boost 1.90 removed copy_option and asio resolver::query; needs source modernization).
Validation status (live)
Reindexing the chain with a clean 24.04 build of #138 + #142 + #146:
Crossed block 450,947 (LYRA2REv2 activation) clean — the historical stall point — and kept going.
Zero validation errors so far (currently ~500k and climbing).
Continuing to tip for full structural confirmation.
Phased plan
Phase 1 — match the network: reproducible 24.04 build, reindex-validated. (in progress — passing)
Phase 2 — polish: add a startup PoW known-answer self-test (catches any future miscompile, any algorithm, regardless of compiler); replace Fix OpenSSL 3.x signature verification failure #146's bespoke DER parser with Bitcoin Core's audited ecdsa_signature_parse_der_lax; split/clean the PRs.
Phase 3 — 26.04 native + tagged release with binaries.
Purpose
Tracking issue for the build/sync modernization effort. It consolidates the root cause of the long-standing "won't compile / won't sync past the fork" problems, the fixes (already written as PRs), the release strategy, and live consensus-validation results. It cross-links the cluster of related issues so anyone landing on one of them finds the plan.
TL;DR
Root cause of the stall (the important part)
Same source, different compiler → different consensus result. Specifically, GCC 13+ at
-O2miscompiles BMW256 (part of the LYRA2REv2 hash chain), producing wrong PoW hashes for LYRA2REv2 blocks. The node then rejects valid blocks at the multi-algorithm activation (block 450,947) and stalls.Community confirmation: builds work with default flags but break with
-Ofast -march=native, which overrides the protective per-file-O1.-Ofastor-march=native— they re-break the LYRA2REv2 hash and reintroduce the stall.The fixes (open PRs)
-O1on the hash files)Strategy
copy_optionand asioresolver::query; needs source modernization).Validation status (live)
Reindexing the chain with a clean 24.04 build of #138 + #142 + #146:
Phased plan
ecdsa_signature_parse_der_lax; split/clean the PRs.Related issues
Checklist
Dockerfile.build+ a clear "do not use-Ofast/-march=native" note