Skip to content

Commit 79cd91e

Browse files
authored
Merge pull request bitcoin#1020 from ajtowns/202010-bip8-lockedin-rec
BIP8: Make signalling during LOCKED_IN recommended rather than mandatory
2 parents cf0b529 + 9a119ce commit 79cd91e

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

bip-0008.mediawiki

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@ for the purposes of this proposal, and support two future upgrades for different
7979
When a block nVersion does not have top bits 001, it is treated as if all
8080
bits are 0 for the purposes of deployments.
8181

82+
Miners should continue setting the bit in LOCKED_IN phase so uptake is visible, though this has no effect on consensus rules.
83+
8284
===New consensus rules===
8385

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

86-
During the MUST_SIGNAL and LOCKED_IN phases, blocks that fail to signal are invalid.
87-
For flexibility, during the LOCKED_IN phase only, this rule does NOT require the top 3 bits to be set any particular way.
88+
During the MUST_SIGNAL phase, blocks that fail to signal are invalid.
8889

8990
===State transitions===
9091

@@ -176,18 +177,13 @@ block, indexed by its parent.
176177

177178
===Mandatory signalling===
178179

179-
Blocks received while in the MUST_SIGNAL and LOCKED_IN phases must be checked to ensure that they signal. For example:
180+
Blocks received while in the MUST_SIGNAL phase must be checked to ensure that they signal. For example:
180181

181182
if (GetStateForBlock(block) == MUST_SIGNAL) {
182183
if ((block.nVersion & 0xE0000000) != 0x20000000 || ((block.nVersion >> bit) & 1) != 1) {
183184
return state.Invalid(BlockValidationResult::RECENT_CONSENSUS_CHANGE, "bad-version-bip8-must-signal");
184185
}
185186
}
186-
if (GetStateForBlock(block) == LOCKED_IN) {
187-
if (((block.nVersion >> bit) & 1) != 1) {
188-
return state.Invalid(BlockValidationResult::RECENT_CONSENSUS_CHANGE, "bad-version-bip8-locked-in");
189-
}
190-
}
191187
192188
Implementations should be careful not to ban peers that send blocks that are invalid due to not signalling (or blocks that build on those blocks), as that would allow an incompatible chain that is only briefly longer than the compliant chain to cause a split of the p2p network. If that occurred, nodes that have not set ''lockinontimeout'' may not see new blocks in the compliant chain, and thus not reorg to it at the point when it has more work, and would thus not be following the valid chain with the most work.
193189

@@ -226,7 +222,7 @@ The template Object is also extended:
226222
The "version" key of the template is retained, and used to indicate the server's preference of deployments.
227223
If versionbits is being used, "version" MUST be within the versionbits range of [0x20000000...0x3FFFFFFF].
228224
Miners MAY clear or set bits in the block version WITHOUT any special "mutable" key, provided they are listed among the template's "vbavailable" and (when clearing is desired) NOT included as a bit in "vbrequired".
229-
Servers MUST set bits in "vbrequired" for deployments in MUST_SIGNAL and LOCKED_IN states, to ensure blocks produced are valid.
225+
Servers MUST set bits in "vbrequired" for deployments in MUST_SIGNAL state, to ensure blocks produced are valid.
230226

231227
Softfork deployment names listed in "rules" or as keys in "vbavailable" may be prefixed by a '!' character.
232228
Without this prefix, GBT clients may assume the rule will not impact usage of the template as-is; typical examples of this would be when previously valid transactions cease to be valid, such as BIPs 16, 65, 66, 68, 112, and 113.

0 commit comments

Comments
 (0)