Inspiration

A blockchain is a decentralized, distributed and public digital ledger that is used to record transactions across many computers so that any involved record cannot be altered retroactively, without the alteration of all subsequent blocks. This provides a natural use case of utilizing blockchain as a version control system for source code. This provides an environment in which the source code can be stored in transparent, shared databases, where they are protected from deletion, tampering, and revision. But wait, how do you manage to store large amounts of data on blockchain without spending millions. Read to find on!

What it does

The application provides a git-like command line utility to host private and public repositories on Ethereum Platform and InterPlanetary File System. The source code is stored off-the-chain on IPFS which is a distributed hypermedia sharing platform and the resulting meta-data (hash) is stored on the blockchain along with other information to retrieve it back later. Below are the commands implemented: gitc init/add/push/pull/clone

How I built it

Since it is really expensive (around $80k for 1GB) to store large files on the blockchain, we deployed a smart contract which stores the hash of the file stored on IPFS. InterPlanetary File System is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing hypermedia in a distributed file system.

Challenges I ran into

Programming smart contracts in Solidity and making use of it to store metadata of the files.

Accomplishments that I'm proud of

Conceptualizing the idea of storing the files using IPFS instead of Ethereum and see it run!

What's next for GitChain

Implementing remaining Git commands and add support for directories and multiple repositories.

Built With

  • ethereum
  • infura
  • ipfs
  • java
  • soldity
Share this project:

Updates