YA crazy bitcoin project

This project is maintained by Rusty Russell

Towards Alpha02

04 Aug 2014

Lots of bugfixing on alpha01: nothing like having two servers running for a week to shake things loose!

I spent a few days rewriting ccan/io and am fairly happy with the results. Both nodes are now running with the new I/O library.

Except one of the nodes is down pending a restart. They lost touch with each other around block 1888, and went their separate ways (an I/O bug which is now squished). Getting them to try to resync after a 6000 block fork is finding some nice bugs!

In particular, once restarted, I saw thousands of PROTOCOL_ECODE_PRIV_UNKNOWN_PREV in the log, in response to PROTOCOL_PKT_BLOCK messages. The first problem was with syncing:

Now, once a block was generated, we sent it to the other peer:

The second one already has a FIXME on it: we should remember valid blocks which don’t have a known block. It still takes a while to sync, but we will. I wrote that code today.

The former sync problem made me think about a major protocol change I’ve been pondering which will involve rewriting the sync code anyway.

And it’d be nice to do this before -alpha02. There’s no better time to break the protocol than before there are any users: there’s a method for the network to negotiate protocol changes, but I’d prefer not to support both old and new protocols until we have to.