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 |
|
Development Build |
|
Issues |
|
Last Commit |
|
Docker Stars |
|
Docker Pulls |
|
Docker Automated |
|
Docker Build |
|
License |
|
Releases |
|
Latest Release |
|
Top Language |
|
Code Size |
|
Chat |
Read here: https://arxiv.org/abs/2003.10486
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
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 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
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/
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
To build the core docker container, run (from inside ./)
make dbm # stands for "docker build main"
this will build the container from source
to pull a minimal docker image of AfricaOS, run
docker pull kuntalabs/africaos:latest
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"
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>
<pkhash> <amount>
Senders submit the hash of the receivers public key to the blockchain, and the amount to send to the receiver
<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
make new_keys
We expose common customization points
- Block Validation
- Proposal Validation
- Proposal Creator Election
- Transaction Output Logic
- Transaction Input Logic
TODO:
- Submit Issue using template
under active development