A Distributed Version Control System that can be navigated via a block explorer.
“IPLD is the data model of the content-addressable web.
It allows us to treat all hash-linked data structures as subsets of a unified information space, unifying all data models that link data with hashes as instances of IPLD” ~from https://ipld.io/
This discussion will touch upon IPLD (Interplanetary Linked Data),
which is an open source project from the IPFS (Interplanetary File System)
Community. Specifically, we will explore its use case for Git, a distributed
version control system.
Firstly, one of the major facets of the definition of Web3.0 is the idea of a content-addressable storage (CAS). The idea behind content addressing is to retrieve the resource based on the contents of the file rather than its location.
In the traditional internet we view resources and websites through their associated URL which serve as names that the Domain Name Service (DNS) maps to the IP addresses so that the browser can serve users the content.
Figure 1: Simplified View of DNS
With CAS, it is rather the composition of the file that is hashed, with the corresponding hash serving as the address at which that resource can be retrieved. Naturally, it is impractical for users to search for resources by the hash, so there exists a decentralized naming service called IPNS (Interplanetary Naming Service). This operates as a web 3.0’s “DNS”.
In a hash-linked data structure, the data is stored as hashes that are connected to one another via a hierarchical tree model. This is however a general term, and there are a variety of different subtypes. A key specific instance for our discussion is the Merkle Tree.
This is the very same data structure that is pivotal to Bitcoin and Ethereum Block architecture. Building a Merkle tree works by hashing the smallest subset of your resource and then hashing all these pieces together up until everything forms a Root hash. Following the example figure demonstrates this below:
Figure 2: Merkle Tree Example
Note here I have purposefully done an example where the number of components is uneven. In this case the odd number kitty is hashed against the same hash. This is because Merkle Trees are binary data structures,
where each level hashes an even number of items.
How Does Git Fit the Picture?
Both Git and Blockchains are chains of blocks linked together by hashes.
Git itself also utilizes the Merkle tree structure. This is why commits and other operations have associated hashes. In both cases data integrity is preserved. Of course, a blockchain offers a lot more than a version control
system, most notably, a distributed consensus component.
Through IPLD, the IPLD graph houses git objects which can then be traversed. This allows for the use case of traversing timestamped commits, akin to how once can do so for blocks on a blockchain. Subsequently you can view the commit from the explorer. Normally commits are mutable in a regular DVCS (Distributed Version Control System), however a blockchain commit would be technically immutable, in the sense that the hash would remain on the blockchain.
Figure 3: Screenshot of a Git Repo on the IPLD Explorer
This discussion has centered around IPLD as a distribution tool for Git, as it is a currently maintained and active project. Please see the relevant Github link from the project repo for more information.
There are other projects, for further exploration please see here.
Thanks for your time and I hope this article was useful to you.