summaryrefslogtreecommitdiff
path: root/bip-0145.mediawiki
diff options
context:
space:
mode:
authorLuke-Jr <luke_github1@dashjr.org>2016-06-01 17:57:05 +0000
committerLuke-Jr <luke_github1@dashjr.org>2016-06-01 17:57:05 +0000
commitc917abe394753b5111f069fd7be86ca77c032acb (patch)
treee83c82655a659358c7786bb2fef2cd7c77c2ad50 /bip-0145.mediawiki
parent55ecc6fd38c8e90100463fb4df767be8896f716b (diff)
parent8324bc512e835f4ff16000ab1dbe7f55e8d110ee (diff)
downloadbips-c917abe394753b5111f069fd7be86ca77c032acb.tar.xz
Merge pull request #365 from luke-jr/segwit_gbt_updates_20160330
BIP 141 and 145: GBT updates for SegWit
Diffstat (limited to 'bip-0145.mediawiki')
-rw-r--r--bip-0145.mediawiki17
1 files changed, 11 insertions, 6 deletions
diff --git a/bip-0145.mediawiki b/bip-0145.mediawiki
index a4528c5..b04c9e6 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,12 +23,12 @@ The template Object is revised to include these keys:
! Key !! Required !! Type !! Description
|-
| 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)
|}
+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====
The Objects listed in the response's "transactions" key is revised to include these keys:
@@ -45,7 +45,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 "rules" list (see [[bip-0009.mediawiki#getblocktemplate_changes|BIP 9]]) includes "segwit".
+
+===Sigops===
+
+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===
@@ -87,6 +91,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)]]