electrum server on a cubox

I don’t even remember if there were alternative wallets available when I started with BitCoin. I used the reference implementation exclusively for a long time. Now there is a wide variety to choose from. They fall in three main categories: full node, light client and web wallets. They are nicely listed and explained at bitcoin.org

full node

Every hardcore bitcoin enthusiast should run at least one full node. That’s how the system was envisioned. It expresses the peer to peer nature. A full node maintains the complete history, and can verify transactions. It has lots of connections to other nodes, and helps propagate the transactions and blocks through the peer to peer network. The downside is that the size of the blockchain has grown so large to make it impractical, especially for mobile devices.

light client

Most mobile wallets fall into this category, as well as my favorite: electrum. The main reasons why I prefer electrum are that it has been in the apt repository for a while, and it has good support for hardware wallets. Light clients communicate with servers that in addition to the blockchain of the full node also maintain an additional database. This is required to serve requests for addresses, that the full node doesn’t have in its wallet. The client is responsible for managing the keys, and thus signs the transactions locally before distributing them.

web wallets

This is mainly for new users that don’t know how to secure their private keys.

electrum server

The main downside of light clients compared to full nodes is that there is a layer between your light client and the peer to peer network. You depend on these servers to be available. The server you connect to, could connect your BitCoin addresses to your IP address. They theoretically could also selectively filter transactions. But what they have no way of doing, is steal from you. As I understand it, electrum talks to multiple servers not only to protect your privacy, but for various reasons. There are about 7’000 publicly reachable full nodes, but only about 20 electrum servers. To protect your privacy, you can run your own electrum server in your basement. That’s what I do, but it’s more to support the system then out of paranoia. There is a strong incentive to mine BitCoin, but the incentive for running a full node or an electrum server is not monetary. Still I think it is very important to have many of these around.

I had a cubox small quad core arm box around that already ran a BitCoin full node and p2pool as well as some smaller stuff. It had some more capacity, but I didn’t know if it was enough to run electrum server. As it is not really apt-get installable, I didn’t want it on my main server. Electrum server uses a leveldb to keep track of all the information that it needs in addition to bitcoind. At the moment this database has about 11GB. Building it from scratch can take a long time, so they advice to download it form the foundary, and grow it from there. It didn’t work out initially, so I tried to build it from scratch. After computing for a week it slowed down too much at the blocks of mid 2012. So I downloaded from the foundry again, and this time it worked. For about two weeks I tested it in private. Then I had to enable IRC to make it public. You find the public servers in the #electrum IRC channel,  they start with E_. My electrum server is probably one of the slower ones. The cubox is a cool device, but not a typical server. It has performance comparable to a smartphone. Sometimes it lags a few blocks, but in general it keeps up quite well. I can see hundreds of clients connect to it.

Leave a Reply

Your email address will not be published. Required fields are marked *