0

I read the bitcoin references but I can't find a description regarding how bitcoin clients find other host in the p2p network. Would you please tell me?

0

1 Answer 1

3

There are several methods for a bitcoin client to find other nodes.

First of all they save a list of nodes from previous connections.
Of course this only works when they don't connect the first time.

If a client has no IPs stored it falls back to DNS-Seeds:

Bitcoin looks up the IP Addresses of several host names and adds those to the list of potential addresses. This is the default seeding mechanism, as of v0.6.x and later.

Once a client is connected to the network, it will ask for a list via the Addr-Message containing a list of IPs of known clients.

As you can see in the Bitcoin-Wiki there was another method, which is no longer used:

IRC

Bitcoin joins a random channel between #bitcoin00 and #bitcoin99 on irc.lfnet.org. Your nick is set to an encoded form of your IP address. By decoding all the nicks of all users on the channel, you get a list of all IP addresses currently connected to Bitcoin.

1
  • You forgot the list of inbuilt client seeds. Jul 2, 2014 at 9:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.