Skip to content

Feature Request: Investigate Use of Existing Impl Pathfinding #289

Open
@carlaKC

Description

@carlaKC

Describe desired feature

When running with a fully simulated network, it would be amazing of SimLN could use the same pathfinding as LND/CLN/Eclair. LND would be the highest priority, because it's the majority of the network.

Possible Approaches

Extern C

  • Create C libraries that implement each pathfinding algorithm
    • CLN: easy, compile library in C
    • LND: use c-shared to build C shared library
    • Eclair: not possible, so far as I know
  • Use extern to call C code for each pathfinding

This would require some (likely painful) investigation to figure out if the c-shared approach would work for LND. There are all sorts of caveats about C-compatible types that I haven't looked into.

IPC

  • Create "stub" servers that call directly to the implementations routing code:
    • Listen on socket, accepting parameters expressed in json
    • Run pathfinding
    • Return result
  • SimLN then spins up each of these small servers using Command
  • Implement the Pathfinder trait in Add pathfinder trait #273 which is responsible for shooting the request into the socket

Notes:

  • I don't have strong opinions on how to handle IPC (never done this myself)
  • We could also define a common RPC for these mini-servers, but that's a lot of boilerplate
  • Main priority is that this should be ✨ seamless ✨ for the end user, SimLN should handle all the ugly stuff.

Use case for feature

A common use case for SimLN's random payment generation is to create "background noise" payments in a network, and then take and measure some action within that busy network.

Would you like to contribute code for this feature?

I don't have capacity to take this on right now, but would be happy to participate in design discussions and review.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions