-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodeRelayer should index payments by payment_hash || payment_secret
#1723
Comments
That one looks subtle 🤓
Can you clarify?
Wouldn't that have the side effect of us not being able anymore to differentiate between a wrong |
Imagine Alice tries to make the following payment, where Bob and Carol are distinct trampoline nodes:
Alice sends
I don't think we have a choice, we must allow having multiple payments for the same |
We need to group incoming HTLCs together by payment_hash and payment_secret, otherwise we will reject valid payments that are split into multiple distinct trampoline parts (same payment_hash but different payment_secret). Fixes #1723
We need to group incoming HTLCs together by payment_hash and payment_secret, otherwise we will reject valid payments that are split into multiple distinct trampoline parts (same payment_hash but different payment_secret). Fixes #1723
is this currently deployed on the ACINQ node? |
@ecdsa yes it is, let me know if you're seeing issues with it. |
Right now, the
NodeRelayer
indexes child actors bypayment_hash
only.It means that senders must know beforehand the total amount they will send through each trampoline node.
This works fine for single-trampoline scenarios, but will not work with multi-trampoline scenarios: if the payer splits his payment between several trampoline routes and one fails, he may end up sending more additional HTLCs to a previous route when retrying.
Right now, we will reject them because the
payment_secret
doesn't match, or we'll simply fail to relay them (if thepayment_secret
is reused) and wait for a timeout from the final recipient.We should instead index by
payment_hash || payment_secret
, but that requires extracting thepayment_secret
a bit higher up in our call stack.The text was updated successfully, but these errors were encountered: