Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

dgit Architecture

Parth Oberoi edited this page Aug 27, 2020 · 1 revision

SmartWeave contract

Dgit will maintain the remote refs and other metadata of each user repository in a SmartWeave contract. Using SmartWeave contract will also help with the easy implementation of role-based access control. Here are a few of the possible contract actions.

  • setRef
  • getRef
  • deleteRef
  • addCollaborator
  • changeCollaboratorRole
  • removeCollaborator

git object store

All the git objects of each user repository will be stored in arweave permaweb as a data transaction with relevant tags for mapping with the user repositories. Packfile can be stored instead of individual git objects for better optimization. Also, the user can have the ability to compact the git objects to packfile for optimizing pull of large repositories.

git-remote-arweave

In order to work seamlessly with the existing git clients, you can use our git remote helper.
git-remote-arweave can get refs from the dgit-node and objects directly from arweave gateways.

PST

A small fee of 0.01Ar will be charged from the users for each git push. This fee will be distributed among the PST holders based on the token holder's share.

dgit nodes

Fetching the repository directory from arweave permaweb will add latency to the application. Even the execution of smartweave contract at the client-side will be highly inefficient. This problem can be tackled by introducing dgit nodes. dgit nodes can charge a transaction fee for their service. Fee will be applicable only for SmartWeave contract actions like updating remote ref of a repository during git push, etc.

Anyone can run their own dgit nodes as long as they have DGIT tokens to stake. Dgit nodes will be optimized to serve all client-side requests. It will also cache contract state.

dgit node maintainers will receive transaction fee apart from the PST fee. We will think on this more to fairly charge the dgit users and incentivise the PST holders and dgit node maintainers.

Staking

Dgit node maintainers need to purchase DGIT tokens and stake them to increase their reputation.

Reputation can be calculated by the following factors.

  • amount of token staked
  • lock-in period
  • balance

Slashing

In case of any malicious behaviour by any dgit node, DGIT DAO can vote to slash the node's stake.

Clone this wiki locally