Consensus algorithms: PoW & PoS

Image of Pexels at Pixabay
Image of tomwieden at Pixabay
I know these are technical concepts, however, I will try to make this post simpler and enjoyable
Introduction
PoW and PoS are not the acronyms used in Batman and Robin comic books to represent blows and punches. I can assure you that it was the first impression I had when I first saw them.
I'm sure many of you are familiar with these terms. However, they were not entirely clear to me until I decided to study them further. These words contain a very important concept within the world of blockchain and cryptocurrencies. That's why I decided to talk about them.
I think it is important to let the readers know the content of the post at the beginning so that they know not only the size of the post but also everything it covers, and obviously, don't bother reading and reading wondering when the post will end (Sometimes it happens to me, it's sad when it happens). This post will contain:
- Consensus algorithms
- Consensus mechanism Proof of Work (PoW)
- Consensus mechanism Proof of Stake (PoS)
- Differences between PoW and PoS
- Final Considerations
All right, let's get started then…
Consensus algorithms
As is well known, blockchain is a technology that allows information to be stored in a secure, transparent and indelible way. And its main characteristic is that it is copied in thousands of nodes of the network of networks. This makes it appear "impossible" to be destroyed since it is not stored in a single place.
Technically speaking, the blockchain is a set of blocks of information (usually made up of data and transactions) joined to each other, forming a chain. And as we all know, it is the infrastructure of the cryptocurrencies.

Source
So, what does the consensus algorithms have to do with all this? Well, as its name indicates, the consensus algorithm is a set of rules for a group of participants (the nodes) to reach a common agreement when performing a task (generating blocks). Obviously when we refer to the blockchain, then it is a set of rules and mathematical calculations that take care of 3 things: validation of authenticity, payment for the generation of a block and the frequency of block generation.
So, in short, the consensus algorithms are the methods to generate the blocks of the blockchain and to pay for them to those who generate them. And this payment is made with the cryptocurrencies corresponding to a given blockchain.
And this is where I want to get, both PoW and PoS are consensus algorithms, that is, is the method used to generate the famous blocks that make up the chain. So far so good.
Of course, as usual, there will always be some people that will say (accusatively): These are not the only existing consensus algorithms!. Obviously not. There are many more, which you (my dear reader) can see in the following image:

Source
Let's see why I only chose these two ...
Proof-of-Work consensus mechanism (PoW)

Image of Ryan McGuire at Pixabay
The mechanism or algorithm PoW or Proof-of-Work was the first algorithm launched by the famous Satoshi Nakamoto, master, lord, and creator of Bitcoin (By the way, nobody knows if it is a woman, man, extraterrestrial, Santa Claus?)
There are other blockchains that use PoW consensus mechanism, such as Litecoin and the very famous of all, the Ethereum blockchain. Maybe you are wondering: why Ethereum? I also thought that Ethereum didn't use PoW. Well, according to what I have researched is that the creator wants to change it to the PoS consensus method, but let's not get ahead of ourselves yet.
The PoW mechanism, as its name indicates, is done in the form of hard work, in the form of mathematical calculations, exerting each time an even greater effort than the previous one (like the effort that the poor man in the photo makes to be able to open the jar of pickles).
For this, the equipment or CPU of the nodes (or the miners, as they are called) that make up the blockchain must have a computing power powerful enough to generate the blocks. And constantly, they must increase their computing power. This results in more energy consumption. So much so that they even say they can consume as much energy as a small country could.
But the problem is that to receive a reward in this type of consensus mechanism, you must have a computing power powerful enough to compete with other miners since the one who will receive the reward will be the first to solve the mathematical problem, and therefore the one that can generate the block of information.
And to ensure the safety of the blocks, the complexity of the mathematical problem is constantly increasing. Do you see the vicious circle that is created? More computing power, more power consumption. Sometimes I wonder if the boom of crypto-mining in my country has contributed to the electrical problem that we have had since a few years ago (but I better not get into the subject because it would fall into political issues, God save me!).
For this reason, there are countries that prohibit this type of technology. Without taking into account the damage they do to the environment. But well, it's all about winning 1 BTC! Isn't that right?
The advantage of this mechanism is that it is difficult to attack it, as it would require a high power to create false blocks within it. In addition, each block contains encrypted (cipher) information of the block created previously, which chains the latter.
Generally, miners take about 10 minutes to create a block. This makes it difficult for the blockchain to scale or adapt to growth, i.e. their ability to work smoothly with increased transaction traffic.
It is said that Bitcoin can only perform 7 TPS (transactions per second) and Ethereum 15 (up to 20) TPS (Unbelievable, isn't it?).
That is why it is necessary to look for another consensus method that allows better use of resources and allows more transactions per second, maintaining the same security offered by PoW.
Let's continue then with PoS
Proof of Stake Consensus Mechanism (PoS)

Image ofOpenClipart-Vectors at Pixabay
The PoS mechanism or Proof-of-Stake, unlike PoW, the blocks are generated by those miners (these are actually called forgers and validators, I read about it somewhere) who have more cryptocurrencies, ie no longer need super powerful computing equipment and high energy consumers, the selection and validation of the blocks depend on the amount of cryptocurrencies that have the participants. It looks like an elitist approach, doesn't it?
In this process, the miners are chosen at random. However, in order to participate in the selection, they will have to deposit an amount of coins. Then a voting system will select the validator of the block. Blocks are created according to the number of coins in the forger's wallet. That is, if you have 15% of all coins, then you will be able to forge 15% of the new blocks.
Unlike PoW, where miners receive rewards for each mined block, forgers will only receive one fee for the transaction.
The creator of Ethereum, Vitalik Buterin (Yes! Looks like the name of a medicine with butter flavor) is planning, what is called in the crypto-sphere world, a hard fork to change the consensus mechanism of PoW for mechanism PoS. This Ethereum PoS protocol will be called Casper (Yes! Like the friendly ghost).
Casper will implement a series of measures to avoid malevolent forgers or validators, in which the punishment will usually be the removal of their entire balance of cryptocurrencies.

Image of jumpinjake at Pixabay
Another concept that appears as a result of this consensus mechanism is Masternode. Yes, it always brings to my mind that big granny's purse that besides being a mystery, contained everything to survive a nuclear apocalypse.
This technology, like PoS, has a participation of coins, that is, a wallet is created with a fixed amount of coins, which will be used to reject or validate blocks and transactions. Unlike PoS, Masternodes not always create blocks. A well-known system that uses this technology is Dash.
This is a small glance of the concept since it would take more than one post to explain the whole concept that embraces the Masternode technology. However, it is a technology that is very fashionable today and that is giving good dividends and future profitability.
Differences between PoW and PoS
Obviously, the high energy consumption and the excess of calculation that has PoW, is the main feature and at the same time main the difference with respect to the PoS mechanism.
Even though PoW is more secure and has its resource drawbacks, the problem is that it does not have scalability, i.e., it is a slower mechanism and is more expensive than PoS.
Another big difference between both mechanisms is that PoW creates crypto coins with each block that originates unlike PoS, who from the beginning already have a fixed amount of coins to work with, no crypto coins are created, and the chosen forgers only receive a fee for each transaction they make.
Final considerations
A problem that both protocols, perhaps more in one than in the other, is the centralization of nodes. The control of the blockchain would have it the manufacturers of miners, generally, this happens where the electricity is cheaper. There would be more miners in these places than in others. But that is in the case of the PoW consensus mechanism, however, the PoS could also suffer from this peculiarity as the power will be held by those who handle most of the money within this scheme. This would ruin the decentralized concept of the blockchain.
Perhaps I have overlooked the problem of the 51% attack on the PoW mechanism, where mining power could be controlled by one person or institution that handles 51% of the miners in the entire network. But this would be too expensive, so it would not be profitable for the attacker.
From my point of view, the concept of algorithms or consensus mechanisms has already become clear. Both PoW and PoS are responsible for creating the magic of blockchain and cryptocurrencies.
It is important to note that the developers of blockchain technologies are constantly working on improved consensus mechanisms, hybrids and correcting the flaws I presented in this post. Increasingly optimized, which will allow not only the scalability of the blockchain but also accelerate transactions per second. It will all attract the attention of large investors, which will facilitate the adoption of this technology as the world's most profitable financial method.
References
https://101blockchains.com/consensus-algorithms-blockchain/
https://www.liteforex.es/blog/for-professionals/que-es-algoritmo-de-consenso-pow-y-pos/
https://101blockchains.com/es/algoritmos-de-consenso-blockchain/
https://blockgeeks.com/guides/proof-of-work-vs-proof-of-stake/
https://hackernoon.com/consensus-mechanisms-explained-pow-vs-pos-89951c66ae10
https://blockgeeks.com/guides/ethereum-casper/
https://hackernoon.com/how-pow-pos-and-masternodes-work-together-for-your-privacy-7dffd4aa351f

Keep spreading the Blockchain and crypto love

#ph-venezuela
Our previous posts:
@jadams2k18 has set 1.500 STEEM bounty on this post!
Bounties are a new way you can earn rewards irrespective of you Steem Power. Go here to learn how bounties work.
Earn the bounty by commenting what you think the bounty creator wants to know from you.
Find more bounties here and become a bounty hunter.
Happy Rewards Hunting!
Great post dear @jadams2k18, I must confess that you made me feel like in a classroom, very well taken this lesson. I have read here today things that I did not particularly know honestly.
Nothing that we can check maybe, but it is logical what you write taking into account the rise of cryptocurrencies in our country and the alternative they represent for many Venezuelans.
Wooo, it is a big difference this energy consumption a real problem for some countries, I imagine the stres of those who do this work in Venezuela these days of so many failures.
Venezuela becomes an ideal land for this type of activity to be a country where people do not pay for electric power, logically today we live consequences, perhaps because of that.
I liked this publication a lot, every time I learn more about this. Thanks for sharing.
YOU DO IT VERY WELL! Beware of electrical faults hahaha.
Pr EV
Hello my fellow @fucho80
I'm glad you enjoyed my post.
Thank you very much!
But I'm learning to cope with this situation. When the light goes out, there is only silence that often we do not appreciate. Life as we know it, hurried and agitated, seems to stop. Which gives us time to meditate and take time for ourselves. Sometimes I find myself anxious that the electricity goes out. Call me crazy! hehehe
Extraordinary post. It is not easy to describe in a simple and accessible language for all, particularly for those who do not have a great knowledge of information technology and who are starting in the world of cryptocurrencies, these concepts that govern the blockchain technology and that in the current world are essential.
Regards!
@ Jadams2k18, My friend:
I just gave a reading to "flight of eagle" to this article.
I could not avoid the desire to comment before doing the detailed reading that corresponds to this article. Then I will give you a second comment.
But you tackled terms that I've always wanted and needed to clarify completely.
I am sure for the quality of your articles and that with this reading, I will finally be without doubt about it.
Thanks for sharing.
@jadams2k18, If we want to understand the Cryptocurrency Space and Blockchain Space we have to go through from the related concepts and good to see that you've deep dived into the POW and POS mechanisms. Keep up the great work.
Welcome and thank you.
@jadams2k18, these technology is very new and its application are just starting to be unfolded, but still it will take alot of time before the full capacity of blockchain consensus algorithms can be fully understand and be used for almost all application online.
It is also my opinion tru several readings that, many advantages are in the team of PoS, or the dPoS.
Any development on any of these are good to developers, now that the "decentralization" philosophy are now the battle cry of crypto adopters.
In the near future, we can fully, categorize which part of our life should be decentralized, and what should stay centralized in a more democratic manner.
Let us keep the discussion high, and the developers and computer scientist to be inspired on blockchain technology.
Hi @guruvaj!
That's true! The trend is towards better use of resources
By the way, a friend told me that he wanted to buy a mining machine. Actually, he was going to build it because one can integrate more video cards to improve the computer power of the machine. However, he told me that these machines had a short lifespan, one or two years at most.
I do not heard of PoW and PoS !
Miners and beef were the first impression I had when I first saw them. (because of the photo above)
After Read your article !
I know , I had seen the work of PoW and PoS. I just didn't know their names are called PoW and PoS.
Nowadays, many PoSs have appeared in a large number in recent years.
Perhaps is the demand for computing power is getting higher and higher, have Relationship !
In the past two years, many new PoSs have been vigorously promoted.
thank your Introduction.
Hi, @cloudblade!
Stake always sound to me like a succulent tasty thick steak. Yummy!
Apparently, that is the trend and when Mr. Buterin sets it in motion, surely the others will begin to be implemented (For the sake of our environment).
very interesting as you say both have there pros and cons. I have a question for you what if we used POW as a first layer to randomly select the available nodes to secure the blocks and then use POS to secure them, that way there is no chance of centralisation or that investing in a bigger node/stake/rig/mining pool can be mitigated while also maintaining the performance of the chain
Helloo @chekohler
You caught me off base (Me has agarrado fuera de base), is a phrase that we commonly use here, to indicate that by carelessness I have let myself make an OUT (baseball terms
What you're asking me is whether combining both protocols would ensure a better decentralization?
I don't know ...
Your approach sounds interesting, but it could be that the PoS mechanism works as follows: renting to the miners of the PoW. In this way, the pools would be chosen by means of a selection of those who have invested the most money. From that point of view, I still see the same case of centralization.
I'll keep an eye on your answer.
Nice post with understandable information supported by cool illustrations @jadams2k18 :)
It was a pleasure reading. Although I already have some basic knowledge about the various consensus algorithms it is good to explain the basic concepts of these algorithms for more general audience. Nice work my friend!
You're welcome :)
Hi @jadams2k18
Thanks for sharing memo. I have read the article and enjoyed reading. Such a nice write-up. Though I enjoyed but much technical so few things couldn't understand but that's learning for me.
Have a great time.
Posted using Partiko Android
Hello @alokkumar121, thanks for coming by ...
As I said to @sacra97, I'm just pumping the hood up, to see what's inside blockchain engine and the effects or collateral damage thereof.