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

Incoming blinded payments #621

Merged
merged 6 commits into from
Apr 17, 2024
Merged

Incoming blinded payments #621

merged 6 commits into from
Apr 17, 2024

Conversation

thomash-acinq
Copy link
Member

Allow receiving blinded payments for Bolt 12 invoices.

@thomash-acinq thomash-acinq requested a review from t-bast March 20, 2024 10:00
@thomash-acinq thomash-acinq force-pushed the incoming-blinded-payment branch from 4614661 to 3794cf3 Compare March 20, 2024 15:32
@thomash-acinq thomash-acinq mentioned this pull request Apr 3, 2024
Copy link
Member

@t-bast t-bast left a 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.

@thomash-acinq
Copy link
Member Author

Thanks for your fixes, I've added them.

thomash-acinq and others added 5 commits April 17, 2024 14:01
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 thomash-acinq force-pushed the incoming-blinded-payment branch from 13bfc92 to b73c985 Compare April 17, 2024 12:35
@thomash-acinq
Copy link
Member Author

Rebased to fix some conflicts

@thomash-acinq thomash-acinq requested a review from t-bast April 17, 2024 12:35
t-bast
t-bast previously approved these changes Apr 17, 2024
@thomash-acinq
Copy link
Member Author

I had rebased but not committed the conflicts fixes. Tests should pass now.

@thomash-acinq thomash-acinq merged commit ada0347 into master Apr 17, 2024
2 checks passed
@thomash-acinq thomash-acinq deleted the incoming-blinded-payment branch April 17, 2024 13:37
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