Minimalistic Bitcoin is a very small implementation of Bitcoin.
I wrote it to have a better understanding of the Bitcoin protocol at low-level
- Clone the repository.
git clone https://github.com/hg333/MinimalisticBitcon.git
- Execute connection.py file
python3 connection.py
That's it, you have a very tiny, very limited bitcoin-node working at port 8333 of your machine.
The network between two nodes is estavlished via handshake demonstrated above.
- The Version Message
- The Verack Message
- Addr
- Ping
- Pong
- Inv
For more refer Messages
Default version is set to 70002, can be changed by editing the respective variable in connection.py
version = struct.pack("i", 70002)
By defalt the application tries connecting to the node at address 24.64.72.174:8333.
HOST = "24.64.72.174"
PORT = 8333
For connecting to other nodes find a stable node at bitnodes