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.py
script. - 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.py
To mine zQoin, run:
$ python client.py
You can customize various parameters in the client.py
and host.py
files:
- client.py:
coin_name
Coin full nameshort_name
Coin short nameclient_port
1-65535, integerhost_port
1-65535, integer (cannot match client port)server_ip
Host server IP
- host.py:
coin_name
Coin full nameshort_name
Coin short nameclient_port
1-65535, integerhost_port
1-65535, integer (cannot match client port)base
Base difficultymax_base
Maximum difficultylogarithmic, linear, ramp_factor
Variables affecting speed of miningmax_coin
Maximum amount of coins in circulation, ~462mb per 1m max_coin/reward, ~580 bytes per walletreward
Base reward per block, floattime_between_rewards
Minimum seconds between blocksconsensus_count
How many validations is required to save blockwallet_list_url
Wallet creation word listhost_version_url
SHA3-512 of this filecheck
Validates the host against host version url hashnode_consensus
Minimum nodes for consensus verificationnode_tolerance
Tolerance for faulty/malicious nodeslocal
Allows local IPsclient_version
with theclient.py
sha3-512
hashgenesis_token
Genesis 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