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

Connecting to new node -> automatically connect Lightning clients #1456

Closed
kilrau opened this issue Apr 2, 2020 · 4 comments
Closed

Connecting to new node -> automatically connect Lightning clients #1456

kilrau opened this issue Apr 2, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers hackathon Lightning HackSprint lightning Lightning network & lnd integration P2 mid priority

Comments

@kilrau
Copy link
Contributor

kilrau commented Apr 2, 2020

When connecting to a new xud node, e.g. (`02529a91d073dda641565ef7affccf035905f3d8c88191bdea83a35f37ccce5d64) on xud-level, we should fetch their L2 URIs and connect to these automatically too.

Details:

  • Lightning clients only (atm LND only, but through swapclient interface should support c-lightning Support c-lightning as swap client #1281 too, doesn't apply to connext/raiden)
  • since we auto-connect to the bootstrap nodes xud1.simnet.exchangeunion.com, xud1.testnet.exchangeunion.com & xud1.exchangeunion.com on launch, this serves not only a preparation for channels but also as a bootstrap peer for the lightning graph sync to solve this issue:
2020-04-02 11:28:09.182 [INF] DISC: Attempting to bootstrap with: Authenticated Channel Graph
2020-04-02 11:28:09.182 [ERR] SRVR: Unable to retrieve initial bootstrap peers: no addresses found
@kilrau kilrau added lightning Lightning network & lnd integration P2 mid priority labels Apr 2, 2020
@kilrau kilrau added the hackathon Lightning HackSprint label Apr 3, 2020
@kilrau kilrau changed the title Connecting to new node -> automatically connect L2 clients Connecting to new node -> automatically connect LND clients Apr 3, 2020
@kilrau kilrau changed the title Connecting to new node -> automatically connect LND clients Connecting to new node -> automatically connect Lightning clients Apr 3, 2020
@kilrau kilrau added the good first issue Good for newcomers label Apr 3, 2020
@sangaman
Copy link
Collaborator

I'm not sure that this is necessary. We already connect before we attempt to open a channel, and lnd automatically connects on its own if there is a channel. If we just connect directly on lnd without having or intending to have channels, I don't think there's any benefit to that. Does this make sense or is there a benefit that I am missing?

@michael1011
Copy link
Contributor

I don't think that it is worth it but connecting to all LND nodes might give our local node a better overview of the network

@sangaman
Copy link
Collaborator

I don't think that it is worth it but connecting to all LND nodes might give our local node a better overview of the network

As far as I'm aware this isn't necessary though for a functional lightning node. As long as there are just a few channels/connections (and I think even one should be enough in most cases) a node will learn about most of the network, at least given the rough size of the network nowadays.

@michael1011
Copy link
Contributor

a node will learn about most of the network, at least given the rough size of the network nowadays

Yes, most of the network. But try connecting to some random node from 1ml.com on your local node. It will find a couple more channels that it didn't know about before which could be helpful for building routes longer than two hops

@kilrau kilrau closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hackathon Lightning HackSprint lightning Lightning network & lnd integration P2 mid priority
Projects
None yet
Development

No branches or pull requests

3 participants