SteemitCryptoAcademy: Consensus Algorithms@ alphafx
Greetings
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.[2] 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
Proof-Of-Work (PoW)
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
Project | Algorithm | Block Time |
---|---|---|
Bitcoin | SHA256 | 10 minutes |
Ethereum | Ethash | ~14 seconds |
Dogecoin | Scrypt | 60 Seconds |
Bitcoin Cash | SHA256 | 10 minutes |
Litecoin | Scrypt | ~2.5 minutes |
Ethereum Classic | Ethash | 13 secs |
Monero | CryptoNight | 120 seconds |
Bitcoin SV | SHA256 | 10 minutes |
DASH | X11 | ~2.6 minutes |
Zcash | Equihash | 2.5 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
Project | Block Time |
---|---|
Binance Coin | ~ 12.5 minutes |
Cardano | 20 secs |
Polkadot | 6 secs |
Stellar | ~6 secs |
Neo | ~15 secs |
Cosmos | ~6 secs |
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
Project | Block Time |
---|---|
Tron | ~3 seconds |
EOS | 500ms |
Tezos | 1 minute |
Lisk | ~10 seconds |
Ark | 8 seconds |
Comparisons
DPoS | PoS |
---|---|
Witnesses are voted by users, to create blocks | Users create blocks based on their stake |
faster | slower |
Eos, Steem, tron | BNB, NEO, Cosmos |
Proof-of-Work Vs Proof-of-Stake
PoS | DPoS |
---|---|
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
Proof-of-Brain
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.
Conclusion
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
Assignment
Write on any of these consensus algorithms extensively
- Stellar Consensus Protocol
- Proof of Capacity
- Proof of Burn
- Proof of Elapsed Time
Rules
Post Homeworks in in the community Steemit Crypto Academy.
For Homework Task, add tag #consensusalgorithm, #alphafx-s2week5, and #cryptoacademy in the first 3 tags. Also, tag me as @alphafx somewhere in the post.
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
I loved the content very formidable thanks for sharing your experience with all of us students I am going to do the homework I liked it very much.
Hello, @alphafx
you have done a great job, I really appreciate you on delivering this leture as I have learnt a lot, for example, you explained well this,
I am waiting for your coming lecture about SCP Stellar axniously
Thank you very much for this.
steam is much better :)
Hello professor.
This is my link
https://steemit.com/hive-108451/@jessica999/crypto-academy-season-2-week-13-for-alphafx
Saludos estimado profesor salto mi tarea y no la corrigio aquí está el enlace Gracias de antemano 🙏
https://steemit.com/hive-108451/@florni/tarea-protocolo-de-consenso-para-la-plataforma-estellar-scp-florni
https://steemit.com/hive-108451/@kingcent/steemcryptoacademy-week13-home-work-post-for-alphafx
Hello professor @alphafx this is my homework task..
My homework post....https://steemit.com/hive-108451/@gboye1/steemit-crypto-academy-season-2-week-5-or-homework-post-for-alphafx-or-consensus-algorithms
Dear Professor @alphafx kindly review my post it is four days old. Thank you sir
Hello sir here is my entry
Link to my post
https://steemit.com/hive-108451/@drqamu/crypto-academy-week-13-homework-task-for-alphafx-comsensus-algorithms
Hello Prof, can i write on two or three of those consensus algorithms in different posts... Is it allowed?
No way
No, any of these....just 1