Skip to content

Expose trusted_peers_no_reserve in node config #323

Open

Description

@frnandu

Description

The ListChannels API already reports ReserveType::TrustedPeersNoReserve for anchor channels whose counterparty is in the trusted_peers_no_reserve list, but there is currently no way to configure that list on LDK Server.

ldk_node::config::AnchorChannelsConfig exposes:

/// A list of peers that we trust to get the required channel closing transactions confirmed
/// on-chain.
pub trusted_peers_no_reserve: Vec<PublicKey>,

This defaults to an empty list, so in practice every anchor channel is ReserveType::Adaptive and the TrustedPeersNoReserve variant is currently unreachable through LDK Server's configuration.

Proposal

Expose the setting alongside the recently added node.anchor_per_channel_reserve_sats (see #321, implemented in #322), wiring it into ldk_node_config.anchor_channels_config.trusted_peers_no_reserve:

  • Config file key: node.trusted_peers_no_reserve (list of node pubkeys)
  • CLI flag: --node-trusted-peers-no-reserve
  • Env var: LDK_SERVER_NODE_TRUSTED_PEERS_NO_RESERVE

Unset keeps the upstream default (empty list).

Security tradeoff to document

When a peer is in trusted_peers_no_reserve, LDK does not maintain a per-channel on-chain reserve for that channel and relies on the peer to confirm the closing transaction. This should be documented as a deliberate trust assumption, distinct from (and stronger than) the fee-bump reserve handled by anchor_per_channel_reserve_sats.

Context

Follow-up from #321 / #322 (Expose anchor per-channel reserve in node configuration), which noted that trusted_peers_no_reserve is not currently configurable in LDK Server.

Activity

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

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