The Blockchain And Its Algorithm

Episode 02.

Someshwaran M
The Capital
Published in
6 min readAug 3, 2019

--

The Proof of Work is an algorithm which is used by cryptocurrencies like Bitcoin. In this episode, I have explained about the algorithms used in Blockchain technology and would be explaining the concept of Proof of Work algorithm in detail.

Click here to listen to my latest podcast on “The Blockchain and its Algorithms “— Episode Two.

Hi there, welcome back to my channel, this is Emerging geek and I’m somesh who’d love to speak about gadgets and technology which helps to transform our lives. Today, I have a gotta very interesting topic to speak about. Every day I see a new Blockchain technology emerging in our midst. No matter how much we try to grasp the latest technology, they always have something new to offer to the table. Ever wondered? what are the roots of all these Blockchain technologies are? I’d say the algorithms are the primary roots of all these revolutionary Blockchain techs.

As I said in the previous episode of the Blockchain, I’m gonna speak about the algorithms which are playing an immutable role in the Blockchain technology. Also, those who have not listened or read through my previous episode of Blockchain, I’d strongly recommend them to check those for a basic introduction of Blockchain. So without any further ado, let’s get started.

Starting with What is an Algorithm?

An algorithm is a set of rules or workflows which you’d need to follow to get the desired results.

For example, let’s say you’d need to cook pasta, so you’d need to boil the water first to make sure the pasta doesn’t stick together. And, add salt to the water to improve the flavor of the pasta. Then, add pasta to it and stir it slightly. Add other ingredients as well and finally drain the pasta. So this is called an algorithm. In the real world, an algorithm tells the user about the next step. Hope you got a basic idea about what is an algorithm.

Have you ever wondered the Blockchain network facilitates millions and millions of people in the same space? but, how come they never interfere with one another?

To provide a better solution for this, we’d need to understand the concepts of the consensus algorithm which is the primary underlying architecture of the Blockchain technology.

What is Consensus Algorithm?

As the name signifies, the consensus algorithm is a so-called general agreement algorithm! It is a decision-making process for a group, where individuals of the group construct and support the decision which works best for the group.

For example, let’s imagine, your papa is likely to purchase a 10000 dollar car but you eventually want him to purchase a much more expensive car than that. The majority of your family is fine with your papa’s decision as they think the papa decision is good for the family but you’d need to deal with papa’s decision whether you liked it or not. However, it’s always a win for the family. This is how a consensus algorithm work.

It’s a resolution where participants need to support the majority decision, whether they liked it or not.

What are the Types of Consensus Algorithms in Blockchain?

To dive deeper into this topic, there are about 14 types of consensus algorithm which are established as of now.

And the famous one would be the Proof of Work and Proof of Stake algorithm.

Let’s see what is Proof of Work in this episode!!!

A Proof of Work is a piece of data which is difficult and time-consuming to produce but easy for others to verify and also, it satisfies a certain set of requirements.

Let’s say, a teacher provides a complex mathematical problem to a bunch of students in a class and the topper of the class would be able to solve the problem by investing a set of rules and formulae and he/ she’d publish this Proof of Work to others for verification.

Producing Proof of Work can be a random process with a low probability that includes a lot of trial and error processes. Likewise, Bitcoin uses a typical system for its Proof of Work which is called Hashcash.

Hashcash is used in Bitcoin for block generation. In order for a block to be accepted by network participants, bitcoin miners must complete a Proof of Work which covers all of the data in the block. The difficulty of the Proof of Work gets fluctuated based on the rate of the new block which is generated in every 10 minutes.

Due to the very low probability of successful generation, this makes it unpredictable which miner in the network will be able to generate the next block. And, this generation of the new block solely depends on the computational power of the computer.

For a block to be valid it must hash to a value less than the current target value; here, a new block should have a hash value 5 so the previous hash value might be 4 or less than 5. this means that each block indicates that work has been done generating it. Each block contains the hash of the previous block, thus each block has a chain of blocks that together contain a large amount of work. Changing a block in the middle requires redoing the whole work again and which is certainly impossible. This is how this algorithm protects the Blockchain from tampering.

Algorithms inform the miners how to go about validating a block. They establish conditions but these are fundamental, and there is a desired outcome for those conditions.

Since the introduction of Blockchain and the Bitcoin in 2009 by Satoshi Nakamoto, many algorithms have been established. Additional algorithms are continuously developed which also aim to solve the faults of existing algorithms like the Proof-of-Work (PoW) algorithm system. Proof-of-Work and Proof-of-Stake are both existing Consensus algorithms. They allow all blockchain nodes to agree and also prevent double-spending.

Also, You Must Be Wondering Why Can’t Hackers Hack The Blockchain Technology?

One of the biggest reason would be the Proof of Work algorithm as it offers a fair amount of difficulty to resist hacking and to solve the puzzle, the hacker needs to spend a whole lot of time and eventually a hacker would need a superior computational machine to solve the puzzle and the cost of the superior machine would be very expensive. This might be one of the biggest reason that Blockchain has much tolerance towards hacking.

Is Proof of Work A Perfect Algorithm for Blockchain?

Not all the algorithms are perfect, This applies to Proof of Work as well. It has a lot of pros as well as a lot of cons. To compensate the drawbacks of Proof of Work, there is an alternate algorithm which was proposed and established which is called Proof of Stake. So let’s see about the Proof of Stake in my next episode. That’s it for today…..

And, Before signing off, I’d like to inform y’all that I’m gonna run a series of episodes on the Blockchain technology so please feel free to drop your reviews and feedback so that I’d able to organize my content. Hope you had some great fun. see you soon. Until then signing of Somesh. Have a great day ahead! Cheers.

--

--

Someshwaran M
The Capital

I am an Open-Source Enthusiast. I learned a lot from the Open-Source community and I love how collaboration, knowledge sharing happens through Open-Source!