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

Splice draft (feature 62/63) #863

Closed
wants to merge 32 commits into from

Commits on Feb 13, 2024

  1. BOLT 2: quiescence protocol.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    1234344 View commit details
    Browse the repository at this point in the history
  2. BOLT #2: Set an initiator in quiescence.

    This is especially useful for protocols such as splicing; for
    simplified commitment transactions, there is already an implied
    initiator at each point, so having the negotiation at splicing
    time would be redundant.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    b126536 View commit details
    Browse the repository at this point in the history
  3. splicing: use the generic negotiation mechanism to splice in/out of a…

    … channel.
    
    The initiator (in the case of simultaneity, the higher feepayer) pays
    for the input and output, and sets the feerate.
    
    We freeze the channel while this construction is going on: it should
    be quick.
    
    Signed-off-by: Rusty Russell <[email protected]>
    
    
    Header from folded patch 'fixup3.patch':
    
    fixup! splicing: use the generic negotiation mechanism to splice in/out of a channel.
    
    - Remove 1 per minute restriction: 25% growth limits us a lot (@niftynei)
    - Nomenclature: initiator, splice transaction, channel funding output.
    - Weaken reserve check to only cover iff they extract funds.
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    80083b1 View commit details
    Browse the repository at this point in the history
  4. Splicing: rewrite it to work on top of quiescence.

    This is much simpler.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    4513bec View commit details
    Browse the repository at this point in the history
  5. commitment_signed: add tlvs for splice sigs.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    552306f View commit details
    Browse the repository at this point in the history
  6. splice_locked: terminate this splice once one reaches agreed depths.

    Signed-off-by: Rusty Russell <[email protected]>
    
    
    Header from folded patch 'fixup2.patch':
    
    fixup! splice_locked: terminate this splice once one reaches agreed depths.
    
    Use 6; we need to start announcing then anyway, so keep it simple.
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    a798ca2 View commit details
    Browse the repository at this point in the history
  7. gossip: add a bit to indicate "splicing".

    This was Matt Corallo's idea; a simple flag means you should keep
    using the channel as it's being replaced.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    7bdf9f0 View commit details
    Browse the repository at this point in the history
  8. gossip: make sure to send new announcement_signatures post-splice.

    Signed-off-by: Rusty Russell <[email protected]>
    
    
    Header from folded patch 'fixup.patch':
    
    fixup! gossip: make sure to send new announcement_signatures post-splice.
    
    It's called `splice_locked` and it's always sent 6 blocks.
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    dcefef6 View commit details
    Browse the repository at this point in the history
  9. BOLT 2: note splice requirements in the checks for adding HTLCs and s…

    …etting fees.
    
    Any changes must be valid for all possible commitment transactions.  A minor
    change, but for implementations which quote the spec and check those quotes
    this will highlight the changes needed.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    5b2da1d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bb82cc1 View commit details
    Browse the repository at this point in the history
  11. BOLT 2: Adjust commitment_signed req for splicing.

    `commitment_signed` is valid when a splice is candidate added.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    787d789 View commit details
    Browse the repository at this point in the history
  12. Bolt 2: Cleaning up splice related verbage

    * the commitment tx includes the splice transaction commitment signatures (not the splice transaction’s own signatures).
    * “in progress” -> “awaiting confirmation” to add clarity.
    * No longer need a 10 block delay for splice closes since all close events are delayed 12 blocks.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    1ea3aae View commit details
    Browse the repository at this point in the history
  13. Bolt 2: splicing and shutdown interactions

    Adding @niftynei’s shutdown updates. Her notes:
    
    `shutdown` MAY be sent while the splice is pending confirmation. New splice negotiations MAY BE initiated while the channel is in `shutdown`.
    The `shutdown` phase MUST NOT be considered concluded until all htlcs are resolved and the channel has exited the pending splice phase (`splice_locked` has been exchanged).
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    ea0beed View commit details
    Browse the repository at this point in the history
  14. Bolt 2: closing_signed must wait for splices

    The closing process, begining with `closing_signed` must not begin until one of the candidate splices is confirmed.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    f1df2ef View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7615130 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    396c638 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    298f605 View commit details
    Browse the repository at this point in the history
  18. splicing: Switch to multiple commitment_signed messages

    instead of a (potentially large) commitment_tlv
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    28c2717 View commit details
    Browse the repository at this point in the history
  19. splicing: Clarify only a single revoke_and_ack is sent

    for a bundle of `commitment_signed` messages.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    817627a View commit details
    Browse the repository at this point in the history
  20. BOLT 2: splicing signing order & commitment_signed

    Splice now uses single `commitment_signed` message and `tx_signatures` order is enoucrage to be smaller added amount first but is not required.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    c8ebff2 View commit details
    Browse the repository at this point in the history
  21. Bolt 2: Splice commitment_signed & splice_locked

    * commitment_signed is now sent a single time while a splice is being negotiated
    * adding a spec for `splice_locked`
    * additional logic for avoding splice_locked race condition
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    787fdf2 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    03c47c1 View commit details
    Browse the repository at this point in the history
  23. fixup! splicing: use the generic negotiation mechanism to splice in/o…

    …ut of a channel.
    
    Co-authored-by: ProofOfKeags <[email protected]>
    ddustin and ProofOfKeags authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d2fc4e4 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    3c2ba1f View commit details
    Browse the repository at this point in the history
  25. Bolt 2: Splice command uses signed relative sats

    Using relative sat amounts simplifies multiple aspects of the protocol.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    3e4cf24 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    fe8e682 View commit details
    Browse the repository at this point in the history
  27. Bolt 2: Splice re-sending of splice_locked

    In cases where one side has sent `splice_locked` but the peer is attempting to resume splicing negotiation via reestablish we must re-send `splice_locked`
    
    This can occur if only one side has received splice signatures, and the peer goes offline. During this time the transaction may be published and confirmed.
    
    When the peer comes online it will be requesting splice signatures (via `next_funding_txid`) but since the transaction is already confirmed we must jump ahead to `splice_locked`.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    79bf5ae View commit details
    Browse the repository at this point in the history
  28. Bolt 2: Splice clarify pending splice

    A pending splice is one waiting for confirmation which is seperate from an ongoing splice negotation.
    
    Adjusting the language to remove ambiguity.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    678ae61 View commit details
    Browse the repository at this point in the history
  29. Bolt 2: interactive-tx only confirmed inputs

    The interactive tx protocol must only use confirmed inputs.
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    e7f84df View commit details
    Browse the repository at this point in the history
  30. Bolt 02: Update splice to reference channel_ready

    Formally known as `funding_locked`
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    10ee7df View commit details
    Browse the repository at this point in the history
  31. Bolt 2: splice message numbers

    Jump to message numer 80 to avoid conflicts with `stfu` etc
    ddustin committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    76c4678 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    c08f5b6 View commit details
    Browse the repository at this point in the history