2

Me and my friend are testing Raspibolt running LND 0.6 Beta. We noticed the following problem/limitation:

  • When I opened a channel with him, I could send him payments (via invoice) without any problems (direct connection). But when he tried to pay me (via invoice), the transaction tried to go through other nodes rather than going directly to my node. Then we closed the channel and tried the other way around. He opened a channel with my node and I could receive payments from him but I couldn't send him any payments directly. Transaction one again tried to go through other nodes.

Why is this happening?

2
  • Do you have an error message or log entry to share so that we don't have to do blind guessing? May 3, 2019 at 3:11
  • No not blind guessing. I am using queryroutes command to check what is happening.
    – user091ok
    May 3, 2019 at 4:56

2 Answers 2

3

The Problem here is the channel reserve. If you fund a channel all the bitcoin are on your side. At this point you can only pay. However let us assume you make a really small payment (below 1% of the channel capacity) your channel partner can't pay you back on that channel. After establishment lightning channels are required to keep at least 1% of the capacity on their side. If it was less it would incentivice the person owning no or only little liquidity to breach to protocol an publish and old channel state. Since the punishment would do basically no other harm then having a channel closed.

I suspect this is what happened between your two nodes. Try to balance the channel a little bit more by sending over 10% of your funds and sending back 5%. if that does work then we found the problem.

2

A lightning network channel has a certain transactional capacity, determined by the channel participants at the time of creation. While it is possible for both parties to add funds to a channel during the creation of said channel, the current implementation generally has just one participant commit funds to the channel. So generally, a channel will start with all of the capacity on one end of the channel, and no capacity on the other end (since just one participant funds it).

To illustrate this, imagine you open a channel with 1BTC capacity to your friend. The initial channel state is: [you:1BTC, friend:0BTC]

So if your friend wants to pay you, they will need the capacity to do so. Maybe they open a channel of their own to do this, or you send some transaction that pushed BTC to their end of the channel, or maybe in the future the channel will just be dual-funded in the first place.

Whatever the case, just because you are a participant of a channel, that alone doesn’t mean you can send/receive lightning payments. Rather, you need to be a participant of a channel, and have the appropriate channel capacity available to your node. This works both ways: you can’t get paid if all of your channels are 100% pushed to your end, and you can’t send payments if all of your channels are 100% pushed to your friend’s node(s).

6
  • 1
    Also I should add that maybe you only paid a small amount to the other node so that miore than 99% of the channel capacity was still on your side. In that case the other node can't send to you due to the 1% channel reserve for the penalty mechanism. Also it would be ingesting to know what happens if the other node specified the direct route through your channel. May 3, 2019 at 3:10
  • These are the details for the channel. This channel was connected with my node and my friend can send me sats. In fact total_satoshis_received is equivalent to 100. The problem occurs when I try to send him 50 sats. The remote_balance and local_balance are not empty:
    – user091ok
    May 3, 2019 at 4:53
  • "capacity": "20000", "local_balance": "100", "remote_balance": "19717", "commit_fee": "283", "commit_weight": "552", "fee_per_kw": "254", "unsettled_balance": "0", "total_satoshis_sent": "0", "total_satoshis_received": "100", "num_updates": "2", "csv_delay": 144, "private": false, "initiator": false, "chan_status_flags": "ChanStatusDefault"
    – user091ok
    May 3, 2019 at 4:53
  • @user091ok perhaps @Rene’a comment is the real issue- try pushing more balance to your node (maybe 1000 sats?) and then see if you can send it back.
    – chytrik
    May 3, 2019 at 6:57
  • 1
    We balanced the channel by sending him more sats and now transactions could go both ways directly.
    – user091ok
    May 3, 2019 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.