From ecdfa0a029b7dc25a1a10dbf773e73f8c2b01769 Mon Sep 17 00:00:00 2001
From: Eric Lombrozo <elombrozo@gmail.com>
Date: Sun, 24 Jan 2016 04:41:29 -0800
Subject: Script witness encoding.

---
 bip-0144.mediawiki | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'bip-0144.mediawiki')

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.
 
-- 
cgit v1.2.3

