Disable sync checkpoint system that blocks IBD

The sync checkpoint (hashSyncCheckpoint) was persisted in LevelDB pointing
to block 2,186,940. On startup it was loaded from DB, overriding any code
change to the initial value. CheckSync then rejected every block below
that height during IBD since they weren't in mapBlockIndex yet.

Three-pronged fix:
- CheckSync now always returns true (master key disabled, no new sync
  checkpoints will ever be broadcast)
- AcceptBlock no longer calls sync checkpoint enforcement
- LoadBlockIndex resets sync checkpoint to genesis if stored hash is
  not in the block index (prevents assert crash)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 18:32:11 -07:00
parent 1966f49ce2
commit 136d446157
3 changed files with 18 additions and 39 deletions
+4 -12
View File
@@ -2471,18 +2471,10 @@ bool CBlock::AcceptBlock()
}
}
// Before fork: enforce sync checkpoints for historical chain integrity
// After fork: no sync checkpoint enforcement (decentralized)
if (nHeight < FORK_HEIGHT_V5)
{
bool cpSatisfies = Checkpoints::CheckSync(hash, pindexPrev);
if (CheckpointsMode == Checkpoints::STRICT && !cpSatisfies)
return error("AcceptBlock() : rejected by synchronized checkpoint");
if (CheckpointsMode == Checkpoints::ADVISORY && !cpSatisfies)
strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!");
}
// Sync checkpoint enforcement is disabled:
// - Master key was removed in V5 fork, no new sync checkpoints will be broadcast
// - Hardcoded checkpoints already guarantee chain integrity
// - The persisted hashSyncCheckpoint in LevelDB blocks IBD from progressing
// Enforce rule that the coinbase starts with serialized block height
CScript expect = CScript() << nHeight;