Distributed Peer-To-Peer Network (The Blockchain)

Distributed Peer-To-Peer Network (The Blockchain)

Arpan Pandey
·Dec 14, 2021·

3 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

  • Back To Real Estate
  • How is the blockchain actually connected?
  • How do we protect?
  • Summing Up

Now, that we know about how the Blockchain works on an individual node, let's discuss how a network of nodes functions. On a very basic level, the whole blockchain just operates as a network of nodes that have some information or part of the blockchain.

Back To Real Estate

In my previous post here, I used an example of a govt. ledger that keeps track of houses. We had suggested that we should move the system to a blockchain. Let's say that someone decides to go through all of the trouble of computing the hash of each block. Then what is preventing them from changing the records? Well, as it turns out nothing much if the blockchain is only present on one node. Now, we will solve the problem using a system of peer-to-peer nodes.

How is the blockchain actually connected?

ConnectedLaptopsImg.png
We will now distribute the blockchain over to a network. The network will be connected through cryptographic keys and stuff, so no one will know the actual data. Let's say that a block was added or mined on computer 1. Then, let's say that again some time passes. Block On The Network.png

Now, let's say that a bad actor has been able to successfully change a block on one of the nodes and has also gone through the trouble of recomputing the hashes. In our previous example, that would've been it. The blockchain would've been compromised. Block On The Network HIjacked.png

How do we protect?

Thankfully, in a peer-to-peer network, the computers are all synced up in real-time. Therefore, they will try to match the block to validate the chain and when they find a mismatch. They will, in a symbolic manner, tell the node with the faulty chain that "Hey, your chain doesn't seem to be right." Hey, your chain doesn't seem to be right..png

This will cause the infected node to realise that it has been infected. Which in turn, causes the infected blockchain to copy over the values and correct itself. Also, you need to realise that all of this happens in a matter of milliseconds to minutes. So, the problem will be fixed even before bad actor gets to the end of the chain. Corrected chain.png

All of this is made even more difficult because there are thousands or millions of nodes on a popular network like the Bitcoin network. And the only way to do it is to gain access to more than 50% of the network and that too in a matter of seconds. This makes it nearly impossible to hijack a blockchain network.

Summing Up

This post, therefore, gives us an insight into how the network is secured and what it takes to be able to hijack a network. Which in itself is also pretty impossible.

Thanks for reading and see you in the next one!

Did you find this article valuable?

Support Arpan Pandey by becoming a sponsor. Any amount is appreciated!

See recent sponsors Learn more about Hashnode Sponsors
 
Share this