Blocklore
Esc

Type to search every published claim: statements, sources and topics.

Enter opens the claim; with no match, suggests the questionUp and down to move
Connect your AI977,628

What it is

BIP 54 (Consensus Cleanup) states that the timewarp bug lets an attacker with a majority of Bitcoin's hashrate arbitrarily lower mining difficulty by manipulating block timestamps, and that in the worst case the attacker can bring difficulty to its minimum within 38 days.1: open 4 sources
FactResearcherEstablishedHigh confidence
makes it possible for a majority-hashrate attacker to arbitrarily lower mining difficulty
Motivation, read 2026-11-20
Still in bip-0054.md at the head of bitcoin/bips (9f3d3bc6a6), read 26 Nov 2026.
In the worst case, an attacker can bring down the difficulty to its minimum within 38 days of starting the attack.
Motivation, read 2026-11-20
Still in bip-0054.md at the head of bitcoin/bips (9f3d3bc6a6), read 26 Nov 2026.
T1Great Consensus Cleanup Revival (Delving Bitcoin, post 1)Delving Bitcoin, supports part of it
setting the timestamp of the last block in a retarget period as much in the future as possible (now + 2h)
Post 1, timewarp section, published 2024-03-24, read 2026-11-20
T2Bitcoin Optech topic, Time warpBitcoin Optech, supports part of it
Time warp is an exploit of Bitcoin’s difficulty adjustment algorithm that allows miners controlling a large amount
Topic summary, first paragraph, read 2026-11-20
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 4/4History, hash and citation
Bitcoin Core measures each 2,016-block difficulty period from the timestamp of its own first block to that of its last block, which spans 2,015 block intervals rather than 2,016, so consecutive measurement windows do not overlap. This off-by-one is the property the timewarp attack exploits.2: open 3 sources
How it worksResearcherEstablishedHigh confidence
T1Bitcoin Core src/pow.cpp, GetNextWorkRequiredSource code, says this directly
int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1);
GetNextWorkRequired, choice of first block, read 2026-11-20
Still in src/pow.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
The timewarp vulnerability exploits how difficulty adjustment periods don't overlap.
Post 1, timewarp section, published 2024-03-24, read 2026-11-20
T2Bitcoin Optech Newsletter, 24 April 2024Bitcoin Optech, supports part of it
explains the off-by-one error in Bitcoin’s difficulty retargeting calculation
Selected Q&A from Bitcoin Stack Exchange, Where exactly is the off-by-one difficulty bug?, read 2026-11-20
bitcoin/bitcoin at f498a5a671 contains this text in src/pow.cpp, and still does on the default branch.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/pow.cpp | grep -nF 'int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1);'
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 3/3, code 1/1History, hash and citation

What defends against it

BIP 54 proposes that the first block of each 2,016-block difficulty period (height divisible by 2,016) must have a timestamp no earlier than 7,200 seconds (two hours) before the timestamp of the block immediately preceding it, which the BIP gives as its fix for the timewarp attack.3: open 2 sources
FactResearcherEstablishedHigh confidence
The former is fixed by preventing the timestamp of the first block of a difficulty period from being lower than the previous block's, with a two-hour grace period.
Rationale, read 2026-11-20
Still in bip-0054.md at the head of bitcoin/bips (9f3d3bc6a6), read 26 Nov 2026.
permits a majority hashrate attacker to arbitrarily increase block cadence.
Topic summary, time warp, read 2026-11-20
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 2/2History, hash and citation
BIP 94 (Testnet 4) adds a timewarp rule: the first block of each difficulty period must not be timestamped more than 600 seconds before the previous block. Bitcoin Core enforces this rule only on testnet4 and regtest; its mainnet parameters set enforce_BIP94 to false.4: open 5 sources
FactResearcherEstablishedHigh confidence
T1BIP 94, Testnet 4BIP, says this directlyBIP 94 on Blocklore
of the immediately prior block minus 600 seconds
Specification, consensus rules, rule 1, read 2026-11-20
Still in bip-0094.mediawiki at the head of bitcoin/bips (9f3d3bc6a6), read 26 Nov 2026.
inline constexpr int64_t MAX_TIMEWARP = 600;
MAX_TIMEWARP, read 2026-11-20
Still in src/consensus/consensus.h at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
// Testnet4 and regtest only: Check timestamp against prev for difficulty-adjustment
ContextualCheckBlockHeader, BIP94 timewarp check, read 2026-11-20
Still in src/validation.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
consensus.enforce_BIP94 = false;
CMainParams, consensus.enforce_BIP94, read 2026-11-20
Still in src/kernel/chainparams.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
a fix to the difficulty adjustment mechanism, which was part of the motivation that started the discussion.
PR description, read 2026-11-20
bitcoin/bitcoin at f498a5a671 contains this text in src/consensus/consensus.h, and still does on the default branch.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/consensus/consensus.h | grep -nF 'inline constexpr int64_t MAX_TIMEWARP = 600;'
bitcoin/bitcoin at f498a5a671 contains this text in src/validation.cpp.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/validation.cpp | grep -nF 'if (block.GetBlockTime() < pindexPrev->GetBlockTime() - MAX_TIMEWARP) {'
BIP 94's Status is "Deployed" on the default branch.
Run it yourselfcurl -s https://raw.githubusercontent.com/bitcoin/bips/master/bip-0094.mediawiki | grep -m1 -E '^ *Statuss?:'
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 5/5, code 3/3History, hash and citation
At commit f498a5a6, Bitcoin Core's GetMinimumTime raises the minimum block template timestamp on all networks to respect both the BIP 94 600-second timewarp limit and the BIP 54 rule that a period's last block is not earlier than its first; the BIP 54 part came from Bitcoin Core PR #35949, merged 7 September 2026.5: open 4 sources
TraceResearcherEstablishedHigh confidence
T1Bitcoin Core src/node/miner.cpp, GetMinimumTimeSource code, says this directly
min_time = std::max<int64_t>(min_time, pindexPrev->GetBlockTime() - MAX_TIMEWARP);
GetMinimumTime, read 2026-11-20
Still in src/node/miner.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
T1Bitcoin Core src/node/miner.cpp, GetMinimumTimeSource code, says this directly
min_time = std::max<int64_t>(min_time, first_block->GetBlockTime());
GetMinimumTime, BIP54 Murch-Zawy rule, read 2026-11-20
Still in src/node/miner.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
This makes the miner enforce the murch-zawy rule for which #35793 adds the validation part.
PR description, read 2026-11-20
T2Bitcoin Optech Newsletter, 11 September 2026Bitcoin Optech, supports part of it
updates block template creation to follow BIP54’s proposed mitigation for the
Notable code and documentation changes, Bitcoin Core, read 2026-11-20
bitcoin/bitcoin at f498a5a671 contains this text in src/node/miner.cpp, and still does on the default branch.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/node/miner.cpp | grep -nF 'min_time = std::max<int64_t>(min_time, first_block->GetBlockTime());'
bitcoin/bitcoin at f498a5a671 contains this text in src/node/miner.cpp.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/node/miner.cpp | grep -nF '// Account for BIP94 timewarp rule on all networks. This makes future'
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 4/4, code 2/2History, hash and citation
Bitcoin Core rejects a block whose timestamp is not later than the median time past, which is the median of the timestamps of the previous 11 blocks, ending with the new block's parent.6: open 2 sources
How it worksBuilderEstablishedHigh confidence
static constexpr int nMedianTimeSpan = 11;
nMedianTimeSpan and GetMedianTimePast, read 2026-11-20
Still in src/chain.h at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())
ContextualCheckBlockHeader, time-too-old check, read 2026-11-20
Still in src/validation.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
bitcoin/bitcoin at f498a5a671 contains this text in src/chain.h, and still does on the default branch.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/chain.h | grep -nF 'static constexpr int nMedianTimeSpan = 11;'
bitcoin/bitcoin at f498a5a671 contains this text in src/validation.cpp, and still does on the default branch.
Run it yourselfgit clone https://github.com/bitcoin/bitcoin && git -C bitcoin show f498a5a6718d9157b6afb85412c3462439117702:src/validation.cpp | grep -nF 'if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())'
Checked at block 976,990, 22 Nov 2026, 04:25 UTC: recheck, quotes 2/2, code 2/2History, hash and citation

What Blocklore watches

6.8 min
7 steps back, deepest at block 977,514
Measures
The largest step backward in time from one block to the next, in the last 144 blocks.
Thresholds
Elevated at a 60 minute step back anywhere, or a 10 minute step back at the first block of a difficulty period (the limit BIP 94 set for testnet4). Alert at a 120 minute step back there, which BIP 54 would make invalid: the signature of a time warp attack.
Source
Block headers from mempool.space and blockstream.info, which must agree.
Last read
26 Nov 2026, 06:01 UTC, block 977,635
-9.13%
Next on course for +9.17%
Measures
The last difficulty adjustment, and the one the current period is on course for.
Thresholds
Elevated when either moves 15% or more, alert at 25% or more: swings that size mean a large share of hashrate arrived or left. The projection counts only after 504 blocks of the period.
Source
Block headers from mempool.space and blockstream.info, which must agree.
Last read
26 Nov 2026, 06:01 UTC, block 977,635

What the lab tests

1 test

Bitcoin Core's own tests, run on a private test network against the newest release of each major version Bitcoin Core maintains, newest first. An older release runs the tests it has. See each release's run.

Bitcoin Core
TestBitcoin Core 32.123 Nov 2026Bitcoin Core 31.323 Nov 2026Bitcoin Core 30.523 Nov 2026
mining_basic.pyPassedPassedPassed

Public record