Noobcash is a simple cryptocurrency system. It is a completely decentralized digital currency, without any need for central authority. The transactions made in the system are verified by a network of nodes and recorded in a public distributed ledger, the Noobcash Blockchain. The nodes in our system communicate via a peer-to-peer network using cryptography for the verification processes.
You can find an online demo of the project at the following address:
https://snf-12208.ok-kno.grnetcloud.net/
You will be able to access all of the nodes, in order for you to be able to check the system's status and validity at any point.
NOTE: In case more than one users are making transactions at the same time, you may notice different behaviour regarding a node's balance than expected. Be sure to check the node's transactions before reporting a problem. You could also setup Noobcash locally for safer results.
- A rest api that implements the functionality of noobcash and is placed in
src
directory. - A cli client placed in
src/tester.py
. - A web app in
webapp
directory.
-
Install all necessary requirements
pip install -r requirements.txt
-
Setup noobcash backend by running the rest api of n nodes.
$ python src/rest.py --help usage: rest.py [-h] -p P -n N -capacity CAPACITY [-bootstrap] Rest api of noobcash. optional arguments: -h, --help show this help message and exit required arguments: -p P port to listen on -n N number of nodes in the blockchain -capacity CAPACITY capacity of a block optional_arguments: -bootstrap set if the current node is the bootstrap
NOTE: The file
src/config.py
should contain the ip address of the bootstrap node and the variable LOCAL should change in case of running in a remote server. In addition, each execution of the code above represents a node in the system. You have to execute the code N times, where N is the number of nodes you will use for the system as specified while setting up the bootstrap node (which can only be set once). -
Run a CLI client:
$ python src/client.py --help usage: client.py [-h] -p P CLI client of noobcash. optional arguments: -h, --help show this help message and exit required arguments: -p P port to listen on
NOTE: Each execution of the code above represents a CLI client for the corresponding node at the specified port P.
-
Run the webapp:
-
Update the local settings file
-
$ python webapp/manage.py makemigrations
-
$ python webapp/manage.py migrate
-
$ python webapp/manage.py shell
Type the following in the interactive console:
exec(open('db_script.py').read())
which executes a script to populate the database with the default settings for the nodes.
See here for the default settings.
-
$ python webapp/manage.py createsuperuser
Save the credentials you used because you will need them to log in to the webapp.
-
$ python webapp/manage.py runserver
You can visit the webapp at http://127.0.0.1:8000
-
- The rest api is written in Python 3.6 using the following libraries:
- Flask
- Flask-Cors
- pycryptodome
- requests
- urllib3
- The webapp is developed using Django 3.0.4 and Python 3.6
We evaluate the performance and the scalability of Noobcash by running the system in okeanos and perform from each node 100 transcations to the system. The transactions are placed in /test/transactions
and the scipt for executing them in test/tester.py
.
- Performance of the system
- Scalability of the system
src/
: Source code of the rest backend and cli client.test/
: Files regarding the evaluation of the system.webapp/
: Files about the web app.
Developed by
as a semester project for the Distributed Systems course of NTUA ECE.