diff options
-rw-r--r-- | bip-codeshark-segwit-peer-services.mediawiki | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bip-codeshark-segwit-peer-services.mediawiki b/bip-codeshark-segwit-peer-services.mediawiki index 7e94b73..c5b205e 100644 --- a/bip-codeshark-segwit-peer-services.mediawiki +++ b/bip-codeshark-segwit-peer-services.mediawiki @@ -73,8 +73,6 @@ The serialization has the following structure: | The block number or timestamp until which the transaction is locked |} -<img src=bip-codeshark-segwit-peer-services/witnesstx.png></img> - Parsers supporting this BIP will be able to distinguish between the old serialization format (without the witnesses) and this one. The marker byte is set to zero so that this structure will never parse as a valid transaction in a parser that does not support this BIP. If parsing were to succeeded, such a transaction would contain no inputs and a single output. If all witnesses are empty, the old serialization format should be used. @@ -112,10 +110,15 @@ implicitly, every transaction and block have a witness, old ones just have empty ones. === Hashes === -Transaction hashes used in the transaction merkle tree and txin outpoints is always computed on the old non-witness -serialization. A new hash including the witness data is added that is -computed from the witness-serialization (this means that transactions -with an empty witness have witness hash equal to normal hash). +Transaction hashes used in the transaction merkle tree and txin outpoints are always computed using the old non-witness +serialization. + +Support for a new hash including the witness data is added that is +computed from the new witness serialization. (Note that transactions +with an empty witness always use the old serialization, +and therefore, they have witness hash equal to normal hash.) + +<img src=bip-codeshark-segwit-peer-services/witnesstx.png></img> == Credits == Special thanks to Gregory Maxwell for originating many of the ideas in this BIP and Luke-Jr for figuring out how to deploy this as a soft fork. |