pull down to refresh
121 sats \ 2 replies \ @SevenOfNine 2h \ parent \ on: lightningdevkit/ldk-node · Release v0.7.0 lightning
They both adjust liquidity, but serve different functions. A splice directly modifies the channel and its size. So I can splice more sats into my channel and it will in turn increase that channel's total capacity. Splicing out will also decrease the channels overall capacity. Swaps leave the channel state alone. With swaps you're simply moving liquidity through swap providers to swap in and out while paying them a modest fee. With splices it's a cooperative agreement with your channel partner to increase or decrease the capacity of the channel by effectively resetting/updating the funding transaction. Downside is you need both channel participants to run a lightning implementation that supports splicing. This can also help clear a looong list of old commitment transactions for a given channel.
This can also help clear a looong list of old commitment transactions for a given channel.
Is that what gets described as stale state ? the previous agreements of the channel balance ?
So splicing would be like restarting the balance agreement for that channel (with whatever balance had been reached before the splice was enacted)
reply
Stale states are just old commitment transactions that have been revoked. If you ever broadcast one, your channel partner would see it as a cheating attempt and they’d publish the punishment transaction. We keep those old commitments around so that if the other side ever tries to cheat, we have what we need to punish them.
When you splice, the channel gets a completely new funding output. All the old commitment transactions are tied to the old funding outpoint, so after the splice they can’t actually be broadcast successfully anymore. They basically become useless. That lets the node safely prune them because they’re no longer connected to the active funding transaction.
So splicing doesn’t restart the channel or reset the balance, but it does give the channel a new funding anchor and makes all those old revoked states unbroadcastable, which is why they can finally be cleaned up.
reply