From a516c135ab622dcf0a4ecf204476034cb086d287 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Mar 2021 15:36:51 +1000 Subject: [PATCH 1/5] BIP341/342: document current deployment status --- bip-0341.mediawiki | 4 +++- bip-0342.mediawiki | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index 0f8d32a9..1e579e1c 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -294,7 +294,9 @@ Examples of preimage for sighashing for each of the sighash modes. == Deployment == -TODO +This BIP is deployed concurrently with [[bip-0342.mediawiki|BIP342]]. + +For Bitcoin signet, these BIPs are always active. == Backwards compatibility == As a soft fork, older software will continue to operate without modification. diff --git a/bip-0342.mediawiki b/bip-0342.mediawiki index 7e00a2e8..1e36a54a 100644 --- a/bip-0342.mediawiki +++ b/bip-0342.mediawiki @@ -133,6 +133,10 @@ In addition to changing the semantics of a number of opcodes, there are also som +==Deployment== + +This proposal is deployed identically to Taproot ([[bip-0341.mediawiki|BIP341]]). + ==Examples== ==Acknowledgements== From 0f95720639c743df2546730a5549eb7ead610529 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 24 Mar 2021 20:35:24 +1000 Subject: [PATCH 2/5] BIP341: bip9 speedy trial parameters --- bip-0341.mediawiki | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index 1e579e1c..c464b59d 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -298,6 +298,16 @@ 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: + + case LOCKED_IN: + if (block.nHeight < min_activation_height) { + return LOCKED_IN; + } + 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). + == Backwards compatibility == As a soft fork, older software will continue to operate without modification. Non-upgraded nodes, however, will consider all SegWit version 1 witness programs as anyone-can-spend scripts. From d582d0bd3162ac7a3f6f1aae46daf7eeb24b201e Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 8 Apr 2021 18:30:51 +1000 Subject: [PATCH 3/5] BIP341: document simplified bip9 states --- bip-0341.mediawiki | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index c464b59d..ec262508 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. From ce5f89fe0ddd99a00bcd1457df407cccd60a9336 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 8 Apr 2021 18:31:04 +1000 Subject: [PATCH 4/5] BIP341: add testnet3 parameters --- bip-0341.mediawiki | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index ec262508..f682d967 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -298,7 +298,7 @@ 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 [[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: +For Bitcoin mainnet and testnet3, 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) { @@ -330,6 +330,8 @@ For Bitcoin mainnet, these BIPs will be deployed by "version bits" with the name 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). +For Bitcoin testnet3, the starttime is epoch timestamp 1619222400 (midnight 24 April 2021 UTC), timeout is epoch timestamp 1628640000 (midnight 11 August 2021 UTC), the threshold is 1512 blocks (75%), and the min_activation_height is block 0. + == Backwards compatibility == As a soft fork, older software will continue to operate without modification. Non-upgraded nodes, however, will consider all SegWit version 1 witness programs as anyone-can-spend scripts. From 93d1b1528592ca129109b4630c17fa5372e4048a Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Tue, 13 Apr 2021 10:45:02 +1000 Subject: [PATCH 5/5] BIP341: add brackets to avoid ambiguity due to precendence rules around bipwise ops --- bip-0341.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index f682d967..5450a08b 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -311,7 +311,7 @@ For Bitcoin mainnet and testnet3, these BIPs will be deployed by "version bits" walk = block; for (i = 0; i < 2016; i++) { walk = walk.parent; - if (walk.nVersion & 0xE0000000 == 0x20000000 && (walk.nVersion >> bit) & 1 == 1) { + if ((walk.nVersion & 0xE0000000) == 0x20000000 && ((walk.nVersion >> bit) & 1) == 1) { count++; } }