bolt12: initial support for incoming blinded payment htlcs#10746
Open
f321x wants to merge 4 commits into
Open
Conversation
move decryption of recipient_data to process_onion_packet, add handling of blinding in peer msgs, handle properties in ProcessedOnionPacket in case of path blinding, move repeated next blinding key derivation to func lnonion.next_blinding_from_shared_secret() Co-Authored-By: f321x <f@f321x.com>
check encrypted_recipient_data constraints, fail invalid blinded htlcs with INVALID_ONION_BLINDING, reject being the final recipient of a blinded payment for now, maybe_forward_htlc: derive forwarding parameters from payment_relay data, allow next hop lookup by node_id, validate_features: reject unknown odd feature bits in blinded path context Co-Authored-By: f321x <f@f321x.com>
Minor refactor of htlc failure handling to override routing errors with `INVALID_ONION_BLINDING` if they are part of a blinded payment. Also implements random delay at introduction point against probing.
... and lnutil.LN_FEATURES_IMPLEMENTED
This file contains hidden or 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
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.
Adds initial support for handling incoming blinded payment htlcs in lnpeer/htlc switch.
lnonion.process_onion_packet()Unittest coverage is lacking, this will be simpler to add to
test_lnpeeronce we can create bolt 12 offers/invoices (similar to the existing tests using bolt11 invoices).Trampoline stays as-is, support for trampoline (forwarding) will follow later on.
I tested this as part of my
bolt12_2branch which is built on top of these commits.Main PR: #10671