This document discusses representing blockchains as graphs to enable analysis and security applications. It describes blockchains as having three main layers that can be modeled as graphs:
1) The peer-to-peer network as a graph of nodes and connections.
2) Each node's ledger as a graph showing the evolution of closed and open ledgers over time.
3) Transactions within ledgers as a graph of accounts and transactions between them.
It then provides an example use case of monitoring server security logs as a temporal graph to detect tampering by comparing graphs using similarity measures like SimRank.
2. About me Roles
• CTO and Cofounder of DZee Solutions Inc.
DZee Solutions is a health care fintech startup
• CTO – Apps Consultants Inc.
Apps Consultants is a consulting organization helping companies
use technology more effectively to create business value.
• Currently consulting with Dish Networks, within
their Enterprise Data Science team.
Interests
• Technology and Tools and the problems they can solve
Personal Philosophy
• Focusing on Problem Formulation and Framing by
closer examination and asking more questions
3. Audience
Interests
How many of you have an interest
primarily in Graphs?
How many of you have Expertise in
Graphs?
How many of you have an interest
primarily in BlockChain?
How many of you have expertise or
considerable exposure to Blockchain?
4. Why?
Graphs
• By 2022, at least one innovative business built on blockchain
technology will be worth $10 billion.
• By 2025, the business value added by blockchain will grow
to slightly over $176 billion, then surge to exceed $3.1 trillion
by 2030
• By 2030, 30% of the global customer base will be made up of
things, and those things will use blockchain as a foundational
technology with which to conduct commercial activity.
Blockchain
7. Blockchain Overview
• Public Ledger consisting of completed blocks
• Stored as a distributed database on a peer to peer network
• Ledger stores transactions between participants identified by their public keys
• Uses hashing extensively.
8. Blockchain (Graph)Components
Peer to Peer Network Ledger Transactions Merkle Trees
The p2p network can be
represented as a graph
where nodes refer to
computers and the links
indicate network
connections.
The network will evolve over
time so an additional time
node can show how the
graph evolves over time
Each node in the p2p
network has a closed ledger
as well as a set of
transactions that are yet to
make into the ledger.
Adding time nodes to the
graph can help us track the
evolution of the ledgers over
time.
The ledger itself has
transactions and the
transactions can be
represented as a graph
where the nodes represent
the public key identities
Merkle trees are used to
determine if a particular
digital asset has changed and
can be represented as a tree
of hash pointers.
Merkle trees evolve over time
and the evolution over time
can be captured efficiently in
a graph.
9. P2P Graph
Layer 1 – Network of Nodes
Distributed ledger stored on a network of nodes with each node having a copy of the distributed ledger.
Time – T1 Time – T2 Time – T3 Analytics
• Nodes most frequent
• Size of the network
• Speed at which the links are established
• Network Growth rate
Applications
• Stress testing block chain applications
• Determining network latencies
• Security and intrusion testing
10. Ledger Graph
Layer 2 – Network of Ledger states
Each node will have a closed ledger with the chained blocks and an open ledger of transactions that have not
made it into the block.
Time – t1
Node1
Node2
Node4
Node3
Node5
Node7
Node6
CL1 OL1
CL1 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL1
CL2 OL2
Time – t2
Node1
Node2
Node4
Node3
Node5
Node7
Node6
CL1 OL1
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL1
CL2 OL2
Time – t3
Node1
Node2
Node4
Node3
Node5
Node7
Node6
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 OL2
CL2 – Closed Ledger: State2
OL2 – Open Ledger: State 2
CL1 – Closed Ledger: State1
OL1 – Open Ledger: State 1
Analytics
• Rate of the state change
• Analytics on State properties
Applications
• Stress testing block chain applications
• Analyzing impact of network latencies
• Security and intrusion testing
11. Transaction Graph
Layer 3 – Transaction Graph
When we look within the ledger, we see a set of accounts/public keys and transactions that occur between
these accounts
Closed Ledger: State1
7 8
1
24
3
56
Closed Ledger: State2
7 8
1
24
3
56
9
Closed Ledger: State3
7 8
1
2
4
3
56
9
10
Analytics
• New participants
• Transaction patterns
Applications
• De-anonymizing the nodes
• Grouping the nodes
13. Security Log Monitoring
1
Monitor Server Security
Logs
2
Ensure that the security
log is not tampered with
3
Alert when the security
log gets tampered with
14. Server Security Log – Over Time
Time – t1 Time – t2 Time – t3
Xxxxx xxxxx xxxxx
Xxxxx xxxxx xxxxx
H1 H2 H3
H4 H5 H6
Xxxxx xxxxx xxxxx
Xxxxx xxxxx xxxxx
Xxxx xxxx
H1 H2 H3 H4
H5 H6
Xxxxx abcxx xxxxx
Xxxxx xxxxx xxxxx
Xxxx xxxx xxxx xxxx
H7 H8
H1 H2 H3 H4 H5 H6
H12 H56H34
Ha Hb
Ht1
H7 H8H1 H2 H3 H4 H5 H6
H12 H56H34
Ha Hb
Hab
H78
Hc
Hbc
Ht2
H1 H2’ H3 H4
H5 H6 H7 H8
H7 H8H1 H2' H3 H4 H5 H6
H12' H56H34
Ha’ Hb
Hab’
H78
Hc
Hbc
Ht3'
15. H1 H2 H3 H4 H5 H6
H7 H8
H12 H56H34
Ha Hb
Ht1
H1 H2 H3 H4 H5 H6
H12 H56H34
Ha Hb
Hab
H78
Hc
Hbc
Ht2
H7 H8H1 H2' H3 H4 H5 H6
H12' H56H34
Ha’ Hb
Hab’
H78
Hc
Hbc
Ht3'
t1 t2 t3Next Next
Temporal Graph of the Merkle Tree
SimRank can be used to measure the similarity between Graphs efficiently and we will see that the differences in t2 and t3 are
coming from changes to the leaf node H2.