Skip to content

bolt12: initial support for incoming blinded payment htlcs#10746

Open
f321x wants to merge 4 commits into
spesmilo:masterfrom
f321x:blinded_payments
Open

bolt12: initial support for incoming blinded payment htlcs#10746
f321x wants to merge 4 commits into
spesmilo:masterfrom
f321x:blinded_payments

Conversation

@f321x

@f321x f321x commented Jul 9, 2026

Copy link
Copy Markdown
Member

Adds initial support for handling incoming blinded payment htlcs in lnpeer/htlc switch.

  • decryption of recipient data, derivation of next path key in lnonion.process_onion_packet()
  • validation for incoming blinded payment htlcs/onions (forwarding and final)
  • support for forwarding htlcs as part of a blinded path and acting as introduction point

Unittest coverage is lacking, this will be simpler to add to test_lnpeer once 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_2 branch which is built on top of these commits.

Main PR: #10671

accumulator and others added 2 commits July 9, 2026 17:24
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>
@f321x f321x added this to the bolt12 milestone Jul 9, 2026
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.
@f321x
f321x force-pushed the blinded_payments branch from 86fea3a to 04f4b14 Compare July 10, 2026 10:08
@f321x
f321x force-pushed the blinded_payments branch from 04f4b14 to bdec56d Compare July 17, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants