Shared on 5th Dec at SGInnovate with Swirlds Mance Harmon, Jordan Fried and Edgar Seah.
Hashgraph consensus, demo apps in Swirlds Java SDK, babble (unofficial golang implementation of Hashgraph) and their implications for distributed ledger technology.
4. A Short History of Computer Science
There are only 2 hard problems in computer science
5. A Short History of Computer Science
cache invalidation,
naming things; and
off-by-1 errors
6. Why Distributed Systems?
1. Foundation: for cloud computing
2. Scale: large data set
3. Live site: being fault tolerant when machines fail
4. Latency: no one likes to wait
5. Intelligence: insights from data to make good decisions
7. A Short History of Distributed Systems
There are only 2 hard problems in distributed systems
8. A Short History of Distributed Systems
2. Exactly-once delivery
1. Guaranteed order of messages
2. Exactly-once delivery
11. Allegory
Imagine that several divisions of the Byzantine army are camped outside
an enemy city, each division commanded by its own general. The
generals can communicate with one another only by messenger. After
observing the enemy, they must decide upon a common plan of action.
However, some of the generals may be traitors, trying to prevent the
loyal generals from reaching agreement. The generals must decide on
when to attack the city, but they need a strong majority of their army to
attack at the same time.
The generals must have an algorithm to guarantee that (a) all loyal
generals decide upon the same plan of action, and (b) a small number of
traitors cannot cause the loyal generals to adopt a bad plan. The loyal
generals will all do what the algorithm says they should, but the traitors
may do anything they wish. The algorithm must guarantee condition (a)
regardless of what the traitors do. The loyal generals should not only
reach agreement, but should agree upon a reasonable plan.
12. Consensus
1. Leader-based Systems: PBFT, Paxos, RAFT
(databases: Google’s Spanner, Apache Cassandra etc)
2. Proof-of-Work: bitcoin, ethereum
3. Proof-of-Stake (economy-based): Iota, Casper, Tezos, EOS
4. Voting-based systems: none, because no one likes to wait
5. Virtual voting: hashgraph, ABFT as a new and
mathematically provable approach?
as covered by Mance Harmon / Leemon Baird
14. Blockchain vs Hashgraph Consensus
1. Data Storage:
Blockchain data is stored in blocks (all transactions made
in a given period of time)
Hashgraph data is stored in events
2. Data Structure:
Blockchain - consensus on who has right to add block
Hashgraph - recorded as a graph of connections
3. Protocol:
Blockchain - mining (PoW) or PoS
Hashgraph - virtual voting
15. Virtual Voting
as covered by Mance Harmon / Leemon Baird and Paul Madsen
ref: https://medium.com/hashgraph/i-want-your-vote-oh-wait-i-already-know-it-e1faa50b31ad
16. Virtual Voting
1. Hashgraph is divided in rounds
Every time one event can connect >2/3 of the first events
of current round by more paths than 2/3 of the population.
(We say one node strongly sees another node)
2. Do we agree on data contained in the first row of events?
First few nodes of new round will vote to say if they will
agree on the data contained in the first row of events of
the preceding round. To do so, they just need to verify
that they are connected to these nodes.
17. Virtual Voting
3. Last stage is to collect the 3rd round node answers
Using 4th round nodes, strongly see the 3rd round node.
If one of the 4th round node succeed in collecting a super
majority (more than 2/3 of the population) of positive votes
upon the data in the 2nd round, then the consensus is
found.
18. Hashgraph as Code
• Design Overview (developer docs in diagrams)
• Swirlds SDK Demos (Java)
• Babble (golang implementation with batteries)
• [Optional] Experiments
• REST and websocket w/Swirlds SDK
• JavaFX desktop app
19. Design Overview
• SwirldMain
• SwirldState or SwirldState2
• Platform
• FastCopyable
• Browser and Console for visualisation
39. Babble (golang)
Caveats:
• This is an unofficial implementation
• There are no guarantees that the hashgraph ABFT is
properly or fully implemented
• You WILL need a license from Swirlds (the patent holder)
if you want to use this open source project on your
projects
41. Design Overview
• De-coupled architecture to facilitate language agnostic
implementation
• babble/main.go as example implementation
• uses docker to run a example test net and simple chat
demo
• Hashicorp’s terraform for deployment on AWS
48. Implications
• General purpose Hashgraph
(like Ethereum is a general purpose blockchain)
• Specific purpose Hashgraph
• missing gap in autonomous AI systems
• consortium solutions (super API system)
49. “AI” and Hashgraph
David Allen Cohen
ref: https://medium.com/hashgraph/ai-3-0-why-hashgraph-and-how-it-will-
revolutionize-blockchain-and-ai-86a6ef715c9f
50. “AI” and Hashgraph
While traditional blockchains such as that which underlies Bitcoin
have gained popularity, many have major scalability issues due to
external mining and its impact on transaction costs and in particular,
unsustainable energy costs expended in the transaction settlement
process.
Even so, there is a new category of what is called blockchain-free
cryptocurrencies that are designed for different domains that attempt
to remedy these scalability issues which use different forms of a
Directed Acyclic Graph (DAG) such as DAGCoin, IOTA for IoT
applications, ByteBall, and others that are emerging. While these may
have found suitable use cases, in evaluating these technologies, I
determined that none would meet all of my requirements (scalability,
speed, footprint, fault tolerance, cybersecurity, AI integration,
communications, etc for initial use in permissioned networks.
52. Fun Tech Projects?
• Gateway Server: REST API, websocket to Swirlds
• Desktop App: JavaFX to Swirlds SDK
• Gateway Server: REST API, websocket to Babble (golang)
• Hashgraph on RaspberryPi (Raspbian)?
• Hashgraph on Mobile?
• Hashgraph in Android?
• Swift port for iOS?
53. Interesting Questions?
• How would quantum computing, quantum cryptography
impact blockchain, hashgraph and various distributed
ledger technology?
54. Impactful Applications?
• Decentralised Deep Learning (e.g. anonymised medical
data for disease diagnosis/prediction)
• Peer-to-peer coordination (e.g. autonomous vehicle fleet,
drones, energy systems)
• Service transformation (e.g. cross jurisdiction, cross
agency systems for governments, municipalities and
cities)
• Financial services (e.g. remittance services, decentralised
stock exchange?)
58. Impactful Applications?
• containerisation technology for ports can be thought of as
a ‘standardised’ physical goods / supply chain system
• like app stores can be thought of as a ‘standardised’
distribution channel on mobile devices
• like docker can be thought of as a ‘standardised’
application deployment methodology
• SO, can distributed ledger technology be thought of as a
‘standardised’ data sharing methodology between
members in the shared world (consortium)?
60. Advertisement
• Deep Tech Nexus
(“AI”, cybersecurity, crypto etc)
• Invests in Deep Tech startups
• Invests in Med Tech startups
• Market Opportunities for portfolio
companies
• Talent Spotting for portfolio companies
ref: http://www.straitstimes.com/business/companies-markets/sginnovate-to-invest-in-20-deep-tech-startups
61. Advertisement
Are you a startup founder or a scientist/
engineer?
https://sginnovate.com/join-our-community
Apprenticeship program: pairing top tech
students to deep tech startups
https://sginnovate.com/apprenticeship
Opportunities in our portfolio companies?
http://bit.ly/sgitalent