Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

xpay treats a local "Too many HTLCs" failure as a 1 msat capacity shortfall and floods the route with dust parts.

Đang mở
#9,597 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
backend, networking, payments

Hướng nghiên cứu

Start by tracing the local failure path in plugins/xpay/xpay.c at the handling and askrene-inform-channel calls, then compare it with channeld/channeld.c and channeld/full_channel.c. Check how plugins/askrene/askrene.c records constrained amounts. Done means a local "Too many HTLCs" failure no longer causes repeated amount-minus-1-msat retries and dust-part creation; verify the behavior with the relevant existing test or reproduction.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When our own outgoing channel has no free HTLC slots, channeld fails the HTLC with temporary_channel_failure ("Too many HTLCs"). xpay handles that like a liquidity failure and tells askrene the channel is constrained to the attempted amount. askrene stores that as "amount minus 1 msat". The same channel stays the cheapest route, so the next getroutes sends the big part over it again, 1 msat smaller, and routes the 1 msat leftover elsewhere. Each retry fails again on the full slots, so xpay produces one new 1–17 msat part per failure. A slot shortage doesn't depend on the amount, so this loop can never succeed.

Observed (mainnet, v26.06.8)

Payment of 298,495 sat, retry_for 60 s:

  • From the first "Too many HTLCs" on our own channel (erring_index 0), xpay ran this cycle 98 times in 14
    s, about once every 60 ms.
  • The dust parts summed to 237 msat. They went over other channels, reached the destination, and were held
    there for about 2 minutes until mpp_timeout.
  • The main part (~295.5k sat) never left our node, so the payment failed.

xpay log (ids shortened):

      260: routes for 295521663msat = [1msat via 4 hops, 295521662msat via 2 hops]
      260: ...: We got failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Too many HTLCs)
  for <local scidd>, assuming it can't carry 295521662msat
      260: routes for 295521662msat = [1msat via 4 hops, 295521661msat via 2 hops]
      260: ...: We got failed: WIRE_TEMPORARY_CHANNEL_FAILURE (... Too many HTLCs) for <local scidd>, assuming
  it can't carry 295521661msat
      ... (98 iterations)
      260: getroutes_done: need more (was_routing 295521655msat, needs_routing 295521656msat)

According to my LLM:

Where it happens
  1. channeld reports a full slot count as a generic temporary_channel_failure:
    channeld/channeld.c#L6602-L6605. The count check, including our own limit applied to
    locally added HTLCs: channeld/full_channel.c#L728-L740
  2. For a local failure (index == 0), xpay has the precise reason ("Too many HTLCs") in the error message:
    plugins/xpay/xpay.c#L1008-L1013
  3. It still maps every temporary_channel_failure to "can't carry this amount":
    plugins/xpay/xpay.c#L1125-L1131
    and sends askrene-inform-channel with inform: constrained and the attempted amount:
    plugins/xpay/xpay.c#L1181-L1193
  4. askrene turns that into a maximum of amount − 1 msat ("we were one msat short"):
    plugins/askrene/askrene.c#L1199-L1211
Ngôn ngữ chính
C
Star
3.1k
Fork
1k
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ElementsProject/lightning

Tất cả issue của ElementsProject/lightning

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.