Clock-warped node gets quietly wedged #6989

issue zw opened this issue on November 11, 2015
  1. zw commented at 5:11 PM on November 11, 2015: contributor

    If you accidentally warp your clock backwards far enough, you'll cause log noise and stall:

    2015-11-11 12:34:56 ERROR: CheckBlockHeader(): block timestamp too far in the future
    2015-11-11 12:34:56 InvalidChainFound: invalid block=00000000000000000d22b34a54be999f4eadde2ee895c208d4b3dc0210aa044f  height=123456  log2_work=12.345678  date=2015-11-11 12:34:56
    2015-11-11 12:34:56 ERROR: ConnectTip(): ConnectBlock 00000000000000000d22b34a54be999f4eadde2ee895c208d4b3dc0210aa044f failed
    

    but after you restart, the futuristic-looking block causing the stall is still considered invalid and no more messages about it get logged. If you miss the original message and you don't tend to scan backwards past the most recent startup, you'll see a comforting LoadBlockIndexDB: hashBestChain=... and No coin database inconsistencies in last N blocks at startup, and you'll see the node acquiring peers; you might see more ConnectInputs failed and AcceptToMemoryPool: non-final than usual, but nothing explicit to alert you to the fact that the longest chain is considered invalid, nor why. @laanwj suggests "'timestamp too far in the future' is a temporary condition, it probably shouldn't cache it indefinitely"; failing that, maybe it's easy enough to get caught in this trap that it merits an extra startup-time breadcrumb in the logs.

  2. laanwj added the label Validation on Nov 11, 2015
  3. laanwj commented at 12:20 PM on February 16, 2016: member

    Related issues and PRs:

    • Give a better error message if system clock is bad #6489
    • (serious) bug with wrong system clock #2007
    • Refine startup error messages (e.g. wrong system time) #5342
    • GUI shows generic out of sync warning when the clock is wrong. #2001
  4. MarcoFalke commented at 8:18 PM on April 24, 2020: member

    Let's continue discussion in #2001

  5. MarcoFalke closed this on Apr 24, 2020

  6. DrahtBot locked this on Feb 15, 2022
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-30 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me