Securing my Bitcoin
I bought some Bitcoin back in 2012-ish. I think I have about 3 coins. They’re sitting on an old laptop, also from about 2012. It’s about time I gave those coins some love.
This is a laptop I haven’t opened in maybe a year. I haven’t used it seriously since about 2014. Thus, I was concerned about the health of the machine generally: whether the hardware works, whether the HDD is corrupted, whether it’s insecure.
My first step was to make sure the machine is not networked. It’s running Ubuntu 12.04, missing several years of security patches. Don’t want someone stealing my coins as soon as I turn the machine on! I changed the WiFi password before turning it on.
I plugged it in and left it to charge the battery for a while. The shitty battery on this machine lasts about 15 minutes. The machine booted, and while booting did a full disk verification. No problems.
Logging in, I immediately get a popup:
Bitcoin: Error opening block database. Do you want to rebuild the block database now?
My heart sinks.
Everything is corrupted.
I check my
~/.bitcoin directory; it at least has a
I copy it to a few different places to “secure” it from anything stupid I might do next.
So what was this error about the block database?
It’s from the program
bitcoin-qt at version 0.8.
This is an old name for the program now known as “Bitcoin Core”, now at 0.14.
The error is just about the block database - not the wallet (private keys).
This is in
$ du -sh blocks/ 62 G
Well shit. Back in the day I was maintaining a full Bitcoin node. Last time I booted this thing, it took many hours to catch up with the latest blockchain. I expect this is infeasible now, and it sounds like most people don’t do this. Today’s blockchain is 130G.
There’s a distinction between “full node” clients and “thin” clients.
bitcoin-qt is one such full node client,
maintaining a full copy of the blockchain in order to verify transactions.
Newer “thin clients” use something called “SPV mode”, or “Simplified Payment Verification”,
which apparently allows verification without downloading the entire blockchain.
SPV is described in the original Bitcoin paper.
Soon I’ll do a blog post studying the paper.
Let’s forget the block database, and concentrate on the
I’m in the amusing situation that I can’t do much with it!
I refuse to network the machine,
I have no USB drive to transfer from it,
bitcoin-qt refuses to do anything until I deal with its giant block database.
I found that there are multiple programs under
bitcoin-qt is just one of them.
The Bitcoin software is structured as client-server:
there’s a daemon called
and a client called
bitcoind daemon runs an HTTP server on 8332,
bitcoin-cli talks to.
bitcoind and waiting an age for it to verify some blocks,
bitcoin-cli can list addresses with
By exploring these addresses’ transactions, it turns out I only have 2.85 BTC!
Tomorrow I’ll get the private keys off this dodgy laptop and into a safer place …
More by Jim
- The inception bar: a new phishing method
- The hacker hype cycle
- Project C-43: the lost origins of asymmetric crypto
- How Hacker News stays interesting
- My parents are Flat-Earthers
- The dots do matter: how to scam a Gmail user
- The sorry state of OpenSSL usability
- I hate telephones
- The Three Ts of Time, Thought and Typing: measuring cost on the web
- Granddad died today
- Your syntax highlighter is wrong
Tagged . All content copyright James Fisher 2017. This post is not associated with my employer. Found an error? Edit this page.