AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 47 Bitcoin

xpay: wait, if final node gives us an indication we're behind on blockheight.

Public commit record

What the developer wrote

Authored by Rusty Russell

93/100 · Strong
xpay: wait, if final node gives us an indication we're behind on blockheight.

This doesn't happen much in real life, but it's certainly possible, so do what pay does here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: https://github.com/ElementsProject/lightning/issues/8612
Changelog-Added: `xpay` will now wait if it suspects a payment failure is due to a height disagreement with the final node.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This update fixes a bug in Core Lightning's experimental 'xpay' payment plugin. Previously, if the final recipient rejected a payment because it thought the current blockchain height was higher than what xpay believed, xpay would immediately give up and report a permanent failure. Now, xpay detects that hint, waits until its own view of the blockchain catches up, and then retries. This prevents unnecessary failed payments when nodes are briefly out of sync on block height.

Recommended action

No urgent security action required; this is a reliability improvement. Users running xpay should upgrade to avoid spurious payment failures due to blockheight desynchronization. Reviewers may want to confirm that waitblockheight timeout handling does not leave payments in an ambiguous state and that the enabled test passes reliably.

Security signals we found

01

Logic bug in payment failure handling could cause premature payment abandonment

02

New behavior aligns xpay with existing pay plugin behavior for blockheight disagreement

03

Error field parsing added for incorrect_or_unknown_payment_details blockheight hint

04

RPC waitblockheight integration added with deadline-based timeout

05

Test coverage enabled for blockheight mismatch scenario

Risk score

Why this scored 47/100

Our methodology →
Potential impact 12/30
Exploitability 5/25
Stealth signal 8/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.