Skip to main content
Tweeted twitter.com/StackBitcoin/status/1122968828294717440
edited tags
Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Source Link

In the Lightning Network, what happens if a "middle node" suddenly goes dormant for a long while?

I think I have a general understanding of how the Lightning Network works. However, I was having a little difficulty in understanding what happens when a node in the middle of a "path" suddenly goes dormant, or offline for a long time. To clarify my question, consider the following example:

  1. A wants to make a payment of 1 BTC to D.
  2. A finds a path from A --> B --> C --> D.
  3. D generates an R and sends H = hash(R) to A
  4. A creates HTLC of 1.002 BTC with B.
  5. B creates HTLC of 1.001 BTC with C.
  6. C creates HTLC of 1 BTC with D.
  7. D unlocks HTLC, receives 1 BTC, and then tells R to C.

However, what if C is suddenly offline meaning C won't be there to receive R from D and thus stops the flow of R back through the path. I would assume that the HTLC's between A and B and B and C run out and so A and B are refunded.

So, would C lose out? Would A have just made a "free" transaction? I assume this is a fast process, but is it likely such an event occurs where a middle node in an LN transaction just goes down for a long while?