From a5447e0c4b219acbbc1e09ccd9419e8dff94f1e8 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 30 Mar 2016 21:43:36 +0000 Subject: BIP 141 & 145: Clarify sigop interaction --- bip-0145.mediawiki | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index b90725e..712e422 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -24,8 +24,6 @@ The template Object is revised to include these keys: |- | costlimit || {{No}} || Number || total cost allowed in blocks |- -| sigoplimit || {{No}} || Number || total sigop cost allowed in blocks divided by 4 -|- | version || {{Yes}} || Number || block version; clients MUST understand the implications of the version they use (eg, comply with [[bip-0141.mediawiki|BIP 141]] for version 5) |} @@ -47,6 +45,10 @@ The Objects listed in the response's "transactions" key is revised to include th Transactions with witness data may only be included if the template's block version is at least 5. +===Sigops=== + +For version 5 blocks, the "sigoplimit" and "sigops" keys must use the new values as calculated in [[bip-0141.mediawiki#Sigops|BIP 141]]. + ===Block Assembly with Witness Transactions=== When block assembly is done without witness transactions, no changes are made by this BIP, and it should be assembled as previously. -- cgit v1.2.3 From 161b39fa687d4716cd54953e840511ebba45899d Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 30 Mar 2016 22:42:42 +0000 Subject: BIP 145: Update for BIP 9 --- bip-0145.mediawiki | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index 712e422..6c2a859 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -15,7 +15,7 @@ This BIP describes modifications to the getblocktemplate JSON-RPC call ([[bip-00 ===Block Template=== -The template Object is revised to include these keys: +The template Object is revised to include a new key: {| class="wikitable" !colspan=4| template @@ -23,8 +23,6 @@ The template Object is revised to include these keys: ! Key !! Required !! Type !! Description |- | costlimit || {{No}} || Number || total cost allowed in blocks -|- -| version || {{Yes}} || Number || block version; clients MUST understand the implications of the version they use (eg, comply with [[bip-0141.mediawiki|BIP 141]] for version 5) |} ====Transactions Object Format==== @@ -43,11 +41,11 @@ The Objects listed in the response's "transactions" key is revised to include th | hash || String || reversed hash of complete transaction (with witness data included) encoded in hexadecimal |} -Transactions with witness data may only be included if the template's block version is at least 5. +Transactions with witness data may only be included if the template's "rulesenforced" list (see [[bip-0009.mediawiki#getblocktemplate changes|BIP 9]]) includes "segwit". ===Sigops=== -For version 5 blocks, the "sigoplimit" and "sigops" keys must use the new values as calculated in [[bip-0141.mediawiki#Sigops|BIP 141]]. +For blocks with segwit enforcement, the "sigoplimit" and "sigops" keys must use the new values as calculated in [[bip-0141.mediawiki#Sigops|BIP 141]]. ===Block Assembly with Witness Transactions=== @@ -89,6 +87,7 @@ Why shouldn't the server simply add the commitment upfront in the "coinbasetxn", * [https://github.com/bitcoin/bitcoin/pull/7404/files Bitcoin Core] ==See Also== +* [[bip-0009.mediawiki|BIP 9: Version bits with timeout and delay]] * [[bip-0022.mediawiki|BIP 22: getblocktemplate - Fundamentals]] * [[bip-0023.mediawiki|BIP 23: getblocktemplate - Pooled Mining]] * [[bip-0141.mediawiki|BIP 141: Segregated Witness (Consensus layer)]] -- cgit v1.2.3 From 2fa7fb9b5cf9a4dbe2affe44267014fc486cbcf6 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 30 Mar 2016 22:43:33 +0000 Subject: BIP 141: Specify VB name --- bip-0145.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index 6c2a859..f7a1e61 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -41,7 +41,7 @@ The Objects listed in the response's "transactions" key is revised to include th | hash || String || reversed hash of complete transaction (with witness data included) encoded in hexadecimal |} -Transactions with witness data may only be included if the template's "rulesenforced" list (see [[bip-0009.mediawiki#getblocktemplate changes|BIP 9]]) includes "segwit". +Transactions with witness data may only be included if the template's "rulesenforced" list (see [[bip-0009.mediawiki#getblocktemplate_changes|BIP 9]]) includes "segwit". ===Sigops=== -- cgit v1.2.3 From 4683a9b71424bac4d43af2236f36fdc2b0c9f470 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 23 Apr 2016 20:20:13 +0000 Subject: BIP 9 (& 145): Switch to rules/vbavailable/vbrequired GBT interface --- bip-0145.mediawiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index f7a1e61..bdaabc9 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -41,11 +41,11 @@ The Objects listed in the response's "transactions" key is revised to include th | hash || String || reversed hash of complete transaction (with witness data included) encoded in hexadecimal |} -Transactions with witness data may only be included if the template's "rulesenforced" list (see [[bip-0009.mediawiki#getblocktemplate_changes|BIP 9]]) includes "segwit". +Transactions with witness data may only be included if the template's "rules" list (see [[bip-0009.mediawiki#getblocktemplate_changes|BIP 9]]) includes "segwit". ===Sigops=== -For blocks with segwit enforcement, the "sigoplimit" and "sigops" keys must use the new values as calculated in [[bip-0141.mediawiki#Sigops|BIP 141]]. +For templates with "segwit" enabled as a rule, the "sigoplimit" and "sigops" keys must use the new values as calculated in [[bip-0141.mediawiki#Sigops|BIP 141]]. ===Block Assembly with Witness Transactions=== -- cgit v1.2.3 From 31c45b611d805a349bc27552e85ba876a5af34ba Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 23 Apr 2016 20:32:59 +0000 Subject: BIP 9, 22 & 145: Use simple Yes/No rather than templates (which don't work on GitHub) --- bip-0145.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index bdaabc9..6d3718b 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -22,7 +22,7 @@ The template Object is revised to include a new key: |- ! Key !! Required !! Type !! Description |- -| costlimit || {{No}} || Number || total cost allowed in blocks +| costlimit || No || Number || total cost allowed in blocks |} ====Transactions Object Format==== -- cgit v1.2.3 From cc4a94c1c04284fc8eca3f83b8d139711fa2a345 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 25 Apr 2016 00:18:39 +0000 Subject: BIP 9 & 145: rules/force mutation --- bip-0145.mediawiki | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index 6d3718b..0448b6c 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -25,6 +25,9 @@ The template Object is revised to include a new key: | costlimit || No || Number || total cost allowed in blocks |} +The "rules/force" mutation MUST NOT be enabled for blocks including transactions with witness data unless the client has indicated in the template request that it also supports the "segwit" rule. +In particular, note that even if the template's "rules" list includes "segwit", but none of the transactions have witness data, the server MAY use the "rules/force" mutation to support old miners. + ====Transactions Object Format==== The Objects listed in the response's "transactions" key is revised to include these keys: -- cgit v1.2.3 From 162e2e002568dc8f1b4a85180d903366f74f40c4 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 11 May 2016 17:45:08 +0000 Subject: Replace "rules/force" mutation with a "cannot be ignored" prefix to rule names --- bip-0145.mediawiki | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bip-0145.mediawiki') diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki index 0448b6c..b04c9e6 100644 --- a/bip-0145.mediawiki +++ b/bip-0145.mediawiki @@ -25,8 +25,9 @@ The template Object is revised to include a new key: | costlimit || No || Number || total cost allowed in blocks |} -The "rules/force" mutation MUST NOT be enabled for blocks including transactions with witness data unless the client has indicated in the template request that it also supports the "segwit" rule. -In particular, note that even if the template's "rules" list includes "segwit", but none of the transactions have witness data, the server MAY use the "rules/force" mutation to support old miners. +The '!' rule prefix MUST be enabled on the "segwit" rule for templates including transactions with witness data. +In particular, note that even if the client's "rules" list lacks "segwit", server MAY support old miners by producing a witness-free template and omitting the '!' rule prefix for "segwit" in the template's "rules" list. +If the GBT server does not support producing witness-free templates after its activation, it must also use the '!' rule prefix in the "vbavailable" list prior to activation. ====Transactions Object Format==== -- cgit v1.2.3