Skip to content
/ AfricaOS Public
forked from kunta-labs/AfricaOS

A distributed, proposal-based, replicated state machine (RSM) written in pure Rust. AOS is a simple, blockchain protocol designed for customization.

License

Notifications You must be signed in to change notification settings

lvwvm/AfricaOS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Africa Operating System (AfricaOS)

A simple, customizable, proposal-based, replicated state machine (RSM), inspired by pBFT (Practical Byzantine Fault Tolerance) written in pure Rust. We show how to setup an N-node network, of which accepts transactions. The transactions can execute arbitrary logic.

Status Type Status
Master Build Build Status
Development Build Build Status
Issues Issues
Last Commit Last commit
Docker Stars Docker Stars
Docker Pulls Docker Pulls
Docker Automated Docker Automated
Docker Build Docker Build
License License
Releases Releases
Latest Release Latest release
Top Language Top language
Code Size Code size in bytes
Chat Discord

White paper

Read here: https://arxiv.org/abs/2003.10486

Get the updated code, and documentation on XS code

All code updates, and documentation are pushed to our sponsorship repository, and eventually pushed into this free repository. The sponsorship repository comes with extra features, detailed/updated documentation, and priority bug fixes. Subscribe to the sponsorship repository on XS Code: https://cp.xscode.com/Kunta-Labs/AfricaOS

To start a single node

Edit the Makefile in /core/ to input the IP addresses, and ports for your other nodes. This version comes with a 3-node setup, for Alice, Bob, and Cici (the default is 127.0.0.1:x, to run all 3 nodes on a single workstation.

make alice # from inside ./core/

To reset Alice

make clean_alice # from inside ./core/

To start 3-node network

To create Bob, copy the folder, and create another folder one level up from the projects root, and run the same command for bob

make bob # from inside ./core/

To reset bob,

make clean_bob # from inside ./core/

Do the same for Cici

make cici # from inside ./core/

Now they should be pointed to each other from a peer perspective

Begin proposal generation

This will submit a first proposal to alice, which will initiate proposal generation amongst each node (alice, bob, and cici)

make p_alice # from inside ./core/

Stress with output/female transaction

To create/submit a new transaction every m seconds

make stress # from inside ./core/

This will create one output tx

make stress_output # from inside ./core/

This will create an input tx for that output

tx_hash=< OUTPUT-TX-HASH > make stress_input

Viewing state from your container

docker cp 8dcbe580eb6f:storage/states.db ./states.db ; cat ./states.db ; rm ./states.db

Docker

To build the core docker container, run (from inside ./)

make dbm # stands for "docker build main"

this will build the container from source

Pulling AOS core container

to pull a minimal docker image of AfricaOS, run

docker pull kuntalabs/africaos:latest

Running 3-node network

to run the 3 containers, and set up the 3-node network, run (from inside ./core/)

make rac #  or make dbm, stands for "run all containers"

Transactions

Combined txs will have the following default values (this is to be customized for your use case):

<partner_sender> <partner_tx_hash> <sig> <pk> <pkhash> <amount>

Output

<pkhash> <amount>

Senders submit the hash of the receivers public key to the blockchain, and the amount to send to the receiver

Input

<partner_sender> <partner_tx_hash> <sig> <pk>

Receivers submit the sender of the amount, the hash of the output transaction, their signature of an arbitrary string (default: "TEST"), and finally the receiver's public key

Generating new keys

make new_keys

Customization

We expose common customization points

  • Block Validation
  • Proposal Validation
  • Proposal Creator Election
  • Transaction Output Logic
  • Transaction Input Logic

To Contribute

TODO:

  • Submit Issue using template

under active development

Discord

https://discord.gg/dMvtDeW

Telegram

http://t.me/africaos

About

A distributed, proposal-based, replicated state machine (RSM) written in pure Rust. AOS is a simple, blockchain protocol designed for customization.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 94.9%
  • Makefile 4.6%
  • Dockerfile 0.5%