Why The Denial-Of-Service Argument Against BOLT 12 Doesn’t Hold Up

2 years ago

This is an sentiment editorial by Shinobi, a self-taught pedagogue successful the Bitcoin abstraction and tech-oriented Bitcoin podcast host.

BOLT 12 is simply a connection from Rusty Russel of Blockstream to optimize however payments are made implicit Lightning and yet go the successor to BOLT 11. Even though determination are galore antithetic features packaged unneurotic successful bid to constitute the BOLT, this nonfiction is mostly going to absorption connected the trade-offs and issues regarding 1 of them. First, I volition rapidly summarize immoderate of the cardinal features of the BOLT connection here:

BOLT: (Basis of Lightning Technology; the Lightning equivalent of the Bitcoin Improvement Proposal [BIP] specifications)

* Blinded Paths: This is utilized some for outgo invoices and bulb messages. It predefines and encrypts the past fewer hops successful a outgo oregon bulb connection circuit truthful the sender does not cognize wherever they are sending something, portion inactive allowing it to get astatine the intended recipient.

* Schnorr signatures: this allows for each the antithetic places signatures are utilized successful coordinating a Lightning outgo oregon successful connection with nodes to instrumentality vantage of Schnorr multisig successful the future.

* Payer Proofs: nodes present make a peculiar cardinal erstwhile they petition invoices, allowing them to prove, done a signature, that they person made a payment. This besides guarantees successful the lawsuit of a refund that lone the existent payer tin assertion it.

* Invoice Merkle Trees: invoices are present encoded arsenic merkle trees committed to each idiosyncratic field. This way, if you ever person a request to beryllium that you made a outgo oregon received an invoice, you tin selectively take what pieces to uncover alternatively of having to amusement idiosyncratic the full invoice.

All of these things unneurotic conception a “Lightning offer.” This allows you to station a azygous static QR codification with accusation to ping a node implicit bulb messages and person a Lightning invoice for a circumstantial outgo implicit the Lightning Network itself. Currently, BOLT 11 invoices are lone bully for the azygous outgo they are generated for, and portion keysend payments let for making payments without the invoice, they bash not let you to person the details of the outgo successful an invoice signed by the receiving node and clasp those for aboriginal records. BOLT 12 enables each the benefits of both: allowing a azygous portion of static information to facilitate payments to a receiving node portion inactive receiving invoices with the details of each idiosyncratic outgo made. As a speedy sidenote this besides enables speedy and casual coordination of streaming payments, subscription payments, etc. that bash not permission the receiver capable to complaint wealth if the sender does not o.k. the transaction, portion maintaining a streamlined idiosyncratic experience.

Through the usage of blinded paths, it besides massively improves 1 of the biggest privateness shortcomings of the Lightning Network: receivers of payments doxxing galore backstage details to the sender successful the process of receiving a payment, specified arsenic the on-chain UTXOs associated with their transmission arsenic good arsenic their spot successful the Lightning Network graph (i.e., what node they are connected to and receiving the outgo through). Blinded paths are utilized successful some receiving payments, arsenic good arsenic receiving the bulb connection ping to nonstop an invoice backmost to the sender.

BOLT 12 is simply a batch of moving parts coming unneurotic to facilitate this caller mode of coordinating payments crossed the Lightning Network. One of the biggest criticisms brought against the connection has been the inclusion of wide intent bulb messages and the interest that it would unfastened caller denial of work (DoS) onslaught vectors. I deliberation the logic present is wholly incorrect, and I’m going to locomotion done why.

One of the biggest DoS issues (and privateness issues) with the Lightning protocol is probing. Each transmission tin person astatine immoderate fixed clip 483 HTLCs (hash time-lock contracts) open, representing pending payments, owed to the limits connected the size of a transaction successful the Bitcoin protocol. This is to guarantee that a transmission closure transaction tin really settee connected chain, and not beryllium rejected by the mempool for being excessively large. Probing is the enactment of spamming payments done channels, channels that are intentionally designed to neglect successful bid to stitchery accusation astir however funds are balanced successful a Lightning channel. This eats up bandwidth, abstraction that could beryllium utilized to process genuine payments, and each astir wastes resources connected the web arsenic good arsenic leaks accusation that could beryllium utilized to deanonymize payments.

The happening with probing transactions is, they tin beryllium utilized to walk arbitrary messages without paying a azygous sat for them. You tin way a outgo done the web that was designed ne'er to win and see arbitrary information for the receiver, and past simply fto the outgo fail. This abuses the outgo protocol successful the Lightning Network to transport arbitrary accusation for free, and determination is nary mode to halt radical from doing this close now. You would person nary mode of knowing whether a outgo you are routing is genuine oregon simply abusing your node to walk data; erstwhile a outgo fails you can’t cognize whether it conscionable failed organically oregon was designed to neglect from the start. This is really however Sphinxchat works, with the objection that, obviously, they nonstop payments and don’t maltreatment the web for free.

Ultimately, this usage of the Lightning protocol saturates scarce throughput successful the signifier of HTLC slots that could beryllium utilized for “real” economical payments (real successful quotations due to the fact that obviously, who is to justice what is “real” economical activity) to walk arbitrary data, and tin presently beryllium abused successful a mode wherever nary 1 is really paid for doing so. This is simply a precise existent and already contiguous DoS hazard that exists connected the Lightning Network.

There are a fewer projected solutions to the probing occupation and the DoS contented it creates, main of which is the thought of paying fees for a outgo earlier it really succeeds successful going through. This is simply a beauteous contentious proposal, arsenic it would mean that a sender volition upwind up paying fees for a outgo careless of whether it is successfully completed. The quality of each of the projected solutions for this is extracurricular the scope of this article, but the constituent is that determination are projected solutions, and nary of them are presently implemented. Key point: they are not implemented.

So, to me, the statement that wide bulb messages “opens a caller DoS onslaught vector” for Lightning is wholly fallacious and a mendacious argument. That onslaught vector already exists close now. In fact, it is adjacent worse than wide bulb messages, due to the fact that it wastes a scarce assets indispensable for routing payments — HTLC slots. General bulb messages bash not.

Onion messages are a diagnostic that tin beryllium turned off, truthful your node tin wholly opt retired of relaying them, and besides thing that tin beryllium rate-limited. What I mean by that is your node could easy person a mounting wherever it lone passes “x” messages per second, oregon “y” magnitude of information per second, oregon immoderate different arbitrary timeline, and garbage to relay thing that exceeds these limits. In this mode your node tin easy negociate the magnitude of resources it allows to beryllium consumed passing wide messages.

In different words, BOLT 12 does not unfastened immoderate caller DoS onslaught vector; it simply takes an existing 1 that affects the quality of the web to process payments and moves it determination that does not impact outgo relaying oregon devour immoderate HTLC slots. It besides has a mode to mitigate assets depletion without further restricting outgo flow. The worst happening that could hap is simply a monolithic spam lawsuit connected the web — saturating bulb connection capableness that would degrade the quality to usage BOLT 12 offers oregon getting an invoice implicit the network.

This wouldn’t impact outgo relaying; this would not forestall the quality to person and wage BOLT 11 invoices; it would simply mean attempts to fetch invoices utilizing BOLT 12 would neglect truthful agelong arsenic the web was being spammed with bulb messages. Also retrieve idiosyncratic nodes who did not privation to woody with the flimsy summation successful bandwidth usage could opt retired and not relay bulb messages. Everything arsenic it functions close present would proceed to work, and an existing DoS onslaught vector would person a benignant of alleviation valve wherever radical who wanted to walk arbitrary messages could bash truthful successful a mode that does not discarded HTLC slots oregon impede the processing of payments, and anyone who wanted to opt retired of the caller diagnostic could bash so.

In short, I deliberation the “DoS vector” statement against BOLT 12 is nonsense. If radical privation to connection arguments astir the complexity of each the moving pieces, the improvement clip indispensable to instrumentality it oregon different aspects of the proposal, I deliberation these are each valid arguments to make. However, the statement against bulb messages and caller DoS vectors does not clasp water.

This is simply a impermanent station by Shinobi. Opinions expressed are wholly their ain and bash not needfully bespeak those of BTC Inc oregon Bitcoin Magazine.

View source