On this page, we provide an overview of the architecture of the MakeOS protocol and how it works. You will learn:
About the network participants.
How git push requests are handled.
Basic protocol economics.
The consensus mechanism.
The network is composed of many nodes spread across the globe, connected and working together to perform operations defined in the MakeOS protocol to enable uncensorable, unstoppable software development. There are several participants in this system that work together to achieve the platform’s goals:
There are 6 network participants namely:
Battery or Dilithium Miners
An account is a network resource that can send and receive transactions, has a balance and can be used to identify a network user. Accounts can own network resources and may transfer ownership of these resources to other accounts. An account is associated with a private key which is used to authorize transactions. An account owner is a user that controls an account.
There are two types of account owners:
A Balance Account owner is a user who owns an account that stores the balance of the native coins and other native resources (such as repositories, push keys and batteries). A Balance Account, like a bank account, has a unique identifier that can be used to receive network resources from other account owners.
A push account owner (aka pusher) is a user who has registered a key on the network solely for signing push transactions (aka push key). A user who intends to push updates to a repository must create a push key, register it on the network and add it to the repository before they can successfully push. The pusher can instruct git to sign commits with their push key. Push accounts are usually associated with a Balance Account that may be required to pay network fees when required.
A remote provider is someone who runs a Git server for handling git fetch and push requests. Users can add them as git remotes, fetch repositories and push updates to them. The remote server handles incoming push requests by validating the request, authenticating the user, broadcasting a push notification to the rest of the network and finally constructing a push transaction for inclusion into the mempool.
Anyone can run a private remote only they can access or a public one accessible to anyone. Remotes are capable of tracking all repositories on the network and downloading every new update as they are pushed. However, it can be configured to only track selected repositories.
A remote provider is incentivized via transaction fees and block inflation. A remote node will take a fraction of the fees paid by the pusher to cover the cost of providing the service. This is designed to encourage users to run public remote servers.
Hosts are keepers of Git objects. They are tasked with persisting the state of all repositories and must make repository objects available to everyone. Hosts are connected to each other through a distributed hash table network where they announce themselves as providers of Git objects and fetch objects from other hosts.
They are also endorsers of push requests — They receive push request notifications from remote providers, validate and authenticate the requests, download git objects, dry-run git updates and send out endorsements if they are satisfied. A push request notification cannot be used to create a push transaction if a pre-determined number of endorsements have not been received. When a node on the network receives both the push request notification and the required number of endorsements, they can add a push transaction to the mempool.
The host role is network incentivized; It is subsidized by the network via block inflation reward. To become a host, one must deposit a minimum amount of the native coin as a security deposit that may be slashed when bad behaviour is detected. The number of hosts in the network is limited.
Hosts are meant to serve as network-sponsored archival nodes that ensure the continued existence and availability of objects, however, anyone can perform their storage functions by running a full node.
Validators are nodes that participate in the consensus system of the network. They are responsible for proposing, validating, voting for blocks and finally executing the transactions in the approved blocks. MakeOS is Proof-of-Stake blockchain built on top of Tendermint Core, a BFT consensus engine. At launch, MakeOS will allow a maximum of 100 validators and gradually increase that number over time.
Anyone can become a validator if:
They have enough native coin to stake and become part of the top 100 most staked validators.
or if they receive enough delegated stake that catapults them into the top 100 most staked validators.
Validator role is an incentivized role — When a validator proposes a block that gets approved, they would receive newly minted native coins as a reward only if they burn a sufficient amount of Dilithium. If they burned an insufficient amount of Dilithium, they will receive a reward proportional to the amount burnt. If a Validator continuously burns less Dilithium below a threshold, they will eventually be unbonded and removed as a validator.
The validator role requires high performing hardware and technical skills to operate a node successfully over a long period. These requirements prevent many from participating in the coin generation process allowing only a few validators benefit from it. MakeOS provides a delegate system that allows anyone to delegate their native coins to any active validator or host.
When a user delegates to a validator or a host, they increase the power of the delegate, pushing them further up the ranking list. They will share any rewards received by their delegates at a commission rate determined by the delegate. Likewise, if a delegate is slashed for misbehaviour, their delegators will also be slashed. Delegators must decide carefully who they are backing.
Dilithium is a secondary currency on the MakeOS network used by network participants to pay the protocol itself for the right to execute operations.
While users pay network participants a transaction fee, network participants pay the protocol in batteries. It is synonymous to gas in Ethereum but tangible enough to be mined and stored in a Balance Account. Batteries are used by validators to execute transactions. They may be used by git users to pay for push request fees. Likewise, the Host requires batteries to create endorsements. Anyone can mine batteries via a Proof-of-Work mining protocol. See the Dilithium page to learn more.
In this section, we will outline how the protocol works to enable a decentralized repository hosting system. This outline is meant to serve as an overview and not an exhaustive, in-depth specification.
These are the protocols a pusher must follow to create a valid push request targeting an existing repository:
Pusher must create an ED25519 keypair.
Pusher must create a push key by registering the public key from #1 on the network by creating a
On successful registration, the pusher can now refer to the registered push key using the push address
(a Bech32 address with HRP=push).
The Pusher may create a repository using
TxRepoCreate transaction if they do not already have one.
Pusher must add push key as a contributor to the repository at
#3 via a
This step can be skipped if the repository is configured to consider the creator as the first contributor.
Pusher must create and sign a token called a Push Token. It is used by the remote and other nodes to perform
authentication, authorization and push integrity checks.
Pusher must sign commit with the registered push key.
User must push signed commit using
These are protocols a remote must follow to successfully handle a push request from a pusher:
Remote must extract, parse and decode Push Token from the request header.
Remote must validate and verify the properties of the push token.
Remote must perform authorization and authentication checks before reading pushed objects.
On successful auth, the Remote must execute the push update and create a changeset describing how the pushed references changed.
Remote must compare commit signature header values with push token properties to ensure integrity is maintained.
Remote must create, sign and broadcast a
PushNote describing both the old state and new state of the repository.
The pushed references changes, nonce, anti-spam fee.
Pusher’s Push Token signature to allow other nodes to verify that a push originated from the pusher.
Remote’s public key and signature.
Remote must revert the repository to its previous state.
Remote must cache the
PushNote in the pushpool while waiting for endorsements from hosts.
Upon receiving a pre-defined number of valid endorsements, the Remote must attempt to create, sign and add a
TxPush transaction to the mempool.
Finalize the repository's state by applying the changes described in the
Hosts are responsible for endorsing push notification, archiving and providing git objects while being incentivized by the network. They follow the following protocol:
The Host must ensure the target repository was registered.
The Host must ensure the target repository exists on the filesystem.
The Host must validate the push note; performing both sanity and consistency checks.
The Host must perform authorization and authentication checks with the goal to:
Ensure that the notification is a reaction to a valid push request.
2. Ensure that the pusher has the authority to push to the target repository.
The Host must download the objects required to apply push note updates to the repository.
After download, the Host must attempt to apply the updates. If it succeeds:
It must revert the repository to its previous state.
It must create and broadcast a
If it has received enough
PushEndorsement for the
PushNote, it must attempt to create a
TxPush transaction and add to the mempool.
Finalize the repository's state by applying the changes described in the
In the push request handling cycle, validators are responsible for executing push transactions that made it into a block and have the required minimum endorsements. Validators update the repositories network state to match the one described in the endorsed
The Validator must check the push transaction.
Must ensure the push note is valid.
Must ensure push endorsements are present and valid.
The Validator must add or updates reference state and nonce on the target repository.
The Validator must deduct fees.
This section briefly describes the economic concept of the MakeOS network
MakeOS has a native currency known as Latinum. It exists to serve as the base currency for paying fees, staking in various governance processes and for preventing Dilithium from decaying rapidly. It provides a means for the protocol and users to price and pay for network services and ultimately provide security to the network via validator and host staking. There will be a total initial supply of 150,000,000 (150 Million) coins at launch and a 3.5% yearly inflation until the supply reaches 700,000,000 (700 Million).
Network security via validator & host staking.
Spam prevention via fees.
Unit of account and Medium of exchange within the network.
For incentivizing network participants for their contributions.
Halting Dilithium decay rate via anti-discharge staking.
Batteries (a.k.a Dilithium) are synonymous to gas on Ethereum, but they take a more tangible form on MakeOS. They are mined via proof of work and stored in a Balance Account.
Some examples of operations that will require Dilithium:
Push operation (optional).
Native repository coin generation.
Dilithium is different from the native currency in the following ways:
It decays over time.
Decay rate can be slowed down via staking Latinum.
Unlike Latinum which is just a balance of an account, Dilithium is based on the UTXO-like model.
They are mined by:
Proof of work miners
Pushers via pre-push proof-of-work.
A Repository Coin (or RepoCoin) is a native coin for a repository. It is issued by repository owners.
They have similar properties of Ethereum’s ERC-20. They are fungible and can be transferred from one account to another.
Repo coins can be generated via a pre-mine or through the burning of Dilithium.
Like Latinum and Dilithium, Repository Coins can be stored in a Balance Account or transferred between accounts.
MakeOS is built on Tendermint Core. Tendermint is a fast, BFT consensus engine that can tolerate 1/3 of connected machines failing. A major quality of Tendermint is its fast finality - Once a block is processed, all transactions included in the block are considered finalized. There is no need to wait for confirmations like Proof-of-work chains.
On MakeOS, fast finality is important because it guarantees that when a push request is made, it will not be reversed. Developers do not have to wait beyond the first block to be certain that their push operation was successful. On a proof-of-work chain, the possibility of a block re-organization means that a push operation may be reversed, requiring developers to re-push.
MakeOS leverages on proof-of-stake to provide Sybil protection. It requires all nodes participating in block creation to lock funds that may be slashed when bad behaviour is detected.