Skip to content

LDK-node server-side #98

Closed
Closed
@ariard

Description

@ariard

Opening this issue to track the interest and design considerations for ldk-node for enterprise purpose. The end goal is to have a high-available, high-perfomant, modularity and secure entreprise Lightning node.

One design consideration - the ldk-node should be configurable to match the advanced Bitcoin hobbyist eager to provide peripheral liquidity to the network to large-scale entreprise with a fully dedicated Bitcoin infrastructure team.

What are the entreprise use-cases ?

With the growth of the Lightning ecosystem, one can expect specialization of the Lightning nodes for different class of Lightning services, level of integration with application logic and types of nodes

  • Lightning routing nodes: providing reliable payments paths across the network and liquidity services (splicing, swaps), care about availability, performance and security.
  • Lightning gateway nodes: providing access to the Lightning network to "spokes" users in exchange of markup fees for the liquidity lockup ; care about security and mobile features support (e.g async payment).
  • Lightning merchant nodes: providing virtual/physical goods to the network.
  • Lightning custom packets nodes: providing routing services and liquidity for e.g Lightning escrow packets ; care about security and modularity
  • Lightning mining pools nodes: providing integration with Stratum v2 for custom mining protocols to send payouts or buy shares over Lightning ; care about security and modularity

Note it is expected in practice that many of those types of nodes to be deployed in one physical deployment.

What types of component a Lightning entreprise nodes should encompass ?

Rather to have one wallet for each type of layer and protocol spoken (L1 wallet, L2 wallet, swap wallet) it is expected coin selection, key and descriptors management and UTXO control to be under a unified component.

There can be an expectation than mempool and fee-estimation to be offered under a single API as this is consumed both for fees management for anchor support, and in the future for automated liquidity management.

There can be an expectation than all the keys managements is handled by a single component with a generic interface with its own recovery and storage handling, something like VLS).

There can be an expectation than the routing stack and all the invoice/offers logic can be separated in its own component to be reused more freely and in a parallel fashion by merchant logic.

What else ? There are few more obvious like watchtower integration and watchdog integration.

What should be the level of runtime modularity ?

I think service-oriented architecture should be favored (without falling in the trap of the micro-services) as it matches well the intrinsic requirements of Lightning and Bitcoin protocol (run multiple watchtower backend and run multiple transaction-relay endpoints).

The LDK-node for entreprise could be splitted in multiple process: channel-management, on-chain monitoring, routing,
p2p stack and one for wallet/signing (though maybe combined with channel-management ?). The exact separation of concerns should match what make sense in term of availability, perfomance and security. The process should expose simplified API (e.g gRPCs) and access to the raw data structure/methods.

If the process interface can be made compatible with the ongoing work in Core's about multiprocess this makes a lot of sense on the long-term to integrate directly the mempool, transaction-relay and any monitoring infrastructure.

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