Skip to content

hg333/MinimalisticBitcon

Repository files navigation

MinimalisticBitcon

Minimalistic Bitcoin is a very small implementation of Bitcoin.

I wrote it to have a better understanding of the Bitcoin protocol at low-level

Quick Start

  • 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.

P2P-Network

image

The network between two nodes is estavlished via handshake demonstrated above.

  • The Version Message
  • The Verack Message

Other Messages Used

  • Addr
  • Ping
  • Pong
  • Inv

For more refer Messages

Configurations

Version

Default version is set to 70002, can be changed by editing the respective variable in connection.py

version = struct.pack("i", 70002)

Host

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

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages