Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SocketAddr for connecting outbound instea of SocketAddress? #492

Open
TheBlueMatt opened this issue Mar 17, 2025 · 4 comments
Open

Use SocketAddr for connecting outbound instea of SocketAddress? #492

TheBlueMatt opened this issue Mar 17, 2025 · 4 comments

Comments

@TheBlueMatt
Copy link

ldk-node currently uses LDK's SocketAddress (which has variants for Tor/I2P/etc) in configuration for the listening address or for the address to connect to in a few places. This implies that ldk-node knows how to connect to Tor/I2P/etc, but I believe that it does not. Instead, shouldn't it use core::net::SocketAddr?

@tnull
Copy link
Collaborator

tnull commented Mar 18, 2025

ldk-node currently uses LDK's SocketAddress (which has variants for Tor/I2P/etc) in configuration for the listening address or for the address to connect to in a few places. This implies that ldk-node knows how to connect to Tor/I2P/etc, but I believe that it does not. Instead, shouldn't it use core::net::SocketAddr?

Well, for one we at least consider to eventually support Tor (#178), but more importantly, we use SocketAddress as it also has the Hostname variant, allowing us to store unresolved names that will be resolved prior to usage (fwiw, LDK's historical NetAddress name made the distinction more clear).

@TheBlueMatt
Copy link
Author

Ah, presumably we should have our own type, then, since we don't support I2P (let alone OnionV2)?

@tnull
Copy link
Collaborator

tnull commented Mar 19, 2025

Ah, presumably we should have our own type, then, since we don't support I2P (let alone OnionV2)?

You mean an LDK Node specific type? Not sure, I generally try to reuse LDK (and BDK/rust-bitcoin) types where possible to allow for easy interop.

@TheBlueMatt
Copy link
Author

I assume for the most part folks aren't taking the address out of the network graph from LDK but rather hard-coding it. In the second case I guess it'd be useful, but in the first its just confusing. Not that its all that critical, tho 🤷‍♂ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants