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

Intercept HTLC forwards for JIT channels #1835

Commits on Nov 30, 2022

  1. Persist pending intercepted htlcs in ChannelManager

    No htlcs are intercepted yet, that will be added in upcoming commit(s)
    
    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    129e1f6 View commit details
    Browse the repository at this point in the history
  2. Add fake scid namespace for intercepted HTLCs

    This is useful for LSPs who wish to create a just-in-time channel for end users
    receiving a lightning payment. These fake scids will be encoded into route
    hints in end user invoices, and signal to LDK to create an event triggering the
    JIT channel, after which the payment will be received.
    
    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    3a1268e View commit details
    Browse the repository at this point in the history
  3. Add HTLCIntercepted event

    Used in upcoming commit(s) so users can intercept forwarded HTLCs
    
    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    5efc197 View commit details
    Browse the repository at this point in the history
  4. Generate HTLCIntercepted event upon interceptable forward

    And store the pending intercepted HTLC in pending_intercepted_htlcs
    
    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    8fe7cbe View commit details
    Browse the repository at this point in the history
  5. Utils for forwarding intercepted htlcs + getting intercept scids

    See ChannelManager::forward_intercepted_htlc and
    ChannelManager::get_intercept_scid for details
    
    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    c1f1b78 View commit details
    Browse the repository at this point in the history
  6. Allow failing back intercepted HTLCs

    Co-authored-by: John Cantrell <[email protected]>
    Co-authored-by: Valentine Wallace <[email protected]>
    valentinewallace and johncantrell97 committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    f79ad2e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ddcd9b0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7809c55 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    acff8f6 View commit details
    Browse the repository at this point in the history