lightninglabs / lightninglabs/lightning-dev-site

Stage 1 - Payment channel is not switching when intermediaries of one channel doesn't have sufficient funds in multi-hop payment channel

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
26
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Scenario: We were trying multi-hop payment from A to C
A opened a channel of 50000 satoshis with B (local balance: 40000, remote balance:0 with respect to A)
B opened a channel of 80000 satoshis with C (local balance: 70000, remote balance:0 with respect to B)
A opened a channel of 90000 satoshis with D (local balance: 80000, remote balance:0 with respect to A)
D opened a channel of 55000 satoshis with C (local balance: 45000, remote balance:0 with respect to D)
Available channels:
A -----> B ------>C
A -----> D ------>C
Now, C added an invoice of 20000 satoshis.
A----->D----->C channel was randomly selected for multi-hop payment
Balances was updated on A ------>D------->C
In A -----> D; A: 60000 and D: 20000
In D -----> C; D: 25000 and C: 20000

Again, C added an invoice of 30000

Expected result:
Now, channel A----->B----->C should be used to settle this payment because D doesn't have sufficient funds.

But we are getting this
{
"payment_error": "unable to route payment to destination: TemporaryChannelFailure",
"payment_preimage": "",
"payment_route": null
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no files, tests, or entry points. Reproduce the two-route scenario with the stated balances, then trace payment routing and channel selection; done means the second 30,000-satoshi payment uses A-B-C instead of returning TemporaryChannelFailure.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain, distributed-systems, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.