Skip to content

avinashshenoy97/brownie-points

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowniePoints Logo

A social currency turned into a crypto currency!

Cryptocurrency Python Version GitHub OpenSource

Setup

cd into the repository and:

pip3 install -r requirements.txt

Start the first node with the command:

python3 BrowniePoints -f <IP_OF_FIRST_NODE> 8000

where 8000 is the port number used by the rendezvous server for the underlying peer-to-peer network.

New nodes can be started and added to the p2p network using:

python3 BrowniePoints -w <IP_OF_FIRST_NODE> 8000

Every node exposes a REST API for accessing information about the blockchain. This API listens on port 16000 by default. This can be changed with the -p flag.

All peers on the network listen on port 50500 for broadcasted messages.

Usage

User Interfaces

2 UIs are also provided with BrowniePoints. To start these, cd into walletUI or explorerUI and start the web server using:

python3 manage.py runserver 0.0.0.0:PORT

Mining

Any node can be made to mine the transactions on the transactions pool by making an empty PUT request to /control/mineBlock to the node that should be credited with the reward.

An example CURL command:

curl --request PUT <IP_OF_NODE>:16000/control/mineBlock

When a valid block is mined, the node will be credited with 50 BrowniePoints and will proceed to broadcast the new block to all other nodes.

License

MIT License

NOTE

This project was done as part of a course on "Software Engineering" at PES University.