<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 3 Apr 2017, at 04:39, Russell O'Connor &lt;<a href="mailto:roconnor@blockstream.io" class="">roconnor@blockstream.io</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Sun, Apr 2, 2017 at 4:13 PM, Johnson Lau via bitcoin-dev <span dir="ltr" class="">&lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank" class="">bitcoin-dev@lists.linuxfoundation.org</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&nbsp; &nbsp; &nbsp; &nbsp; • the witness of the first input of the coinbase transaction MUST have exactly one stack item (the "extended header"), with the following data:<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; • bytes 0 to 3: nHeight MUST be equal to the height of this block (signed little endian)<br class=""></blockquote><div class=""><br class=""></div><div class="">&nbsp;Someone told me a while back that it would be more natural if we move the nHeight from the coinbase script to the coinbase locktime.&nbsp; Have you considered doing this?<br class=""></div></div></div></div>
</div></blockquote></div><div class=""><br class=""></div><div class="">Yes, it’d look much better. But I’m thinking of a different approach: instead of using a hash of 0000….0000, we use the hash of previous block for the coinbase input. With some new SIGHASH design, this allows people to pay to a child of a particular block. This is actually implemented in my spoonnet2 branch. I’ll describe it with a BIP soon</div><div class=""><br class=""></div><div class="">However, what I’m trying to do in the extended block header is independent to the design of coinbase tx. Here I’m trying to let people knowing the height just by a header and extended header (&lt;300 bytes), without requiring all headers in the history.</div><div class=""><br class=""></div><div class="">Also I forgot to post the link of the BIP:&nbsp;<a href="https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.mediawiki" class="">https://github.com/jl2012/bips/blob/spoonnet/bip-extheader.mediawiki</a></div></body></html>