This project is a basic implementation of a Proof-of-Work (PoW) blockchain in Python. The implementation is inspired by the tutorial Creating Your First Blockchain with Java Part 2 - Transactions.
- The use of Merkle root
- The true meaning of blockchain being a legder
- UTXO
- How mining really works and the role of nonce
- Digital signature creatation and verification
- Basic blockchain structure with blocks and transactions.
- Proof-of-Work algorithm to mine blocks.
- Digital signatures for transaction security.
- Adjustable difficulty for mining.
- Merkle root for transaction validtion
- Basic wallet implementation
This project requires the following libraries:
jsondatetimepycryptodome(for cryptographic functions)
You can install pycryptodome using pip:
pip install pycryptodomeClone the repository:
git clone https://github.com/JUSTFAVOUR/JAB.git
cd JAB
python test.py You can adjust the mining difficulty by changing the difficulty variable in the blockchain.py file. This variable controls the amount of computational power and time required to mine a block.
# blockchain.py
# Adjust this variable to increase or decrease mining difficulty
difficulty = 4NOTE: you can write your test to interact with the code