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

Update to select funding inputs before sending open_channel2 and splice_init #2903

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Aug 1, 2024

  1. Use official splice messages

    We replace our experimental version of `splice_init`, `splice_ack` and
    `splice_locked` by their official version. If our peer is using the
    experimental feature bit, we convert our outgoing messages to use the
    experimental encoding and incoming messages to the official messages.
    
    We also change the TLV fields added to `tx_add_input`, `tx_signatures`
    and `splice_locked` to match the spec version. We always write both the
    official and experimental TLV to updated nodes (because the experimental
    one is odd and will be ignored) but we drop the official TLV if our
    peer is using the experimental feature, because it won't understand the
    even TLV field.
    
    This guarantees backwards-compatibility with peers who only support the
    experimental feature.
    t-bast committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    addc7c9 View commit details
    Browse the repository at this point in the history
  2. Remove support for splicing without quiescence

    We initially supported splicing with a poor man's quiescence, where we
    allowed splice messages if the commitments were already quiescent.
    
    We've shipped support for quiescence since then, which means that new
    even nodes relying on experimental splicing should support quiescence.
    We can thus remove support for the non-quiescent version.
    t-bast committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    64b4879 View commit details
    Browse the repository at this point in the history
  3. Add support for RBF-ing splice transactions

    If the latest splice transaction doesn't confirm, we allow exchanging
    `tx_init_rbf` and `tx_ack_rbf` to create another splice transaction to
    replace it. We use the same funding contribution as the previous splice.
    
    We disallow creating another splice transaction using `splice_init` if
    we have several RBF attempts for the latest splice: we cannot know which
    one of them will confirm and should be spent by the new splice.
    t-bast committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    2d350e5 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Disallow chains of unconfirmed splice transactions

    When 0-conf isn't used, we reject `splice_init` while the previous
    splice transaction hasn't confirmed. Our peer should either use RBF
    instead of creating a new splice, or they should wait for our node
    to receive the block that confirmed the previous transaction. This
    protects against chains of unconfirmed transactions.
    t-bast committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    cb02ea9 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Add optional maxExcess parameter to channel open API

    This change passes `maxExcess` to Peer via OpenChannel and from Peer to Channel via INPUT_INIT_CHANNEL_INITIATOR. The `maxExcess` parameter will be used by bitcoind funding calls but is not currently used.
    remyers committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    5003dc0 View commit details
    Browse the repository at this point in the history
  2. Add maxExcess and addExcessToRecipientPosition params to fundTransact…

    …ion calls
    
    These parameters are only supported in a testing branch of bitcoind for now.
    remyers committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    4a03134 View commit details
    Browse the repository at this point in the history
  3. Add maxExcess_opt to ChannelParams in NodeParams

    This will be used by non-initiators when funding dual funded channels and splicing
    remyers committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8cc2e4a View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Update to select funding inputs before sending open_channel2 and spli…

    …ce_init
    
     - If `addExcessToRecipientPosition_opt` is set, excess from funding (if any) will be added to the proposed `fundingAmount`/`fundingContribution` before sending `open_channel2`/`splice_init` respectively.
     - We assume our peer requires confirmed inputs. In the future we could add a heuristic for this, but it's safer to assume they want confirmed inputs.
    remyers committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    38ae09a View commit details
    Browse the repository at this point in the history