Skip to content

Split LND in node and core processes #6694

Open
@joostjager

Description

@joostjager

LND remote signing is currently only available as a blind signer without the possibility of validation and policy enforcement. This is detailed further in #6243.

Making the remote signer more intelligent seems to lead to a great deal of duplication of logic between lnd and the remote signer, to the point where the remote signer needs to keep its own channel state database and chain backend connection.

One idea (previously described #6243 (comment)) is to split lnd in a node process and a core process to achieve a similar result without duplication.

image

In this diagram, pathfinding and invoicing are still part of node. Those components however could easily be isolated in dedicated processes too.

The main change is that peer messages are forwarded from node to core after they've been decrypted by node using the node key. The node key is derived from the main seed, so node won't have access to the keys that core uses (which would defeat the purpose of the split).

To remain flexible, it may be an option to use abstract interfaces for the link between node and core, where an in-process and a grpc implementation of the interface exist. This allows users that don't care about remote signing to keep running a single process.

As a starting point, we've created two branches that give a rough impression of the touch points:

LND Core: https://github.com/bottlepay/lnd/tree/lnd-core
LND Node: https://github.com/bottlepay/lnd/tree/lnd-node

The purpose of this issue is to discuss what it would take to complete the described split, how much effort would be required and whether this is a solution that can count on support from the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions