1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-19 12:08:05 +00:00

Merge pull request #522 from shaolinfry/bip8-simplified

Further simplify BIP8
This commit is contained in:
Luke Dashjr 2017-04-21 13:41:02 +00:00 committed by GitHub
commit b5f44d986a
3 changed files with 9 additions and 8 deletions

View File

@ -30,7 +30,7 @@ Those proposing changes should consider that ultimately consent may rest with th
|-
| [[bip-0008.mediawiki|8]]
|
| Version bits with optional guaranteed lock-in
| Version bits with guaranteed lock-in
| Shaolin Fry
| Informational
| Draft

View File

@ -1,6 +1,6 @@
<pre>
BIP: 8
Title: Version bits with optional guaranteed lock-in
Title: Version bits with guaranteed lock-in
Author: Shaolin Fry <shaolinfry@protonmail.ch>
Comments-Summary: No comments yet.
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
==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-uaversionbits/states.png" align="middle"></img>
<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