Good day and welcome to another class again, last time around, we seemed to enjoy the class as there were a lot of assignment entries, and the average score was good, today we hope for even better.
Today, I want to talk about the brains of blockchain technology, CONSENSUS ALGORITHM.
What Are Consensus Algorithm?
I want us to take a little trip to a few weeks back when I taught blockchain Platforms, I mentioned the types of consensus algorithms used by nodes on a blockchain to confirm the transactions, and validate blocks. These consensus systems have also been used as a reward system for the nodes.
To break it down properly, I will take the words one by one. According to Wikipedia The word consensus comes from Latin meaning "agreement, accord", which in turn comes from consentire, meaning "feel together". Its meaning and usage relate to both a generally accepted opinion, and the conclusion of a decision based on collective agreement. Both the process and outcome of consensus decision-making are referred to as consensus.
Algorithm on the other hand as is a mathematical term. Wikipedia says; In mathematics and computer science, an algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation.
From all these, we can deduce that Consensus Algorithm is a sequence of well implemented codes, amongst nodes, used to maintain the integrity of data in the blockchain. This algorithm confirms transactions, creates and confirms blocks, and is used to keep the nodes in check. It is also used as a reward system for the nodes.
There are 3 main types, Now let us talk about the types.
Types Of Consensus Algorithms
This is a consensus algorithm that requires miners to use significant amount of computer power to deter malicious cyber activities. The Proof-of-Work is a system of mining, which involves solving puzzles to validate a transaction and create a new block. The miners are rewarded for being the first to solve the puzzle with some crypto. This also serves as a way to mint and circulate the coins.
Due to the randomness of the winners, the computing power needed and the expenses, miners create pools, and combine efforts so as to share profits
This system is strict, even the most minute change in the transaction invalidates the hash.
Proof of work in simple steps;
Transactions are made different locales, randomly
These transactions are then grouped together to form a block
Miners validate the transactions within the block
Puzzles, called proof-of-work problems are solved during this process
Miners race to solve the puzzler first. The winner gets a reward
Valid transactions are recorded on the blockchain
Top Projects that use the PoW
|Bitcoin Cash||SHA256||10 minutes|
|Ethereum Classic||Ethash||13 secs|
|Bitcoin SV||SHA256||10 minutes|
Proof Of Stake (PoS)
This system puts the mining power into the hands of holders of the coin. The PoS was invented to solve a lot of problems faced by the PoW. For example the power used to verify bitcoin transactions could power houses for days. This is addressed by PoS since it delegates mining power based on the portfolio of each miner. This means less activity since miners are limited to the capacity of their portfolio. This method is also safer, because to perform a malicious attack, you'll have to own 51% of the coins.
Top Projects Using PoS
|Binance Coin||~ 12.5 minutes|
The Proof-of-Stake has many
Delegated Proof-of-Stake (DPoS)
In this system, certain "witnesses" are selected from people who hold the coins, they are charged with making blocks. Selection of witnesses is like a stakeholder meeting, users of the system come together to vote in witnesses, these stakeholders get voting power, according to their stake just like we do on steemit.
Witnesses are voted in to oversee the blockchain and maintain functionality, also effect changes if need be. Witnesses are in charge of block production and transaction validation, they are paid with transaction fees. They also keep each other in check.
Block validators/delegates in DPoS are major nodes who vet the blocks created by witnesses and ensure they follow all consensus rules. They govern over matters like transaction fees, payment of witnesses, and block intervals and block sizes of the network. Delegates are not paid.
Top Projects on DPoS
|Witnesses are voted by users, to create blocks||Users create blocks based on their stake|
|Eos, Steem, tron||BNB, NEO, Cosmos|
Proof-of-Work Vs Proof-of-Stake
|Puzzles are solved to create blocks||Blocks are created by users chosen based on their stake|
|To add malware, the hacker has to have a computer stronger than those of 51% of the network||You need to own 51% of the tokens to add a malicious block|
|Miners are given rewards||Miners take the transaction fee|
Hybrids & Special Algorithms
Some consensus algorithms are built customized for their respective blockchains. These are numerous, probably uncountable, and I'm going to talk about some
Proof-of-Activity (PoW + PoS = PoA)
The PoAtried to combine the best features of PoW and the PoS systems. The initial stage of the mining process models after the PoW, competition between miners and powerful computers to find a new block.Once this is achieved, it takes the PoS, the new block carries only the miner's address and a header. A new set of delegates are randomly chosen, according to their stake on the network to validate these new blocks. Decred is an example of a popular project that uses PoA
This is a mining mechanism where instead of power being burned, coin is mined based on original content creation and participation. Steemit uses this reward system, alongside the DPoS. According to the steem bluepaper, coins are mined one block every three seconds and these coins are shared according to pre-determined rules amongst witnesses, curators, content creators, who compete for these tokens. The competition here is not similar to the Proof-of-Work system, where miners burn away energy to win, rather these competitors compete by adding value to the steem blockchain.
I hope we all understand now how consensus and mining work hand in hand. I would have loved to talk about the SCP for stellar but it is very extensive, and if you'd like it to be taught next, indicate in the comment section. Have a great week
Write on any of these consensus algorithms extensively
- Stellar Consensus Protocol
- Proof of Capacity
- Proof of Burn
- Proof of Elapsed Time
Post Homeworks in in the community Steemit Crypto Academy.
PLAGIARISM is not right, ensure to avoid it. make sure images are copyright free, original images are better.
Post Requires a minimum of 300 words.
Submit Homework task on or before 15th may 2021.
make sure to use #alphafx-s2week5
Users who are powering down will not be voted, take note!
@steemcurator02 will only consider voting homework posts from users with reputation 50 or above, and SP 100 and above