As a software developer diving into the world of distributed ledger technology (DLT) , I initially found myself tripping over terms like “DAG” & “Merkle Tree”.

Directed Acyclic Graph (DAG):

Let’s imagine a roadmap without loops, where we can not get stuck going in circles.
That is essentially a Directed Acyclic Graph.
In graph theory, the intersections where lines meet are called vertices, and the connecting lines edges.
DAGs come in handy for modelling complex relationships between data pieces and various real-world systems.

 

Merkle Trees: Data efficiency & security

A Merkle Tree is a binary tree structure for efficient and secure data verification.
It condenses large data sets into a fixed-sized fingerprint, known as the root hash , without needing every single piece to rebuild the whole tree.

  • Each leaf node(the bottom layer) represents a block of data.

  • Every node above those leaves stores a hash, which is a unique fingerprint of the data below it.

  • The root node at the very top represents the fingerprint of the entire dataset.
     

    Alt text  

Blockchain Implementations
While traditional blockchains follow a linear structure, some utilize DAG.
The Ethereum blockchain leverages Merkle Trees to verify authenticity of transactions & blocks.
Specifically, it uses a variant called ‘Patricia Merkle Tree’ (or Patricia Trie) to efficiently verify smart contract states without storing the entire history , preventing bottlenecks.

For a coder’s perspective on Merkle Trees, read this article by @Haruxe

More about Patricia Merkle Trees in Ethereum here .