Feature Request: Investigate Use of Existing Impl Pathfinding

Aperta
#289 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@f3r10 ci sta già lavorando.

Dal 25/6/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

difficult feature

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 #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.

Lingua principale
Rust
Stelle
80
Fork
44
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitcoin-dev-project/sim-ln

Tutte le issue di bitcoin-dev-project/sim-ln

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.