Once the bitcoin client is connected to a machine (or multiple machines) on the bitcoin network, they can share information (e.g. the block-chain, IP addresses of other nodes, etc). I understand how this peer-to-peer architecture is robust to nodes joining/leaving/crashing and not relying on any central authority.

My question is: when I start my client, it has no information about the IP addresses of the other nodes, so how does it know who/where to connect to initially? How does one 'boot-strap' a peer-to-peer network?

link|improve this question
feedback

2 Answers

up vote 6 down vote accepted

The Bitcoin client has a number of sources that it uses to locate the network on initial startup. In order of importance:

1) The primary mechanism, if the client has ever run on this machine before and its database is intact, is to look at its database. It tracks every node it has seen on the network, how long ago it last saw it, and its IP address.

2) The client can use DNS to locate a list of nodes connected to the network. One such seed is bitseed.xf2.org. The client will resolve this and get a list of Bitcoin nodes.

3) The client has a list of semi-permanent nodes compiled into it.

4) The client can connect to a well-known IRC network, irc.lfnet.org, and find other nodes that way. (This method is now considered obsolete.)

link|improve this answer
2  
5) It takes IP addresses from the commandline (-addnode). – Pieter Wuille Dec 4 '11 at 14:58
feedback

There are several bootstrap methods. I know of two:

  1. An specific IRC channel is joined by the client. In this channel, connected clients often broadcast their IP, to allow others to find them.
  2. There is a list of hard-coded IPs in the client binary, which the client will connect to bootstrap its network.
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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