NebulousLabs/Sia — pull request #136 by DavidVorick (2014-06-10 03:26:08+00:00)
Title: Low Resolution Implementation of Snapshots

So, this is partially incomplete, I'll be coming back and fixing it up in future PRs.

The goal of this pull request was to do bootstrapping and synchronization by using snapshots. This was to get disk wallets moving across the quorum. It partially works and it partially doesn't. Wallets get synchronized well, and I believe that blocks also get synchronized well, but I can't get the entropy seeds to match after synchronization.

Also, I realized that heartbeats need signatures, and I also want heartbeats to contain hashes of the previous state of the quorum (including wallets and scripts). That's going to be implemented using a merkle tree, and the design isn't fully worked out. In the meantime we're probably just going to hash the quorum without wallets and scripts. This isn't implemented.

The quorum needs a list of nonces, which isn't implemented yet. Some form of this will probably be implemented at a high level.

Most of the code here goes toward encoding and decoding various structs, and saving them to disk then loading them from disk.

The features I'm really going to be focusing on for the next few days is the file uploading and wallet transactions. After that I'll come back and finish off the synchronization stuff.