summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lombrozo <elombrozo@gmail.com>2016-01-24 04:41:29 -0800
committerEric Lombrozo <elombrozo@gmail.com>2016-01-24 04:41:29 -0800
commitecdfa0a029b7dc25a1a10dbf773e73f8c2b01769 (patch)
tree6e80fd19bb1b9669ab6923869fda5a9b04271ddf
parent2010cf49798ba4f440ef841e1c32441a797b6932 (diff)
downloadbips-ecdfa0a029b7dc25a1a10dbf773e73f8c2b01769.tar.xz
Script witness encoding.
-rw-r--r--bip-0144.mediawiki6
1 files changed, 3 insertions, 3 deletions
diff --git a/bip-0144.mediawiki b/bip-0144.mediawiki
index 233fbc3..9b2422b 100644
--- a/bip-0144.mediawiki
+++ b/bip-0144.mediawiki
@@ -63,8 +63,8 @@ The serialization has the following structure:
| A list of one or more transaction outputs
|-
| 1+
-| witness
-| witness
+| script_witnesses
+| script_witnesses[]
| The witness structure as a serialized byte array
|-
| 4
@@ -77,7 +77,7 @@ Parsers supporting this BIP will be able to distinguish between the old serializ
If the witness is empty, the old serialization format should be used.
-Witness objects can be extended to contain other kinds of witness data not yet specified. This BIP is agnostic to the witness data structure, defined in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141] (Consensus segwit BIP), and treats it as an arbitrary byte array.
+Currently, the only witness objects type supported are script witnesses which consist of a stack of byte arrays. It is encoded as a var_int item count followed by each item encoded as a var_int length followed by a string of bytes. Each txin has its own script witness. The number of script witnesses is not explicitly encoded as it is implied by txin_count. Empty script witnesses are encoded as a zero byte. The order of the script witnesses follows the same order as the associated txins.
* '''Rationale for not having an independent message type with its own serialization''': this would require separate "tx" and "block" messages, and all RPC calls operating on raw transactions would need to be duplicated, or need inefficinent or nondeterministic guesswork to know which type is to be used.