Skip to content

Commit

Permalink
Further simplify BIP8.
Browse files Browse the repository at this point in the history
There is no material change to the specification
However, lockinontimeout is just an implementation
detail, if not set the workflow is BIP9.
As a result, BIP8 is more concisely represented in the
simplified state.
  • Loading branch information
shaolinfry committed Apr 21, 2017
1 parent eb88f8d commit 7f6a0f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bip-0008.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ This specification provides a way to optionally guarantee lock-in at the end of

==Specification==

This specification adds a new per-chain deployment parameter to the [[bip-0009.mediawiki|BIP9]] specification as follows:
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:

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

===State transitions===

<img src="bip-0008/states.png" align="middle"></img>

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.
During the STARTED state if the '''lockinontimeout''' is set to true, the state will transition to LOCKED_IN when '''timeout''' is reached.

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

==Backwards compatibility==

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.
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.

==Deployments==

Expand Down
Binary file modified bip-0008/states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7f6a0f8

Please sign in to comment.