spesmilo / spesmilo/electrum

HTLC max in flight exceeded when sending LN payments

Open
#8,533 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🐞 lightning ⚡
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Tried to send about $100 to Coingate via LN. I have $400 in outgoing LN channel capacity across the Electrum and ACINQ trampolines.

Payment failed due to:

electrum/lnchannel.py
 952         if current_htlc_sum + amount_msat > chan_config.max_htlc_value_in_flight_msat:
 953             raise PaymentFailure(f'HTLC value sum (sum of pending htlcs: {current_htlc_sum/1000} sat '
 954                                  f'plus new htlc: {amount_msat/1000} sat) '
 955                                  f'would exceed max allowed: {chan_config.max_htlc_value_in_flight_msat/1000} sat')

Not sure why

  • the LN router is choosing channels such that the channel limit are exceeded?
  • trampolines are applying value in flight limits at all?

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

Start with the HTLC limit check shown in electrum/lnchannel.py around lines 952-955, then trace how LN routing selects channels and how trampoline payments reach this check. The issue does not name tests or define the intended behavior; done would require establishing why the limit is reached and validating the agreed behavior for routed and trampoline payments.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.