Skip to content

RFC: How should CDK support LDK going forward? #2170

Description

@thesimplekid

CDK currently supports LDK through an in-process ldk-node backend. This gives operators a simple deployment model: run one cdk-mintd binary and get both the mint and Lightning node.

The downside is that CDK also owns more Lightning node operational surface than it does for other backends. For example, CDK has had to maintain its own LDK node dashboard and manage the node lifecycle inside the mint process.

ldk-server now provides an ldk-node based daemon with a gRPC API. This would make LDK work more like CDK's CLN, LND, and external payment processor integrations: the mint connects to a separate Lightning service.

This raises the question: what should CDK's long-term LDK support look like?

Options

1. Keep only the current embedded ldk-node backend

Pros:

  • one binary for operators
  • simple local development and testing

Cons:

  • CDK keeps maintaining node management UI and lifecycle code
  • mint upgrades stop the Lightning node
  • can not run multiple mint instances against one node

2. Support both embedded ldk-node and ldk-server

Pros:

  • preserves the simple single-binary option
  • adds a service-separated option for production deployments
  • gives CDK time to evaluate ldk-server as it matures

Cons:

  • two LDK backends to maintain
  • more docs, config, tests, and support complexity

3. Add ldk-server support and eventually remove embedded ldk-node

Pros:

  • aligns LDK with CDK's other Lightning backends
  • removes CDK's need to maintain an LDK dashboard
  • separates mint and node lifecycles
  • enables multiple mint instances to share one Lightning node

Cons:

  • removes the current one-binary deployment model
  • may be premature while ldk-server APIs are still stabilizing

Open questions

  • Should ldk-server be an optional backend, a future replacement, or out of scope for now?
  • If both are supported, which should CDK recommend for production?
  • Should CDK keep maintaining the embedded LDK dashboard long term?

Possible conservative path

Add ldk-server as an experimental backend while keeping embedded ldk-node. Once ldk-server is more mature and CDK has integration experience, revisit whether the embedded backend and dashboard should be deprecated.

My current preference

I am leaning toward adding ldk-server support and removing support for the integrated ldk-node backend over time.

The main reason is that it removes the need for CDK to maintain a CDK-specific Lightning node dashboard. If ldk-server becomes the LDK deployment target, CDK can lean on LDK-native tools and other operational tooling instead of owning that surface itself.

I also think separating the mint and Lightning node is the better model at scale. It allows the mint layer to be horizontally scaled while sharing one underlying node, and it keeps the mint and Lightning node as separate services with separate lifecycles. They are distinct pieces of infrastructure, and treating them that way seems like the cleaner long-term architecture.

Already a PR adding support for it here: #2164

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions