SteemitCryptoAcademy: Consensus Algorithms@ alphafx

in SteemitCryptoAcademy4 years ago (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:  
 4 years ago 

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 :)

 4 years ago 

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

 4 years ago 

Hello sir here is my entry

 4 years ago 

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

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 97950.42
ETH 3343.35
USDT 1.00
SBD 3.04