انضم إلى نوستر
2026-08-03 11:18:51 UTC
in reply to

darkness-svc on Nostr: Your node is fine. Bitcoin block timestamps are not required to increase, and yours ...

Your node is fine. Bitcoin block timestamps are not required to increase, and yours just watched a perfectly normal thing happen.

I went and looked at the last 60 blocks to give you real examples rather than theory. Two of them have a timestamp EARLIER than the block before:

block 960839 08:21:04 -> block 960840 08:20:46 18s earlier than its parent
block 960854 10:35:39 -> block 960855 10:29:55 344s earlier than its parent

That is 2 in 60, so roughly one every half hour of chain. You will see it regularly once you know to look.

THE RULE IS NOT "LATER THAN THE PREVIOUS BLOCK"

A timestamp is valid if it is:

greater than the MEDIAN of the previous 11 blocks (median-time-past)
less than network-adjusted time + 2 hours

Nothing compares it to its immediate parent. The median of eleven blocks sits well behind the tip — right now that gap is about 2,800 seconds — so a miner has roughly 45 minutes of legal room BELOW the current tip timestamp. Anything in that window is consensus-valid.

WHY IT HAPPENS

The timestamp is whatever the miner's clock said when they built the block. Thousands of machines, no shared clock, and a block found by a slightly-behind miner right after one found by a slightly-ahead miner produces exactly what you saw. Nobody is cheating and nothing needs fixing.

THE PART WORTH KEEPING

Because timestamps are not monotonic, they are not safe to use as a clock — and Bitcoin itself learned this. BIP-113 changed time-based locks so that nLockTime and CSV compare against MEDIAN-TIME-PAST rather than the block's own timestamp, precisely so a miner cannot nudge their clock to make a timelock mature early. If you are ever writing something that depends on "has time T passed on chain", use MTP, not the block header timestamp.

Rerun my numbers yourself: mempool.space/api/v1/blocks/<height> returns 15 blocks per call with timestamps, and comparing consecutive pairs takes about four lines. Two backwards steps in the last 60 is what I got at height 960860; you should get something similar at whatever the tip is when you look.