-
Notifications
You must be signed in to change notification settings - Fork 24
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
Incoming blinded payments #621
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thomash-acinq
force-pushed
the
incoming-blinded-payment
branch
from
March 20, 2024 15:32
4614661
to
3794cf3
Compare
Merged
t-bast
reviewed
Apr 10, 2024
src/commonMain/kotlin/fr/acinq/lightning/wire/LightningMessages.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/serialization/v3/ChannelState.kt
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/OfferPaymentMetadata.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/OfferPaymentMetadata.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/OfferPaymentMetadata.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/IncomingPaymentPacket.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/IncomingPaymentPacket.kt
Show resolved
Hide resolved
t-bast
reviewed
Apr 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found a few issues in this iteration, which I've fixed in #630. See below for detailed comments.
src/commonMain/kotlin/fr/acinq/lightning/wire/LightningMessages.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/wire/LightningMessages.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/wire/LightningMessages.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/OfferPaymentMetadata.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/IncomingPaymentPacket.kt
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/payment/IncomingPaymentHandler.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/payment/IncomingPaymentHandlerTestsCommon.kt
Outdated
Show resolved
Hide resolved
Thanks for your fixes, I've added them. |
t-bast
approved these changes
Apr 17, 2024
And use a tlv stream for pay-to-open to be future-proof. Fix a bug where the `blinding` point of an HTLC was not encoded.
While this is short-lived in the `path_id` field of an invoice's blinded path, this is also permanently recorded in our payments DB. We thus need to use a versioned encoding to ensure that we're able to change the data we store in `path_id`s while still being able to read past data.
We must use the `invalid_onion_blinding` failure code whenever we reject a blinded payment to protect against probing. We also need to send `update_fail_malformed_htlc` instead of `update_fail_htlc`, to avoid encrypting an error with our real `node_id`. When rejecting a blinded pay-to-open attempt, we also must avoid encrypting a normal error with our `node_id`: we instead return an empty error reason, that the introduction node will convert to an `invalid_onion_blinding` error.
thomash-acinq
force-pushed
the
incoming-blinded-payment
branch
from
April 17, 2024 12:35
13bfc92
to
b73c985
Compare
Rebased to fix some conflicts |
t-bast
previously approved these changes
Apr 17, 2024
t-bast
approved these changes
Apr 17, 2024
I had rebased but not committed the conflicts fixes. Tests should pass now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow receiving blinded payments for Bolt 12 invoices.