summaryrefslogtreecommitdiff
path: root/bip-0341.mediawiki
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-04-08 18:30:51 +1000
committerAnthony Towns <aj@erisian.com.au>2021-04-08 21:25:10 +1000
commitd582d0bd3162ac7a3f6f1aae46daf7eeb24b201e (patch)
tree30db7289388635aff79de0efa052f321aa9ffac6 /bip-0341.mediawiki
parent0f95720639c743df2546730a5549eb7ead610529 (diff)
downloadbips-d582d0bd3162ac7a3f6f1aae46daf7eeb24b201e.tar.xz
BIP341: document simplified bip9 states
Diffstat (limited to 'bip-0341.mediawiki')
-rw-r--r--bip-0341.mediawiki26
1 files changed, 24 insertions, 2 deletions
diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki
index c464b59..ec26250 100644
--- a/bip-0341.mediawiki
+++ b/bip-0341.mediawiki
@@ -298,7 +298,29 @@ This BIP is deployed concurrently with [[bip-0342.mediawiki|BIP342]].
For Bitcoin signet, these BIPs are always active.
-For Bitcoin mainnet, these BIPs will be deployed by "version bits" with the name "taproot" and bit 2, using BIP9 modified to use a lower threshold, and with an additional ''min_activation_height'' parameter and changing the state transition logic for LOCKED_IN to the following:
+For Bitcoin mainnet, these BIPs will be deployed by "version bits" with the name "taproot" and bit 2, using [[bip-0009.mediawiki|BIP9]] modified to use a lower threshold, with an additional ''min_activation_height'' parameter and replacing the state transition logic for the DEFINED, STARTED and LOCKED_IN states as follows:
+
+ case DEFINED:
+ if (GetMedianTimePast(block.parent) >= starttime) {
+ return STARTED;
+ }
+ return DEFINED;
+
+ case STARTED:
+ int count = 0;
+ walk = block;
+ for (i = 0; i < 2016; i++) {
+ walk = walk.parent;
+ if (walk.nVersion & 0xE0000000 == 0x20000000 && (walk.nVersion >> bit) & 1 == 1) {
+ count++;
+ }
+ }
+ if (count >= threshold) {
+ return LOCKED_IN;
+ } else if (GetMedianTimePast(block.parent) >= timeout) {
+ return FAILED;
+ }
+ return STARTED;
case LOCKED_IN:
if (block.nHeight < min_activation_height) {
@@ -306,7 +328,7 @@ For Bitcoin mainnet, these BIPs will be deployed by "version bits" with the name
}
return ACTIVE;
-For Bitcoin mainnet, the BIP9 starttime is epoch timestamp 1619222400 (midnight 24 April 2021 UTC), BIP9 timeout is epoch timestamp 1628640000 (midnight 11 August 2021 UTC), the threshold is 1815 blocks (90%) instead of 1916 blocks (95%), and the min_activation_height is block 709632 (expected approximately 12 November 2021).
+For Bitcoin mainnet, the starttime is epoch timestamp 1619222400 (midnight 24 April 2021 UTC), timeout is epoch timestamp 1628640000 (midnight 11 August 2021 UTC), the threshold is 1815 blocks (90%) instead of 1916 blocks (95%), and the min_activation_height is block 709632 (expected approximately 12 November 2021).
== Backwards compatibility ==
As a soft fork, older software will continue to operate without modification.