Further simplify BIP8.

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.
This commit is contained in:
shaolinfry 2017-04-21 14:45:16 +05:30
parent eb88f8dd1a
commit 7f6a0f811c
2 changed files with 6 additions and 5 deletions

View File

@ -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;
@ -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==

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB