The problem:
UTXOs can become unspendable TXOs. When they do, multiple systems in CLN remain in pending states that can confuse users.
This problem is particularly exasperated when users have lots of channels in many states as seen in #9102 and #9112
The solution:
A system that collects all inputs on SIGHASH_ALL tx's we care about (channel opens, splices, wallet activity) and monitors the chain for their inputs being spent. After some spending depth (100?) we move the corresponding tx state into a new NOT_POSSIBLE state. A state of this kind would need to exist for wallet UTXOs, channels, and inflights.
Then, when displaying user balances, we exclude the NOT_POSSIBLE items.
Importantly we should never delete these and if possible reorgs should move the items back into their old states.
Fixes #9102
Fixes #9112
The problem:
UTXOs can become unspendable TXOs. When they do, multiple systems in CLN remain in pending states that can confuse users.
This problem is particularly exasperated when users have lots of channels in many states as seen in #9102 and #9112
The solution:
A system that collects all inputs on SIGHASH_ALL tx's we care about (channel opens, splices, wallet activity) and monitors the chain for their inputs being spent. After some spending depth (100?) we move the corresponding tx state into a new NOT_POSSIBLE state. A state of this kind would need to exist for wallet UTXOs, channels, and inflights.
Then, when displaying user balances, we exclude the NOT_POSSIBLE items.
Importantly we should never delete these and if possible reorgs should move the items back into their old states.
utxopsbt,addpsbtinput,fundpsbt, etc)Fixes #9102
Fixes #9112