Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIP141: New commitment structure, sigop limits, etc #277

Merged
merged 2 commits into from
Jan 12, 2016

Conversation

jl2012
Copy link
Contributor

@jl2012 jl2012 commented Jan 11, 2016

Revised based on the latest codebase:

https://github.com/sipa/bitcoin/commits/segwit2

@jl2012 jl2012 changed the title New commitment structure, sigop limits, etc BIP141: New commitment structure, sigop limits, etc Jan 11, 2016
@CodeShark
Copy link
Contributor

ACK

@jl2012 jl2012 force-pushed the bip141 branch 2 times, most recently from fea016a to 349f88b Compare January 11, 2016 18:29

The coinbase's input's witness must consist of a single byte array, which the size must be a multiple of 32 bytes but not bigger than 32*32 bytes. These are assumed to be the Merkle path to connect the witness root hash to the commitment root hash. Depth of the commitment is determined by the length of the path. If the depth of the tree is 0, the path should be represented by 0x00, and the witness root hash will be same as the commitment root hash.
A scriptPubKey (or redeemScript as defined in BIP16/P2SH) that consists of a 1-byte push opcode (for 0 to 16) followed by a data push between 2 and 32 bytes gets a new special meaning. The value of the first push is called the "version byte". The following byte vector pushed is called the "witness program".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything beyond 17 is two bytes, should it be called version byte?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only 0-16 are defined. Anything beyond 17 has no special meaning.

luke-jr added a commit that referenced this pull request Jan 12, 2016
BIP141: New commitment structure, sigop limits, etc
@luke-jr luke-jr merged commit 68ac3c7 into bitcoin:master Jan 12, 2016
luke-jr pushed a commit to luke-jr/bips that referenced this pull request Jan 20, 2018
Steal language from next_per_commitment_point requirements.

Closes: bitcoin#277
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants