1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-06-01 17:15:27 +00:00

Remove trailing whitespace from all BIPs

This commit is contained in:
Orfeas Stefanos Thyfronitis Litos
2024-07-25 18:35:39 +03:00
parent ad1d3bc2a7
commit 9a56d3544e
48 changed files with 291 additions and 291 deletions

View File

@@ -43,13 +43,13 @@ By removing this data from the transaction structure committed to the transactio
A new data structure, <code>witness</code>, is defined. Each transaction will have 2 IDs.
Definition of <code>txid</code> remains unchanged: the double SHA256 of the traditional serialization format:
[nVersion][txins][txouts][nLockTime]
A new <code>wtxid</code> is defined: the double SHA256 of the new serialization with witness data:
[nVersion][marker][flag][txins][txouts][witness][nLockTime]
Format of <code>nVersion</code>, <code>txins</code>, <code>txouts</code>, and <code>nLockTime</code> are same as traditional serialization.
The <code>marker</code> MUST be a 1-byte zero value: <code>0x00</code>.
@@ -67,14 +67,14 @@ A new block rule is added which requires a commitment to the <code>wtxid</code>.
A <code>witness root hash</code> is calculated with all those <code>wtxid</code> as leaves, in a way similar to the <code>hashMerkleRoot</code> in the block header.
The commitment is recorded in a <code>scriptPubKey</code> of the coinbase transaction. It must be at least 38 bytes, with the first 6-byte of <code>0x6a24aa21a9ed</code>, that is:
1-byte - OP_RETURN (0x6a)
1-byte - Push the following 36 bytes (0x24)
4-byte - Commitment header (0xaa21a9ed)
32-byte - Commitment hash: Double-SHA256(witness root hash|witness reserved value)
39th byte onwards: Optional data with no consensus meaning
and the coinbase's input's witness must consist of a single 32-byte array for the <code>witness reserved value</code>.
If there are more than one <code>scriptPubKey</code> matching the pattern, the one with highest output index is assumed to be the commitment.