Skip to content
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

Avoid offer_hash PaymentId collision #132

Merged

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Mar 8, 2024

Previously, we'd deterministically derive the offer_hash as a PaymentId for outbound BOLT 12 payments. However, as offers may be paid multiple times, this could result in collisions in our
outbound_payments store.

Here, we therefore use random PaymentIds to avoid collisions, even if offers are paid multiple times.

tnull added 2 commits March 8, 2024 14:32
Previously, we'd deterministically derive the `offer_hash` as a
`PaymentId` for outbound BOLT 12 payments. However, as offers may be
paid multiple times, this could result in collisions in our
`outbound_payments` store.

Here, we therefore use random `PaymentId`s to avoid collisions, even if
offers are paid multiple times.
@tnull tnull merged commit 16bc6f4 into lightningdevkit:main Mar 9, 2024
4 checks passed
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