Skip to content

Instantly share code, notes, and snippets.

@jurvis
Created August 31, 2023 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jurvis/78da1d1f627fd852edbd34a3d18a012f to your computer and use it in GitHub Desktop.
Save jurvis/78da1d1f627fd852edbd34a3d18a012f to your computer and use it in GitHub Desktop.
LDK Splicing Meeting 08/30/2023

Splicing Sync Notes (08/30/2023)

Attendees: Jeff Czyz, Matt Corallo, optout, Jesse Posner, Wilmer Paulino, Jurvis Tan

Interactive-tx branch updates

There are two main thrusts of the effort right now.

1. Users define inputs/outputs they want to contribute upfront (Batching)

  • Change InteractiveTxConstructor API to allow user to define the inputs/outputs, and let it steer the negotiation without user interaction.
    • This enables us to not have to expose an event every time a counterparty sends us something.
  • The constructor does the automatic negotiation within the generate_message_sendmethod, which both transitions the underlying InteractiveTxStateMachine state and returns the right message to send.

2. Account for tx_complete as an ack mechanism
Currently, our model (and the state machine ASCII) incorrectly assumes a few things:

  1. TheirTxComplete cannot move back to Negotiating
  2. State machine doesn't need to respond with tx_complete message to advance negotiation state if user does not have any inputs/outputs to contribute within a turn.

API Rollout

We think this is how our API for interactive-txs should work:

If we are the initiator User calls open_channel, with their desired channel value and corresponding inputs/outputs. They get passed to InteractiveTxConstructor, and it drives to the end automatically.

Then, when we are in NegotiationComplete(i.e. both parties have sent tx_complete message), we expose an event with the final transaction that the user then can approve/reject.

If we are the non-initiator: Expose request to user immediately to open a dual-funded channel. User then can choose to contribute their own amount and call back to the channel manager for the UTXOs they want to use, then pass it to InteractiveTxConstructor and it drives automatically.

Then, when we are in NegotiationComplete(i.e. both parties have sent tx_complete message), we expose an event with the final transaction that the user then can approve/reject.

Dual-Funding

Duncan has a WIP branch for ChannelManager state machine changes. That is still blocked by merging the channel maps PR.

Splicing

  • optout is going to start working on adding splicing messages to LDK (splice_init, splice_ack, etc.), as well as help out with thinking about of how we can start testing InteractiveTxConstructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment