<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><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=""><div class="">I think the biggest problem of sum tree is the lack of flexibility to redefine the values with softforks. For example, in the future we may want to define a new CHECKSIG with witness script version 1. That would be counted as a SigOp. Without a sum tree design, that’d be easy as we could just define new SigOp through a softfork (e.g. the introduction of P2SH SigOp, and the witness v0 SigOp). In a sum tree, however, since the nSigOp is implied, any redefinition requires either a hardfork or a new sum tree (and the original sum tree becomes a placebo for old nodes. So every softfork of this type creates a new tree)</div><div class=""><br class=""></div><div class="">Similarly, we may have secondary witness in the future, and the tx weight would be redefined with a softfork. We will face the same problem with a sum tree</div><div class=""><br class=""></div><div class="">The only way to fix this is to explicitly commit to the weight and nSigOp, and the committed value must be equal to or larger than the real value. Only in this way we could redefine it with softfork. However, that means each tx will have an overhead of 16 bytes (if two int64 are used)</div><div class=""><br class=""></div><div class="">You could find related discussion here:&nbsp;<a href="https://github.com/jl2012/bitcoin/commit/69e613bfb0f777c8dcd2576fe1c2541ee7a17208" class="">https://github.com/jl2012/bitcoin/commit/69e613bfb0f777c8dcd2576fe1c2541ee7a17208</a></div><div class=""><br class=""></div><div class="">Maybe we could make this optional: for nodes running exactly the same rules, they could omit the weight and nSigOp value in transmission. To talk to legacy nodes, they need to transmit the newly defined weight and nSigOp. But this makes script upgrade much complex.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 12 Dec 2016, at 00:40, Tier Nolan via bitcoin-dev &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" class="">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Sat, Dec 10, 2016 at 9:41 PM, Luke Dashjr <span dir="ltr" class="">&lt;<a href="mailto:luke@dashjr.org" target="_blank" class="">luke@dashjr.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Saturday, December 10, 2016 9:29:09 PM Tier Nolan via bitcoin-dev wrote:<br class="">
&gt; Any new merkle algorithm should use a sum tree for partial validation and<br class="">
&gt; fraud proofs.<br class="">
<br class="">
</span>PR welcome.<br class=""></blockquote><div class=""><br class=""></div><div class="">Fair enough.&nbsp; It is pretty basic.<br class=""><br class=""><a href="https://github.com/luke-jr/bips/pull/2" class="">https://github.com/luke-jr/bips/pull/2</a><br class=""><br class=""></div><div class="">It sums up sigops, block size, block cost (that is "weight" right?) and fees.<br class=""></div></div></div></div>
_______________________________________________<br class="">bitcoin-dev mailing list<br class=""><a href="mailto:bitcoin-dev@lists.linuxfoundation.org" class="">bitcoin-dev@lists.linuxfoundation.org</a><br class=""><a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" class="">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br class=""></div></blockquote></div><br class=""></body></html>