SteemitCryptoAcademy: Consensus [email protected] alphafx

in SteemitCryptoAcademylast month (edited)

White and Green Modern Corporate Fashion Brand Guidelines Presentation (3).png

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.

image.png

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.

image.png

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

ProjectAlgorithmBlock Time
BitcoinSHA25610 minutes
EthereumEthash~14 seconds
DogecoinScrypt60 Seconds
Bitcoin CashSHA25610 minutes
LitecoinScrypt~2.5 minutes
Ethereum ClassicEthash13 secs
MoneroCryptoNight120 seconds
Bitcoin SVSHA25610 minutes
DASHX11~2.6 minutes
ZcashEquihash2.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

ProjectBlock Time
Binance Coin~ 12.5 minutes
Cardano20 secs
Polkadot6 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

ProjectBlock Time
Tron~3 seconds
EOS500ms
Tezos1 minute
Lisk~10 seconds
Ark8 seconds

image.png

Comparisons

DPoSPoS
Witnesses are voted by users, to create blocksUsers create blocks based on their stake
fasterslower
Eos, Steem, tronBNB, NEO, Cosmos

Proof-of-Work Vs Proof-of-Stake

PoSDPoS
Puzzles are solved to create blocksBlocks 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 networkYou need to own 51% of the tokens to add a malicious block
Miners are given rewardsMiners take the transaction fee

image.png

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.

image.png

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

image.png

Assignment

Write on any of these consensus algorithms extensively

  • Stellar Consensus Protocol
  • Proof of Capacity
  • Proof of Burn
  • Proof of Elapsed Time

image.png

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

Sort:  

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,

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 am waiting for your coming lecture about SCP Stellar axniously
Thank you very much for this.

steam is much better :)

The weekly assignment so to say is good.
My self a hoping and also working hard as one of steem slogan to met @steemcurator02 requirements.

Thank you.

i like your enthusiasm, keep the spirit up

A very interesting topic shared i've been exposed to new terms here that will boost my crypto skill well explained.

Continuing the class with the other subsequent topic it will be very helpful. Thanks

Wow. What a wonderful lecture.

THIS IS MY HOMEWORK LINK HERE

Hi Professor @alphafx thank you for today lecture post I have to learn in-depth about consensus algorithms and I really about to know about Stellar Consensus Protocol from you in next week, I have done home work post here I have tried to explain about PoB, PoC and PoET hope so you like my home work post. Crypto Academy Week 13 - Homework Post for @alphafx

Professor @alphafx I have updated my homework post within 12 hours of giving time period here is a link thanks. Crypto Academy Week 13 - Homework Post for @alphafx

I'd love you to teach on SCP for stella in coming class.

This is a link to my assignment:
https://steemit.com/hive-108451/@damzxyno/crypto-academy-week-13-homework-post-for-professor-alphafx

This is a link to my Twitter post: https://twitter.com/Damzxyno/status/1391809865102802957?s=19

Hello Prof, can i write on two or three of those consensus algorithms in different posts... Is it allowed?

No, any of these....just 1

@alphafx, can you please explain more about the assignment?
When you say "write on any of these" what do you mean?
What is the maximum and minimum question can a person answer?
Thank you

Answer just 1

Thank you very much.

Greetings professor @alphafx, here is my homework

hello @alphafx, reading your lecture made this topic look very easy. It was only when I started preparing my answer I got to know the depth of this topic.

Anyway I have given my best shot of penning down this article.
you can find my homework post here

Hello Professor @alphafx. Here is the link to my homework for the week. I must confess it was difficult and required a lot of research.

I chose Proof of Capacity, and as I learned during the research it is still not very widespread.

https://steemit.com/hive-108451/@allbert/crypto-academy-week-13-homework-post-for-alphafx-consensus-algorithms

Pls can I also do the homework I have a reputation 42

no, explore steemit, it is an unlimited world, it does not end in the academy

Hello professor @alphafx thanks for a brilliant lecture on Consensus algorithms. Here is my entry https://steemit.com/hive-108451/@meniya/crypto-academy-week-13-homework-post-for-professor-alphafx
Thank you

Hello dear sir, Here is my homework submission for this week.

https://steemit.com/hive-108451/@steemlover63/crypto-academy-week-13-homework-post-for-alphafx

Thanks a lot for such a great lecture.

Prof alphafx please it seems you skipped my home work post, @Chirich written 4 days ago

Hello teacher, I hope you are well, here I am attaching my homework for this week. Thank you very much for your time.

f57160446c72349cec5fea5687457be8181f38c5aef638cac9f70212c937d4d8.0.png

Hello sir here is my entry

Well crafted informative lecture. I learned a lot from it and from the homework task as well. Here is my homework task entry

Link here

Great lecture for this week. I think Yes you can lecture the SCP for stellar next week so we can have more knowledge about that too. Thank you for this week's lesson taught. @alphafx

Hello teacher, good night, I hope you are very well. here I leave my homework

hola profesor espero se encuentre bien me gustaria que por favor calificara mi tarea aqui se la dejo muchas gracias. homework

Hello Sir,
Hope you will be fit and fine.
Here I posted my Homework season 2 week 5.
https://steemit.com/hive-151613/@numanfarooq7677/crypto-academy-week-13-homework-post-for-alphafx

Hello professor @alphafx. Thanks for this very interesting lecture.
Here is the link to my homework
https://steemit.com/hive-108451/@obikay/crypto-academy-season2-week5-homework-post-for-alphafx-consensus-algorithm

Thank you

I will be happy to take part in this homework...will work hard to reach a reputation of 50