thanks for that.
yes, i know all that, BUT how my wallet knows which Nodes to contact?
Like bit torrent, when i load a torrent in my Mac, it goes to a server/tracker and that tracker connects me to all the peers sharing that torrent; that tracker knows who are the peers/nodes because i don't!
in bitcoin who is this tracker? who plays this role? how my wallet knows who are the NODES?
The client comes with a large number of nodes hard coded (called seed nodes) which are nodes that are known to have good uptimes and been up for a while. The data is compiled from what are called DNS seeds, which are a set of servers which are also hard coded. The node also keeps its own database of peers to connect to.
On startup, the nodes first checks its own database of nodes. If it cannot connect to any nodes there, it queries the DNS seeds. The DNS seed servers will respond with nodes that are available for the node to connect to. If it happens to not be able to connect to those nodes, it will fallback to the hard coded seed nodes.
The list of DNS seeds can be found here:
https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L98These are the current DNS seeds:
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli