- What is version bits BIP9?
- How is version bits activated?
- What are soft fork timeouts?
- What is the activation workflow?
- What is the version bit?
- When should miners set bits?
- How does it differ to an ISM soft fork?
- Do miners have to upgrade?
- Who assigns version bits to different upgrade proposals?
- Further reading
What is version bits BIP9?
The version bits BIP9 system is a way to introduce backward compatible rule changes to the Bitcoin consensus rules, known as a soft fork.
version bits allows miners to signal that they can validate the soft fork rules. It also allows for up to 29 soft forks to be proposed concurrently.
How is version bits activated?
version bits does not require activation, it’s simply a way for miners to signal readiness for a soft fork by setting bits in the block header nVersion field.
What are soft fork timeouts?
Soft forks have a start time and an timeout during which the proposal is active. The soft fork can only be activated between start time and timeout. If the soft fork does not get activated by the timeout, the soft fork proposal fails and will not activate even if signalled.
What is the activation workflow?
Under version bits, a soft fork proposal goes through a workflow:
The Bitcoin network retargets mining difficulty every 2016 blocks; at this time version bits will look at the window of the previous 2016 blocks to see how many blocks signal for a given soft fork. If 95% of the blocks signal readiness for the soft fork, the state changes from
[LOCKED_IN] the rules will activate after one more difficulty retarget, i.e. a further 2016 blocks. Nodes software will warn that an upgrade is pending.
What is the version bit?
When no soft forks are being signalled, miners should set the block version field to
When should miners set bits?
To signal readiness for soft fork(s), miners should set the relevant version bit(s) together with
0x20000000. This should only be done after the soft fork’s start time.
The bits should be unset if either the soft fork activates, or reached
“alice” soft fork uses bit 0, i.e.
“bob” soft fork uses bit, 1, i.e.
To signal both soft forks at once, use
- note if one is activated before the other, you must unset the relevant bit and continue signalling the other. IF one fails to activate and the timeout expires, you should also unset the bit.
How does it differ to an ISM soft fork?
IsSuperMajority() or ISM for short, is a legacy soft fork trigger that activates new rules once 950 out of 1000 blocks are mined which signal the new block version.
An IsSuperMajority() soft fork will orphan all blocks with previous version after activation. For example, if the current version is 4, and the next soft fork introduces version 5 blocks, then after activation is reached (950/1000 blocks), nodes will reject all version 4 blocks.
Once a version bits soft fork reaches activation, nodes will simply begin enforcing the new rules, and will NOT orphan a non-signalling block unless it violates the new rules.
ISM() looks at the previous 1000 blocks on a rolling basis; version bits looks at the previous 2016 block once each time the mining difficulty retargets.
ISM() soft forks do not expire. version bits soft forks can only activate between the start time and the timeout.
Do miners have to upgrade?
No. A BIP9 soft fork will not activate unless 95% of the miners signal readiness. If a soft fork reaches
[LOCKED_IN] state, where the vast majority of the miners are ready for the change, the remaining miners should upgrade before the next difficulty retarget (about 2 weeks).
Non-upgraded miners risk producing invalid blocks which would be orphaned if they are not able to validate the newly activated rules.