Draft based on http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012313.html
BIP141: New commitment structure #316
pull jl2012 wants to merge 2 commits into bitcoin:master from jl2012:bip141_new_commitment changing 1 files +15 −19-
jl2012 commented at 8:54 AM on February 2, 2016: contributor
-
New commitment structure 50788915e9
-
Location of the witness commitment c7a786bb30
-
in bip-0141.mediawiki:None in c7a786bb30
75 | - 76 | -and the coinbase's input's witness must consist of a single 32-byte array for the witness nonce. 77 | +For each stack item in the coinbase witness, a double SHA256 is calculated. The "witness commitment" is the root of a Merkle tree, whose leaves are all these hashes. 78 | 79 | -If there are more than one scriptPubKey matching the pattern, the one with highest output index is assumed to be the commitment. 80 | +Item 0 of the coinbase witness stack is the "wtxid commitment". The "wtxid commitment" must be exactly 32 bytes. It is the root of a Merkle tree, whose leaves are all those <code>wtxid</code> in the block, calculated in a way similar to the hashMerkleRoot in the block header. The <code>wtxid</code> of coinbase transaction is assumed to be <code>0x0000....0000</code>.
NicolasDorier commented at 10:41 AM on February 2, 2016:Item 0 mean top of the stack or bottom of the stack ? I assume bottom, but maybe it can be clarified.
jl2012 commented at 11:48 AM on February 2, 2016:Yes, 0 means bottom in the source code
luke-jr added the label Proposed BIP modification on Feb 8, 2016luke-jr commented at 5:20 AM on February 24, 2016: memberWhat's the status of this? Ready for merging?
sipa commented at 5:31 AM on February 24, 2016: memberIt's an idea, and I'm waiting for more opinions first.
in bip-0141.mediawiki:None in c7a786bb30
178 | +Any contents or commitments that are not consensus-critical to Bitcoin, such as merge-mining, MUST NOT use the coinbase witness stack to preserve the ability to do upgrades of the Bitcoin consensus protocol. 179 | + 180 | +=== Location of the witness commitment === 181 | 182 | - Double-SHA256(Witness root hash|Hash(new commitment|witness nonce)) 183 | +Theorectically, the witness commitment could be placed in any location within the coinbase transaction. In practice, most miners should place it in either the scriptSig or as one of the output scriptPubKey. The following discussion assumes that the BIP34 block size push occupies 4 bytes, which is true for the following 300 years with 10 minutes block interval.
NicolasDorier commented at 6:27 AM on February 24, 2016:typo "Theorectically"...
jl2012 closed this on Mar 28, 2016luke-jr referenced this in commit 298489b421 on Jan 20, 2018Contributors
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:10 UTC
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:10 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me