<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.0">Jekyll</generator><link href="http://simplelightning.com//feed.xml" rel="self" type="application/atom+xml" /><link href="http://simplelightning.com//" rel="alternate" type="text/html" /><updated>2022-04-05T17:29:28+00:00</updated><id>http://simplelightning.com//feed.xml</id><title type="html">The Simple Lightning Newsletter</title><subtitle>Lorem ipsum dolor sit amet consectetur adipisicing elit. Maxime mollitia, molestiae quas vel sint commodi repudiandae consequuntur voluptatum laborum.
</subtitle><entry><title type="html">Payment Timeouts in Payment Channels - #3 Timelocks</title><link href="http://simplelightning.com//payment-timeouts-in-payment-channels-timelocks.html" rel="alternate" type="text/html" title="Payment Timeouts in Payment Channels - #3 Timelocks" /><published>2022-03-31T00:02:00+00:00</published><updated>2022-03-31T00:02:00+00:00</updated><id>http://simplelightning.com//payment-timeouts-in-payment-channels-timelocks</id><content type="html" xml:base="http://simplelightning.com//payment-timeouts-in-payment-channels-timelocks.html">&lt;p&gt;This the third post in our 3-part introductory series on payment channels!&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;&lt;a href=&quot;/payment-channels-make-the-lightning-network.html&quot;&gt;In the last deep dive&lt;/a&gt;, we talked about how &lt;strong&gt;hashlocks&lt;/strong&gt; work to create &lt;strong&gt;atomic payments&lt;/strong&gt; in payment channels. In this post we’ll go into &lt;strong&gt;timelocks&lt;/strong&gt;, the second type of locks used to construct &lt;strong&gt;HTLCs&lt;/strong&gt;. Timelocks establish timeouts for payments and enable trustless escrow services in the Lightning Network.&lt;/p&gt;

&lt;h2 id=&quot;timeouts-with-timelocks&quot;&gt;Timeouts with Timelocks&lt;/h2&gt;

&lt;h3 id=&quot;so-why-do-we-need-timelocks-in-multi-hop-payments&quot;&gt;So, why do we need Timelocks in multi-hop payments?&lt;/h3&gt;

&lt;p&gt;Time is money, and without being able to account for time it’s impossible to process payments.&lt;/p&gt;

&lt;p&gt;Imagine, you have payment route with four hops in the route: (1) Alice, (2) Bob, (3) Charlie, and (4) Dave.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlc-multi-hop-routing-i.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 0. Four peers with 300k Sats between each of them.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In the last post we showed how Dave generates the &lt;em&gt;random secret preimage&lt;/em&gt; (usually abbreviated as “R”, but represented here as a key) and computes the hash (represented here as an “H” lock) to send to Alice. Alice locks up funds in HTLC with Bob, Bob does the same with Charlie, and Charlie with Dave. The result is Fig 1, with 100k sats locked in an HTLC with each peer in the route.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlc-multi-hop-routing-0.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 1. Each hop in the route has 100k sats in an HTLC with its peer.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;However, these HTLCs don’t have any timelocks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What happens if one of the nodes in the route crashes or goes offline?&lt;/em&gt;&lt;/p&gt;

&lt;h4 id=&quot;without-timelocks-payments-can-get-stuck&quot;&gt;Without timelocks, payments can get stuck.&lt;/h4&gt;

&lt;p&gt;Transactions are only atomic between hops, not for the route as a whole.&lt;/p&gt;

&lt;p&gt;Consider what happens if Bobs’ node goes down after Dave received his hashlock from Charlie (Fig. 2). Dave has the key that allows him to unlocks the hashlock, between him and Charlie. Dave sends the key to Charlie who in turn sends the key to Bob. However, Bob doesn’t respond because his node is offline.&lt;/p&gt;

&lt;p&gt;But if Bob doesn’t respond, Charlie is still able to use the secret to retrieve the funds from Bob by settling on the blockchain. Using the secret, Charlie will &lt;a href=&quot;https://github.com/lightning/bolts/blob/master/05-onchain.md#failing-a-channel&quot;&gt;close/fail their channel&lt;/a&gt;, by sending the last HTLC contract/commitment transaction to the blockchain.&lt;/p&gt;

&lt;p&gt;But what happens to the funds between Alice and Bob?&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlc-multi-hop-routing-1.gif&quot; /&gt;
  &lt;figcaption&gt;Fig. 2. Bob's node goes down and Alice's 100k Sat payment is locked, until Bob comes back online.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Alice is the one who requested to make this payment, so she’s not expecting to her money back. However, it doesn’t benefit anyone to have BTC stuck in a state where no one can move or claim it.&lt;/p&gt;

&lt;p&gt;Alice could wait until Bob comes back online and is responsive again, which could take days, weeks. But what happens if Bob dropped off the graph and never responds again? The HTLC between them is valid indefinitely, so the money committed to the HTLC could stuck there permanently.&lt;/p&gt;

&lt;h2 id=&quot;what-are-timelocks&quot;&gt;What are Timelocks?&lt;/h2&gt;

&lt;p&gt;Timelocks are the other half of the condition inside of HTLCs.&lt;/p&gt;

&lt;p&gt;HTLCs are hashlocks + timelocks, combined with an OR condition. The funds in each channel can only flow one way, forward to the recipient if hashlock is unlocked or backward, back to the sender if the timelock times out.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlcs-hashlocks-timelocks.gif&quot; width=&quot;100%&quot; /&gt;
  &lt;figcaption&gt;Fig. 3. Hashlocks OR Timelocks in an HTLC&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;To receive/unlock payment in a HTLC, the recipient can either provide the key for the hashlock OR wait for the timelock to expire. If the hashlock is valid it can be executed in the payment channel or onchain, however the timelocks are only ever executed on chain as a fail safe.&lt;/p&gt;

&lt;h3 id=&quot;how-do-timelocks-unstick-payments&quot;&gt;How do timelocks “unstick” payments?&lt;/h3&gt;

&lt;p&gt;Timelocks require that parties in the contract acknowledge a deadline and agree to forfeit the ability to claim the payment, returning funds to the payer after a specific time and date.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlc-multi-hop-routing-2.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 4. A visualization of timelocks added to each of the payment channels compared to Fig. 2. to create an OR condition between the hashlocks and timelocks.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Another way to think about this is that, the timelock dictates how long Bob has to beat Alice and provide the secret. If Bob produces the secret before the timelock unlocks he can claim the funds, but if the timelock times out first Alice can. And the same goes for Charlie vs. Bob, and Dave vs. Charlie.&lt;/p&gt;

&lt;p&gt;If Bob goes offline after Dave received his payment from Charlie, Dave can still claim the funds from Charlie, who will in turn try to claim the funds from Bob. Bob has the time remaining in the timelock to comeback online and claim his funds from Alice. Because the Charlie’s transaction is on the blockchain, the secret has been made public and can easily be found. If the funds aren’t claimed, after the deadline of the timelock Alice will be able to retrieve those funds, and Bob is the only one out the money (Fig. 5.).&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-30/htlc-multi-hop-routing-3.gif&quot; /&gt;
  &lt;figcaption&gt;Fig. 4. The HTLC being unlocked by the timelock between Alice and Bob.&lt;/figcaption&gt;
&lt;/figure&gt;</content><author><name>Kiara Bickers</name></author><category term="deep-dive" /><category term="payment-channels" /><category term="HTLCs" /><category term="timelocks" /><category term="preimage" /><summary type="html">This the third post in our 3-part introductory series on payment channels!</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/2022-03-16/htlc-routing-3.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/2022-03-16/htlc-routing-3.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">How Do Payment Channels Make Up The Lightning Network? - #2 Hashlocks</title><link href="http://simplelightning.com//payment-channels-make-the-lightning-network.html" rel="alternate" type="text/html" title="How Do Payment Channels Make Up The Lightning Network? - #2 Hashlocks" /><published>2022-03-16T00:02:00+00:00</published><updated>2022-03-16T00:02:00+00:00</updated><id>http://simplelightning.com//payment-channels-make-the-lightning-network</id><content type="html" xml:base="http://simplelightning.com//payment-channels-make-the-lightning-network.html">&lt;p&gt;This the second post in our 3-part introductory series on payment channels.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;&lt;a href=&quot;/how-payment-channels-work-the-basics.html&quot;&gt;In the last deep dive&lt;/a&gt;, we talked about how a 2-of-2 multisig is used to move bitcoin off of the main chain and into a payment channel. In this post we’ll go into how payments can be routed though multiple payment channels in the Lightning Network.&lt;/p&gt;

&lt;h3 id=&quot;payment-channel-basics&quot;&gt;Payment Channel Basics:&lt;/h3&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/lightning-payment-channel.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 1. The basic terminology on payment channels&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Users and businesses on the network operate as lightning nodes, two nodes can transact peer-to-peer to move funds in a payment channel between them without having to incur fees that may one day become prohibitive on the Bitcoin blockchain.&lt;/p&gt;

&lt;p&gt;But one peer-to-peer payment channel in isolation is not much of a network.&lt;/p&gt;

&lt;h4 id=&quot;how-are-payment-channels-connected-to-create-the-full-lightning-network&quot;&gt;How are payment channels connected to create the full Lightning Network?&lt;/h4&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/lightning-network-blockchain.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 2. Nodes aconnected via payment channels in the lightning network&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;peer-connections-and-channels&quot;&gt;Peer Connections and Channels&lt;/h2&gt;

&lt;p&gt;Nodes talk to each other through the TCP/IP layer of the internet, and connect to each other by establishing payment channels on the Lightning Network. Although you can open as many channels as you want, every open channel costs some amout of on chain fees, and requires tieing up some liquidity.&lt;/p&gt;

&lt;p&gt;On the Lightning Network, users don’t need to open a channel with every user they want to transact with, because transactions can be routed through other peers.&lt;/p&gt;

&lt;h4 id=&quot;but-how-do-payments-route-through-nodes-across-the-network&quot;&gt;But how do payments route through nodes across the network?&lt;/h4&gt;

&lt;h2 id=&quot;routing-and-receiving-payments&quot;&gt;Routing and Receiving Payments&lt;/h2&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/lightning-network-single-hop-payment.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 3. A Single-hop Payment routing through nodes A, B, and C.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Say Node A in the A-B-C connection wants to send 100k Sats (or about $50) to Node C with 1 hop in the route (Ct. Fig. 4).&lt;/p&gt;

&lt;h4 id=&quot;how-does-the-protocol-enable-the-payment-to-go-through-the-middle-man-node-b-trustlessly&quot;&gt;How does the protocol enable the payment to go through the middle man (Node B) trustlessly?&lt;/h4&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-routing-0.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 4.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Alice can’t blindly trust Bob to pass the payment to Charlie without putting some security measures in place first.&lt;/p&gt;

&lt;h3 id=&quot;what-is-a-hashlock&quot;&gt;What is a Hashlock?&lt;/h3&gt;

&lt;p&gt;In Bitcoin hashes are used in a variety of different ways, full nodes use it to validate data, link together blocks in the chain, and miners use it to prove they’ve done work for the rest of the network. In this instance, hashes are used to create a lock.&lt;/p&gt;

&lt;h4 id=&quot;a-hashlock-is-a-cryptographically-hashed-or-scrambled-random-number&quot;&gt;A hashlock is a cryptographically hashed or scrambled random number:&lt;/h4&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-hashlock.png&quot; width=&quot;70%&quot; /&gt;
  &lt;figcaption&gt;Fig. 5.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;SHA-256 is a one-way mathematical hash function that creates an unique output. We can mathematically prove that it’s impossible to guess or reproduce the original number from the output hash. Because of this property, the hashed output can function as a &lt;em&gt;lock&lt;/em&gt;, and the original input can serve as the &lt;em&gt;key&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The user that generated the lock can give it to other users for the purpose of locking up bitcoin. To unlock the bitcoin, the user just provides the secret key. Revealing the key in a transaction, shows everyone how to reproduce the unique hash.&lt;/p&gt;

&lt;h2 id=&quot;trustless-payments-channel-routing-with-htlcs&quot;&gt;Trustless Payments Channel Routing With HTLCs&lt;/h2&gt;

&lt;p&gt;Here the specific hashlock being used is called an HTLC. &lt;strong&gt;Hash Time Locked Contracts&lt;/strong&gt; (HTLCs) are conditional payments used in payment channels, and are the fundamental building blocks of every payment on the Lightning Network.&lt;/p&gt;

&lt;p&gt;Sticking with this example, Alice wants to send 100k Sats to Charlie, but the two of them don’t have a direct channel relationship, and it’s more bitcoin than either of them want to spend to open a new channel. Conveniently, they both have 300k Sats channels with Bob, so the payment can route through him.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;First, Charlie generates a random number as the &lt;em&gt;secret key&lt;/em&gt; and computes its SHA-256 hash represented as the &lt;em&gt;lock&lt;/em&gt;. Then he sends the hashlock to Alice.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-routing-1.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 6.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;Alice uses her payment channel with Bob to pay him 100k Sats, but she adds the condition that the key for Charlie’s hashlock is needed to claim the funds. In order for Bob to claim the payment, he has to provide the secret data which was used to compute the hash.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-routing-2.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 7.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;Bob keeps his payment from Alice, and generates his own 100k Sats payment to Charlie. Using the hash provided from Alice Bob locks his 100k Sats payment, creating the condition that the key is needed to claim the funds. Using his payment channel to Charlie, Bob sends the payment along.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-routing-3.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 8.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;Charlie has the original key (usually called the &lt;strong&gt;preimage&lt;/strong&gt;) that was used to produce the hash, so when Charlie receives the payment from Bob he’s able to lock and claim the funds. By making this transaction the secret is revealed to Bob, so that he can also claim his payment from Alice.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
  &lt;img src=&quot;assets/images/2022-03-16/htlc-routing-4.png&quot; /&gt;
  &lt;figcaption&gt;Fig. 9.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;With HTLCs the capacity of each of the two channels don’t change, only move from peer-to-peer. The purpose of HTLCs is to make &lt;strong&gt;atomic payments&lt;/strong&gt;, so that the peer-to-peer transaction isn’t divisible into separate parts.&lt;/p&gt;</content><author><name>Kiara Bickers</name></author><category term="deep-dive" /><category term="payment-channels" /><category term="hashlocks" /><category term="HTLCs" /><category term="preimage" /><category term="atomic-payments" /><summary type="html">This the second post in our 3-part introductory series on payment channels.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/2022-03-16/htlc-routing-3.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/2022-03-16/htlc-routing-3.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Spec Meeting - 14.Mar.2022</title><link href="http://simplelightning.com//lightning-spec-meeting-03-14-22.html" rel="alternate" type="text/html" title="Spec Meeting - 14.Mar.2022" /><published>2022-03-16T00:01:00+00:00</published><updated>2022-03-16T00:01:00+00:00</updated><id>http://simplelightning.com//lightning-spec-meeting-03-14-22</id><content type="html" xml:base="http://simplelightning.com//lightning-spec-meeting-03-14-22.html">&lt;p&gt;The call this week was mostly a technical discussion on how shutdown should work
with cooperative close peer messages.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;open-pull-requests&quot;&gt;Open Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#968&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/968&quot;&gt;Port convention for different network&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Litecoin is not supported. No need to specify Litecoin ports.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#967&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/967&quot;&gt;Blinded fees&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Still some debate on if the this is being done correctly.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;</content><author><name>Team</name></author><category term="spec-meeting" /><summary type="html">The call this week was mostly a technical discussion on how shutdown should work with cooperative close peer messages.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Spec Meeting - 02.Mar.2022</title><link href="http://simplelightning.com//lightning-spec-meeting-2-28-22.html" rel="alternate" type="text/html" title="Spec Meeting - 02.Mar.2022" /><published>2022-02-28T00:01:00+00:00</published><updated>2022-02-28T00:01:00+00:00</updated><id>http://simplelightning.com//lightning-spec-meeting-2-28-22</id><content type="html" xml:base="http://simplelightning.com//lightning-spec-meeting-2-28-22.html">&lt;p&gt;The Lightning Network has multiple implementations that are all theoretically working together to be compatible and define the network as a whole. But the past week there have been some public discussions around how relevant the Lightning Spec process actually is.&lt;!--more--&gt; Some developers believe everything should be formalized into the Spec, others want to maintain control of what features they offer/implement and when.&lt;/p&gt;

&lt;p&gt;Current disagreements aside, hopefully things evolve to produce the best experience for users.&lt;/p&gt;

&lt;h2 id=&quot;open-pull-requests&quot;&gt;Open Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#960&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/960&quot;&gt;Echo channel_type in accept_channel&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#962&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/962&quot;&gt;Remove legacy sphinx format&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#964&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/964&quot;&gt;Clarify mutual close requirements&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;BOLT 2 Clarification&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#759&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/759&quot;&gt;Onion messages&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#910&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/910&quot;&gt;Simple turbo channels enablement&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We skipped the deep-dive for the week due to upcoming conferences. If you want to contribute or get involved by joining in on the spec calls or writing content shoot over a DM on Twitter.&lt;/p&gt;</content><author><name>Team</name></author><category term="spec-meeting" /><summary type="html">The Lightning Network has multiple implementations that are all theoretically working together to be compatible and define the network as a whole. But the past week there have been some public discussions around how relevant the Lightning Spec process actually is.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">How Do Payment Channels Work? - #1 The Basics</title><link href="http://simplelightning.com//how-payment-channels-work-the-basics.html" rel="alternate" type="text/html" title="How Do Payment Channels Work? - #1 The Basics" /><published>2022-02-16T00:02:00+00:00</published><updated>2022-02-16T00:02:00+00:00</updated><id>http://simplelightning.com//how-payment-channels-work-the-basics</id><content type="html" xml:base="http://simplelightning.com//how-payment-channels-work-the-basics.html">&lt;p&gt;This the first post in our 3-part introductory series on payment channels.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;the-cost-of-on-chain-transactions&quot;&gt;The Cost of On-chain Transactions&lt;/h2&gt;

&lt;p&gt;In the Bitcoin network, nodes are distributed all over the world, and the transaction data is synchronized across the network in blocks. Because this is a 10-minute process, users on the network also wait 10-minutes for their transactions to be confirmed. Bitcoin is not directly limited to a specific number of transactions per second, but it is indirectly limited by the maximum capacity of transaction weight per block.&lt;/p&gt;

&lt;p&gt;The storage on the blockchain is a scarce resource, which is why users bid for their transactions to be confirmed in that next block. When there are more transactions waiting to be confirmed in the mempool, fees on-chain rise to match the increased demand for inclusion of their transaction on the chain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the network, every UTXO is data that each fully validating node is required by law to store. For the user, the price is 10-min processing and transaction fees.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What if we could get closer to instant payments, with less fees?&lt;/p&gt;

&lt;h2 id=&quot;what-are-payment-channels&quot;&gt;What are Payment Channels?&lt;/h2&gt;

&lt;p&gt;Payment channels, sometimes referred to as micropayment channels, are a trustless method of exchanging funds peer-to-peer. On the Bitcoin network, &lt;strong&gt;payment channels&lt;/strong&gt; lock funds into a 2-of-2 multi-signature address that allows the two parties to exchange bitcoin off of the blockchain.&lt;/p&gt;

&lt;p&gt;As bitcoin scales, more users will opt to transact their bitcoin in payment channels to opt out of on-chain transaction fees.&lt;/p&gt;

&lt;p&gt;For more on the history of payment channels check out &lt;a href=&quot;https://youtu.be/HauP9F16mUM&quot;&gt;Christian Decker’s Chaincode Lightning talks&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;how-do-payment-channels-work&quot;&gt;How do Payment Channels Work?&lt;/h2&gt;

&lt;h3 id=&quot;channel-open-the-funding-transaction&quot;&gt;Channel Open: The Funding Transaction&lt;/h3&gt;

&lt;p&gt;To open a channel a transaction a 2-of-2 multi-signature is made to lock up funds.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-02-16/lightning-payment-channel-open.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you want to open a channel with your local pizza stop, Homeslice Pizza, you can commit 1,100,000 sats or ($500 USD) to the channel by sending the funds to a 2-of-2 multi-signature anchor or &lt;strong&gt;funding transaction&lt;/strong&gt;. The funds are essentially locked because you and Homeslice both have to sign a new transaction in order to release the funds.&lt;/p&gt;

&lt;p&gt;The funding transaction must be sent to the bitcoin network and confirmed in order for the channel to be opened.&lt;/p&gt;

&lt;h3 id=&quot;payments-in-the-channel-commitment-transactions&quot;&gt;Payments in the Channel: Commitment Transactions&lt;/h3&gt;

&lt;p&gt;Once the channel is open you can sign new transactions to make changes to the balance.&lt;/p&gt;

&lt;p&gt;Over the next weeks, as you make new orders to Homeslice you credit your balance by 110,031 sats and debit Homeslice’s balance by 110,031 sats.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-02-16/lightning-payment-channel-commitment-transaction.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Both parties mutually sign each &lt;strong&gt;commitment transaction&lt;/strong&gt;, which updates the balance of the channel.&lt;/p&gt;

&lt;p&gt;These transactions are considered valid and could be sent to the network, but instead, the parties can also keep these transactions off-chain. This way, the balance state of the channel can be updated thousands of times getting us closer to instant micropayments.&lt;/p&gt;

&lt;p&gt;Instead of being limited by block weight, users in payment channels are theoretically only limited by how fast both parties can create and sign a commit transaction.&lt;/p&gt;

&lt;p&gt;To ensure that neither party tries to cheat, by broadcasting an old state of the network, all old transactions are invalidated. When a new commit transaction is made, both parties invalidate the previous state of the channel. In the event of a conflict, only the newest commitment transaction is considered valid to the network.&lt;/p&gt;

&lt;h3 id=&quot;channel-close-the-settlement-transaction&quot;&gt;Channel Close: The Settlement Transaction&lt;/h3&gt;

&lt;p&gt;When you and Homeslice pizza are in unanimous agreement to close the channel, one party sends the &lt;strong&gt;settlement transaction&lt;/strong&gt; to the blockchain. This way, only two transactions ever hit the bitcoin blockchain, and the users get to minimize fees.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-02-16/lightning-payment-channel-close.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;But this is not the typical payment channel, there are a few problems here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem #1 - Locked Liquidity is Expensive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although users save money in the long run by minimizing fees, payment channels require a lot of liquidity up front. And profits in the channel are indefinitely locked up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem #2 - Directionally is Limited&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In our example, where you are the only peer to fund the channel, there is no initial balance for Homeslice Pizza to make payments to you. Not that they have a reason too, but their business does have inventory that they need to pay for.&lt;/p&gt;

&lt;p&gt;What if they could make payments to one of their vendors with the funds locked up in your payment channel with them?&lt;/p&gt;

&lt;p&gt;What if there was a way to move funds from an open channel to a 3rd party without hitting the blockchain?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the Lightning Network?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Lightning Network&lt;/strong&gt; is a network of nodes connected by multiple payment channels! In the following posts in this series, we’ll level up our understanding on payment channels, and how they constitute the network as a whole.&lt;/p&gt;</content><author><name>Kiara Bickers</name></author><category term="deep-dive" /><category term="payment-channels" /><summary type="html">This the first post in our 3-part introductory series on payment channels.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Spec Meeting - 14.Feb.2022</title><link href="http://simplelightning.com//lightning-spec-meeting-02-14-22.html" rel="alternate" type="text/html" title="Spec Meeting - 14.Feb.2022" /><published>2022-02-16T00:01:00+00:00</published><updated>2022-02-16T00:01:00+00:00</updated><id>http://simplelightning.com//lightning-spec-meeting-02-14-22</id><content type="html" xml:base="http://simplelightning.com//lightning-spec-meeting-02-14-22.html">&lt;p&gt;This week there were no merged pull requests. Much of the discussion was focused on long term open pull requests.&lt;/p&gt;

&lt;p&gt;We are exploring how to better communicate the updates to pull requests in the event that spec meetings are primarily, deeply technical and less eventful.&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;open-pull-requests&quot;&gt;Open Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#904&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/904&quot;&gt;Use a warning in quick close&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Added helpful context in debug logs&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#798&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/798&quot;&gt;Offers&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Added Offers functionality for use with or without Blinded paths&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#910&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/910&quot;&gt;Simple turbo channels enablement&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Added “channel_ready message”- Zeroconf enables channel usage immediately prior to transaction confirmations onchain. Information in the “funding locked message” is not available yet: the short-channel-id is missing because it’s a reference to the funding tx onchain (doesn’t exist yet). By using an alias SCID until the funding transaction is confirmed, peers can switch over to using either the alias or the real SCID. Therefore, channel readiness is independent of the funding transaction confirmation.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;</content><author><name>Team</name></author><category term="spec-meeting" /><summary type="html">This week there were no merged pull requests. Much of the discussion was focused on long term open pull requests. We are exploring how to better communicate the updates to pull requests in the event that spec meetings are primarily, deeply technical and less eventful.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">What is Bitcoin Dust &amp;amp; How Can We Fix It?</title><link href="http://simplelightning.com//what-is-bitcoin-dust-and-can-lightning-fix-it.html" rel="alternate" type="text/html" title="What is Bitcoin Dust &amp;amp; How Can We Fix It?" /><published>2022-02-02T00:02:00+00:00</published><updated>2022-02-02T00:02:00+00:00</updated><id>http://simplelightning.com//what-is-bitcoin-dust-and-can-lightning-fix-it</id><content type="html" xml:base="http://simplelightning.com//what-is-bitcoin-dust-and-can-lightning-fix-it.html">&lt;h2 id=&quot;how-is-dust-created&quot;&gt;How is dust created?&lt;!--more--&gt;&lt;/h2&gt;

&lt;p&gt;Bitcoin is represented as Unspent Transaction Outputs (or UTXO’s). You can think of UTXO’s as the unit of Bitcoin that is transferred inside of transactions. The lifecycle of a UTXO begins in a “coinbase transaction”  when miners earn bitcoin for correctly finding the Bitcoin’s next blockhash. When a mining pool earns the bitcoin from a coinbase transaction, the reward is split up to pay miners that were contributing to the pool’s hashrate. Because the value being sent to each node is small, some pools may set a minimum balance before it transfers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UTXOs split into smaller values:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-02-02/miner-payout.png&quot; width=&quot;40%&quot; /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Whenever Bitcoin is sent from the pool, a single UTXO has to be split, to create change. Each full node in the network has to keep track and store the total UTXO set. Because this contributes to the growing size of the blockchain, we want to limit the number of UTXO’s in the set.&lt;/p&gt;

&lt;h2 id=&quot;what-is-dust&quot;&gt;What is dust?&lt;/h2&gt;

&lt;p&gt;Each UTXO has its own transaction chain of history going back all the way back to when it was first mined into existence as a coinbase transaction. As UTXO’s get divided into smaller and smaller values of bitcoin, more UTXO’s are added to the set and the value of bitcoin within them gets smaller and smaller. When a user wants to spend a UTXO containing a small value of bitcoin it at some point no longer makes economic sense to do so. The value of bitcoin in the UTXO is so small, it isn’t enough to pay for the transaction fee required for bitcoin full nodes to relay it or for miners to include the transaction in a block. This is precisely when these UTXO’s are referred to as dust. Dust is essentially low value UTXO’s that have collected over time and have been outpriced or uneconomical to spend.&lt;/p&gt;

&lt;h2 id=&quot;why-does-dust-put-a-strain-on-the-network&quot;&gt;Why does dust put a strain on the network?&lt;/h2&gt;

&lt;p&gt;The mempool is the default 300 megabyte database of unconfirmed or pending transactions which is stored and unique to every node. But it is also a competitive marketplace for confirmation, when there is a backlog of unconfirmed transactions fees are relatively high, and when there is no backlog transactions fees are much lower. When fees are low, it may become economical for those who have dust UTXO’s to consolidate their sent into one large UTXO, which would also be good for the network as a whole.&lt;/p&gt;

&lt;p&gt;If every Bitcoiner used on-chain Bitcoin transactions to buy $3 coffees, the UTXO set would dramatically increase in size. This also has adverse effects and negative network externalities such as increasing the RAM and disk space hardware requirements required for “pruned nodes” (fully validating nodes that don’t store the entire blockchain). Enter the Lightning network!&lt;/p&gt;

&lt;h2 id=&quot;dust-on-the-lightning-network&quot;&gt;Dust on the Lightning Network?&lt;/h2&gt;

&lt;p&gt;Bitcoin used in payment channels allows for much more frequent and smaller transaction values in theory because of the need to only create new UTXO’s when a channel is opened or closed (transaction mined on-chain). OG Bitcoin artist CryptoGrafitti, put this theory to the test with a “lowest bid auction” in 2018, whoever paid the lowest would receive his &lt;a href=&quot;https://cryptograffiti.com/products/black-swan&quot;&gt;Black Swan&lt;/a&gt; piece. There is no such thing as dust on the Lightning Network now, however, it’s commonly believed that routing fees on the Lightning Network will increase over time, so payment amounts will also once again need to increase to remain economical to be routed. Otherwise, a direct payment channel relationship with a peer is required.&lt;/p&gt;

&lt;h2 id=&quot;what-is-a-dust-attack&quot;&gt;What Is a Dust Attack?&lt;/h2&gt;

&lt;p&gt;Now that we’ve explained dust, lightning transactions, and UTXO’s, you can see where reality collides with theory when we approach this from an adversarial perspective. In 2017, it was widely believed certain mining pools were doing a DoS (Denial of service) attacks on Bitcoin by flooding the mempool with transactions to bid up fees and make less value UTXO’s uneconomical to consume. When this attack happens, a miner is able to include their dust UTXO’s in blocks because they can mine their own transactions without needing to communicate with nodes that wouldn’t relay them.&lt;/p&gt;

&lt;p&gt;Chain surveillance companies will also do “dust attacks”, effectively tracing someone’s UTXO lifecycle by sending them small UTXO’s they accidentally consolidate with their other funds.&lt;/p&gt;

&lt;p&gt;Last year, &lt;a href=&quot;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003264.html&quot;&gt;Antoine Riard disclosed a Lightning network vulnerability related to dust&lt;/a&gt;. Because the “dust limit” is enforced by a transaction relay policy between Bitcoin nodes, a Lightning commitment transaction (or channel update) with one of its UTXO’s below the dust limit may fail to relay in the event of a unilateral transaction. The CVE’s could have been exploited via fee blackmailing of node operators, liquidity burning of competing LSP’s, or attacking direct channel peers if the lightning node operator was also a miner.&lt;/p&gt;

&lt;h2 id=&quot;the-future-of-micropayments-on-lightning&quot;&gt;The Future of Micropayments on Lightning&lt;/h2&gt;

&lt;p&gt;Many believe the Lightning Network to be the holy grail for “micropayments”, but it’s still unclear whether that is true due to the long term economical feasibility. This is because of the 546 satoshis dust limit default relay policy on-chain enforced by Bitcoin node operators as well as the 483 max HTLCs in flight, base fee,  and ppm fee routing policies off-chain enforced by Lightning node operators. Time will tell whether the capital allocation requirements of opening and closing a channel will surpass the average Lightning Network user’s Bitcoin hot wallet threshold. All eyes are on the mempool–may the best transaction snipers win. This topic will serve as a foundation for our future Replace-by-fee, Child-pays-for-parent, zero confirmation, and package relay related deep dives.&lt;/p&gt;

&lt;p&gt;1 sat/vbyte or bust,&lt;br /&gt;- &lt;em&gt;Seardsalmon&lt;/em&gt;&lt;/p&gt;</content><author><name>Vivek Kasarabada</name></author><category term="deep-dive" /><category term="dust" /><category term="UTXOs" /><summary type="html">How is dust created?</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Spec Meeting - 31.Jan.2022</title><link href="http://simplelightning.com//lightning-spec-meeting-1-31-22.html" rel="alternate" type="text/html" title="Spec Meeting - 31.Jan.2022" /><published>2022-02-02T00:01:00+00:00</published><updated>2022-02-02T00:01:00+00:00</updated><id>http://simplelightning.com//lightning-spec-meeting-1-31-22</id><content type="html" xml:base="http://simplelightning.com//lightning-spec-meeting-1-31-22.html">&lt;p&gt;Light meeting this week.&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;merged-pull-requests&quot;&gt;Merged Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#954&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/954&quot;&gt;Clarify the sighash types for HTLC Success and Timeout transactions&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;This was a small change for clarification and cross reference.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;open-pull-requests&quot;&gt;Open Pull Requests&lt;/h2&gt;

&lt;p&gt;The two open  pull requests have been unbundled to focus on finer details, allowing for more time and scrutiny on individual parts. It is expected that Offers features such as route blinding will be adjusted and released in phases.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#765&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/765&quot;&gt;Route Blinding&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#798&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/798&quot;&gt;Offers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Team</name></author><category term="spec-meeting" /><summary type="html">Light meeting this week.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">BOLT 11: How to Pay People on Lightning</title><link href="http://simplelightning.com//bolt-11-how-to-pay-people-with-lightning.html" rel="alternate" type="text/html" title="BOLT 11: How to Pay People on Lightning" /><published>2022-01-19T00:02:00+00:00</published><updated>2022-01-19T00:02:00+00:00</updated><id>http://simplelightning.com//bolt-11-how-to-pay-people-with-lightning</id><content type="html" xml:base="http://simplelightning.com//bolt-11-how-to-pay-people-with-lightning.html">&lt;p&gt;Before doing a &lt;a href=&quot;https://simplelightning.com/tag/deep-dive&quot;&gt;deep-dive&lt;/a&gt; on the more topical BOLT 12 and how future payments could help improve payments on lightning, we should first explain how payments currently work with &lt;a href=&quot;https://github.com/lightning/bolts/blob/master/11-payment-encoding.md&quot;&gt;BOLT 11&lt;/a&gt;.&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;bitcoin-address-vs-lightning-invoice&quot;&gt;Bitcoin Address vs. Lightning Invoice&lt;/h2&gt;

&lt;p&gt;BOLT 11 is the formal definition on how to pay people over lightning, similar to how transaction outputs and address types define how bitcoin is sent over the Bitcoin blockchain. When you make payments on (layer-one) Bitcoin you generate and share an &lt;strong&gt;address&lt;/strong&gt; to the payee. With (layer-two) Lightning the difference is, the payee requests an &lt;strong&gt;invoice&lt;/strong&gt; from the payer, and that invoice expires if it’s not paid within a specified time.&lt;/p&gt;

&lt;h2 id=&quot;bech32-encoding-for-qr-codes&quot;&gt;Bech32 Encoding for QR Codes&lt;/h2&gt;

&lt;p&gt;From a user experience standpoint, this means you’re presented with a unique QR code containing a BOLT 11 Invoice at the point of payment instead of providing one. The invoice is created with the same bech32 encoding that was previously used in SegWit, which was designed to &lt;a href=&quot;https://bitcoin.sipa.be/bech32/demo/demo.html&quot;&gt;error correction&lt;/a&gt; when addresses are typed and make the robot vomit of &lt;a href=&quot;https://github.com/btcpayserver/btcpayserver/issues/2110&quot;&gt;QR codes compact&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-01-19/bolt11-vs-bolt12-qrcode-invoices.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;You’ll notice that the invoice is much larger than the address because bech32 in SegWit encodes a simple hash. And for Lightning Network usage bech32 encodes an entire payment invoice, which is why the invoice QR codes also look larger and more complex.&lt;/p&gt;

&lt;h2 id=&quot;decoding-bolt-11-lightning-invoice-data&quot;&gt;Decoding BOLT 11 Lightning Invoice Data&lt;/h2&gt;

&lt;p&gt;When decoding the BOLT 11 invoice we have two parts:&lt;/p&gt;

&lt;h3 id=&quot;1-the-human-readable-data&quot;&gt;1. The Human-Readable Data&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-01-19/lightning-bolt-11-invoice-human-readable.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;2-the-machine-data&quot;&gt;2. The Machine Data&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;assets/images/2022-01-19/lightning-bolt-11-invoice-machine-data.png&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;22-the-tagged-fields&quot;&gt;2.2 The Tagged Fields&lt;/h3&gt;
&lt;p&gt;Defined tags are optional fields for adding a payment hash, invoice description, expiry time, public key of the payee node, a fallback bitcoin “onchain” address, extra routing information for routing to an unannounced channel, payment metadata, a payment secret to prevent probing by other nodes, and more. Each field has its own: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;type&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data_length&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data&lt;/code&gt; section for formatting purposes. But knowing the details of all this data is not as important as understanding the motivation for updating this.&lt;/p&gt;

&lt;h2 id=&quot;problems-with-bolt-11&quot;&gt;Problems With BOLT 11&lt;/h2&gt;

&lt;p&gt;There are some problems with BOLT 11, and particularly bech32. Bech32 encoding was used because it was familiar to SegWit, but it makes invoices that are so large and clunky to send inside the lightning network it’s not the best user experience. Secondary to that, &lt;a href=&quot;https://github.com/sipa/bech32/issues/51&quot;&gt;the encoding was found to have mutation issues&lt;/a&gt; meaning that it will have to be replaced anyway. In a future post, we’ll cover more about &lt;a href=&quot;https://bolt12.org/&quot;&gt;BOLT 12 offers&lt;/a&gt; and how developers can fix some of the existing issues with BOLT 11 invoices.&lt;/p&gt;

&lt;p&gt;Aside from BOLT 11, there are other optional ways you can pay people over lightning using Keysend, LNURL, MMP / AMP, and with &lt;a href=&quot;https://lightningaddress.com/&quot;&gt;Lightning address&lt;/a&gt;, which we will cover in future deep dives as well.&lt;/p&gt;</content><author><name>Kiara Bickers</name></author><category term="deep-dive" /><category term="BOLTs" /><category term="BOLT-11" /><summary type="html">Before doing a deep-dive on the more topical BOLT 12 and how future payments could help improve payments on lightning, we should first explain how payments currently work with BOLT 11.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Spec Meeting - 17.Jan.2022</title><link href="http://simplelightning.com//lightning-spec-meeting-1-17-22.html" rel="alternate" type="text/html" title="Spec Meeting - 17.Jan.2022" /><published>2022-01-19T00:01:00+00:00</published><updated>2022-01-19T00:01:00+00:00</updated><id>http://simplelightning.com//lightning-spec-meeting-1-17-22</id><content type="html" xml:base="http://simplelightning.com//lightning-spec-meeting-1-17-22.html">&lt;p&gt;There were two pull requests merged: Informing peers about an IP address change and facilitating peer communications before unilateral closes. The IRC meeting  was cut a bit shorter than usual due to the US Holiday.&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;merged-pull-requests&quot;&gt;Merged Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#917&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/917&quot;&gt;BOLT 1: adds remote address to optional init_tlvs (IP discovery)&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;This notifies a peer when its IP has changed so that it can inform its other peers of the change as well.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#942&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/942&quot;&gt;Removed requirement to broadcast an outdated commitment transaction&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;Instead of immediately unilaterally closing a channel upon discovering that a peer is unable to provide the most up to date channel balance state, this allows the peer other options to recover the state or wait for the peer to send an error before unilaterally closing.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;open-pull-requests&quot;&gt;Open Pull Requests&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;#910&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/910&quot;&gt;Explicitly allow funding_locked early, and support alias scids&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;No second implementation yet. This would allow channel peers  to acknowledge payments using an alias until a short channel id is confirmed onchain at a “funding depth of zero”. This is an intended UX improvement for rapid onboarding of new users. They can receive payments on Lightning instantly without needing to wait for multiple blocks onchain to set up a lightning channel.  It is a nuanced topic with many risk tolerances and UX tradeoffs which we will explore in a future deep dive.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#911&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/911&quot;&gt;BOLT 7: add gossip address descriptor type DNS hostname&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;This allows node operators to announce a symbolic name such as a domain name to remain reachable despite an IP change.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#919&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/919&quot;&gt;Add a max_dust_htlc_exposure_msat&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;No second implementation yet, just needs cross implementation check. This limits the amount a miner would earn in the event of a unilateral close to a max dust amount plus transaction fees. It caps the amount that is not explicitly associated with one of the channel peers or an HTLC that would be used as fees.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;#941&lt;/strong&gt; - &lt;a href=&quot;https://github.com/lightning/bolts/pull/941&quot;&gt;Clarification how messages are referred to&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;A clarification to BOLT 1 messages.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;</content><author><name>Team</name></author><category term="spec-meeting" /><summary type="html">There were two pull requests merged: Informing peers about an IP address change and facilitating peer communications before unilateral closes. The IRC meeting was cut a bit shorter than usual due to the US Holiday.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" /><media:content medium="image" url="http://simplelightning.com//assets/images/lightning-strikes-icon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>