<div dir="ltr"><div><div>With the assumed malleability-fix CHECKSIG2 version of lightning, watching for and responding to bad behavior is fully outsourceable. You can synchronize channel state (signed refund transactions) with a third party that watches for replay of old transactions on the mainnet, and starts the refund process if it observes them, paying the fees necessary to get on the chain.<br><br>With the CLTV/CSV-only form of the hash time-lock contracts that Rusty has developed, this is indeed something the users&#39; wallets would have to be online to observe happening and respond to. I presume that we are eventually going to get a CHECKSIG2 with some kind of malleability-immune signing scheme in the long term, and that we are not interested in introducing new consensus behavior to cover that short stopgap.<br><br>&gt; I&#39;m not even sure if sufficient coordination is a sufficient solution.<br><br></div>A regrettable choice of words. In this case it is game theoretic cooperation, not coordination. The users need only expect that each other would react the same way, being willing to burn money as fees that would otherwise be stolen. They don&#39;t actually have to communicate with each other in order to cooperate.<br><br></div>You are correct though that hubs-with-hashpower complicate this situation. Although a hub with hashpower also creates risk in the timestop scenario too...<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 14, 2015 at 11:53 AM, Matt Corallo <span dir="ltr">&lt;<a href="mailto:lf-lists@mattcorallo.com" target="_blank">lf-lists@mattcorallo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 08/14/15 00:47, Mark Friedenbach via bitcoin-dev wrote:<br>
&gt; On Thu, Aug 13, 2015 at 4:42 PM, Joseph Poon via bitcoin-dev<br>
&gt; &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a><br>
</span><span class="">&gt; &lt;mailto:<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     I haven&#39;t tested the details of this, but is there another bit available<br>
&gt;     for use in the future for the relative blockheight?<br>
&gt;<br>
&gt;     I strongly believe that Lightning needs mitigations for a systemic<br>
&gt;     supervillan attack which attemps to flood the network with transactions,<br>
&gt;     which can hypothetically be mitigated with something like a timestop<br>
&gt;     bit (as originally suggested by gmaxwell).<br>
&gt;<br>
&gt;<br>
&gt; This proposal includes no such provision.<br>
&gt;<br>
&gt; Since we talked about it, I spent considerable time thinking about the<br>
&gt; supposed risk and proposed mitigations. I&#39;m frankly not convinced that<br>
&gt; it is a risk of high enough credibility to worry about, or if it is that<br>
&gt; a protocol-level complication is worth doing.<br>
&gt;<br>
&gt; The scenario as I understand it is a hub turns evil and tries to cheat<br>
&gt; every single one of its users out of their bonds. Normally a lightning<br>
&gt; user is protected form such behavior because they have time to broadcast<br>
&gt; their own transactions spending part or all of the balance as fees.<br>
<br>
</span>My concern is how the hell do you automate this? Having a threat of<br>
&quot;well, everyone could update their software to a new version which will<br>
destroy all coins right now&quot; is kinda useless, and trying to come up<br>
with a reasonable set of metrics as to how much and when you move from<br>
just paying the fee to destroying coins is really hard, especially if<br>
you assume the attacker is a miner with, say, enough hashrate (maybe<br>
rented) to get one or three blocks in the next day (the timeout period).<br>
<span class=""><br>
&gt; Therefore because of the threat of mutually assured destruction, the<br>
&gt; optimal outcome is to be an honest participant.<br>
&gt;<br>
&gt; But, the argument goes, the hub has many channels with many different<br>
&gt; people closing at the same time. So if the hub tries to cheat all of<br>
&gt; them at once by DoS&#39;ing the network, it can do so and spend more in fees<br>
&gt; than any one participant stands to lose. My issue with this is that<br>
&gt; users don&#39;t act alone -- users can be assured that other users will<br>
&gt; react, and all of them together have enough coins to burn to make the<br>
&gt; attack unprofitable.<br>
<br>
</span>Now users are coordinating quickly in an attack scenario?<br>
<span class=""><br>
&gt; The hub-cheats-many-users case really is the same<br>
&gt; as the hub-cheats-one-user case if the users act out their role in<br>
&gt; unison, which they don&#39;t have to coordinate to do.<br>
&gt;<br>
&gt; Other than that, even if you are still concerned about that  scenario,<br>
&gt; I&#39;m not sure timestop is the appropriate solution. A timestop is a<br>
&gt; protocol-level complication that is not trivial to implement, indeed I&#39;m<br>
&gt; not even sure there is a way to implement it at all -- how do you<br>
&gt; differentiate in consensus code a DoS attack from regular old blocks<br>
&gt; filling up? And if you could, why add further complication to the<br>
&gt; consensus protocol?<br>
<br>
</span>Yea, implementation is really tricky here. I do not at all think we<br>
should be thinking about implementing this any time soon, and should<br>
assume Lightning will have to stand reasonably on its own without it<br>
first, and only if it gains a lot of traction will there be enough<br>
motivation for making such a change at the Bitcoin protocol level for<br>
Lightning.<br>
<span class=""><br>
&gt; A simpler solution to me seems to be outsourcing the response to an<br>
&gt; attack to a third party<br>
<br>
</span>Doesnt that defeat the purpose of Lightning?<br>
<span class=""><br>
&gt; or otherwise engineering ways for users to<br>
&gt; respond-by-default even if their wallet is offline, or otherwise<br>
&gt; assuring sufficient coordination in the event of a bad hub.<br>
<br>
</span>I&#39;m not even sure if sufficient coordination is a sufficient solution.<br>
If you assume a hub just shut down, and everyone is trying to flush to<br>
the chain, with a backlog of a few days worth of transactions (with<br>
timeouts of a day or so), and users are even paying huge fees (99% of<br>
what they&#39;d get back), if the former-hub is a miner, it can claim that<br>
last 1% of many of the transactions that take longer than a day to confirm.<br>
</blockquote></div><br></div>