Skip to content

Add event for failed payment relay#3244

Merged
t-bast merged 2 commits intomasterfrom
relay-failure-events
Jan 29, 2026
Merged

Add event for failed payment relay#3244
t-bast merged 2 commits intomasterfrom
relay-failure-events

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Jan 26, 2026

We add an event when a payment could not be relayed and indicates that we may need to add liquidity towards the next node. It is really hard to figure it out in the context of a single payment though, so this event does not by itself mean that liquidity should be allocated. The listeners should collect several events and regularly query the state of existing channels with our peers, and network graph data for remote nodes, to create good heuristics for allocating liquidity. Otherwise, it would be trivial for malicious senders to game routing nodes into allocating liquidity "for free" towards them, which could result in financial loss.

We add an event when a payment could not be relayed and indicates that
we may need to add liquidity towards the next node. It is really hard
to figure it out in the context of a single payment though, so this
event does not by itself mean that liquidity should be allocated. The
listeners should collect several events and regularly query the state
of existing channels with our peers, and network graph data for remote
nodes, to create good heuristics for allocating liquidity. Otherwise,
it would be trivial for malicious senders to game routing nodes into
allocating liquidity "for free" towards them, which could result in
financial loss.
@t-bast t-bast requested a review from pm47 January 26, 2026 15:32
We add an event whenever we're unable to send a given HTLC through an
outgoing channel. Note that this may happen multiple times for a single
payment, since we iterate through our channels and retry on failure.
@t-bast t-bast merged commit 369f042 into master Jan 29, 2026
1 check passed
@t-bast t-bast deleted the relay-failure-events branch January 29, 2026 07:43
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