<div dir="ltr">Christian,<div><br></div><div>I hope the additional clarification in the RFC makes clear that BOLT 10 takes precedence for bootstrapping and autopilot functionality.  To summarize the intention of this BOLT: Lightning is authoritative, but DNS can be used to assist in on-boarding (with all of its usefulness AND inherent flaws.)<br><br>&gt;<span style="color:rgb(33,33,33);font-size:13px">we can just do the domain -&gt; nodeid binding without encouraging</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">&gt; users to actually open a direct connection :-)<br></span><br>Right - the intention is to provide fallback mechanisms and user-friendly ways of finding the right nodes.  If a user wants to open a channel to Starbucks before they leave their house, then can and then let the confirmation process start on the way there.</div><div><br></div><div>&gt;<span style="color:rgb(33,33,33);font-size:13px"> The risk is that</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">&gt; if we spec and implement this right now, it&#39;ll become the normal mode of</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">&gt; operation and we&#39;ll end up with a very poor network.</span></div><div><font color="#212121"><br></font></div><div><font color="#212121">I agree, and I am in no rush to get this BOLT part of the spec before every implementation has an autopilot function in a state they&#39;re comfortable with.  If we want to kick it out for some months or even longer to allow time for the network to bootstrap itself in a decentralized way, I&#39;m fine with that. I do think the pros of being able to associate a given merchant/user with their incoming node in a way familiar to users will help to ease the pain of opening channels that are useful to the user.</font></div><div><font color="#212121"><br></font></div><div><font color="#212121">&gt; </font><span style="color:rgb(33,33,33);font-size:13px">Well, the fallback solution is not exactly free either, it takes time to</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">confirm the channel, so the merchant can indeed force a degraded user</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">experience</span></div><div><br>Ah, good point. I would exercise caution against implementing my exact proposal regarding channel opens as payments as it was an example of functionality that would be enabled by the BOLT that needs careful thought and design to address concerns.  I think the ability to find nodes operated by the owners of domains and subdomains could open up other useful possibilities as well, including giving mobile users the option of where to open their first channel to.</div><div><br></div><div>With your feedback, perhaps a good idea would be to decide on and explicitly defined allowable uses for information gleaned from DNS records such as the line already added about disallowing bootstrapping from a non-seed domain.</div><div><br></div><div>Perhaps the first approved use-case could be invoices that include a domain in the extra fields, clients can do a lookup on the domain and ensure the node they&#39;re paying is listed, and if not provide a warning notification to the user, or simply display the domain and the result of the lookup.</div><div><br></div><div>This would provide some protection against invoice tampering, as a malicious actor with the ability to modify the invoice displayed to the user would have to also display a domain other than the one the one associated with the website the user intended to pay.</div><div><br></div><div>Thanks,</div><div>Tyler</div><div><br></div><div><div class="gmail_quote"><div dir="ltr">On Mon, Apr 9, 2018 at 12:26 PM Christian Decker &lt;<a href="mailto:decker.christian@gmail.com">decker.christian@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tyler,<br>
<br>
thanks for the detailed feedback, I&#39;ll try to address some of the issues<br>
inline:<br>
<br>
Tyler H &lt;<a href="mailto:tyzbit@gmail.com" target="_blank">tyzbit@gmail.com</a>&gt; writes:<br>
&gt; --Regarding looking up nodes at the time of payments:<br>
&gt;<br>
&gt; In the future, nodes could negotiate a channel open with a push amount and<br>
&gt; provide the TXID or payment hash as proof of their payment of the invoice.<br>
&gt; This wouldn&#39;t even require the channel to be usable, and merchants could<br>
&gt; decide to accept 1 (or even 0) confirmations of this transaction based on<br>
&gt; their acceptable level of risk, considering the properties of the channel<br>
&gt; (capacity, local balance etc).  So in that use case, this would be a rough<br>
&gt; process of the interaction:<br>
<br>
There is very little difference between pushing with the channel<br>
creation and just doing an immediate update even though the channel<br>
isn&#39;t confirmed yet. To be honest I think the `push_msat` feature is the<br>
classical case of optimizing too early.<br>
<br>
But the end result is still that the merchant either takes a hit in the<br>
trustworthiness of the incoming payment, or the buyer is going to have a<br>
bad time waiting at the checkout until the channel confirms.<br>
<br>
&gt; User tries to pay lightning invoice, and it fails.  The user&#39;s wallet<br>
&gt; offers to pay via channel opening.  The user accepts.  The wallet reads the<br>
&gt; invoice for a &quot;domain&quot; field, or perhaps if the wallet happens to be a<br>
&gt; browser, it does a SRV lookup against the current domain serving the<br>
&gt; invoice.  The wallet looks up the domain records, and verifies the<br>
&gt; destination node is present.  If so, the wallet picks the correct node<br>
&gt; based on the records present, and opens a channel with a push amount to<br>
&gt; it.  The destination node sees this and via as some yet undetermined<br>
&gt; method, associates it to that payment invoice and chooses to mark it as<br>
&gt; &quot;paid&quot; or &quot;pending X confirmations&quot; according to whatever criteria the node<br>
&gt; operator wishes to use.<br>
<br>
I was going to comment that, since we already have an invoice detailing<br>
the destination, the indirection through the DNS system to find the<br>
desired connection point was useless, but your example with Starblocks<br>
where connections are accepted by one node, and payments by another<br>
convinced me that this is indeed a useful feature. A feature however<br>
that could be solved just as well by including an `r` tag in the invoice<br>
itself. In this case you can either use the gossip protocol or the BOLT<br>
10 DNS lookup system to locate the entry point into the merchant&#39;s<br>
network. I don&#39;t think that a direct connection to the merchant in case<br>
of it being unreachable is a good idea, because it creates latent<br>
hubs. But I see the slight advantage of reducing the failure probability<br>
w.r.t. to opening a channel with a random node.<br>
<br>
&gt; In a simple example, you could list all of your nodes but prefer clients<br>
&gt; open channels to a single one, similar to ACINQ&#39;s setup with &quot;endurance&quot;<br>
&gt; and &quot;starblocks&quot; on testnet.  This example would simply require setting<br>
&gt; &quot;endurance&quot; to have the highest priority. This also allows domain operators<br>
&gt; to have one or more public nodes, but many private ones with channels open<br>
&gt; to their public nodes to better manage their risk. For example, the private<br>
&gt; nodes could be behind a firewall.<br>
<br>
This is definitely true, if I&#39;m not mistaken, starblocks doesn&#39;t even<br>
allow incoming connections, so you have to use endurance as an entry<br>
point.<br>
<br>
&gt; The result of this is that the user experience is improved, and a side<br>
&gt; benefit is being able to safely associate a given payment request, and by<br>
&gt; extension node, with a domain.  Another nontrivial benefit is there will be<br>
&gt; more channels opened with value on the other side, allowing for receiving<br>
&gt; funds back from Lightning.<br>
&gt;<br>
&gt; There are some possible open questions regarding ensuring a payment request<br>
&gt; hasn&#39;t been spoofed, but if you present the domain to the user, he/she can<br>
&gt; verify that the wallet is about to open a channel to the domain they<br>
&gt; expect.  Other issues with this are with DNS hijacking, which to be frank<br>
&gt; is not an unlikely scenario.  Caution would be necessary, and perhaps<br>
&gt; cryptographic means of associating nodes and their associated domains would<br>
&gt; be a requirement for something like this to exist, but the proposed BOLT<br>
&gt; lays the groundwork for that to happen.<br>
<br>
There&#39;s some value in this, that&#39;s definitely true, however these kinds<br>
of added security through DNS haven&#39;t quite worked out in the past. Then<br>
again we can just do the domain -&gt; nodeid binding without encouraging<br>
users to actually open a direct connection :-)<br>
<br>
&gt; --Future payments going through the merchant:<br>
&gt;<br>
&gt; This is probably the biggest wrinkle.  The merchant _does_ have the ability<br>
&gt; to know when a payment transits the channel, thus reducing privacy.  I<br>
&gt; think the proposed BOLT should only be used to improve user experience, not<br>
&gt; as a replacement for the decentralized nature of Lightning.  For example,<br>
&gt; node operators will use autopilot-like functionality for opening channels,<br>
&gt; BUT they will be able to augment that with looking up common stores and<br>
&gt; merchant&#39;s domain records and open their own channels to them to provide<br>
&gt; alternate routes to popular anticipated destinations for payments, thus<br>
&gt; making their own node more valuable and increasing the decentralization of<br>
&gt; the network.  For example, if you know people are going to be paying<br>
&gt; Starbucks, you can issue a DNS request of your own, get their current<br>
&gt; preferred node and connect, and then any node you have channels with will<br>
&gt; be able to pay Starbucks through you, without having to open a channel of<br>
&gt; their own.<br>
<br>
Ok, I definitely agree that, if implemented, this would be only a<br>
fallback solution. The problem is how to communicate this until we have<br>
the autopilots that take care of the normal operation? The risk is that<br>
if we spec and implement this right now, it&#39;ll become the normal mode of<br>
operation and we&#39;ll end up with a very poor network.<br>
<br>
&gt; --Merchant crippling payments:<br>
&gt;<br>
&gt; With the convention I described above, using channel opens as proof of<br>
&gt; payment, if Starbucks wants to deny a customer the ability to pay McDonalds<br>
&gt; (or simply doesn&#39;t have the appropriate channels to do so), the user&#39;s<br>
&gt; wallet will simply fall back, look up <a href="http://mcdonalds.com" rel="noreferrer" target="_blank">mcdonalds.com</a>, find the appropriate<br>
&gt; node and pay the invoice via channel opening.  This also partly addresses<br>
&gt; point 2, as if a merchant wants to spy on its customers, it must provide<br>
&gt; routes to its competitors.  It can either spy or deny routes, but not<br>
&gt; both.  In addition, the onion-like nature of payments means the merchant<br>
&gt; can&#39;t be sure a user paid a competitor, or a node behind them, though some<br>
&gt; configurations of channels and nodes can definitely reduce privacy quite a<br>
&gt; bit (example: a tiny etsy shop only has a couple of connections, Evil<br>
&gt; Starbucks being one of them with the largest channel.  A user paying an<br>
&gt; amount above the second largest channel to this shop would have to use the<br>
&gt; merchant&#39;s channel, and the merchant would be sure that the payment didn&#39;t<br>
&gt; travel any further from there.)<br>
<br>
Well, the fallback solution is not exactly free either, it takes time to<br>
confirm the channel, so the merchant can indeed force a degraded user<br>
experience. Unlike fully random connection the merchant can also be<br>
reasonably sure that the origin of the payment he is tampering with is<br>
actually its customer and that degrading their experience might result<br>
in the customer preferring them over the competition.<br>
<br>
&gt; --Network of large hubs:<br>
&gt; I disagree.  Again, leaning on the ability to open channels with push<br>
&gt; amounts that have some minor assurances (authority of DNS records) that<br>
&gt; you&#39;re getting the node you intend, I expect routing node operators to<br>
&gt; preemptively open channels to merchants they expect to receive payments,<br>
&gt; and they could advertise their own node to do so, along with allowing<br>
&gt; customers to connect directly to merchants.  The minimum requirement to use<br>
&gt; this BOLT are the same as running a Lightning node full time, plus<br>
&gt; ownership of a domain.<br>
&gt;<br>
&gt; With that said, I agree regarding the value of random connections in<br>
&gt; strengthening the network.  Nodes are well-equipped to find inefficiencies<br>
&gt; and correct them.  The intention of the BOLT is really to improve the<br>
&gt; on-boarding experience, along with providing an additional means to<br>
&gt; advertise &quot;official&quot; nodes to ease clients, especially mobile ones, onto<br>
&gt; the network.<br>
<br>
I&#39;m ok with this being a fallback solution, I just don&#39;t want it to<br>
become the de-facto standard of operating, which&#39;d result in the extreme<br>
scenarios I listed above. But maybe we&#39;re both looking at this from<br>
extreme ends and the truth (most likely) lies somewhere in-between :-)<br>
<br>
&gt; Your pessimism is warranted and invited.<br>
<br>
Yeah, sorry about that, I tend to be overly pessimistic in these cases<br>
;-)<br>
<br>
Cheers,<br>
Christian<br>
</blockquote></div></div></div>