1

If we consider any blockchain based system (bitcoin, for example), how does initial trust setup works?

When a new user wants to join blockchain network, how does the client know that it talks to legitimate server? It does not know number of servers, it does not know their public keys, etc. I believe it also cannot rely on some certificate authority.

  • Now don't quote me on this, but I BELIEVE that the node you either download and setup on your own machine or connect to with your wallet client has a few hardcoded known nodes in it. Then, once connected to the network, you discover new nodes as they broadcast and rebroadcast transactions. – Anthony Russell Jul 3 '18 at 19:41
  • 1
    reference monero node seeds github.com/monero-project/monero/blob/… – Anthony Russell Jul 3 '18 at 19:53
2

There are a couple ways to bootstrap a blockchain client node. The most used one is the DNS Seed. On most coin wallets, there are a list of hard coded DNS records that point to peers.

It's possible to download peers.dat from the blockchain official site, and have the client node connect to peers from that file. This is not the most used way, but works.

The least used way is to connect to the IRC channel for the blockchain, ask the users there and connect to the peer by hand. Not used today for the absolute majority of coins, but can be used for a little know, small ones.

After discovering and connecting to the first peer, the node will listen to transactions and build its own node list.

On the bitcoin software (and almost every other coin), there are a special block named Genesis Block that are hardcoded on the application. This way you can connect to any peer, trusted or not, and ask for the genesis block. Having the genesis block and a list of peers, you can ask different peers for different blocks and calculate their hashes following the chain, and see if their hashes match. With enough known nodes, it's practically impossible (mathematically possible but very, very unlikely) to nodes to fool your client. It's like having dozens of complete strangers that never communicated before telling you the same fake numbers on the lottery draw.

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.