Imagine a three node network with two channels
A <-> B <-> C
Let's say B would like to perform two splices:
splice-out 10M sats from A <-> B
splice-out 10M sats from B <-> C
B would then like to merge these two splices into a single transaction. This is done in the standard way, namely:
- Initiate splice-out with A, continue process until A finalizes. Do not finalize ourself and pause here.
- Initiate splice-out with C, add inputs & outputs from splice attempt (1). Finalize up to the point of signature exchange.
- Pass inputs & outputs from splice attempt (2) to A. Finalize up the point of signature exchange.
At this point all nodes have a single matching transation that performs a splice for A <-> B and B <-> C.
By existing tie break rules current de-facto rule, the initiator (B) must sign first.
A is waiting to receive signatures for all inputs, which include input(s) controlled by C
- It will not send signatures until it receives all of these
C is waiting to receive signatures for all inputs, which include input(s) controlled by A
- It will not send signatures until it receives all of these
B has it's own signatures but not those for A or C. It cannot send the complete package for either splice, even though it is required to for both.
To break this race condition, the tie break rule must be updated for the accepter to sign first.
Okay working through it:
Now we have
amount_a
: 1Mamount_b
: 0amount_c
: 1MAnd assume existing channels ab and ac are the same, say 10M
amount_ab
: 10Mamount_bc
: 10MSo for the signing order on
splice_ab
we seeB
has 11M in incoming inputsA
has 10M in incoming inputsSince (2) is less,
A
must sign firstAnd for the signing order on
splice_bc
we seeB
has 11M in incoming inputsC
has 10M in incoming inputsSince (2) is less,
C
must sign firstWhich, I believe I see now, makes a tie actually impossible. Nice! 👍