Skip to content

Reject incoming HTLCs with a high cltv_expiry#3323

Merged
t-bast merged 1 commit into
masterfrom
sane-cltv-expiry-limits
Jul 8, 2026
Merged

Reject incoming HTLCs with a high cltv_expiry#3323
t-bast merged 1 commit into
masterfrom
sane-cltv-expiry-limits

Conversation

@t-bast

@t-bast t-bast commented Jul 7, 2026

Copy link
Copy Markdown
Member

We currently reject HTLCs with a cltv_expiry higher than 2 weeks in the future when sending them (in the sendAdd method). That's because they would lock up our funds for a long period of time if our peer decided to force-close. Also, a large cltv_expiry makes slow jamming easier.

We now apply the same limits to incoming HTLCs for consistency (since they may differ by cltv_expiry_delta). Note that we don't do it in the receiveAdd function, which would trigger a force-close. We just accept those HTLCs and then fail them, since it is harmless to have them only temporarily in our commitment as long as we don't relay.

We currently reject HTLCs with a `cltv_expiry` higher than 2 weeks in
the future when sending them (in the `sendAdd` method). That's because
they would lock up our funds for a long period of time if our peer
decided to force-close. Also, a large `cltv_expiry` makes slow jamming
easier.

We now apply the same limits to incoming HTLCs for consistency (since
they may differ by `cltv_expiry_delta`). Note that we don't do it in
the `receiveAdd` function, which would trigger a force-close. We just
accept those HTLCs and then fail them, since it is harmless to have
them only temporarily in our commitment as long as we don't relay.
@t-bast t-bast requested review from pm47 and sstone July 7, 2026 14:23
@t-bast t-bast merged commit 7fb9460 into master Jul 8, 2026
1 check passed
@t-bast t-bast deleted the sane-cltv-expiry-limits branch July 8, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants