A blockchain implementation in Java for a cryptocurrency. The blockchain is modeled after Bitcoin.
Late October of 2020. 10th grade.
It is a command line interface over the blockchain to:
- Be either a miner or just a listening node (pulling the blockchain real time, but not mining)
- Mine the pending transactions into a block
- Make a transaction
- View blockchain
- View your balance
- Java Programming Language & OOP (inheritance)
- Gradle
I tried to make this cryptocurrency as robust to my abilities. This included signing transactions, validating blocks in a chain, and a basic P2P network.
- secp256k1 key cryptography
- SHA256withECDSA transaction signature algorithm
- Blocks are stored in an
ArrayList
- Blocks hashed with SHA256 algorithm
- Blocks mined like in Bitcoin (specified number of zeros at the beginning of hash)
- Only on LAN (localhost)
- Can connect and listen to other peers, assigning you a port
- Miners can broadcast newly mined blocks to other nodes (only full nodes, not other miners, for now)
./gradlew run --console plain
Useful links that helped guide me: