Attendees: Jeff Czyz, Matt Corallo, optout, Jesse Posner, Wilmer Paulino, Jurvis Tan
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_send
method, 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:
- TheirTxComplete cannot move back to Negotiating
- 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.
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.
Duncan has a WIP branch for ChannelManager
state machine changes. That is still blocked by merging the channel maps PR.
- 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 testingInteractiveTxConstructor