sipa / bitcoin

Bitcoin integration/staging tree
http://www.bitcoin.org
MIT License
88 stars 21 forks source link

[segnet3 hard-fork] Allow additional data in coinbase witness #60

Open ajtowns opened 8 years ago

ajtowns commented 8 years ago

Based on: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012301.html https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012313.html

An alternative to #48 . It's probably not acceptable as is, but hopefully useful for discussion?

This aims to be a reasonably simple patch set that allows future soft-forks to have additional commitments made by including them in the coinbase witness.

With this patchset, the coinbase witness stack can contain up to 255 elements, of any size, however the coinbase must commit to the number of elements. The coinbase commits to the merkle root of a tree whose first leaf is the merkle root of the tree of all the witnesses for the other transactions, and whose remaining leaves are the coinbase witness stack elements.

sipa commented 8 years ago

I have not included this in segwit4, but we should keep thinking about this.