electrum
electrum copied to clipboard
jit: Improve JIT zeroconf channel opening
Related PRs:
- https://github.com/spesmilo/electrum/pull/9624
- https://github.com/spesmilo/electrum/pull/9598
- https://github.com/spesmilo/electrum/pull/9606
- https://github.com/spesmilo/electrum/pull/9611
- https://github.com/spesmilo/electrum/pull/9587
- https://github.com/spesmilo/electrum/pull/9586
- https://github.com/spesmilo/electrum/pull/9588
- https://github.com/spesmilo/electrum/pull/9590
Changes:
- make it possible to have multiple JIT channels with single LSP by using the deterministic remote scid alias created on channel open instead of the static node id hash as scid alias of the jit channel on LSP side
- add error handling to correctly wind down and remove channels and local txs if the jit opening failed (e.g. if lsp didn't get preimage from client)
- disable JIT/zeroconf on LSP side if exceptions occur to prevent further issues
- only finalize jit opening if funding tx got successfully accepted to our mempool
- add funding tx fee to opening fee of channel so client pays for (funding) mining fees
- use max(absolute fee, relative fee) instead of failing zeroconf opening if fee is below min abs fee
- add checks to LSP and client side to prevent insane fees
Note: we should only signal OPTION_ZEROCONF_OPT in the init messages if the peer is also our configured trusted zeroconf node.
will replace this, it's pretty outdated.