Repository navigation
Conversation
3eb47a2 to
8cde735
Compare
8cde735 to
66480c3
Compare
1f645d6 to
d31e3b8
Compare
d31e3b8 to
612eaa0
Compare
612eaa0 to
63a1b32
Compare
63a1b32 to
290cf49
Compare
579fa97 to
f0bf882
Compare
nGoline
left a comment
There was a problem hiding this comment.
Two issues here before we merge, but there's a third one that can be fixed in this PR since you're fixing a constant:
proto/lsps2.rs:10UNKNOWN_NEXT_PEER = "4010":unknown_next_peerisPERM|10 = 0x400a. Every RejectReason except OfferExpired (core/lsps2/htlc.rs:52) sends it.
| error!("LSPS2: Capacity query failed: {:#}", cause); | ||
| } | ||
| } | ||
| json_fail(TEMPORARY_CHANNEL_FAILURE) |
There was a problem hiding this comment.
BOLT #4 (and wire/onion_wire.csv:56-58) define it as u16 len + channel_update, so the minimal valid message is "10070000". lightningd passes the hex through without validation and CLN payers only peek the type, but payers that parse the body see a malformed failure. Master's own mock (tests/plugins/lsps2_mock.py:44) already uses "10070000".
The failure also occurs in plugins/lsps-plugin/src/proto/lsps2.rs:9: TEMPORARY_CHANNEL_FAILURE = "1007"
| warn!("LSPS2: Channel ready check failed: {:#}", cause); | ||
| } | ||
| HtlcError::CapacityQuery(ref cause) => { | ||
| error!("LSPS2: Capacity query failed: {:#}", cause); |
There was a problem hiding this comment.
This logs CapacityQuery with error!, which common/status_levels.c maps to LOG_BROKEN. CapacityQuery is a failed RPC to the policy plugin, not an internal invariant failure, and BROKEN fails any pyln test that hits it. Should be warn!.
nGoline
left a comment
There was a problem hiding this comment.
Also, no test exercises the new failure path, while master now has a mock LSPS2 service that could.
|
|
||
| fn handle_htlc_error(e: HtlcError) -> serde_json::Value { | ||
| match e { | ||
| HtlcError::FundChannel(ref cause) => { |
There was a problem hiding this comment.
FundChannel is not always transient. It also covers the client refusing the open (tests/test_cln_lsps.py test_lsps2_non_approved_zero_conf drives that path). master's mock, written against bLIP-52 (1ebc494), fails with temporary_channel_failure only when the client disconnects before funding_signed and with unknown_next_peer when the client rejects the open with an error. Mapping every FundChannel to temporary_channel_failure makes payers retry a payment that cannot succeed. Also, the old behaviour was not "no failure signal": continue makes lightningd fail the unresolvable JIT scid with unknown_next_peer. the PR body and Changelog should say what actually changes.
…errors Changelog-Fixed: lsps-plugin: JIT channel HTLCs now fail with temporary_channel_failure instead of being silently continued when channel opening fails.
f0bf882 to
1a47fe5
Compare
Problem
In
service.rs,handle_htlc_safecaught all errors fromhandle_htlc_innerand responded with"result": "continue"while only logging atdebug!level. This silently swallowed failures during JIT channel opening - most critically,fundchannelfailures caused by insufficient on-chain balance. The paying node received no failure signal and the operator had no actionable log outputFix
Replace the catch-all
continuewith a typed dispatch onHtlcError:HtlcError::FundChannel->warn!(operator action required) +TEMPORARY_CHANNEL_FAILUREHtlcError::ChannelReadyCheck->warn!+TEMPORARY_CHANNEL_FAILUREHtlcError::CapacityQuery->error!+TEMPORARY_CHANNEL_FAILUREThe outer
handle_htlc_safestill catches truly unexpected errors (deserialization and stuff like that) and continues, which is the correct behaviour for unknown failuresImportant
26.09 FREEZE August 5th: Non-bugfix PRs not ready by this date will wait for 26.12.
RC1 is scheduled on August 17th
The final release is scheduled for September 7th.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgrade