IPFVCS - a VCS (version control system) using IPFS!

Thanks to this friendo I’ve met this book, but it wasn’t until this page that I had a inspiration. Understanding how a VCS’ filesystem works, specifically Git’s content-addressable approach (do you remember IPFS?), made me inspired (and brave enough) to start building my own VCS where the objects hashes (and commit hashes as well) are made with IPFS!
(PS: well, not just that what inspired me, but also my frustrations with Git’s deduplication approach).

Here is IPFVCS’ repo: GitHub - 01VCS/ipfvcs: [WIP] Test VCS using IPFS for object hashes! Should focus heavily on file deduplication and inspire on the work of the Pijul VCS (pull requests are very welcome, hope you surpass me as the lead)

After cloning it, you can test by running “./ipfvcs init” then “./ipfvcs hash-object testfile.txt -w”. Now the next step will be to explore the .ipfvcs/objects folder and try to believe your eyes!

So, the basic file system is somewhat okay (basic comitting and deduplication isn’t yet a thing)

Hope you enjoy it!

There’s a more mature witchcraft by me: GitHub - 01VCS/01: Git, on steroids. Layer2 for git, ready for the Web 3.0 (with it you can replace git by a wrapper that may power it up - but use it at your sole responsibility)

2 Likes

I’m open to (and will need) some feedback!

Question:

Will using IPFS’ hashing/CIDv0 (Qm…) make it waaay slower than git?

Make sure to have a look at IPLD(https://ipld.io), as they worked on representing Git objects within the IPFS ecosystem.

IIRC, the problem was for objects of more than 1Mb, as go-ipfs wouldn’t transfer that by default. But now that PL is encouraging to create more diverse or specialised implementations, you could have one that follow different rules and use different defaults for libp2p. I think the rationale in go-libp2p was to mitigate Dos attacks by limiting to 1Mb the size of blocks by default meaning the amount of bad data you ingest before realising that it doesn’t match the requested CID.

Maybe you can massively raise the limit for the prototype, then find a strategy to mitigate the problem for you (big limits, user prompt when above limit, raising limit when remote peer behave correctly, accept onjects signed by trusted keys, etc).

I think git over IPFS worked well for object below 1Mb though.

It may have been this: GitHub - ipld/js-ipld-git

2 Likes