{"id":1485,"date":"2014-11-01T01:55:59","date_gmt":"2014-10-31T23:55:59","guid":{"rendered":"http:\/\/blog.ulrichard.ch\/?p=1485"},"modified":"2014-11-01T01:55:59","modified_gmt":"2014-10-31T23:55:59","slug":"electrum-server-on-a-cubox","status":"publish","type":"post","link":"https:\/\/ulrichard.ch\/blog\/?p=1485","title":{"rendered":"electrum server on a cubox"},"content":{"rendered":"<p>I don&#8217;t even remember if there were alternative wallets available when I started\u00c2\u00a0with BitCoin. I used the reference implementation exclusively for a long time.\u00c2\u00a0Now there is a wide variety to choose from. They fall in three main categories:\u00c2\u00a0full node, light client and web wallets. They are nicely listed and explained at <a href=\"https:\/\/bitcoin.org\/en\/choose-your-wallet\" target=\"_blank\" rel=\"noopener\">bitcoin.org<\/a><\/p>\n<h4>full node<\/h4>\n<p>Every hardcore bitcoin enthusiast should run at least one full node. That&#8217;s how the system was envisioned. It expresses the peer to peer nature. A full node maintains\u00c2\u00a0the complete history, and can verify transactions. It has lots of connections to other nodes, and helps propagate the transactions and blocks through the peer\u00c2\u00a0to peer network. The downside is that the size of the blockchain has grown so large to make it impractical, especially for mobile devices.<\/p>\n<h4>light client<\/h4>\n<p>Most mobile wallets fall into this category, as well as my favorite: <a href=\"https:\/\/electrum.org\/de\/\" target=\"_blank\" rel=\"noopener\">electrum<\/a>. 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\u00c2\u00a0addresses, that the full node doesn&#8217;t have in its wallet. The client is responsible for managing the keys, and thus signs the transactions locally before distributing them.<\/p>\n<h4>web wallets<\/h4>\n<p>This is mainly for new users that don&#8217;t know how to secure their private keys.<\/p>\n<h4>electrum server<\/h4>\n<p>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 <a href=\"https:\/\/getaddr.bitnodes.io\/\" target=\"_blank\" rel=\"noopener\">7&#8217;000 publicly reachable full nodes<\/a>, but only about <a href=\"http:\/\/electrum.qc.to\/\" target=\"_blank\" rel=\"noopener\">20 electrum servers<\/a>. To protect your privacy, you can run your own electrum server in your basement. That&#8217;s what I do, but it&#8217;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.<\/p>\n<p>I had a <a href=\"http:\/\/www.solid-run.com\/products\/cubox-i-mini-computer\/\" target=\"_blank\" rel=\"noopener\">cubox small quad core arm box<\/a> around that already ran a BitCoin full node and <a href=\"http:\/\/www.p2pool.org\/\" target=\"_blank\" rel=\"noopener\">p2pool<\/a> as well as some smaller stuff. It had some more capacity, but I didn&#8217;t know if it was enough to run electrum server. As it is not really apt-get installable, I didn&#8217;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 <a href=\"http:\/\/foundry.electrum.org\/\" target=\"_blank\" rel=\"noopener\">foundary<\/a>, and grow it from there. It didn&#8217;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 <a href=\"irc:\/\/irc.freenode.net\/electrum\" target=\"_blank\" rel=\"noopener\">#electrum<\/a> IRC channel,\u00c2\u00a0 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t even remember if there were alternative wallets available when I started\u00c2\u00a0with BitCoin. I used the reference implementation exclusively for a long time.\u00c2\u00a0Now there is a wide variety to choose from. They fall in three main categories:\u00c2\u00a0full node, light client and web wallets. They are nicely listed and explained at bitcoin.org full node Every [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,1],"tags":[22,37],"class_list":["post-1485","post","type-post","status-publish","format-standard","hentry","category-bitcoin","category-software","category-uncategorized","tag-arm","tag-bitcoin"],"_links":{"self":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1485"}],"version-history":[{"count":0,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1485\/revisions"}],"wp:attachment":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}