Hacker News new | ask | show | jobs
by jnbiche 3120 days ago
There's an old Bitcoin in Python project called ArtForz's Bitcoin "half-node" (or maybe "half-a-node") which is a compressed, single file, easy-to-follow simplified Bitcoin node. No wallet functions, just the basic networking and validating.

Actually, I found a copy here: https://pastebin.com/ZSM7iHZw

It's public domain, and it may help you figure things out (it did for me).

The main hurdle is understanding the message types: https://en.bitcoin.it/wiki/Protocol_documentation#Message_ty...

Once you understand these, it's pretty much all serializing, deserializing, validating, and passing these around over TCP/IP sockets. And then building the chain. And then adding wallet functions.

It's been a while since I've done this so now I'm thinking of building another one in some new language.