rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

add probing code

Open moneyball opened this issue 2 years ago • 8 comments

Can we add Mutiny's probing code? @benthecarman @TonyGiorgio

Or Matt's? @TheBlueMatt

Would like to add the simple prober code so that other LDK users can borrow from it to run their own (there should be at least one prober for each LSP used being run). I know of at least 2 projects that could use this right now.

moneyball avatar Nov 09 '23 01:11 moneyball

Our probing code has gotten significantly more complex since it basically has turned into a analytics platform for us to test algorithms and visualize results. On top of that it requires a web server to serve the results. Perhaps it's something to add to ldk-sample or spin off into a different project? There's nothing that needed to be added to rust-lightning to get it to work.

AnthonyRonning avatar Nov 09 '23 05:11 AnthonyRonning

Agree it doesn't need to be in the rust-lightning repo per se even though I filed the issue here. Probably a new repo in the LDK GitHub org with a forked version of ldk-sample. Or, an option added to ldk-sample?

moneyball avatar Nov 10 '23 00:11 moneyball

Agree it doesn't need to be in the rust-lightning repo per se even though I filed the issue here. Probably a new repo in the LDK GitHub org with a forked version of ldk-sample. Or, an option added to ldk-sample?

I think the sample is really just a sample and shouldn't start to include production code. I think just adding some really naive probing code to an already-existing LDK node is trivial and should be in the order of ~10 lines that any user should easily be able to write. However, if we want to offer a more sophisticated background prober, it would probably warrant creating a new bare-bones crate based on LDK or LDK Node that includes a few more complex algorithms.

So either way we probably don't want to just add something to the sample real quick.

tnull avatar Nov 10 '23 08:11 tnull

Ok, let's not add this trivial 10 lines of code to ldk-sample or rust-lightning. Let's put it somewhere else in the LDK GitHub org. If it is so simple, this will be very easy for someone to do. I'll add as a good first issue.

moneyball avatar Nov 10 '23 18:11 moneyball

Would it be okay to take LDK-sample as a starting off point and add a "probe" command that does the work? Our probing code is basically LDK sample with a lot of additional code, SQL database, authenticated API endpoints, analytics, etc.

But most of our complexity wouldn't be needed to do the same probing as us so perhaps I can make a minimized starting off point. It started off simple but a few things we learned doing background probing that we can contribute to.

AnthonyRonning avatar Nov 10 '23 19:11 AnthonyRonning

If we want to include something in the lightningdevkit repo, we should probably do something smart, like actually picking target paths that we have less information on rather than just trying the same path over and over again, but the naive approach at https://git.bitcoin.ninja/index.cgi?p=ldk-sample;a=commit;h=f47b6f50b85ef3770173cc8e4bcddd3662cb5d5e (just pick a random target and a random amount once a minute) seems to learn pretty well in spite of its naivete.

TheBlueMatt avatar Nov 15 '23 16:11 TheBlueMatt

Well i had a unsucessful but enlightning experience with probing, now I have depth with general probing and rust, can i give it a shot ?

007harshmahajan avatar Jan 22 '24 00:01 007harshmahajan

Sure, if you want. I think, to start, we'd like to have a single function which, given a target node to probe, picks a path. As an initial go, we probably want to "just" call our router, but rather have a separate mode on our ProbabilisticScorer. In this mode, rather than scoring based on probability, we should score based on probability (the existing metric), but also avoid any channels we've "recently" probed (with some heuristic for recent that falls off with time-since-probe).

Concretely, we'll probably want to just have a wrapper struct that wraps ProbabilisticScorer and implements ScoreLookUp itself.

TheBlueMatt avatar Jan 25 '24 02:01 TheBlueMatt

is this still being worked on by you @007harshmahajan

Geoelycom avatar May 04 '25 21:05 Geoelycom

is this still being worked on by you @007harshmahajan

not now

007harshmahajan avatar May 05 '25 09:05 007harshmahajan

Can I tackle it instead??

On Mon, 5 May 2025 at 10:58, Harsh Mahajan @.***> wrote:

007harshmahajan left a comment (lightningdevkit/rust-lightning#2720) https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622

is this still being worked on by you @007harshmahajan https://github.com/007harshmahajan

not now

— Reply to this email directly, view it on GitHub https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4GCI3S5UPEPEYK3NHM6ZT244Y45AVCNFSM6AAAAAB4NKRXMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNJQGQ4TSNRSGI . You are receiving this because you commented.Message ID: @.***>

Geoelycom avatar May 05 '25 10:05 Geoelycom

Can I tackle it instead??

On Mon, 5 May 2025 at 10:58, Harsh Mahajan @.***> wrote:

007harshmahajan left a comment (lightningdevkit/rust-lightning#2720)

https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622

is this still being worked on by you @007harshmahajan

https://github.com/007harshmahajan

not now

Reply to this email directly, view it on GitHub

https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AM4GCI3S5UPEPEYK3NHM6ZT244Y45AVCNFSM6AAAAAB4NKRXMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNJQGQ4TSNRSGI

.

You are receiving this because you commented.Message ID:

@.***>

yes go ahead with it 🙌

007harshmahajan avatar May 05 '25 10:05 007harshmahajan

Ok

On Mon, 5 May 2025 at 11:31, Harsh Mahajan @.***> wrote:

007harshmahajan left a comment (lightningdevkit/rust-lightning#2720) https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850570887

Can I tackle it instead??

On Mon, 5 May 2025 at 10:58, Harsh Mahajan @.***> wrote:

007harshmahajan left a comment (#2720 https://github.com/lightningdevkit/rust-lightning/issues/2720)

#2720 (comment) https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622

is this still being worked on by you @007harshmahajan https://github.com/007harshmahajan

https://github.com/007harshmahajan

not now

Reply to this email directly, view it on GitHub

#2720 (comment) https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850499622 ,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AM4GCI3S5UPEPEYK3NHM6ZT244Y45AVCNFSM6AAAAAB4NKRXMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNJQGQ4TSNRSGI

.

You are receiving this because you commented.Message ID:

@.***>

yes go ahead with it 🙌

— Reply to this email directly, view it on GitHub https://github.com/lightningdevkit/rust-lightning/issues/2720#issuecomment-2850570887, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4GCI6F5DWYRIRGX3CPCBD2444WJAVCNFSM6AAAAAB4NKRXMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNJQGU3TAOBYG4 . You are receiving this because you commented.Message ID: @.***>

Geoelycom avatar May 05 '25 10:05 Geoelycom