Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Distributed Ledger

Distributed Ledger

VoxxedSG

June 17, 2018
Tweet

More Decks by VoxxedSG

Other Decks in Technology

Transcript

  1. ! Software developer ! Experience in distributed and dlt systems

    ! Started working with dlt in 2016, I had development experience with quite a few dlt systems like ethereum, hashgraph, bigchaindb Github: https://github.com/Minisha LinkedIn: www.linkedin.com/in/minisha-murugan-335ab821 Who am I? Self intro
  2. The goal of the presentation is to give u an

    idea of the consensus algorithm used in distributed, decentralised system. And you will also see the direction in which decentralised system architecture is moving towards. Goal
  3. 1. CENTRALIZED TO DECENTRALIZED 2. CONSENSUS ALGORITHMS 3. RAFT 4.

    PROOF OF WORK 5. HASHGRAPH 6. TAKE AWAYS/BENEFITS 7. DEMO AGENDA
  4. Paxos: Leslie Lamport, The part-time parliament, ACM Transactions on Computer

    Systems (TOCS), v.16 n.2, p.133-169, May 1998 [doi>10.1145/279227.279229] ! Leader based system - Raft ! Decentralised system - Proof of work ! Open consensus and permissioned governance - Hashgraph CONSENSUS ALGORITHMS AGREEING ON THE SAME APPLICATION STATE POW(1997) PAXOS (1998) Hashgraph (2017)
  5. RAFT - IN DECENTRALISED SETTING WHAT COULD GO WRONG? !

    Single node can easily take control of the cluster (n/2)+1 Tolerate 2 node failure ! Throughput is limited to one node
  6. PROOF OF WORK CONSENSUS ALGORITHM ! A proof-of-work (PoW) system

    is an economic measure to deter denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer. ! Computational puzzles were first invented to prevent spam emails by Cynthia Dwork and Mani Naor in 1992 ! In 1997 Adam Back invented hashcash with the proof of work algorithm to control spam ! SHA-256 output is effectively random, getting zero bits = same as flipping a coin and getting N heads in a row
  7. Proof of Work CONSENSUS ALGORITHM Voxxed Days = A735FD19A763971C74EF1 34BF5CC54BD7585FD3778

    B9ABEDB4B482F829ECAA9 ? 1 2 3 4 0A735FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 00735FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 00035FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 Hash 00005FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 00005FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 0 + 00005FD19A763971C74EF134BF5CC54BD7585FD3778B9ABEDB4B482F829ECAA9 00005FD19A763971C74EF1 34BF5CC54BD7585FD3778 B9ABEDB4B482F829ECAA9 4 Resultant string Nounce /Proof String Challenge String Sha-256
  8. PROOF OF WORK CONSENSUS ALGORITHM Node 1 P1 P1 P1

    P1 P = P1? P = P1? P = P1? Node2 Node3 Node4
  9. POW DRAWBACKS CONSENSUS ALGORITHM ! Time consuming ◦ 1 block

    in 10 mints ! Energy consuming ◦ Landauer’s principle: Any non-reversible computation must consume a minimum amount of energy (each bit changed required kT In 2 joules). Since sha-256 is not reversible energy consumption is inevitable ◦ Electricity consumed per transaction (KWh) 973 ! Not fair timestamp ◦ Miner decide on the timestamp for a transaction ! Secure over time ◦ Longest chain is the truth. ! 51% risk ◦ 2/3 of the nodes has to be honest https://digiconomist.net/bitcoin-energy-consumption
  10. Hedera Hashgraph Open consensus and permissioned governance ! Governing model

    ◦ 39 members(6 continents and 18 industries) ◦ 3 year term and max of 2 consecutive term ! Sharding
  11. HASHGRAPH CONSENSUS ALGORITHM Node 1 Node 2 Node 3 Event

    signed by Node1 D1 D1 D1 Timestamp Transactions Hash D1 D1 D1 D1
  12. BENEFITS Hedera in comparison to other public ledgers ! Leaderless

    system ◦ No Denial of Service Attack ! Fair timestamp ◦ The ordering will reflect the timestamp and the timestamp reflect the majority of the community ! Not energy consuming ! Fast ◦ It is limited only by the bandwidth. If each member has enough bandwidth to download and upload a given number of transactions per second, the system as a whole can handle close to that many.
  13. BENEFITS EVOLUTION OF CONSENSUS ALGORITHMS ! For a decentralised system

    to work, it has to be both secure and performant. ! To be performant in a system with million and millions of nodes, ideas like sharding could contribute significantly ! Some algorithm like hashgraph are already notable in maintaining both security and performance
  14. HOW TO GET STARTED? HASHGRAPH ! Download the swirlds jar

    ◦ https://www.swirlds.com/download/ ! Implement the apis ◦ SwirldMain ◦ SwirldState