Add a payment_metadata map in blinded * path contexts#4584
Add a payment_metadata map in blinded * path contexts#4584TheBlueMatt wants to merge 4 commits intolightningdevkit:mainfrom
payment_metadata map in blinded * path contexts#4584Conversation
We almost certainly don't want to be moving `option` TLVs during serialization, and while we had logic elsewhere to work around this previously its nice not to have to in the future.
|
👋 Thanks for assigning @tnull as a reviewer! |
7c4e653 to
ee6ba89
Compare
|
No issues found. All previously flagged issues from prior review passes have been verified as resolved:
Verification completed across all changed files covering:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4584 +/- ##
=======================================
Coverage 87.15% 87.15%
=======================================
Files 161 161
Lines 109251 109338 +87
Branches 109251 109338 +87
=======================================
+ Hits 95215 95296 +81
+ Misses 11560 11559 -1
- Partials 2476 2483 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ee6ba89 to
792846c
Compare
Similar to how BOLT 11 payments can use a `payment_metadata` to provide arbitrary bytes in the invoice to be communicated back to them when receiving, its useful to be able to provide some bytes which are communicated back upon receiving a payment. Here we do so in the BOLT 12 blinded path contexts, offering a `BTreeMap<u64, Vec<u8>>` instead to enable more easily including multiple sets of data. Also note that a `Router` building a blinded path is allowed to modify the `payment_metadata` without breaking the payment. Tests by claude
792846c to
98cff64
Compare
Similar to how BOLT 11 payments can use a `payment_metadata` to provide arbitrary bytes in the invoice to be communicated back to them when receiving, its useful to be able to provide some bytes which are communicated back upon receiving a payment. Here we do so in the BOLT 12 blinded message path contexts, offering a `BTreeMap<u64, Vec<u8>>` instead to enable more easily including multiple sets of data. We don't yet wire it up to the public `ChannelManager` API, but do allow selecting values for those using the manual `OffersMessageFlow`. Tests by claude
|
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
98cff64 to
b8375a7
Compare
We do so both in the blinded message and payment paths, supporting async payments when data is injected in the blinded payment paths (eg via the
Router). We don't expose building offers with metadata yet.