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

renepay: fix CLTV value for the first hop

Public commit record

What the developer wrote

Authored by Lagrang3

68/100 · Adequate
renepay: fix CLTV value for the first hop

Changelog-Fixed: renepay: fix the computation of the CLTV for the first hop, it was double counting the current blockheight leading to too 900k blocks into the future.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Core Lightning's renepay plugin where the time-lock expiry (CLTV) for the first hop of a payment was incorrectly calculated by adding the current block height twice. This caused HTLCs to be created with expiry values roughly 900,000 blocks too far in the future. Such far-future expiries could make payments fail or behave unexpectedly, and in edge cases could affect fund safety by making HTLCs resolve very slowly.

Recommended action

Review whether any payments sent with the buggy renepay version used far-future CLTVs and could have been stranded, failed, or exploited via timeout manipulation. Apply the patch and run the now-enabled test_cltv_value.

Security signals we found

01

CLTV/expiry miscalculation in payment routing

02

Double-counting of blockheight leading to far-future HTLC expiries

03

Test previously marked xfail now passing after fix

04

Schema fixture values corrected to realistic expiry

Risk score

Why this scored 60/100

Our methodology →
Potential impact 18/30
Exploitability 12/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.