Building

The project can be build from Visual Studio 2015 (Preview). It doesn't depend on any recent F# improvements and may be capable of being built with an earlier release of Visual Studio. It includes most of the dependencies as NuGet packages which are downloaded by the IDE automatically. Two packagages are not present on NuGet though:

  • Secp256k1.net - On github
  • leveldb-sharp - also on github. I forked from the official release to add support for binary keys and values.

Last but not least, it needs leveldb. I built my version from source a while ago and unfortunately I don't remember the exact step that I went through. The source code has instructions for Windows so it could be as simple as following them.

Configuration

The important settings are the directory location for the block and the database files. If you want to bootstrap and quickly process a large amount of blocks, for instance if you want to sync up with the latest bootstrap, I recommend putting the UTXO leveldb database on a RAM Disk. I use IMDisk. It's free. A 2 GB RAM disk works fine.

Setting the DB

Run the database script db.sql to create the tables. You can use direct SQL or an IDE like SQLiteStudio.

Importing Bootstrap dat

Syncing is much faster if you start with a bootstrap file. Then change the main function to just load this file. Basically uncomment the lines that mentions readBootstrap and comment out the rest. This function uses a faster processBlock function that bypasses all validation. It just parses the file and updates the UTXO db.

Once it completes, you can copy the resulting UTXO and bitcoin databases to the normal location and update the config file accordingly.

Syncing up

Revert the changes you made to main and run the application again. This time, it will locate peers and synchronize the rest of the blockchain from them. You are good to go.