Skip to content

jit: Improve JIT zeroconf channel opening#9584

Closed
f321x wants to merge 1 commit intospesmilo:masterfrom
f321x:jit
Closed

jit: Improve JIT zeroconf channel opening#9584
f321x wants to merge 1 commit intospesmilo:masterfrom
f321x:jit

Conversation

@f321x
Copy link
Copy Markdown
Member

@f321x f321x commented Feb 27, 2025

Related PRs:

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

@f321x f321x self-assigned this Feb 27, 2025
@f321x f321x force-pushed the jit branch 3 times, most recently from e6ae837 to a12f38f Compare February 28, 2025 08:48
@f321x f321x force-pushed the jit branch 4 times, most recently from a7be9d7 to 496f490 Compare March 7, 2025 13:13
@f321x f321x force-pushed the jit branch 2 times, most recently from ccb9773 to a420cb1 Compare March 10, 2025 15:52
@f321x f321x force-pushed the jit branch 2 times, most recently from 5ab1421 to 368abb9 Compare March 10, 2025 16:26
@f321x f321x marked this pull request as ready for review March 10, 2025 16:33
@f321x f321x changed the title wip: Improve JIT channel opening Improve JIT zeroconf channel opening Mar 10, 2025
@f321x f321x force-pushed the jit branch 2 times, most recently from d0128b6 to 90068b1 Compare March 11, 2025 09:43
@f321x f321x changed the title Improve JIT zeroconf channel opening jit: Improve JIT zeroconf channel opening Mar 22, 2025
@f321x f321x force-pushed the jit branch 2 times, most recently from 491c64a to 8669245 Compare April 8, 2025 08:41
@f321x f321x marked this pull request as draft December 5, 2025 16:29
f321x added a commit to f321x/electrum-fork that referenced this pull request Dec 5, 2025
Deduct the just in time channel opening fees from the total amount so
htlcs don't get timed out if they come from a just in time channel with
opening fee.

Related: spesmilo#9584
f321x added a commit to f321x/electrum-fork that referenced this pull request Dec 5, 2025
Deduct the just in time channel opening fees from the total amount so
htlcs don't get timed out if they come from a just in time channel with
opening fee.

Related: spesmilo#9584
ecdsa pushed a commit to f321x/electrum-fork that referenced this pull request Dec 6, 2025
Deduct the just in time channel opening fees from the total amount so
htlcs don't get timed out if they come from a just in time channel with
opening fee.

Related: spesmilo#9584
@f321x
Copy link
Copy Markdown
Member Author

f321x commented Dec 8, 2025

Note: we should only signal OPTION_ZEROCONF_OPT in the init messages if the peer is also our configured trusted zeroconf node.

@f321x
Copy link
Copy Markdown
Member Author

f321x commented Dec 19, 2025

will replace this, it's pretty outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant