1
1
I would like to write a very simple program in bitcoin. I thought a simple C program that accepts the mined blocks would be appropriate. So I assume, the program would open a socket connection to some fixed relay node and start accepting the blocks. Could someone show how it could be done. Thank you.
[Edit:] I have since discovered what is probably best suited for the purpose. There is a minimal bitcoin networking stack implemented in python by Dr Christian Decker of ETH Zurich. It was used to gather results for some highly cited research papers on the bitcoin network but at the same time it is extremely readable too.
Thank you for that information. Something even better would be just 40-50 lines of code doing some basic thing, like accepting blocks or smthn like that. – user2277550 – 2015-09-12T09:57:03.030
1Accepting blocks means validating them, which is a huge amount of work and must be bit-for-bit identical with Bitcoin Core. It's not possible with a small codebase, or at least not for now until libbitcoinconcensus is stable. – Anonymous – 2015-09-12T10:23:20.000