out-swap receive: invoices carry a 318-block route-hint CLTV delta; Strike and Cash App can't pay them
Maintainer thường phản hồi trong vòng 1 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
- 48/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ệ
- go
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start with sdk/swaps/invoice.go and sdk/swaps/out_swap.go to trace how the final CLTV and swap server route hint reach the invoice; the issue says the 318-block hint is copied unchanged. Check the related send-side CLTV issues (#1238, #1472, #1509) for timing constraints. Done means identifying whether the receive hint can safely use a lower delta or multiple paths and addressing the reported failures; the cause remains unconfirmed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Lightning invoices created by a mainnet Wavelength wallet on v0.2.1 can't be paid from Strike or Cash App. The same type of invoice is paid without trouble from a self-hosted LND node, and the receive completes normally.
The one unusual property I found in these invoices is the timelock budget. The swap server's route hint sets cltv_expiry_delta = 318. Together with the final CLTV of 40, a payer has to accept 358 blocks for the last hop alone, and about 574 blocks on a typical route. I think this goes over the CLTV limits these custodial wallets apply. Neither service publishes its limit, so this is an inference, not a confirmed cause.
Strike and Cash App are where many everyday Lightning users hold their balance. When those users can't fund a Wavelength wallet, onboarding for any app built on the SDK is blocked, so I wanted to report it early.
Environment
| Wavelength | daemon/SDK v0.2.1 (Android Wavewalletdk.aar, sha256 07d97821…02fb) |
| Network | mainnet, operator wavelength.lightning.finance:443 |
| App | Android wallet forked from apps/rn-wallet-demo at v0.2.1. My changes are UI only; invoice creation is the unmodified SDK path. |
| Devices | Android emulator (x86_64, API 34) and a Pixel 6a (Android 17) |
What I tested
I tried to rule out causes on my side before reporting:
- App vs SDK. Ran the same source on a clean emulator and created fresh 1,000 sat invoices there. The receive path comes straight from the SDK.
- Wallet online. Kept the receiving wallet open and in the foreground the whole time, so a backgrounded or sleeping client can't be the cause.
- Different payers, same invoice type. Paid from a self-hosted LND node, Strike (scanning the QR) and Cash App.
- Receive path. Confirmed in the daemon log that a paid invoice runs the whole flow (route hint → invoice → vHTLC funded → claimed → VTXO).
- Decoded invoice. Checked amount, expiry, route hint, fees, CLTV values and feature bits for anything unusual.
- Graph reachability. Checked that the hint node (
LOOP,021c97a9…7d0d) is public and well connected: 65 active channels, about 112 BTC capacity. - CLTV sensitivity. Ran
lncli queryrouteswith the invoice's hop hint at several--cltv_limitvalues. This only searches for a route; nothing was sent. - Existing reports and source. Searched open and closed issues and PRs for this repo (cltv, route hint, hop hint, timelock, receive, custodial, Strike), and read
sdk/swapsonmain.
Results
Payers
| Payer | Result |
|---|---|
Self-hosted LND (default max_cltv 2016) |
Paid; receive completed in about 20 s |
| Strike | "Can't find route" |
| Cash App | "Sorry, your withdrawal could not be processed," followed by an SMS saying it failed. No reason given. |
Invoice decode (1,000 sat example)
| Field | Value |
|---|---|
| Amount / expiry | 1,000 sat / 3600 s |
min_final_cltv_expiry |
40 |
| Route hint | 1 path, 1 hop, via LOOP (021c97a9…7d0d), virtual SCID |
| Hint fee | 0 msat base + 2500 ppm |
Hint cltv_expiry_delta |
318 |
| Features | 8, 14, 17 |
Route probes from LND (block height 978,095)
--cltv_limit |
Result |
|---|---|
| 300 | unable to find a path to destination |
| 1000 | 6-hop route; total_time_lock 978,669 (574 blocks); total_fees_msat 3105, of which 2500 is the hint |
Daemon log, successful receive paid from LND (abridged)
SWAP: Received route hint from swap server ... path_count=1 path_hops=1 payer_fee_msat=2500 vhtlc_amount_sat=1000
SWAP: Invoice created for out-swap ... amount_sat=1000
SWAP: Found funded vHTLC ... amount_sat=1000
SWAP: vHTLC claimed successfully ...
OORC: ... ReceiveCompleted
Analysis
- Where the value comes from (from the source).
sdk/swaps/invoice.gosetsdefaultCLTVExpiry = 40for the final hop.sdk/swaps/out_swap.gocopies the swap server'sRouteHintPaths, includingCltvExpiryDelta, into the invoice unchanged. So the 318 is set by the swap server's receive quote, not by the client. Nothing betweenv0.2.1andmainchanges this path. - Why only some payers fail (inferred). A payer with a total CLTV limit under about 358 blocks can never reach these invoices, wherever it sits in the graph. One under about 574 blocks will usually fail too. LND's default of 2016 is well clear of both. Strike's "can't find route" fits this. Cash App's error gives no reason, so its failure may come from a different check.
- Fees look unlikely. About 0.31% in total on 1,000 sat, but I can't rule out a custodial fee cap.
- Probably deliberate. I assume the 318 is tied to the vHTLC claim and refund timing windows, the same kind of trade-off as the send-side fixes in #1238, #1472 and #1509.
Questions
- Is a 318-block receive hint delta intended, and is the impact on custodial payers known?
- Can the receive-side delta be lowered (for example to 144 or less), or does it have to cover the full vHTLC refund window? If it does, could that window be shorter for receives?
- Would it help to offer more than one hint path, including one with a smaller delta, so payers with stricter limits can still find a route?
- Is there a list of payers known to work or fail that wallet developers could show their users?
Limitations
- Only one amount (1,000 sat) was tested against Strike and Cash App.
- Strike's and Cash App's limits are not public, so the CLTV explanation is my best inference.
- I tried no other custodial payers (e.g. Wallet of Satoshi, Coinbase).
- Not re-run on
main. The source path I checked is unchanged sincev0.2.1.
Related
- #1239, #1508: send-side CLTV limits (in-swap). This report is the receive-side (out-swap) counterpart.
- #1238, #1472, #1509: send-side CLTV bounds and reserves.
I'm happy to run further tests or provide more logs.
- Ngôn ngữ chính
- Go
- Star
- 63
- Fork
- 19
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 121
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lightninglabs/wavelength
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lightninglabs/wavelength#1565 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
actor P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
lightninglabs/wavelength#1120 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
lightninglabs/wavelength#1085 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`darepocli create` should fail _before_ password is entered when `wallet.type=lnd` is configuredĐang mởcli P3 ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lightninglabs/wavelength#601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
lightninglabs/wavelength#1664 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lightninglabs/wavelength
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Cojekt/LibreDental#258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cmd/podiomd: permission MCP stalls the turn when a tool input exceeds the 64KB scanner limitĐang mởgo good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opensro-dev/opensro#4949 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 3 ngày
-
agent-execution/02 row 4: consumers Verify row lacks delivery/base binding, cannot pass post-mergeĐang mởbug effort:s impact:low raised-by:verifier risk:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
medici-finance/assay#7946 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày