bitcoin-dev-project / sim-ln

Payment activity generator for the lightning network
MIT License
63 stars 27 forks source link

Try to add eclair/ldk support #181

Closed PurpleTimez closed 4 months ago

PurpleTimez commented 5 months ago

I don't understand the framework, and dunno if other implems support can be useful.

PurpleTimez commented 4 months ago

Eclair Support

From eclair documentation's (README.md), there is an API where one can install plugin written in Scala, Java or any JVM-compatible language.

I think from then a plugin could be designed to expose a GRPC interface and this interface driven by a sim-lib module to act sim actions (get_info, send_payment, track_payment, get_node_info, list_channels).

LDK Support

LDK has a sample node called ldk-sample. It is a test lightning node that one can run on the command-line a REPL fashion. Internally, it's using a module (cli.rs) which is pipping user command to the internal interface of the LDK library.

I think a GRPC interface alternatively integrated in ldk-sample runtime, instead of the command-line cli could be a way to have a LDK runtime driven by sim-lib. Accessing directly the LDK interface allow a stable interface to act on sim actions (get_info, send_payment, track_payment, get_node_info, list_channels).

I don't know if the two support approaches will work end-to-end, though I think it's an interesting way to have eclair / ldk support in sim-ln. I don't know how much hacking work it is, I can try.

carlaKC commented 4 months ago

See #26 for ongoing discussion on multi-impl support

PurpleTimez commented 4 months ago

See https://github.com/bitcoin-dev-project/sim-ln/issues/26 for ongoing discussion on multi-impl support

Left thoughts here. Sounds eclair support better to prioritize. Dunno if way proposed is not too much maintenance.

carlaKC commented 4 months ago

Closing boilerplate PR after discussion in #26, feel free to re-open an eclair implementation if reasonably achievable.