Skip to content

NodeRelayer should index payments by payment_hash || payment_secret #1723

@t-bast

Description

@t-bast

Right now, the NodeRelayer indexes child actors by payment_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 the payment_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 the payment_secret a bit higher up in our call stack.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions