You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
LSPS2 service event handling isn't idempotent #4209
Event handlers in LDK are expected to always be idempotent, but LSPS2 service doesn't appear to be. eg once we get to PaymentQueue::add_htlc we debug_assert that an HTLC with the same intercept id isn't already present, but it definitely could be. There's probably other instances.
Hmm, yeah, event replaying can be tricky. To handle this we probably need to error out when we detect a duplicate intercept SCID there, but to communicate this to the user we first need #4074.
A duplicate event isn't an error, though, its an expected condition. An error there might imply that the dev should return an error in the event handler, which will result in an infinite loop. IMO we should return success on a replayed event.
A duplicate event isn't an error, though, its an expected condition. An error there might imply that the dev should return an error in the event handler, which will result in an infinite loop. IMO we should return success on a replayed event.
Well, we just diverged from this model of 'just continue if expected' error handling with #4160 . So now arguably you might expect a Duplicate error if there already is a corresponding entry.
Activity
tnull commentedon Nov 6, 2025
Hmm, yeah, event replaying can be tricky. To handle this we probably need to error out when we detect a duplicate intercept SCID there, but to communicate this to the user we first need #4074.
TheBlueMatt commentedon Nov 6, 2025
A duplicate event isn't an error, though, its an expected condition. An error there might imply that the dev should return an error in the event handler, which will result in an infinite loop. IMO we should return success on a replayed event.
tnull commentedon Nov 6, 2025
Well, we just diverged from this model of 'just continue if expected' error handling with #4160 . So now arguably you might expect a
Duplicateerror if there already is a corresponding entry.TheBlueMatt commentedon Nov 6, 2025
Oh, right, I forgot about that PR. Ugh, yea, maybe indeed.