Blockchain for Decision Makers
上QQ阅读APP看书,第一时间看更新

Participants in the network

Once again, the network is a very important feature in a blockchain—it has to be decentralized enough to be sure that the majority is not controlled by a single entity. It has to be heterogeneous enough so that the truth is represented by the majority. To achieve decentralization and heterogeneity, data must be distributed across the community. It should be distributed to anyone who wants to participate with no condition or barriers, forming a network of computers interacting with each other.

The network layer of a blockchain is also known as a peer-to-peer network.

In a centralized system, devices such as phones or computers access information to a central server that is owned by one entity. In a decentralized system supported by a peer-to-peer network, all of the devices, including the servers, interact and communicate with each other independently. These devices are called nodes. Each node can share information with any other node, without relying on a central server. Examples of such networks are the infamous file-sharing applications, BitTorrent, uTorrent and eMule, enabling users to download from and share data. When you are a participant of a peer-to-peer network, you act both as a provider and a consumer of files retrieved through other nodes. These are the kind of networks that enable decentralization within a blockchain. No entity is proprietary of the data nor has the exclusive right to read or modify the database.

The story of Napster is a revealing example of the weaknesses showed in a centralized system, especially in terms of control. Napster was a music file-sharing application that was shut down in 2001 after a long legal action undertook by record companies complaining about a violation of copyrights. Although Napster worked upon a peer-to-peer network, it centrally maintained a directory of all users and files. This configuration allowed the US district court to cease Napster's activity once the injunction was issued. The seizure would probably not have happened if the application relied on a true decentralized peer-to-peer network where the directories were stored by each node.

In a blockchain, there are several roles given to the participants of the network:

  • The users: They utilize the application running on top of the blockchain. They do not own any data from that blockchain; they solely use the service.
  • The nodes: These computers store the database on their memory and make it available for anyone to see the history of transactions or information.
  • The miners: These computers run the software enabling the validation of blocks and transactions.

In certain blockchains, such as the one underpinning Bitcoin, anybody can become a miner, a node, or just a user. These kinds of blockchains are called public (or permissionless) as opposed to private (or permissioned) blockchains in which the roles are predefined for every participant. We will explore these differences further in the next chapters.

We will not technically describe how these nodes are connected but we will remember that, in a distributed system (in the end, that is what a blockchain is), the computers talk to each other to exchange information efficiently. Geolocation and power of the computers are variables that are taken into consideration when making the computers talk to each other.

Each node (and each miner) holds an identical copy of the blockchain. New miners and nodes download the entire history to the peers they are connected to if they want to be part of that network. The size of a blockchain can be pretty memory-consuming: at the time of writing this book, if you want to become a node of the Bitcoin blockchain, you must download a 223 GB file.

The responsibility of the miner is to do the following:

  • Construct a new block with new transactions.
  • Find the correct answer to the mathematical problem (the nonce) to validate the block.
  • Spread it across the network for everyone to see and check.

For the blockchain to evolve, transactions need to occur continuously and get compiled in blocks by the miners who calculate the resulting hash before adding the block to the chain.

But how do the miners ensure that the suggested block does not include fake transactions? And how do they add it to the chain?