- one ledger(block) has one transaction
- sibling(s) means the nodes in the same quorum
- ballot has one slot, and one slot has one transaction
- to make story simple and easy, the keypair of stellar will be used
- check latest transaction id(latest transaction id)
- compare between local transaction id and siblings
- if different
- catchup
- catched up
- validate transaction
- if it is not valid, response 401
- check the ballot is opened or not
- if opened, wait until the ballot is closed
- the received transaction go to the transaction pool
- if closed,
- check the siblings ballot is opened or not
- if opened ballot is found,
- check the transaction in ballot is already handled in local or not
- if it is already handled, skipt it
- if not, open new ballot with that ballot
- wait until the ballot is closed
- start new ballot with new transaction
- broadcast the ballot to siblings
- if all accept new ballot
- start consensus
- if not,
- if another node has the opened ballot with previous transaction id
- wait until that ballot is closed
- if another node has the opened ballot with previous transaction id
- receive the result of validation of other sibling
- if the count of accepted is over threshold,
- broadcast closing ballot signal to the siblings
- got close signal
- save the transaction in ballot to the storage
- Python 3.6.x or higher
- nothging :)
$ apt install python3 python3-pip
$ pip3 install virtualenv
$ brew install python3
$ pip install virtualenv
$ virtualenv ./simple-fba
Using base prefix '/usr'
New python executable in /root/simple-fba/bin/python3
Also creating executable in /root/simple-fba/bin/python
Installing setuptools, pip, wheel...cdone.
$ cd simple-fba
$ mkdir src
$ cd src
$ git clone https://github.com/spikeekips/simple-fba
$ python setup.py develop
For example, we will run 6 nodes with the different port in the same machine.
$ simple-fba-node.py -init -name=node0 -port=5000 -siblings=localhost:5001,localhost:5002,localhost:5003,localhost:5004,localhost:5005
$ simple-fba-node.py -init -name=node1 -port=5001 -siblings=localhost:5000,localhost:5002,localhost:5003,localhost:5004,localhost:5005
$ simple-fba-node.py -init -name=node2 -port=5002 -siblings=localhost:5001,localhost:5000,localhost:5003,localhost:5004,localhost:5005
$ simple-fba-node.py -init -name=node3 -port=5003 -siblings=localhost:5001,localhost:5002,localhost:5000,localhost:5004,localhost:5005
$ simple-fba-node.py -init -name=node4 -port=5004 -siblings=localhost:5001,localhost:5002,localhost:5003,localhost:5000,localhost:5005
$ simple-fba-node.py -init -name=node5 -port=5005 -siblings=localhost:5001,localhost:5002,localhost:5003,localhost:5004,localhost:5000
and then, send the 100 payment to the node0
node. At first, the client or wallet needs it's own secret seed. To generate secret seed, visit https://portal.willet.io .
$ simple-fba-wallet.py node0 SCQ2IRPN4OXFIZNZODN6JQF6O4F2Z3ODA4W27C2GQSVD5WK2KQNA6WKF GAFVNM4NQLCE2RLQLYHIOIZAUEDG4U7RTGRTVNMKFX6KF3QKXTW72ULP 100
GAFVNM4NQLCE2RLQLYHIOIZAUEDG4U7RTGRTVNMKFX6KF3QKXTW72ULP
is the public address of the other account.
- Generating keypair
- Creating account