This is my personal project to get into the Go programming language (Golang) for the first time. You should not use this Blockchain or Client, except if you want to have some fun! 🤙
- Hash & verify blocks
- Add Blocks to Blockchain
- Validate Blockchain
- Real Mining with Dfficulty (nonce)
- Transaction Pool & Add Transactions to Blocks
- Client API
- Error Management
- > 90% Test Coverage
- Wallets
- P2P-Sync
Have fun ❤️ and give feedback!
- For the purpose of this project, I didn't implement a project structure pattern, like package oriented design. The packages are not designed to be used outside of this project.
- It's not considered good practice to pack all types in a common
/types
folder, but it was my first attempt in order to avoid dependency cycles.
Run make run
Currently it just runs as a simulation and therefore resets the state with every new run.
It will log the output to stdout, so you'll be seeing what is going on in your console.
Errors will be written into the errors.log
and the current state of the blockchain persisted in state.json
. Both files are generated in the root folder.
There is a really small API (without validation) just to get the current state and post new transactions from outside the client.
Response will be with content-type: application/json
Body (content-type: application/json
):
{
"from": "any string",
"to": "any string",
"amount": "any integer"
}
Run make test
make linter
make test-coverage-report