Skip to content

Config: expose negotiate_anchor_zero_fee_commitments so integrators can opt into 0FC channels #987

Description

@hash-money

default_user_config sets only negotiate_anchors_zero_fee_htlc_tx (src/config.rs#L421 at current main); channel_handshake_config.negotiate_anchor_zero_fee_commitments stays at LDK's default false, and no Config/ChannelConfig surface exposes it — so two ldk-node peers can't open a zero-fee-commitment channel even experimentally, despite the pinned LDK carrying the full 0FC machinery (feerate-0 commitment, keyless P2A anchor, TRUC CPFP child).

Why we need it (not hypothetically)

We integrate ldk-node via orange-sdk in a sweep-everything mobile wallet (Phoenix model: on-chain balance ~0 at steady state). Verified on-device (Mutinynet, 2026-07-11): with the LSP offline, a force-close cannot confirm

  1. the legacy-anchor commitment is built at the 253 sat/kW floor and never relays alone;
  2. no CPFP child can be built: with the LSP in trusted_peers_no_reserve the bump event is skipped by design, and de-trusting re-introduces the per-channel reserve — the exact thing a sweep-everything wallet can't hold (and without a reserve, coin selection finds no confirmed UTXO and aborts);
  3. nothing external can rescue it: the legacy anchor is keyed, and the anyone-can-spend branch needs 16 confirmations of the very tx that can't confirm.

0FC + P2A resolves this class without a reserve: keyless anchor, bring-your-own-fees child, pure L1 recovery even with the counterparty dead. That makes the handshake flag the first gate to a real fix for us, not a nice-to-have — the only current workaround is a fork.

Ask

A config surface that sets negotiate_anchor_zero_fee_commitments (opt-in, default off — wherever it fits your config layering). If the actual gate is that 0FC needs more than the handshake flag (e.g. the reserve/test assumptions in #875), we'd genuinely like to know what the real blocker list is.

We control both channel ends (our LSP is ldk-node too) and run staging on Mutinynet, which already relays TRUC + ephemeral anchors — so we can validate end-to-end and publish before/after results as soon as a knob exists.

Related: the trusted-peer half of this failure is filed as lightningdevkit/orange-sdk#95; the rescue-tool export surface is a separate ask (one thread per topic).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions