From: praxeology_guy <praxeology_guy@protonmail.com>
To: Johnson Lau <jl2012@xbt.hk>
Cc: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Segwit v2
Date: Wed, 26 Apr 2017 22:18:57 -0400 [thread overview]
Message-ID: <DNxe70Moe7FPATV74BusHFQRm8Qaw4dTpeY8tXIjfL_NZHJqYSODEHNfc82LpaietUBeBdzgpMsrZjVI8LLzg2vd19laY29G7Lgch2M9dKo=@protonmail.com> (raw)
In-Reply-To: <06E90C6D-8B4C-40A7-8807-8811A27AE401@xbt.hk>
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
Johnson Lau,
> not change the commitment structure as suggested by another post
Not sure if you realize my proposal is backwards compatible. We could also merge the two arrays, which would be harder to compress, but a more simple format. Below I gave an example of how this would be backwards compatible.
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*)
variable bytes - Extension roots: array of {extension identifier, extension root length, extension root}
bytes onwards: Optional data with no consensus meaning
* "witness reserved value" _must_ also go in the input's scriptSig/witness field
Here is an example of the "Extension roots" with this format:
Extension roots: 2, {0, 0, []}, {1, 0, []}
size = 2 // two elements in Commitment hash
{ext.id = 0, length = 0, empty} // First element is the wtxid merkle root hash, must be calculated, not specified here
{ext.id = 1, length = 0, empty} // Second element is the "witness reserved value", which is found in the scriptSig
Later after all the miners upgrade, we could stop using the ext.id = 1 and also stop putting the unneccesary value in scriptSig.
[-- Attachment #2: Type: text/html, Size: 1605 bytes --]
prev parent reply other threads:[~2017-04-27 2:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 20:28 [bitcoin-dev] Segwit v2 Luke Dashjr
2017-04-26 8:51 ` praxeology_guy
2017-04-26 19:31 ` Johnson Lau
2017-04-26 20:01 ` Luke Dashjr
2017-04-26 20:09 ` Johnson Lau
2017-04-26 21:34 ` Russell O'Connor
2017-04-27 2:18 ` praxeology_guy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='DNxe70Moe7FPATV74BusHFQRm8Qaw4dTpeY8tXIjfL_NZHJqYSODEHNfc82LpaietUBeBdzgpMsrZjVI8LLzg2vd19laY29G7Lgch2M9dKo=@protonmail.com' \
--to=praxeology_guy@protonmail.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=jl2012@xbt.hk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox