Skip to content

channeldb+invoices: add spontaneous AMP receiving + sending via SendToRoute - #5108

Merged
Roasbeef merged 22 commits into
lightningnetwork:masterfrom
cfromknecht:sendtoroute-amp
Apr 7, 2021
Merged

channeldb+invoices: add spontaneous AMP receiving + sending via SendToRoute #5108
Roasbeef merged 22 commits into
lightningnetwork:masterfrom
cfromknecht:sendtoroute-amp

Conversation

@cfromknecht

@cfromknecht cfromknecht commented Mar 15, 2021

Copy link
Copy Markdown
Contributor

This PR adds the ability to receive spontaneous AMP payments, and send them by crafting the appropriate request using SendToRoute. This PR is opened as a Draft since not all feature bits/TLV record types are decided.

PLEASE DO NOT RUN THIS ON A PRODUCTION NODE

Summary of changes:

  • Adds support for parsing AMP record from TLV onion payload
  • Adds (non-final) AMP feature bits
  • Add InvoiceRef support for querying by pay_addr only
  • Add JIT AMP-invoice insertion when receiving AMP HTLC
  • Validation + testing around HTLC-level preimage persistence
  • Reconstruction of HTLCSet child preimage/hashes using amp package
  • Integration test demonstrating multi-path AMP via SendToRoute

TODO:

  • expand itest assertions
  • add more unit testing around AMP invoice settlement w/ invalid HTLC sets
  • fix invoice parsing for AMP invoices

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants