2

I just installed bitcoin core client (from github) and started the client. It took around 24 hours to install the full block chain. Where did the blockchain come from? How did did my bitcoin core client find its first peer on the network?

1

Bitcoin Core chooses peers in the P2P network in a few ways:

  1. it tries to connect to peers it already knows about, or
  2. it connects to peers it learns about by querying volunteer-run DNS services, or
  3. it connects to one of a number of hardcoded seeds

Once connected to the P2P network, peers rumor possible other nodes they know about, and the node builds a picture of the network using these responses. On a fresh installation there's no known peers, so the discovery begins at the seed nodes.

  • When you say "it tries to connect to peers it already knows about" - how does it "already" know about them? Is that the same as point #3? – Max Vernon Dec 11 '17 at 16:41
  • 1
    It knows about them from earlier runs. Known peers are stored on disk in peers.dat. – Pieter Wuille Dec 11 '17 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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