Autopilot automatically connects to peers in order to establish a p2p network. I didn't find however a complete explanation of its motivation and logic.
- 5,623
- 1
- 8
- 31
- 26,452
- 30
- 111
- 246
-
I suggest that you read the code (which is well commented): https://github.com/lightningnetwork/lnd/tree/master/autopilot – Andrew Chow May 13 '18 at 16:03
1 Answers
there is an issue out discussing the strategies for the autopilot (c.f.: https://github.com/lightningnetwork/lnd/issues/677 ) there it is stated that it currently uses a constrained barabasi albert model or preferential attachment ( https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model ) this means that it will look at the topology of the network and randomly select nodes to connect to. However the probability distribution is not uniformly distributed but weighted by the node degree (meaning the numbers of channels a node has) of the nodes resulting to the fact that the autopiolot is more likely to connect to nodes which are already highly connected.
the model is constrained because currently nodes that are too big ( I think having more than 5k channels) will be excluded.
- 11,670
- 8
- 35
-
please extend post by config, see https://www.reddit.com/r/lightningnetwork/comments/gvrpvg/struggling_with_lnd_autopilot/ – droid192 May 01 '22 at 11:06