<snip>
- Your local peers.dat file
- Ask other peers
- Query DNS
- Use hardcoded list, compiled into client
<snip>
Thanks Jeff. The hardcoded list, are those IPs or host names?
IP addresses. But that hardcoded list, as you might imagine, gets out of date fairly quickly.
Typically an empty node with an empty peers.dat file gets most of its initial addresses from DNS.
After that, most addresses come via peer exchange, from talking to other nodes.
Sorry for such basic questions, I know the code is out there but I'm not a developer so I probably wouldn't know what I'm looking at. I'm working on a project and want to be sure the peer finding process is as robust as possible when bitcoind starts up the very first time on a new client. As I understand things, items 1 and 2 in the above list won't do anything the first time bitcoind starts up since there's no data there. Item 3 will only work if DNS is functioning correctly. Please correct me if I'm wrong.
That is correct. But let's emphasize that this is the
first time startup, so that other readers are not confused.
Too many people focus on the bootstrapping process, when
normally most peer addresses come from your local database or other nodes.