Conversation
There are three closely related, but separate parameters: - `InteractiveTxParams`: low-level bitcoin parameters (amounts, outputs, locktime, confirmations) - `Purpose`: whether the interactive-tx is an initial funding, a splice, a rbf - `SessionContext`: higher level meta information about the interactive-tx (why are we opening or splicing this channel?) This PR adds a `SessionContext` and carries it all the way to the completion (success or failure) of the interactive-tx process.
| case class SpliceInProgress(cmd_opt: Option[CMD_SPLICE], sessionContext: SessionContext, splice: typed.ActorRef[InteractiveTxBuilder.Command], remoteCommitSig: Option[CommitSig]) extends QuiescentSpliceStatus | ||
| /** The splice transaction has been negotiated, we're exchanging signatures. */ | ||
| case class SpliceWaitingForSigs(signingSession: InteractiveTxSigningSession.WaitingForSigs) extends QuiescentSpliceStatus | ||
| case class SpliceWaitingForSigs(sessionContext: SessionContext, signingSession: InteractiveTxSigningSession.WaitingForSigs) extends QuiescentSpliceStatus |
There was a problem hiding this comment.
I'm not sure whether sessionContext should be (a) in [Rbf/Splice]WaitingForSigs, or (b) in InteractiveTxSigningSession.WaitingForSigs.
(a) is somewhat more consistent at the [Rbf/Splice]Status level, because we have to add sessionContext to [Rbf/Splice]InProgress in any case
(b) allows for better factorization between rbf and splice, and simpler codecs.
I went with (a) for this first shot, lmk what you think 🙏
| def sessionId: ByteVector32 | ||
| } | ||
| object SessionContext { | ||
| case class Unspecified(sessionId: ByteVector32) extends SessionContext |
There was a problem hiding this comment.
For example, we could have a LiquidityRequest context which contains the requested LiquidityAds.Lease. There are various other cases in feature branches.
|
I don't think this will be necessary after #2848, which adds a Every on-the-fly funding made to wallet nodes will simply be a liquidity purchase, and the details of what triggered it will be contained in the |
|
Closing this in favor of #2848 |
There are three closely related, but separate parameters:
InteractiveTxParams: low-level bitcoin parameters (amounts, outputs, locktime, confirmations)Purpose: whether the interactive-tx is an initial funding, a splice, a rbfSessionContext: higher level meta information about the interactive-tx (why are we opening or splicing this channel?)This PR adds a
SessionContextand carries it all the way to the completion (success or failure) of the interactive-tx process. It is useful for better debugging, diagnostics, metrics.