Skip to content

Commit ea67c68

Browse files
AIQnetLabclaude
andcommitted
fix: replace wall-clock timestamp dependency with VTS for block validation
The network was deadlocking because timestamp validation rejected valid blocks — nodes couldn't reach 2/3 consensus and the chain stalled. Key changes: - Timestamp validation split into SYNC/LIVE modes: wall-clock checks disabled during sync, VTS (cryptographic hash chain) + prev_hash provide ordering guarantees without clock dependency - Disk-first height ordering: all update_all_heights and rollback paths now write RocksDB before RAM to prevent crash-induced divergence - O(1) hash index: microblock_hash_{height} in metadata CF enables prev_hash validation without loading full block body (WriteBatch atomic) - 3-tier prev_hash validation: hash index → full block + backfill → MISSING_PREVIOUS self-healing (buffer & retry, not reject) - VTS strict monotonicity: regression tolerance tightened from 15M to 5M hashes (30s → 10s), graceful skip when prev block unavailable - Chronic stall recovery threshold reduced from 300s to 120s for faster PFP activation when consensus is stuck - Periodic disk/RAM integrity check every 1000 blocks with auto-repair - Hash index migration at startup (idempotent, non-fatal fallback) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f3887a1 commit ea67c68

3 files changed

Lines changed: 701 additions & 415 deletions

File tree

0 commit comments

Comments
 (0)