2 ms·
> Is there a “centralised” server under Bitcoin? Yes, Bitcoin clients use a semi-hardcoded list of "seed peers" that they look up via DNS and connect to first.
by jcrawfordor 5y ago
> Is there a “centralised” server under Bitcoin?
Yes, Bitcoin clients use a semi-hardcoded list of "seed peers" that they look up via DNS and connect to first. Peer discovery proceeds from there using P2P methods. One example is seed.bitcoin.sipa.be, there are several set in the source tree of bitcoin core. Each of these "seed" DNS names provides a list of records that are known good Bitcoin nodes. This DNS method replaced Bitcoin's original method, dating back to Nakamoto, which was to connect to a hardcoded IRC server and then join a hardcoded channel where Bitcoin nodes advertised their presence. There is no real theoretical advantage to the DNS method but it is simpler and DNS is far less likely to be blocked than IRC.
As in most distributed/P2P systems, the Bitcoin DNS seeds are somewhat integrity sensitive. Normally the Bitcoin network cannot enter a "split-brain" state (e.g. two independent and equally valid blockchains) because there are a large number of nodes which are strongly interconnected, preventing any substantial number of Bitcoin nodes being unaware of blocks that other nodes are aware of (in actuality Bitcoin enters a "split-brain" state on a regular basis, but as long as nodes are aware of both "valid" blockchains they have an agreed upon convention to select a single blockchain head as valid). But this is only true of nodes which are already participating. When a new Bitcoin node starts for the first time, it has no way to discover any other nodes besides the DNS seeds. In theory, if the DNS seeds were malicious, they could provide a list of nodes which were complicit in an attack by intentionally not forwarding any information about some blocks or advertisements of nodes which are aware of those blocks. In other words, in practice the cost of a sybil attack is actually reduced to the number of nodes directly advertised by the DNS seeds, but only for new users and only if the DNS seeds are complicit. In practice the former is a massive limitation and the Bitcoin project allows only trusted individuals to operate DNS seeds in order to mitigate the latter, so the issue is not that big.
The problem is that there actually is no decentralized way to initially discover peers on the internet. Imagine if you wanted to implement a peer-to-peer information flow over the telephone system. If you have a list of telephone numbers of participants you can come up with all kinds of schemes. But what about when you very first join? You don't know any numbers to try. Randomly calling every phone number in order isn't feasible. You need to have some kind of "point of contact" to first discover other peers or you simply have no one to call. There are various terms for this, I like "introducer" but Bitcoin uses "seed" as do some others. Every decentralized system that operates over the internet has a semi-centralized introducer mechanism somewhere deep down.
There are several theoretical mechanisms such as multicast groups, but none of these actually work across the internet. They do usually work across local networks (and are used by things like Bonjour), but in the majority of cases when a user wants to bootstrap a P2P system there is no other peer on the same local network.