A toy cryptocurrency to learn about the blockchain and Rust. Functionality heavily inspired by the original bitcoin client.
Clone this repo, install docker and docker compose. Run docker-compose up
in the root of the repo. 4 nodes will start up a single container and attempt to start mining and communicating with each other.
- Rust Book: https://doc.rust-lang.org/book/second-edition/
- Example block: https://webbtc.com/block/000000000000000001f942eb4bfa0aeccb6a14c268f4c72d5fff17270da771b9
- secp256k1: https://www.wpsoftware.net/rustdoc/secp256k1/
Merkle Tree
- https://en.wikipedia.org/wiki/Merkle_tree
- https://bitcoin.stackexchange.com/questions/10479/what-is-the-merkle-root
Networking
- https://en.bitcoin.it/wiki/Network
- https://en.bitcoin.it/wiki/Protocol_rules
- TCP Example server: https://github.com/Nervengift/chat-server-example/blob/master/src/main.rs
- https://users.rust-lang.org/t/how-to-write-a-simple-tcp-client-and-server/3712
- https://bitcoin.stackexchange.com/questions/3536/how-do-bitcoin-clients-find-each-other
Bitcoin Wiki:
- https://en.bitcoin.it/wiki/Transaction_fees
- https://en.bitcoin.it/wiki/Bitcoin_Core_0.11_(ch_3):_Initialization_and_Startup
- https://en.bitcoin.it/wiki/Difficulty
- https://en.bitcoin.it/wiki/Transaction
- https://en.bitcoin.it/wiki/Block_hashing_algorithm
- https://en.bitcoin.it/wiki/Protocol_documentation
- https://en.bitcoin.it/wiki/Getblocktemplate
- https://en.bitcoin.it/wiki/Confirmation
- https://en.bitcoin.it/wiki/Script
- https://en.bitcoin.it/wiki/Genesis_block