In such a model, there is a huge problem that needs to be solved. If all those clients exchange information, what stops some of them from saying something different than the others. And who should be trusted in this case?
This problem is especially critical for blockchains that usually come with their own currency. It would be a worst-case scenario if no one could stop anyone from taking currency tokens from your account and putting them into their own or simply deleting them.
Other than that, even outside of the monetary space, data is important to its owner. If that data is altered or deleted, it does damages. This needs to be prevented or the system itself loses trust. Without trust, there is less if not even no instigation to use a system.
3️⃣ Consensus Protocols

There is a multitude of consensus protocols for different use cases. They are not exclusive to blockchains.

If you ever worked with Kafka, you perhaps know that it always comes with the need for a Zookeeper node (or even better more).
Kafka topic leader election (when a node fails) is based on a consensus protocol where multiple Zookeeper nodes decide which of the remaining Kafka instances should become the leader of a certain topic.
This is only an example of a permissioned variant of a consensus protocol. The participants are known and can authenticate themselves.

In the case of blockchains, however, permissionless consensus protocols are used. In a peer-to-peer network, all participants are never known.
Clients usually only talk to a small portion of the system. All clients each talking to parts of the system leads to everyone being involved in the end. But this creates the need for a way so that anonymous clients can trust the data of other anonymous clients.
Consensus Protocols are designed to achieve consensus in a system. They are a set of algorithms and steps that, given the same input on every client, lead to the same result for everyone.
All participants can verify whether what they see is correct or whether a choice was valid.

The protocols themselves don't prevent incorrect or fraudful data, they provide a way to filter that data out. Clients can then simply ignore it.
The participants of the network agree on what the truth is together. Some participants may disagree but it's usually a majority vote. You could say that the process is somehow democratic.
In blockchain space, getting this consensus usually requires mining or validating, depending on the protocol used by the specific blockchain.

When Bitcoin miners use up all those precious Nvidia graphics cards and energy, they do this to contribute to the system's consensus.
In this specific case, they do a very difficult calculation (hashing) multiple times by guessing a random integer to get a pre-defined result (a hash). This result, the nonce, is then included in a new block and can be verified for correctness by everyone.
Every participant can check whether that nonce and its block are correct.

Guessing the nonce and verifying the result builds the consensus of the Bitcoin network. Clients can agree on which blocks are actually correct and which are not.
There are also other factors included like the longest verifiable chain being accepted as the truth and more, so the protocol is a little more complex than presented here. But you should hopefully still get a general idea of the system itself.
There is never _the_ consensus protocol. Other blockchains use other consensus protocols and alter them to fit their needs. It is more important to choose one that fits the specific case and works well (enough) to guarantee some form of security and stability in such a system.
4️⃣ Conclusion

Consensus protocols in blockchain space are used to ensure that the system behaves correctly although there is no central controlling entity. They come in a multitude of flavors and research on more is ongoing.

Their job is to build security and trust.
Without security and trust, such systems would have no value to be used. This is why consensus plays a crucial part in building all that up.
As already stated, you can use those protocols for a lot more than only decentralized networks, so feel free to research. You might or might not end up needing this knowledge at some point.
4️⃣ Before You Leave

If you like this type of content, leave a like, and if your own audience might find this thread valuable, feel free to retweet. 😊

If you want more content like this, follow me for more! 💛🙏🏻
You can follow @oliverjumpertz.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: