This project is a simple implementation of a cryptocurrency named zQoin, based on SHA3-512 Proof of Work. It includes a blockchain, wallets, and mining functionality. The project is divided into two main components:
host.py: Starts the blockchain and wallets, interconnected to other nodes by a P2P network.client.py: Mines zQoin crypto, and sends/receives transactions to/from wallets.
- Blockchain: A basic implementation of a blockchain to manage transactions and mining.
- Node Integration: PBFT fault tolerence between P2P nodes that host the blockchain.
- Wallets: Create and manage wallets for storing zQoin.
- Mining: Mine zQoin as part of a mining pool, using the
client.pyscript. - Full Customizability: Variables all ready to customize, in an easy to read format.
To run this project, you need to have Python installed. Additionally, you need to install the following dependencies:
For the client and host:
$ pip install flask
$ pip install tkinter
Host only:
$ pip install flask-limiter
To start the blockchain node, run:
$ python host.pyTo mine zQoin, run:
$ python client.pyYou can customize various parameters in the client.py and host.py files:
- client.py:
coin_nameCoin full nameshort_nameCoin short nameclient_port1-65535, integerhost_port1-65535, integer (cannot match client port)server_ipHost server IP
- host.py:
coin_nameCoin full nameshort_nameCoin short nameclient_port1-65535, integerhost_port1-65535, integer (cannot match client port)baseBase difficultymax_baseMaximum difficultylogarithmic, linear, ramp_factorVariables affecting speed of miningmax_coinMaximum amount of coins in circulation, ~462mb per 1m max_coin/reward, ~580 bytes per walletrewardBase reward per block, floattime_between_rewardsMinimum seconds between blocksconsensus_countHow many validations is required to save blockwallet_list_urlWallet creation word listhost_version_urlSHA3-512 of this filecheckValidates the host against host version url hashnode_consensusMinimum nodes for consensus verificationnode_toleranceTolerance for faulty/malicious nodeslocalAllows local IPsclient_versionwith theclient.pysha3-512hashgenesis_tokenGenesis block token
This project includes DotSlashVerify hashes for the files to ensure their integrity.
Feel free to fork this project, submit issues and pull requests. Contributions are welcome!
This project is licensed under the GPL-3.0 License.
- 7/19: Initial commit
- 7/24: Full mining and wallet implementation
- 7/27: Got the mining pool working, woo!
- 7/30: P2P node & fault tolerance