Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: calkob on March 11, 2016, 08:02:34 PM



Title: exactly how does a node find its first connection
Post by: calkob on March 11, 2016, 08:02:34 PM
Just wondering what is actually happening in the background as bitcoin core is searching for its first node, where is it looking? i know there is no central server that it connects to so how does it find that 1st one?


Title: Re: exactly how does a node find its first connection
Post by: Quantus on March 11, 2016, 08:06:23 PM
The program comes with a list of large stable nodes
My understanding is the list is long and it includes very stable old nodes that hardly ever go down.


Title: Re: exactly how does a node find its first connection
Post by: achow101 on March 11, 2016, 08:20:44 PM
The program comes with a list of large stable nodes
My understanding is the list is long and it includes very stable old nodes that hardly ever go down.
Actually that is the last resort.

This is specific for Bitcoin Core, it may be different for other nodes.
First the node checks for its own list of peers that it has built. If it is a new node, that list won't exist.
Then it will check with several DNS seeds, servers which provide a list of nodes. Those DNS seeds are hard coded into the client.
If for some reason the DNS seeds aren't reachable, then it resorts to its own internal hard coded list of seed nodes. Those seed nodes are nodes which have had a super high uptime so it is likely that the node will be able to connect to those.


Title: Re: exactly how does a node find its first connection
Post by: Quantus on March 11, 2016, 08:26:50 PM
cool I suspected the nodes listed in the client only relayed other known nodes and didn't bother with anything else; had to google DNS seed. :)


Title: Re: exactly how does a node find its first connection
Post by: calkob on March 11, 2016, 09:45:55 PM
Great info guys, thank you just what i was looking....... ;D