O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)

385 visualizações

Publicada em

Consensus Algorithms
Dr. Svetlin Nakov at CryptoBlockCon - Las Vegas (11 Dec 2018)

In this talk the speaker Svetlin Nakov explains very briefly the concepts of decentralized consensus and blockchain consensus algorithms, along with examples from popular blockchain networks and DLT ledgers:

The concept of Byzantine Fault Tolerance (BFT)
The role of consensus algorithms in decentralized systems and blockchains
Proof-of-work consensus (PoW), mining, pools, hash power, ASIC mining, etc.
Proof-of-stake (PoS) and its variants: DPoS (delegated PoS), RPoS (randomized PoS), LPoS (leased PoS), PoI (proof of importance)
Practical Byzantine Fault Tolerance (PBFT) and FBA (federated byzantine agreement)
Proof-of-Authority (POA)
Non-blockchain consensus, asynchronous byzantine fault tolerance (aBFT) and Hashgraph

Publicada em: Educação
  • Seja o primeiro a comentar

Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)

  1. 1. BFT, Proof of Work, Proof of Stake, Delegated PoS, … Blockchain Consensus Algorithms Dr. Svetlin Nakov Co-Founder, Chief Training & Innovation @ Software University (SoftUni) http://nakov.com Software University (SoftUni) – http://softuni.org
  2. 2. Table of Contents 1. About the Speaker 2. What is Consensus Algorithm? 3. Byzantine Fault Tolerance (BFT) 4. Proof of Work (PoW) 5. Proof of Stake (PoS) 6. Delegated Proof of Stake (DPoS) 7. Asynchronous BFT (aBFT) 8. Other consensus algorithms 2
  3. 3.  Software engineer, trainer, entrepreneur, PhD, author of 15 books, blockchain expert  3 successful tech educational initiatives (100,000+ students) About Dr. Svetlin Nakov 3
  4. 4. Book "Practical Cryptography for Developers" 4 GitHub: github.com/nakov/pra ctical-cryptography- for-developers-book Book site: https://cryptobook. nakov.com
  5. 5.  Technical advisor @ LockChain / LockTrip: https://locktrip.com  Raised ~ 10.000 ETH in token sale (Sep-Nov 2017)  Currently LOC token holders book hotels @ 20-30% better price  Head of blockchain education (Jan-June 2018) @ Academy School of Blockchain: https://academytoken.com  Raised ~ 48M USD in token sale (Jan-Apr 2018)  Tech advisor for blockchain crypto startups:  Tokenize Exchange, Bountie, Weidex, IRIS Payments Solutions, Aeternity Ventures, FFQuest, Blockchain List Nakov – Blockchain & Crypto Projects 5
  6. 6. Blockchain List: blockchainlist.net 6 The largest marketing database for the blockchain / ICO industry
  7. 7. What is Consensus Algorithm?
  8. 8. Decentralized Systems 8 Peer-to-peer network (p2p) Decentralized (no owner, no central point of control) Consensus (all nodes hold the same state)
  9. 9. Blockchain == Chain of Data Blocks 9 timestamp block_hash all_transactions_hash transaction #1 hash transaction #2 hash transaction #3 hash … Block #0 (genesis block) prev_hash nonce timestamp block_hash all_transactions_hash transaction #1 hash transaction #2 hash transaction #3 hash … Block #1 prev_hash nonce timestamp block_hash all_transactions_hash transaction #1 hash transaction #2 hash transaction #3 hash … Block #2 prev_hash nonce Blockchain == p2p network, holding a synchronized chain of blocks (ledger)
  10. 10. Consensus Algorithms  Nodes in a decentralized system maintain a common state (the "ledger" in the blockchain networks)  Consensus algorithms (consensus protocols / consensus mechanisms) reach agreement among all nodes about the changes in the common state  Many approaches to achieve consensus, still there is no perfect solution:  Proof-of-work (PoW), Proof-of-stake (PoS), Delegated PoS, FBA, others 10
  11. 11. Byzantine Fault Tolerance (BFT)  Byzantine Fault Tolerance (BFT) means that a distributed system works properly under inconsistent failing behavior of some of its nodes  It might survive 33%, 50% or even more failing nodes  Byzantine faults are highly unpredictable:  Bad connectivity, conflicts, intentional attacks, …  Bad actors have incentive to misbehave / cause faults  Honest nodes should win the consensus process 11
  12. 12. Public Blockchains and BFT  Public blockchains / DLT are permissionless p2p networks:  Trustless environments: at any time, a node can join, leave, fail, misbehave or perform an attack  BFT is achieved by the underlying consensus protocol  Permissioned blockchains / DLT are less attacked  Still need to be Byzantine Fault-Tolerant (BFT) 12
  13. 13. Proof of Work (PoW) Consensus
  14. 14.  A "proof-of-work" (PoW) is a piece of data which is:  Difficult to produce, but easy for others to verify  Example: find x, such that SHA256(data + x) < target difficulty  In a PoW consensus the participant (miner) who first solves the PoW, build the next block and receives the block award  Participants in the consensus, called miners (typically in a mining pool) compete to find the lucky hash  Huge resources and energy are lost in the PoW competition Proof-of-Work (PoW) 14
  15. 15.  Bitcoin was the first blockchain based on proof-of-work  Initially miners used CPU, later GPU, finally ASIC hardware  Ethereum, Zcash, Monero, Litecoin, Dash use proof-of-work mining  ASIC miners == small number of big players == more centralization  Many hash algorithms (like ETHash) are designed to be ASIC-resistant  But soon or later become ASIC-minable (like ETHash and Equihash)  Proof-of-work systems are vulnerable to 51% attack  51% hash power  reverse transactions  double spend attack  Proof-of-work systems are slow  block time cannot be small Proof-of-Work Blockchain Systems 15
  16. 16. Proof of Stake Consensus
  17. 17.  Proof-of-stake  increase security + reduce resource wasting  Cardano, Qtum, Tron, Stratis, PIVX, LockTrip use classical PoS  The creator of the next block is chosen in combinations of deposited stake (wealth) and random selection  E.g. depositing 5% of the coins gives the chance to build (mine) 5% of the "Proof of Stake blocks" over the time  Executing a monopoly attack (like the 51% in PoW) is more expensive than in PoW systems  PoS can achieve better performance than PoW Proof of Stake (PoS) Consensus 17
  18. 18. Delegated Proof of Stake (DPoS)
  19. 19.  Large groups of nodes achieve consensus slower  E.g. 10.000 nodes cannot sync immediately due to network latency limitations  Small groups of nodes achieve consensus faster  But the consensus is more centralized (depends on less participants)  Democracy: vote & elect a small number of representatives  The "democracy problem": people with much resources (money, media, marketing, PR, etc.) have more decision power Number of Nodes & Consensus 19
  20. 20.  Stakeholders vote for delegates in a democratic way  Votes weight is proportional to the wallet's stake in the network  Delegates generate new blocks (like the miners in PoW)  Validate transactions and take the fees as profit  Very fast confirmation of transactions (< 1 sec)  Examples: EOS (0.5 sec block time, 21 delegates), BitShares, Ark  DPoS trades more centralization for better performance  One of the fastest and proven algorithms (millions TPS) Delegated Proof of Stake (DPoS) 20
  21. 21. Other Consensus Protocols
  22. 22.  Federated Byzantine Agreement (FBA) consensus  Fast, trustless, secure consensus algorithm, used in Stellar, based on quorums and quorum slices  No mining, no staking, no 51% attack  Local agreement: nodes agree with their quorum slices (groups)  Quorum is set of nodes, representing all quorum slices  It achieves global agreement (consensus) and finality  FBA has high throughput (thousands TPS)  ~ 4 secs. average processing time in the Stellar blockchain Federated Byzantine Agreement (FBA) 22
  23. 23.  Proof of Authority (PoA) – trusted nodes (notaries) create and validate blocks, like DPoS, but based on authority (+stake)  Leased Proof of Stake (LPoS) – similar to DPoS, with leasing  Randomized Proof of Stake (RPoS) – like DPoS but randomized  Proof of Importance (PoI) – like PoS but the chance to win the next block is based on staking + activity (transactions created)  Practical Byzantine Fault Tolerance (PBFT) – leader orders the transactions, everyone executes and votes; the majority wins  Proof of Elapsed Time (PoET) – uses randomization in the CPU Other Consensus Protocols 23
  24. 24.  Asynchronous Byzantine Fault Tolerance (aBFT) is extremely fast, still not widely adopted consensus algorithm (needs 2/3 honest nodes)  HashGraph is patented (but free to use) aBFT algorithm  Gossip about gossip: everyone knows what everyone else knows  Virtual voting – no voting because you how others will vote  HashGraph scales well with the number of transactions (500.000 TPS)  Does not scale well with the number of nodes in the network  For public blockchain delegation / sharding might be used  Hedera is building public blockchain + cryptocurrency (HBAR) Asynchronous BFT (aBFT) 24
  25. 25.  No perfect consensus algorithm  Each algorithms has pros and cons  The end of Proof of Work is coming slowly  Miners may switch to provide meaningful services  DPoS has great performance (both throughput and TPS)  Proven for public blockchains, currently handling billions  HashGraph is coming: extreme performance and security  Still not proven for public blockchain Conclusion 25
  26. 26. https://nakov.com Blockchain Consensus Algorithms

×