Skip to content

Add threshold for disabling from_future_htlc#3293

Merged
t-bast merged 1 commit intomasterfrom
per-peer-otf-deactivate
Apr 17, 2026
Merged

Add threshold for disabling from_future_htlc#3293
t-bast merged 1 commit intomasterfrom
per-peer-otf-deactivate

Conversation

@t-bast
Copy link
Copy Markdown
Member

@t-bast t-bast commented Apr 17, 2026

When funding a transaction using from_future_htlc, we are taking the risk that the remote node doesn't fulfill the corresponding HTLCs. If we detect that too many peers fail such HTLCs, this may indicate a bug on the wallet side, so we automatically disable from_future_htlc to limit our exposure.

We also ensure that nodes that already had one suspicious payment are blacklisted for other payments. This issue can happen when wallet users use multiple devices in unsupported scenarios.

When funding a transaction using `from_future_htlc`, we are taking the
risk that the remote node doesn't fulfill the corresponding HTLCs. If
we detect that too many peers fail such HTLCs, this may indicate a bug
on the wallet side, so we automatically disable `from_future_htlc` to
limit our exposure.

We also ensure that nodes that already had one suspicious payment are
blacklisted for other payments. This issue can happen when wallet users
use multiple devices in unsupported scenarios.
@t-bast t-bast requested a review from pm47 April 17, 2026 10:17
Copy link
Copy Markdown
Member

@pm47 pm47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

My only comment is that it is not possible to independently (e.g. from a monitoring/alert point of view) tell whether we are currently rejecting all otf fundings, as it becomes dependent from the configuration. I think it's acceptable and not worth adding more complexity.

@t-bast t-bast merged commit 119f8c2 into master Apr 17, 2026
1 check passed
@t-bast t-bast deleted the per-peer-otf-deactivate branch April 17, 2026 11:50
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