Skip to content
BIP ATLAS

BIPs 0009 · 0008

How does a soft fork switch on?

A bit in a block can signal readiness. New rules take effect only after a deployment has counted enough signals, waited, and reached activation.

A miner sets a bit in a block header. That block still follows the old rules. So does the next one. A soft fork needs a separate agreement about when nodes will begin rejecting blocks that break the new rules.1234

BIP 9 supplies that agreement: count signals over a period, lock in the change if enough blocks signal, then wait another period before enforcing it. BIP 8 changes the clock and adds an option to require signalling at the deadline. In either case, signalling by miners does not measure how many users have upgraded their nodes.145678

Source revision
bitcoin/bips @ 3a10b5b
Source checked
1 October 2026
Review state
Awaiting review
Source details

This chapter is an independent explanation, not the proposal itself. Preamble fields are shown as the pinned files record them, without author e-mail addresses. Status is the proposal’s own field. It is not an endorsement or a sign of consensus.

BIP 9: Version bits with timeout and delay

BIP
9
Title
Version bits with timeout and delay
Authors
Pieter Wuille
Peter Todd
Greg Maxwell
Rusty Russell
Status
Deployed
Type
Informational
Assigned
2015-10-04
License
PD

Pinned source · Reader view on bips.dev
SHA-256 0ffa7b1ad84e1f32c7499d8a8756721c737037cbc91c825d05d11640ed5fedda
Git blob ca6db79568ff6787a977c269c01429ee3bac0743

BIP 8: Version bits with lock-in by height

BIP
8
Title
Version bits with lock-in by height
Authors
Shaolin Fry
Luke Dashjr
Status
Complete
Type
Informational
Assigned
2017-02-01
License
BSD-3-Clause OR CC0-1.0
Version
1.0.0

Pinned source · Reader view on bips.dev
SHA-256 e86abe98ea522c919377db46206fac2bbb34c007c67ddbb2f92bcab9d2d617a2
Git blob 91379f039894fe16182c66de588565f3bad678ed

Fig. A11.1 The block where the rules change

The block where the rules changecsv: signals are counted in blocks 415,296–417,311; LOCKED_IN begins at 417,312, and ACTIVE at the recorded height 419,328. At least 1,916 blocks must have signalled, but the count itself is not recorded. The new rules are enforced only from ACTIVE. Prior periods are inferred from BIP 9's rules. segwit: signals are counted in blocks 477,792–479,807; LOCKED_IN begins at 479,808, and ACTIVE at the recorded height 481,824. At least 1,916 blocks must have signalled, but the count itself is not recorded. The new rules are enforced only from ACTIVE. Prior periods are inferred from BIP 9's rules.COUNT SIGNALSWAIT ONE PERIODENFORCE RULESCSV · BIT 0BIPS 68 / 112 / 113STARTEDLOCKED_INACTIVE415,296–417,311417,312419,328AND EVERY BLOCK AFTER≥ 1,916 SIGNALSPERIODS INFERRED; COUNT NOT RECORDEDHEIGHT RECORDEDSEGWIT · BIT 1BIPS 141 / 143 / 147STARTEDLOCKED_INACTIVE477,792–479,807479,808481,824AND EVERY BLOCK AFTER≥ 1,916 SIGNALSPERIODS INFERRED; COUNT NOT RECORDEDHEIGHT RECORDEDSTRIPS SHOW PHASES, NOT INDIVIDUAL BLOCKS
The block where the rules changecsv: signals are counted in blocks 415,296–417,311; LOCKED_IN begins at 417,312, and ACTIVE at the recorded height 419,328. At least 1,916 blocks must have signalled, but the count itself is not recorded. The new rules are enforced only from ACTIVE. Prior periods are inferred from BIP 9's rules. segwit: signals are counted in blocks 477,792–479,807; LOCKED_IN begins at 479,808, and ACTIVE at the recorded height 481,824. At least 1,916 blocks must have signalled, but the count itself is not recorded. The new rules are enforced only from ACTIVE. Prior periods are inferred from BIP 9's rules.COUNT SIGNALSWAIT ONE PERIODENFORCE RULESCSV · BIT 0BIPS 68 / 112 / 113STARTEDLOCKED_INACTIVE415,296–417,311417,312419,328AND EVERY BLOCKAFTER≥ 1,916 SIGNALSPERIODS INFERRED; COUNT NOT RECORDEDHEIGHT RECORDEDSEGWIT · BIT 1BIPS 141 / 143 / 147STARTEDLOCKED_INACTIVE477,792–479,807479,808481,824AND EVERY BLOCKAFTER≥ 1,916 SIGNALSPERIODS INFERRED; COUNT NOT RECORDEDHEIGHT RECORDEDSTRIPS SHOW PHASES, NOT INDIVIDUAL BLOCKS
Historical windows and heights, both networks
csv, mainnet
2016-05-01 → 2017-05-01 = BIP 68 ✓
start 2016-05-01 00:00:00 UTC (1462060800), timeout 2017-05-01 00:00:00 UTC (1493596800), state “active since #419328”; implied LOCKED_IN from 417,312
csv, testnet
2016-03-01 → 2017-05-01 = BIP 68 ✓
start 2016-03-01 00:00:00 UTC (1456790400), timeout 2017-05-01 00:00:00 UTC (1493596800), state “active since #770112”; implied LOCKED_IN from 768,096
segwit, mainnet
2016-11-15 → 2017-11-15 = BIP 141 ✓
start 2016-11-15 00:00:00 UTC (1479168000), timeout 2017-11-15 00:00:00 UTC (1510704000), state “active since #481824”; implied LOCKED_IN from 479,808
segwit, testnet
2016-05-01 → 2017-05-01 = BIP 141 ✓
start 2016-05-01 00:00:00 UTC (1462060800), timeout 2017-05-01 00:00:00 UTC (1493596800), state “active since #834624”; implied LOCKED_IN from 832,608
CSV and SegWit each passed through a counting period and a waiting period. Only the ACTIVE side enforces the new rules. The activation heights are recorded in BIP 9; the preceding periods are inferred from its rules.391011

What a signal contains

Before BIP 9, a soft fork raised the block version number, and nodes compared versions as integers. Only one change could roll out at a time, and none could be rejected for good: until one had fully rolled out, no later one could be scheduled. Every upgrade also permanently restricted which version values were allowed. BIP 9’s authors wanted separate signals for separate deployments.12

Reading the field as bits lets separate deployments signal side by side. A signalling block must have 001 as its top three bits, which gives versions from 0x20000000 to 0x3FFFFFFF. A block whose top bits are anything else counts as signalling nothing. That leaves 29 bits for deployments, and two other top-bit patterns for future mechanisms.1314

Fig. A11.2 One bit per deployment

One bit per deploymentThe 32-bit block version, bit 31 on the left. Bits 31 to 29 must read 001; bits 28 to 0 are the 29 deployment bits. Bit 1 is segwit. Bit 0 is csv. The value drawn is 0x20000003, a hypothetical version signalling for both. segwit only: 0x20000002; csv only: 0x20000001; both (hypothetical): 0x20000003.31282416800100000000000000000000000000011TOP BITS 001200000030x29 DEPLOYMENT BITS · 28 TO 0BIT 1 · SEGWITBIT 0 · CSVSEGWIT ONLY0x20000002bit 1 setCSV ONLY0x20000001bit 0 setBOTH (HYPOTHETICAL)0x20000003bits 1 and 0 setANY OTHER TOP BITS: THE BLOCK SIGNALS NOTHING
A hypothetical version that would signal for both recorded deployments at once: the top three bits must be 001, and the other 29 are free for deployments. csv used bit 0 and segwit bit 1.91314

Each deployment gets a bit and a window in which that bit counts. Setting it outside that window does not turn the rules on. A bit can eventually be reused, but BIP 9 discourages that until necessary, and even then recommends a pause in between to detect buggy software.1516

Choosing and reusing a deployment bit

Each deployment names its bit, from 0 to 28, a starttime and a timeout. BIP 9 suggests a start about a month after a release that includes the change, and a timeout one year later. The timeout is what lets a bit be reused: in the authors’ words, a new use of a bit then clearly refers to a new BIP.151718

Reuse is allowed but not encouraged. A later deployment may take a bit once the previous one has timed out or activated, and BIP 9 recommends a pause in between. The authors give that fallow period two jobs: it helps detect buggy clients, and it leaves time for warnings and upgrades after a soft fork succeeds.16

Count, wait, enforce

Every deployment is in one of five states: DEFINED, STARTED, LOCKED_IN, ACTIVE or FAILED. States change only at the boundaries of 2,016-block retarget periods, and every block in a period shares one. A block’s state never depends on its own version, only on its ancestors.219

The clock is not the wall clock. BIP 9 compares starttime and timeout with the median time past of the block before each period begins, a value the chain itself makes monotonic. Once that reaches starttime, the deployment is STARTED and the bit means something.1520

At each boundary in STARTED, nodes count how many of the previous 2,016 blocks set the bit. At least 1,916 of them, 95 percent, moves the deployment to LOCKED_IN; on testnet the threshold was 1,512. If the timeout has been reached, the deployment fails instead, and that check comes first.5

Fig. A11.3 How close is enough?

How many blocks must signalEach bar is one retarget period of 2,016 blocks, to scale. bip 9 · mainnet: at least 1,916 must signal (95 percent), so 101 non-signalling blocks are enough to stop lock-in in that period; bip 9 · testnet: at least 1,512 must signal (75 percent), so 505 non-signalling blocks are enough to stop lock-in in that period; bip 8 · suggested: at least 1,815 must signal (90 percent), so 202 non-signalling blocks are enough to stop lock-in in that period.05041,0081,5122,016BIP 9 · MAINNET · ≥ 1,916 · 95%100 MAY WITHHOLD · 101 STOP LOCK-INBIP 9 · TESTNET · ≥ 1,512 · 75%504 MAY WITHHOLD · 505 STOP LOCK-INBIP 8 · SUGGESTED · ≥ 1,815 · 90%201 MAY WITHHOLD · 202 STOP LOCK-IN
A single block can separate reaching the threshold from waiting another period. The thresholds belong to the specified deployment rules.52122

Once LOCKED_IN, the deployment waits exactly one period. No further tally can undo it. The next period is ACTIVE, and upgraded nodes enforce the new rules. Miners should keep signalling during the wait so uptake remains visible.34

Step forward to STARTED, choose enough signals and advance through LOCKED_IN to ACTIVE. Reaching the threshold starts a wait; it does not activate the new rules immediately. BIP 9 still checks the timeout before the count.24523

Fig. A11.4 From signalling to rules

Static view: a hypothetical csv run, period 10 reaching the threshold, played to the end. With JavaScript you can pick a deployment, step through periods and set the counts.

From signalling to rulesSchematic run of 30 periods for csv (BIP 9, bit 0, mainnet parameters), threshold 1,916; window periods 1–26, timeout reached at period 27; period heights are schematic. So far: period 0 DEFINED; periods 1–10 STARTED; period 11 LOCKED_IN; periods 12–29 ACTIVE. Period 29: ACTIVE; the rules are enforced.MTP ≥ STARTTIME≥ 1,916 SIGNALAFTER ONE PERIODMTP ≥ TIMEOUTMTP ≥ TIMEOUTDEFINEDSTARTEDLOCKED_INACTIVEFAILEDRETARGET PERIODS · 2,016 BLOCKS EACH0DS<S<S<S<S<S<S<S<S<10S≥LAAAAAAAA20AAAAAAAAAABAR ABOVE TILES: THE WINDOW, START TO TIMEOUT02,0161,916PERIOD 29schematic blocks 58,464–60,479ACTIVENOT COUNTEDD DEFINED · S STARTED · M MUST_SIGNAL · L LOCKED_IN · A ACTIVE · F FAILED
From signalling to rulesSchematic run of 30 periods for csv (BIP 9, bit 0, mainnet parameters), threshold 1,916; window periods 1–26, timeout reached at period 27; period heights are schematic. So far: period 0 DEFINED; periods 1–10 STARTED; period 11 LOCKED_IN; periods 12–29 ACTIVE. Period 29: ACTIVE; the rules are enforced.MTP ≥ STARTTIME≥ 1,916 SIGNALAFTER ONE PERIODMTP ≥ TIMEOUTMTP ≥ TIMEOUTDEFINEDSTARTEDLOCKED_INACTIVEFAILEDPERIODS · 2,016 BLOCKS EACH0DS<S<S<S<S<S<S<S<S<S≥LAAA15AAAAAAAAAAAAAAABAR ABOVE TILES: THE WINDOW02,0161,916PERIOD 29schematic blocks 58,464–60,479ACTIVENOT COUNTEDD DEFINED · S STARTED · M MUST_SIGNALL LOCKED_IN · A ACTIVE · F FAILED

Period 29: ACTIVE; the rules are enforced.

BIP 9 table, line 18. Schematic clock and hypothetical counts (none are in the pinned sources); states from the tested model.

A schematic run of periods. Choose a deployment, step through the boundaries, and set whether a counted period reaches the threshold. The counts are hypothetical.245715202425
Caveat

Signalling is not activation. A STARTED or LOCKED_IN deployment changes no rule; only ACTIVE blocks enforce it, at least one full period after the count that locked it in. (BIP 8’s MUST_SIGNAL period is the one exception: there, a block that fails to signal can itself be invalid.)2347

Why the timeout wins, and how unknown upgrades are noticed

The order matters because bits are shared over time. If counting came first, the authors explain, two deployments on the same bit could collide: an old one locking in while a new one starts, both demanding that miners set the bit. Checking the timeout first rules that out.523

Nodes that have not upgraded still notice. BIP 9 has software track unexpected bits as an unknown upgrade, and says it should warn loudly when one locks in.26

Reading the historical record

The opening diagram uses CSV and SegWit, the deployments listed in BIP 9. Their recorded activation heights let us work backward to the waiting and counting periods. They do not tell us the exact count of signalling blocks; the diagram shows only the threshold that must have been met.45911

Deployment dates, heights and source checks

BIP 9 keeps a small table of deployments. It records csv, the bundle of BIPs 68, 112 and 113, on bit 0 with a mainnet window from 1 May 2016 to 1 May 2017, and segwit on bit 1 from 15 November 2016 to 15 November 2017. The dates match the Unix times written in the deployment sections of BIP 68 and BIP 141, and this site’s build fails if they ever disagree.910

The table records only where each deployment became active: block 419,328 for csv and 481,824 for segwit, both multiples of 2,016. The rules let us read backwards. csv must have been LOCKED_IN from block 417,312, which means blocks 415,296 to 417,311 included at least 1,916 that signalled; segwit was LOCKED_IN from 479,808.4511

Those dates are history, not a schedule. A deployment’s parameters describe one attempt at one time; the table’s states say how each attempt ended.927

What happens if the deadline arrives?

BIP 8’s authors wanted to limit miners’ ability to delay a change and avoid a schedule tied to block timestamps. Their proposal uses block heights for the start and deadline. It also allows a minimum activation height, so a change can lock in without taking effect too soon.62225

The choice is lockinontimeout. Turn it off and an attempt without enough signals fails at the deadline. Turn it on and the final period becomes MUST_SIGNAL: once the permitted number of non-signalling blocks has been used, further non-signalling blocks are invalid. That forces the count needed for lock-in.724

Fig. A11.5 Two endings for a stalled deployment

Two endings for a stalled deploymentBIP 8 with its suggested threshold of 1,815 and a window of 26 periods, starting at period 1; no period reaches the threshold. lockinontimeout false: period 0 DEFINED; periods 1–26 STARTED; periods 27–29 FAILED. lockinontimeout true: period 0 DEFINED; periods 1–25 STARTED; period 26 MUST_SIGNAL; period 27 LOCKED_IN; periods 28–29 ACTIVE. In a MUST_SIGNAL period, 2,016 − 1,815 = 201 blocks may fail to signal; the 202nd that fails is invalid, so at least 1,815 signal. minimum_activation_height is 0, so LOCKED_IN lasts one period.LOCKINONTIMEOUT FALSED0S1S2…S24S25S26F27F28LOCKINONTIMEOUT TRUED0S1S2…S24S25M26L27A28TIMEOUTHEIGHTBAR ABOVE TILES: THE WINDOW · 26 PERIODS = 52,416 BLOCKS201MINIMUM ACTIVATION HEIGHT 0:LOCKED_IN LASTS ONE PERIOD2,016 − 1,815 = 201 BLOCKSMAY FAIL TO SIGNALTHE 202ND THAT FAILSIS INVALID
BIP 8’s suggested parameters, run by the tested model with no STARTED period reaching the threshold. Only lockinontimeout differs.7212425

The choice can split nodes onto different chains. BIP 8 warns that nodes requiring lock-in may follow a lower-work chain than nodes that do not, potentially for an extended period. Its authors suggest this option for changes facing political opposition from a non-negligible share of miners.2128

BIP 8 parameters and deployment history

So a BIP 8 deployment counts in heights: startheight and timeoutheight, both on retarget boundaries and at least 4,032 blocks apart. Its suggested threshold is lower, 1,815 blocks or 90 percent, and its suggested window is probably at least a year, 52,416 blocks. A minimum activation height can hold a locked-in deployment back so that nodes have time to upgrade; set to 0, LOCKED_IN lasts one period, as in BIP 9.212529

The new part is lockinontimeout. Without it, a deployment that never reaches the threshold fails at the timeout. With it, the last period before the timeout becomes MUST_SIGNAL. Once 2,016 minus the threshold blocks in it have failed to signal, any further block that fails to signal is invalid, and the deployment locks in regardless.724

BIP 8’s own history is in its changelog: rejected after a three-year timeout in 2020, revised with MUST_SIGNAL and a minimum activation height, and advanced to complete in 2026. Its pinned assignments file lists no deployments.2730

Proposal dates and status in the pinned sources

A soft fork tightens the rules in a backward-compatible way. Once it is active, blocks that older software would accept can be rejected, so everyone needs to know from which block the new rules apply. BIP 9, assigned in 2015 and recorded as deployed, is the mechanism that told them for the csv and segwit soft forks. BIP 8, assigned in 2017 and now recorded as complete, is an alternative that counts in block heights and can force the outcome.16931

The signal, the waiting period and enforcement are separate steps. Following the deployment’s state tells a node which rules apply.247

Evidence

Each numbered marker in the text points here, and the ↩ links lead back to the text. Quotes are verbatim from the BIP files at commit 3a10b5b, wiki markup included. Links open the exact lines. Labels say what kind of statement each entry is: a rule, the author’s rationale, history, a test vector, or our own inference.

  1. ↩ a b c Rule BIP 9 reads the block version field as a bit vector, so several backward-compatible changes (soft forks) can be deployed in parallel, each tracked on its own bit; BIP 8 reads the field the same way.

    Quoted source text (2)

    allowing multiple backward-compatible changes (further called "soft forks") to be deployed in parallel. It relies on interpreting the version field as a bit vector, where each bit can be used to track an independent change.

    BIP 9, line 16

    The nVersion block header field is to be interpreted as a 32-bit little-endian integer (as present), and bits are selected within this integer as values (1 << N) where N is the bit number.

    BIP 8, lines 73–76
  2. ↩ a b c d e f Rule The states are DEFINED, STARTED, LOCKED_IN (for one period after a period in which at least threshold blocks set the bit), ACTIVE and FAILED.

    Quoted source text (2)

    '''DEFINED''' is the first state that each soft fork starts out as.

    BIP 9, lines 49–53

    '''LOCKED_IN''' for one retarget period after the first retarget period with STARTED blocks of which at least threshold have the associated bit set in nVersion. # '''ACTIVE''' for all blocks after the LOCKED_IN retarget period. # '''FAILED''' for one retarget period past the timeout time, if LOCKED_IN was not reached.

    BIP 9, lines 51–53
  3. ↩ a b c d Rule Miners should keep setting the bit in LOCKED_IN so uptake stays visible, but this has no effect on consensus rules; the new rules are enforced only in ACTIVE blocks.

    Quoted source text (2)

    Miners should continue setting the bit in LOCKED_IN phase so uptake is visible, though this has no effect on consensus rules.

    BIP 9, lines 68–69

    The new consensus rules for each soft fork are enforced for each block that has ACTIVE state.

    BIP 9, line 73
  4. ↩ a b c d e f g h i Rule After one period of LOCKED_IN the deployment becomes ACTIVE automatically; ACTIVE and FAILED are terminal.

    Quoted source text (2)

    After a retarget period of LOCKED_IN, we automatically transition to ACTIVE.

    BIP 9, line 137

    And ACTIVE and FAILED are terminal states, which a deployment stays in once they're reached.

    BIP 9, line 142
  5. ↩ a b c d e f g h Rule BIP 9's lock-in threshold is at least 1,916 of a period's 2,016 blocks (95%), or 1,512 (75%) on testnet; failure takes precedence over counting.

    Quoted source text (1)

    The threshold is ≥1916 blocks (95% of 2016), or ≥1512 for testnet (75% of 2016). The transition to FAILED takes precedence, as otherwise an ambiguity can arise.

    BIP 9, lines 113–114
  6. ↩ a b c Rule BIP 8 is an alternative to BIP 9 that uses block heights instead of timestamps for start and timeout, and adds a parameter that can guarantee activation.

    Quoted source text (1)

    This document specifies an alternative to [[bip-0009.mediawiki|BIP9]] that corrects for a number of perceived mistakes. Block heights are used for start and timeout rather than POSIX timestamps. It additionally introduces an activation parameter that can guarantee activation of backward-compatible changes

    BIP 8, lines 15–17
  7. ↩ a b c d e f g Rule With lockinontimeout set, the last period before the timeout is MUST_SIGNAL: once 2,016 minus threshold blocks in it have failed to signal, further non-signalling blocks are invalid, and LOCKED_IN follows.

    Quoted source text (3)

    '''MUST_SIGNAL''' for one retarget period prior to the timeout, if LOCKED_IN was not reached and '''lockinontimeout''' is true.

    BIP 8, line 66

    During the MUST_SIGNAL phase, if '''(2016 - threshold)''' blocks in the retarget period have already failed to signal, any further blocks that fail to signal are invalid.

    BIP 8, line 90

    If we have finished a period of MUST_SIGNAL, we transition directly to LOCKED_IN.

    BIP 8, line 152
  8. ↩ a b c d e f History BIP 9's assignment table records csv (bit 0; mainnet 1 May 2016 to 1 May 2017; active since block 419,328) and segwit (bit 1; mainnet 15 November 2016 to 15 November 2017; active since block 481,824).

    Quoted source text (2)

    | csv | 0 | 2016-05-01 00:00:00 | 2017-05-01 00:00:00 | active since #419328

    BIP 9 (assignments.mediawiki), lines 18–22

    | segwit | 1 | 2016-11-15 00:00:00 | 2017-11-15 00:00:00 | active since #481824

    BIP 9 (assignments.mediawiki), lines 28–32
  9. ↩ a b History Those dates match the Unix times in the deployment sections of BIP 68 and BIP 141.

    Quoted source text (2)

    midnight 1st May 2016 UTC (Epoch timestamp 1462060800) and BIP9 '''timeout''' will be midnight 1st May 2017 UTC (Epoch timestamp 1493596800)

    BIP 68, line 226

    midnight 15 November 2016 UTC (Epoch timestamp 1479168000) and BIP9 timeout will be midnight 15 November 2017 UTC (Epoch timestamp 1510704000)

    BIP 141, line 308
  10. ↩ a b c Test vector Read with BIP 9's rules, csv's activation at block 419,328 means LOCKED_IN from block 417,312 and a threshold-reaching count in blocks 415,296 to 417,311; segwit's at 481,824 means LOCKED_IN from 479,808. Each recorded activation height is a multiple of 2,016.

    Quoted source text (2)

    active since #419328

    BIP 9 (assignments.mediawiki), line 22

    active since #481824

    BIP 9 (assignments.mediawiki), line 32
  11. ↩ Author’s rationale BIP 9's motivation: BIP 34's integer version comparison allowed only one change at a time, could not reject a proposal permanently, and every upgrade permanently removed version values.

    Quoted source text (2)

    As it relies on comparing version numbers as integers however, it only supports one single change being rolled out at once, requiring coordination between proposals, and does not allow for permanent rejection

    BIP 9, line 20

    every upgrade permanently restricts the set of allowed nVersion field values.

    BIP 9, line 22
  12. ↩ a b Rule A signalling block's top three version bits must be 001, giving versions 0x20000000 to 0x3FFFFFFF; a version without those top bits counts as signalling nothing.

    Quoted source text (2)

    The top 3 bits of such blocks must be 001, so the range of actually possible nVersion values is [0x20000000...0x3FFFFFFF], inclusive.

    BIP 9, lines 59–60

    When a block nVersion does not have top bits 001, it is treated as if all bits are 0 for the purposes of deployments.

    BIP 9, lines 65–66
  13. ↩ a b Author’s rationale Restricting the top bits to 001 leaves 29 deployment bits and keeps top bits 010 and 011 for two future mechanisms.

    Quoted source text (1)

    By restricting the top 3 bits to 001 we get 29 out of those for the purposes of this proposal, and support two future upgrades for different mechanisms (top bits 010 and 011).

    BIP 9, lines 63–64
  14. ↩ a b c d Rule A BIP 9 deployment has a name, a bit from 0 to 28, a starttime (a minimum median time past) and a timeout after which it is considered failed if not locked in.

    Quoted source text (1)

    It is chosen from the set {0,1,2,...,28}. # The '''starttime''' specifies a minimum median time past of a block at which the bit gains its meaning. # The '''timeout''' specifies a time at which the deployment is considered failed.

    BIP 9, lines 29–31
  15. ↩ a b Author’s rationale A later deployment may reuse a bit once the previous one has timed out or activated, though BIP 9 discourages it until necessary and recommends a pause; the authors say the fallow period after an attempt helps detect buggy clients and leaves time for warnings and upgrades.

    Quoted source text (2)

    A later deployment using the same bit is possible as long as the starttime is after the previous one's timeout or activation, but it is discouraged until necessary, and even then recommended to have a pause in between to detect buggy software.

    BIP 9, lines 42–43

    The fallow period at the conclusion of a soft fork attempt allows some detection of buggy clients, and allows time for warnings and software upgrades for successful soft forks.

    BIP 9, lines 222–224
  16. ↩ Author’s rationale BIP 9 suggests a starttime about a month after a release including the soft fork, and a timeout one year (31,536,000 seconds) later.

    Quoted source text (2)

    '''starttime''' should be set to some date in the future, approximately one month after a software release date including the soft fork.

    BIP 9, lines 39–40

    '''timeout''' should be 1 year (31536000 seconds) after starttime.

    BIP 9, line 40
  17. ↩ Author’s rationale The authors give the timeout as a way to reuse bits even when a soft fork never activates, so a new use of a bit clearly refers to a new BIP.

    Quoted source text (1)

    The failure timeout allows eventual reuse of bits even if a soft fork was never activated, so it's clear that the new use of the bit refers to a new BIP.

    BIP 9, lines 216–218
  18. ↩ Rule All blocks in one 2016-block retarget period have the same state, and a block's state never depends on its own version, only on its ancestors'.

    Quoted source text (2)

    All blocks within a retarget period have the same state.

    BIP 9, lines 86–88

    Note that a block's state never depends on its own nVersion; only on that of its ancestors.

    BIP 9, line 118
  19. ↩ a b Rule BIP 9's clock is the median time past of the period's first block's parent, treated as a monotonic clock defined by the chain.

    Quoted source text (1)

    The expression GetMedianTimePast(block.parent) is referred to as MTP in the diagram above, and is treated as a monotonic clock defined by the chain.

    BIP 9, lines 98–100
  20. ↩ a b c d Author’s rationale BIP 8 suggests a threshold of 1,815 blocks (90%), a timeout of probably at least a year or 52,416 blocks after the start, and lockinontimeout true for a soft fork facing political opposition from a non-negligible share of miners.

    Quoted source text (2)

    probably at least 1 year, or 52416 blocks (26 retarget intervals) after '''startheight'''. # '''threshold''' should be 1815 blocks (90% of 2016), or 1512 (75%) for testnet.

    BIP 8, lines 50–51

    '''lockinontimeout''' should be set to true for any softfork that is expected or found to have political opposition from a non-negligible percent of miners.

    BIP 8, line 53
  21. ↩ a b Author’s rationale BIP 8 sets out to correct what its authors call perceived mistakes in BIP 9: a near-unanimous hashrate requirement that lets a small minority veto, timestamps that let a sudden hashrate loss interfere with a late activation, unreliable block times, and a non-intuitive trigger at the first retarget after a given time.

    Quoted source text (5)

    This document specifies an alternative to [[bip-0009.mediawiki|BIP9]] that corrects for a number of perceived mistakes.

    BIP 8, line 15

    Activation is dependent on near unanimous hashrate signalling which may be impractical and result in veto by a small minority of non-signalling hashrate.

    BIP 8, line 23

    Due to using timestamps rather than block heights, it was found to be a risk that a sudden loss of significant hashrate could interfere with a late activation.

    BIP 8, line 25

    Since each new block must increase the height by one, thresholds based on block height are much more reliable and intuitive and can be calculated exactly for difficulty retarget.

    BIP 8, line 27

    Block time is somewhat unreliable and may be intentionally or unintentionally inaccurate, so thresholds based on block time are not ideal. Secondly, BIP9 specified triggers based on the first retarget after a given time, which is non-intuitive.

    BIP 8, line 27
  22. ↩ a b Author’s rationale The authors explain why failure takes precedence: otherwise two non-overlapping deployments on the same bit could both demand the bit, one locking in while the other starts.

    Quoted source text (1)

    The transition to FAILED takes precedence, as otherwise an ambiguity can arise. There could be two non-overlapping deployments on the same bit, where the first one transitions to LOCKED_IN while the other one simultaneously transitions to STARTED, which would mean both would demand setting the bit.

    BIP 9, lines 114–116
  23. ↩ a b c d Rule Without lockinontimeout, a deployment that has not reached the threshold fails at the timeout height; the count is checked first. (BIP 8's state diagram labels lock-in "height < timeoutheight AND threshold reached"; this site follows the pseudocode, which counts first, so a threshold-reaching period can still lock in at the timeout height, consistent with the parameter text's "excluding this block's bit state".)

    Quoted source text (3)

    If the threshold hasn't been met and we reach the timeout, we transition directly to FAILED.

    BIP 8, line 130

    if (count >= threshold) { return LOCKED_IN; } else if (lockinontimeout && block.height + 2016 >= timeoutheight) { return MUST_SIGNAL; } else if (block.height >= timeoutheight) { return FAILED; }

    BIP 8, lines 143–149

    Once this height has been reached, if the soft fork has not yet locked in (excluding this block's bit state), the deployment is considered failed on all descendants of the block.

    BIP 8, line 38
  24. ↩ a b c d Rule minimum_activation_height lets LOCKED_IN last longer so nodes can upgrade; setting it to 0 keeps LOCKED_IN to a single period.

    Quoted source text (2)

    This allows more time to be spent in the LOCKED_IN state so that nodes can upgrade. This may be set to 0 to have the LOCKED_IN state be a single retarget period.

    BIP 8, line 52

    Regardless of the value of '''lockinontimeout''', if LOCKED_IN is reached, ACTIVE will be reached either one retarget period later, or at '''minimum_activation_height''', whichever comes later.

    BIP 8, line 97
  25. ↩ Rule BIP 9 has software track unexpected version bits as an extra unknown upgrade, and says it should warn loudly when one locks in.

    Quoted source text (1)

    To support upgrade warnings, an extra "unknown upgrade" is tracked, using the "implicit bit" mask = (block.nVersion & ~expectedVersion) != 0. Mask will be non-zero whenever an unexpected bit is set in nVersion. Whenever LOCKED_IN for the unknown upgrade is detected, the software should warn loudly about the upcoming soft fork.

    BIP 9, line 163
  26. ↩ a b History BIP 8's changelog records it moving to Rejected after a three-year timeout in 2020, being revised (MUST_SIGNAL, a minimum_activation_height parameter, a 90% recommendation), and advancing to Complete in 2026.

    Quoted source text (5)

    * '''1.0.0''' (2026-08-03): ** Advance to Complete.

    BIP 8, lines 280–281

    ** Reduce recommended threshold from 95% to 90%.

    BIP 8, line 284

    ** Replace FAILING state with MUST_SIGNAL phase.

    BIP 8, line 293

    ** Add minimum_activation_height parameter.

    BIP 8, line 300

    * '''0.0.2''' (2020-02-26): ** Move to Rejected due to 3-year time-out.

    BIP 8, lines 304–305
  27. ↩ Rule BIP 8 warns that nodes with lockinontimeout set may follow a lower-work chain than nodes without it for an extended period, and may need to connect preferentially to each other.

    Quoted source text (1)

    Implementations with ''lockinontimeout'' set to true may potentially follow a lower work chain than nodes with ''lockinontimeout'' set to false for an extended period. In order for this not to result in a net split nodes with ''lockinontimeout'' set to true, those nodes may need to preferentially connect to each other.

    BIP 8, line 209
  28. ↩ Rule A BIP 8 deployment adds startheight, timeoutheight, a threshold, minimum_activation_height and the lockinontimeout flag, with heights on retarget boundaries and the timeout at least 4,032 blocks after the start.

    Quoted source text (3)

    The '''startheight''' specifies the height of the first block at which the bit gains its meaning.

    BIP 8, lines 37–41

    The '''lockinontimeout''' boolean if set to true, blocks are required to signal in the final period, ensuring the soft fork has locked in by timeoutheight.

    BIP 8, line 41

    '''startheight''', '''timeoutheight''', and '''minimum_activation_height''' must be an exact multiple of 2016 (ie, at a retarget boundary), and '''timeoutheight''' must be at least 4032 blocks (2 retarget intervals) after '''startheight'''.

    BIP 8, line 58
  29. ↩ Test vector BIP 8's pinned assignments file has a heading and a note but no deployment rows (this site's parser finds none).

    Quoted source text (1)

    ==Deployments== List of deployments. State can be defined, active, failed. Dates are in UTC.

    BIP 8 (assignments.mediawiki), lines 1–5
  30. ↩ History BIP 9 (Wuille, Todd, Maxwell, Russell) was assigned in 2015 and is recorded as Deployed; BIP 8 (Fry, Dashjr) was assigned in 2017 and is recorded as Complete. Both are Informational.

    Quoted source text (2)

    Title: Version bits with timeout and delay Authors: Pieter Wuille <pieter.wuille@gmail.com> Peter Todd <pete@petertodd.org> Greg Maxwell <greg@xiph.org> Rusty Russell <rusty@rustcorp.com.au> Status: Deployed Type: Informational Assigned: 2015-10-04

    BIP 9, lines 3–10

    Title: Version bits with lock-in by height Authors: Shaolin Fry <shaolinfry@protonmail.ch> Luke Dashjr <luke+bip@dashjr.org> Status: Complete Type: Informational Assigned: 2017-02-01

    BIP 8, lines 3–8