*** Edureka Online Training: https://www.edureka.co ***
This edureka tutorial will give you a graphic representation of hashgraph and explain all parts of the gossip protocol being used including witness, fame, rounds, consensus timestamp.
Elevate Developer Efficiency & build GenAI Application with Amazon Q
What is Hashgraph? | Hashgraph Explained | Edureka
1.
2. The image that you see on the left, is a hashgraph.
Hashgraph is a Distributed Ledger Technology
developed by Leemon Baird, the co-founder and CTO of
Swirlds, in 2016.
MEMBERS
Alice Bob Carrol Dave
3. A B C D
Alice
Bob
Carrol
Dave
EVENT
Each event is a container for
zero or more transactions
along with some information
regarding the transaction
4. A B C D
1
2
3 4
Timestamp
and
Digital Signature
Transaction
Hash
EVENT
6. A B C D
1
2
3
4 WITNESS
ROUND
The first event that a member creates in each round
is called a witness. Lets colour Alice’s witnesses
yellow.
It is possible for a member to have no witnesses in
a given round.
Alice’s Witness
Bob’s Witness
Carrol’s Witness
Dave’s Witness
Every witness is defined by
its two properties i.e. a
witness can either be Famous
or Not-Famous
7. A B C D
1
2
3
4 FAME
ROUND
The fame of every witness of a round is decided
through a systematic voting process. If a witness of
the of the next round can see a certain witness
then it votes ‘yes’.
Let’s try and calculate B2’s Fame.
Alice’s Witness
Bob’s Witness
Carrol’s Witness
Dave’s Witness
Witness Vote
A3
B3
C3
D3
Yes
Yes
Yes
Yes
8. A B C D
1
2
3
4 Election
ROUND
All four witnesses voted YES, so we would expect
that B2 will be declared to be famous. But the
election isn’t over yet! An election isn’t over until
the votes are counted.
The votes will be counted by the witnesses in the
following round. So B4 will count the votes. And D4
will also count the votes.
Witness VoteA3
B3
C3
D3
Yes
Yes
Yes
Yes
B4 will collect the votes from every round-3 witness
that it strongly sees.
B4
A3
9. A B C D
1
2
3
4 Election
ROUND
All four witnesses voted YES, so we would expect
that B2 will be declared to be famous. But the
election isn’t over yet! An election isn’t over until
the votes are counted.
The votes will be counted by the witnesses in the
following round. So B4 will count the votes. And D4
will also count the votes.
Witness VoteA3
B3
C3
D3
Yes
Yes
Yes
Yes
B4 will collect the votes from every round-3 witness
that it strongly sees.
B4
A3
,B3
10. A B C D
1
2
3
4 Election
ROUND
All four witnesses voted YES, so we would expect
that B2 will be declared to be famous. But the
election isn’t over yet! An election isn’t over until
the votes are counted.
The votes will be counted by the witnesses in the
following round. So B4 will count the votes. And D4
will also count the votes.
Witness Vote
B3
C3
D3
Yes
Yes
Yes
Yes
B4 will collect the votes from every round-3 witness
that it strongly sees.
A3
A3B4 ,B3,C3 ,D3
Election Result: B2 is Famous
11. Election
Witness Vote
B3
C3
D3
Yes
Yes
Yes
Yes
A3
A3B4 ,B3,C3 ,D3
Election Result: B2 is Famous
A B C D
1
2
3
4
ROUND
Since the supermajority has voted that B2 is famous
let’s colour it yellow.
Now let’s calculate C2’s fame.
Election Result: C2 is Not Famous
Famous Witness A2, B2, D2, A1, B1, C1, D1
12. Rounds
A B C D
1
2
3
4
ROUND
We have now decided the fame of every witness in
round 2. Once a round has the fame decided for all
of its witnesses, it is possible to find the round
received and find the consensus timestamp for a
new set of events
Let’s start by considering the black event
immediately below A2
Famous Witness A2, B2, D2, A1, B1, C1, D1
Since the black event is seen by all of the famous
witnesses in round it is said to have a round
received of 2.
13. Timestamps
A B C D
1
2
3
4
ROUND
The consensus timestamp of the black event can be
found as follows:-
Famous Witness A2, B2, D2, A1, B1, C1, D1
Now consider the grey event below B2.
It is seen by B2, but not seen by A2 or D2. So it was
not seen by all the famous witnesses in round 2
Find the earliest event X by Alice that is an ancestor
of A2 and a descendent of the black event.
Similarly, find the earliest event Y by Bob that is an
ancestor of B2 and descendent of the black event.
And similarly for event Z by Dave.
14. Consensus Order
A B C D
1
2
3
4
ROUND
Continuing, we find consensus for the 6 black
events and the 4 dark green events. These are the
10 events that have a round received of 2.
Famous Witness A2, B2, D2, A1, B1, C1, D1
We need to sort these 10 events into an order that
all members will agree on. This agreed order is the
consensus order.
This is done by sorting them by round received.