Skip to main content

Gitopia Architecture


Pending update. The architecture has changed since this article was written.

The main components of Gitopia are -

  • A Gitopia main chain built using the Cosmos-SDK. It handles app logic, access controls, and meta information related to git repository storage.
  • A Decentralized compute infrastructure which handles packfile processing and CI/CD.
  • A redundant data storage using Arweave Blockweave.
  • IBC interface for blockchains to tightly integrate their development workflows with Gitopia.

Gitopia architecture high level Diagram

Gitopia main-chain

The Gitopia main chain is an application-specific blockchain optimized for decentralized source code collaboration. It is built using Cosmos-SDK and will run on delegated-Proof-of-Stake (dPoS) based Byzantine Fault Tolerant (BFT) Tendermint consensus engine.

The Gitopia main chain will be interoperable with other chains via the Inter-Blockchain Communication Protocol(IBC).

The Gitopia main-chain will also be secured by a distributed set of Validators and the native Gitopia token, $LORE.

The main chain will be responsible for managing the application state and enforcing access controls. It will handle the following requirements -

  • User to address resolution
  • User, Organization, and Repository settings
  • Application workflows
  • Governance workflows
  • git references
  • Meta information related to git repository storage

Decentralized Compute Infrastructure

Git uses a smart protocol when transferring objects between git client and the server. It figures out which git objects are needed and compresses them into an optimized Packfile format, in order to transfer git objects efficiently during fetch or push. A decentralized variant cannot feature this optimization directly at the data layer, as data can be appended to the blockchain, but existing data cannot be optimized. Therefore, Gitopia requires a Decentralized Compute Infrastructure optimized to perform git operations and other CI/CD actions.

The Decentralized Compute Infrastructure will be responsible for the processing of the packfiles. The compute infrastructure will process these packfiles into:

  • A single packfile available for users to clone
  • A destructured packfile (i.e., git objects of the above single pack file available as loose git objects to serve the web app and lazy load the file browser view efficiently).

The decentralized compute infrastructure will also be responsible for -

  • CI/CD workflows
  • Code quality check
  • Unpacking git loose objects for optimized rendering at the web app

Redundant Permanent Storage Layer

The redundant storage layer will allow users to store their repository on other data stores for an extra layer of security. The users can use Arweave or any other data storage facility of their choice.

Arweave Gitopia IBC Bridge

When Arweave is being used as a redundant data storage solution, the cost of storing data should be paid via AR tokens. However, having the user exposed to multiple tokens is not user-friendly.

To have all platform activity managed via LORE token, Arweave Cosmos IBC Bridge must be introduced. This bridge will enable Gitopia and other projects in the cosmos ecosystem to use IBC. This way, we can tightly couple IBC with Gitopia to provide a seamless developer experience.

Inter Blockchain Communication(IBC) Bridge

The blockchain ecosystem is generally seen as a divided ecosystem of siloed decentralized networks that are unable to communicate or exchange data with each other, resorting to tribalism and competition instead of cooperation.

Inter Blockchain Communication (IBC) is a protocol that allows blockchains to talk to each other. There are several important technical requirements involved and conditions that need to be met, but we won’t dive into those here. Just know that being able to transfer tokens and other data frictionlessly and trustlessly between previously unconnected blockchains is a big deal.

Gitopia will be integrated with the Cosmos IBC layer (Inter-Blockchain Communication) in order to establish interoperability between Gitopia’s application layer and various other blockchains that are interoperable with the Cosmos IBC.

Gitopia has a tremendous amount of utility in the open decentralized cryptocurrency ecosystem, as nearly all networks in the ecosystem reserve a certain portion of tokens to incentivize community-based development. Gitopia offers these decentralized networks the ability to use Gitopia’s decentralized repository management to establish transparency and provability of code contributions from community-based developers who are incentivized with network reserves. The IBC also offers a cross-chain payment channel (which is secured by the Cosmos Hub) that these networks can utilize to fund bounties/issues/proposals on Gitopia.