lndk-org / lndk

MIT License
83 stars 21 forks source link

Feature: On startup, auto-connect to onion messaging peers #88

Open orbitalturtle opened 9 months ago

orbitalturtle commented 9 months ago

Feature Description

Some users might want to use LNDK simply to forward onion messages on the network, increasing the anonymity set (which is relatively quite small right now!). For users of LNDK who aren't currently connected to nodes that support onion messaging, I think it'd be nice to offer an automatic solution.

To make the process automatic, we we could add an option (maybe enabled by a config flag --connect-to-onion-peers or something), which would use lnd's describegraph command to look up which nodes support onion messages and connect to a random few.

How long do connections persist?

One thing @carlaKC and I discussed here is whether connections without a channel would persist for very long. In CLN I learned from one of the devs that a peer won't disconnect if a channel isn't initiated, "but it won't seek to reconnect either." From eyeballing connections made with my own node, it seems like they'd stay connected for a couple of days.

Perhaps upon disconnect, we can just reconnect?