Bitcoin QT Importing blocks from disk

btcd ArchitectureThe installation instructions and source code can be found on github at:

A Brief History

Back in May, we first announced our plans to release btcd. A week later we released our first core package from btcd, btcwire, and announced our plans to continue releasing the component packages of btcd in a staggered fashion.

Over the next month, we released btcjson, btcdb, and btcscript. Then in mid-July we released btcchain at which time we announced btcd was next. At that point, btcd had most of the core bits and we figured we’d be releasing it within a few weeks. Well, as you have no doubt noticed, it is now 10 weeks later…

What Took so Long?

As typically happens with development, several things came up, all of which took a few days (or a week) here and there.

The following list is a brief overview of the various things that were tackled:

  • Decided to separate chain and wallet architecture
  • Added built-in support for the “official” bitcoin block acceptance regression test
  • Added support for testnet
  • 3 separate issues with the Go run-time garbage collector leaking memory
  • Extremely poor SQLite performance
  • Provided LevelDB as another backend database written in pure Go instead of requiring cgo like SQLite
  • Added support for proxies and tor (including proper DNS resolution via tor to avoid leaking your IP)
  • Implemented complete address manager including bucketizing to increase geographic separation and reduce attack vectors
  • Finished the connection manager which deals with talking to multiple peers simultaneously
  • Implemented a transaction pool and relay complete with proper chain rule adherence and additional filtering for miners

So, as you can see from the list above, we were able to cram quite a bit in 10 weeks!

Separate Chain and Wallet

While implementing the wallet and starting to build the GUI, we quickly realized that there is, what we consider, a fundamental design flaw in the other implementations we have seen to date. In particular they have the wallet and chain functionality integrated in the same process.

Bitcoin QT Verifying Blocks

Bitcoin QT import wallet

Bitcoin QT import wallet dat

Bitcoin QT reindexing Blocks on disk

Bitcoin QT loading block Index