Share
Embed
Distributed Ledger
VoxxedSG
June 17, 2018
Transcript
23 slides
-
! 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 -
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 -
1. CENTRALIZED TO DECENTRALIZED 2. CONSENSUS ALGORITHMS 3. RAFT 4.
PROOF OF WORK 5. HASHGRAPH 6. TAKE AWAYS/BENEFITS 7. DEMO AGENDA -
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) -
RAFT CONSENSUS ALGORITHM Leader Candidate D1 D1 D1 D1 Follower
Follower Follower Client -
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 -
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 -
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 -
PROOF OF WORK CONSENSUS ALGORITHM Node 1 P1 P1 P1
P1 P = P1? P = P1? P = P1? Node2 Node3 Node4 -
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 -
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 -
HASHGRAPH CONSENSUS ALGORITHM Node 1 Node 2 Node 3 Event
signed by Node1 D1 D1 D1 Timestamp Transactions Hash D1 D1 D1 D1 -
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. -
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 -
HOW TO GET STARTED? HASHGRAPH ! Download the swirlds jar
◦ https://www.swirlds.com/download/ ! Implement the apis ◦ SwirldMain ◦ SwirldState