Skip to content

Commit b5f44d9

Browse files
authored
Merge pull request bitcoin#522 from shaolinfry/bip8-simplified
Further simplify BIP8
2 parents 8eeceda + 7f6a0f8 commit b5f44d9

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

README.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Those proposing changes should consider that ultimately consent may rest with th
3030
|-
3131
| [[bip-0008.mediawiki|8]]
3232
|
33-
| Version bits with optional guaranteed lock-in
33+
| Version bits with guaranteed lock-in
3434
| Shaolin Fry
3535
| Informational
3636
| Draft

bip-0008.mediawiki

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<pre>
22
BIP: 8
3-
Title: Version bits with optional guaranteed lock-in
3+
Title: Version bits with guaranteed lock-in
44
Author: Shaolin Fry <[email protected]>
55
Comments-Summary: No comments yet.
66
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0008
@@ -23,19 +23,20 @@ This specification provides a way to optionally guarantee lock-in at the end of
2323

2424
==Specification==
2525

26-
This specification adds a new per-chain deployment parameter to the [[bip-0009.mediawiki|BIP9]] specification as follows:
26+
This specification is the same as [[bip-0009.mediawiki|BIP9]] except there is no FAILED condition. The state transition from '''STARTED''' to '''LOCKED_IN''' will occur under two condition:
2727

28-
# The '''lockinontimeout''' boolean if set to true, will transition state to '''LOCKED_IN''' at timeout if not already '''LOCKED_IN''' or '''ACTIVE'''.
28+
The first is when the threshold of blocks signalling is reached as per BIP9. The second is if the timeout is still '''STARTED'''.
2929

3030
===State transitions===
3131

32-
<img src="bip-uaversionbits/states.png" align="middle"></img>
32+
<img src="bip-0008/states.png" align="middle"></img>
3333

34-
The state transition workflow is exactly the same as in [[bip-0009.mediawiki|BIP9]] with an additional rule: During the STARTED state if the '''lockinontimeout''' is set to true, the state will transition to LOCKED_IN when '''timeout''' is reached.
34+
During the STARTED state if the '''lockinontimeout''' is set to true, the state will transition to LOCKED_IN when '''timeout''' is reached.
3535

3636
case STARTED:
37-
// BIP9 specification follows
37+
// BIP8/9 specification follows
3838
if (GetMedianTimePast(block.parent) >= timeout) {
39+
// implementation detail: if flag set, BIP8 workflow, else BIP9 workflow.
3940
return (fLockInOnTimeout == true) ? THRESHOLD_LOCKED_IN : THRESHOLD_FAILED
4041
}
4142
int count = 0;
@@ -57,7 +58,7 @@ https://github.com/bitcoin/bitcoin/compare/master...shaolinfry:bip-uaversionbits
5758

5859
==Backwards compatibility==
5960

60-
If '''lockinontimeout''' boolean is set to false this BIP is compatible with nodes that implement BIP9. If '''lockinontimeout''' boolean is set to true, nodes that only implement BIP9 will not activate the soft fork if hashpower threshold is not reached by '''timeout''', however, those nodes will still accept the blocks generated by activated nodes.
61+
BIP8 and BIP9 deployments should not share concurrent active deployment bits. Nodes that only implement BIP9 will not activate a BIP8 soft fork if hashpower threshold is not reached by '''timeout''', however, those nodes will still accept the blocks generated by activated nodes.
6162

6263
==Deployments==
6364

bip-0008/states.png

-54.8 KB
Loading

0 commit comments

Comments
 (0)