<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>How does one know what consensus has formed (around a UTXO set)?</div><div><br></div><div>e</div><div><br>On Dec 18, 2017, at 16:27, Kalle Rosenbaum via bitcoin-dev &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Hi Mark</div><div><br></div>Yes, it seems like sign-to-contract protocols, which I just now briefly read about [1][2], may need to use historic witnesses. That raises the question, what are Bitcoin witnesses for?<div><br></div><div>To me it seems witnesses should be regarded as temporary. But it seems both respondents to this thread, Eric and Mark,&nbsp;mean that witnesses are forever. I regard witnesses as a way to authenticate updates to the UTXO set, and once buried deep enough in the blockchain, the witness is no longer needed, because consensus has formed around the UTXO set update.</div><div><br></div><div>Suppose a transaction with an invalid witness happens to enter the blockchain and gets buried 100000 blocks down with the witness still available. Is the blockchain above it valid? I'd say the blockchain is valid and that it was a bug that the transaction made it into the blockchain. We will have to live with such bugs.</div><div><br></div><div>Another way to put it: Suppose that all witnesses from 2017 dissappears from all nodes in 2020. Is the blockchain still valid? I think so. I would continue using it without looking back.</div><div><br></div><div>With that approach, I think sign-to-contract protocols has to find ways to work in a witnessless environment. For example, users of such protocols can setup their own archival nodes.</div><div><br></div><div>I'd love to hear alternative views on this.</div><div><br></div><div>Thanks,</div><div>/Kalle</div><div><div><div><br></div><div>[1] <a href="https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-03-mit-bitcoin-expo/slides.pdf">https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-03-mit-bitcoin-expo/slides.pdf</a><br></div><div>[2]&nbsp;<a href="https://bitcointalk.org/index.php?topic=893898.msg9861102#msg9861102">https://bitcointalk.org/index.php?topic=893898.msg9861102#msg9861102</a></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-18 18:30 GMT+01:00 Mark Friedenbach via bitcoin-dev <span dir="ltr">&lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Sign-to-contract enables some interesting protocols, none of which are in wide use as far as I’m aware. But if they were (and arguably this is an area that should be more developed), then SPV nodes validating these protocols will need access to witness data. If a node is performing IBD with assumevalid set to true, and is also intending to prune history, then there’s no reason to fetch those witnesses as far as I’m aware. But it would be a great disservice to the network for nodes intending to serve SPV clients to prune this portion of the block history.&nbsp;<div><div class="h5"><br><div><br><blockquote type="cite"><div>On Dec 18, 2017, at 8:19 AM, Eric Voskuil via bitcoin-dev &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.<wbr>linuxfoundation.org</a>&gt; wrote:</div><br class="m_-1037308974542236649Apple-interchange-newline"><div><div dir="auto"><div></div><div>You can't know (assume) a block is valid unless you have previously validated the block yourself. But in the case where you have, and then intend to rely on it in a future sync, there is no need for witness data for blocks you are not going to validate. So you can just not request it.&nbsp;</div><div><br></div><div>However you will not be able to provide those blocks to nodes that *are* validating; the client is pruned and therefore not a peer (cannot reciprocate). (An SPV client is similarly not a peer; it is a more deeply pruned client than the witnessless client.)</div><div><br></div><div>There is no other reason that a node requires witness data. SPV clients don't need it as it is neither require it to verify header commitment to transactions nor to extract payment addresses from them.</div><div><br></div><div>The harm to the network by pruning is that eventually it can become harder and even impossible for anyone to validate the chain. But because you are fully validating you individually remain secure, so there is no individual incentive working against this system harm.</div><div><br></div><div>e</div><div><br>On Dec 18, 2017, at 08:35, Kalle Rosenbaum &lt;<a href="mailto:kalle@rosenbaum.se" target="_blank">kalle@rosenbaum.se</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-12-18 13:43 GMT+01:00 Eric Voskuil <span dir="ltr">&lt;<a href="mailto:eric@voskuil.org" target="_blank">eric@voskuil.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-1037308974542236649gmail-"><br>
&gt; On Dec 18, 2017, at 03:32, Kalle Rosenbaum via bitcoin-dev &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfounda<wbr>tion.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Dear list,<br>
&gt;<br>
&gt; I find it hard to understand why a full node that does initial block<br>
&gt; download also must download witnesses if they are going to skip verification anyway.<br>
<br>
</span>Why run a full node if you are not going to verify the chain?<br></blockquote><div><br></div>I meant to say "<span style="color:rgb(80,0,80);font-size:12.8px">I find it hard to understand why a full node that does initial block</span><br style="color:rgb(80,0,80);font-size:12.8px"><span style="color:rgb(80,0,80);font-size:12.8px">download also must download witnesses when it is going to skip verification of the witnesses anyway."</span></div><div class="gmail_quote"><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div class="gmail_quote"><span style="color:rgb(80,0,80);font-size:12.8px">I'm referring to the "assumevalid" feature of Bitcoin Core that skips signature verification up to block X. Or have I misunderstood assumevalid?</span></div><div class="gmail_quote"><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div class="gmail_quote"><span style="color:rgb(80,0,80);font-size:12.8px">/Kalle</span></div><div class="gmail_quote">&nbsp;<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div class="m_-1037308974542236649gmail-h5"><br>
&gt; If my full node skips signature verification for<br>
&gt; blocks earlier than X, it seems the reasons for downloading the<br>
&gt; witnesses for those blocks are:<br>
&gt;<br>
&gt; * to be able to send witnesses to other nodes.<br>
&gt;<br>
&gt; * to verify the witness root hash of the blocks<br>
&gt;<br>
&gt; I suppose that it's important to verify the witness root hash because<br>
&gt; a bad peer may send me invalid witnesses during initial block<br>
&gt; download, and if I don't verify that the witness root hash actually<br>
&gt; commits to them, I will get banned by peers requesting the blocks from<br>
&gt; me because I send them garbage.<br>
&gt; So both the reasons above (there may be more that I don't know about)<br>
&gt; are actually the same reason: To be able to send witnesses to others<br>
&gt; without getting banned.<br>
&gt;<br>
&gt; What if a node could chose not to download witnesses and thus chose to<br>
&gt; send only witnessless blocks to peers. Let's call these nodes<br>
&gt; witnessless nodes. Note that witnessless nodes are only witnessless<br>
&gt; for blocks up to X. Everything after X is fully verified.<br>
&gt;<br>
&gt; Witnessless nodes would be able to sync faster because it needs to<br>
&gt; download less data to calculate their UTXO set. They would therefore<br>
&gt; more quickly be able to provide full service to SPV wallets and its<br>
&gt; local wallets as well as serving blocks to other witnessless nodes<br>
&gt; with same or higher assumevalid block. For witnessless nodes with<br>
&gt; lower assumevalid they can serve at least some blocks. It could also<br>
&gt; serve blocks to non-segwit nodes.<br>
&gt;<br>
&gt; Do witnessless nodes risk dividing the network in two parts, one<br>
&gt; witnessless and one with full nodes, with few connections between the<br>
&gt; parts?<br>
&gt;<br>
&gt; So basically, what are the reasons not to implement witnessless<br>
&gt; nodes?<br>
&gt;<br>
&gt; Thank you,<br>
&gt; /Kalle<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; bitcoin-dev mailing list<br>
&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundat<wbr>ion.org</a><br>
&gt; <a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-d<wbr>ev</a><br>
</blockquote></div><br></div></div>
</div></blockquote></div>______________________________<wbr>_________________<br>bitcoin-dev mailing list<br><a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.<wbr>linuxfoundation.org</a><br><a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" target="_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-<wbr>dev</a><br></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
bitcoin-dev mailing list<br>
<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.<wbr>linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-<wbr>dev</a><br>
<br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>bitcoin-dev mailing list</span><br><span><a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a></span><br><span><a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a></span><br></div></blockquote></body></html>