1 How to run a pruning node with leveldb
3 Pruning nodes use a lightweight database to store address histories.
4 Only unspent coins are kept in that database; spent outputs are
8 __________________________________________________________
9 1. patch and compile bitcoind.
11 Install version 0.8 or equivalent.
12 Patch it with the patch distributed with Electrum.
14 Note: Even though Electrum's database uses pruning, you cannot use it
15 with a ultra-pruning bitcoind (forthcoming in 0.9 or later).
16 A full bitcoin node is required in order to know for each address
17 if it has been used. Pruning occurs only at the level of the Electrum database.
18 txindex=1 however is *not* needed!
20 __________________________________________________________
22 2. Install python-leveldb:
24 Starting at Ubuntu 12.10 you can use apt to install leveldb. If you
25 rather stay on 12.04 LTS you can use the backport and add
26 "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe"
27 to your sources file. Install the package with:
29 sudo apt-get install python-leveldb
31 alternatively build yourself, see
32 http://code.google.com/p/py-leveldb/
34 http://peter-hoffmann.com/2011/installation-leveldb-ubuntu-python.html
35 make sure you have libtool, automake and pkg-config
37 __________________________________________________________
39 3. edit /etc/electrum.conf :
45 path = /path/to/your/database
48 ______________________________________________________________
50 4. catch up with the blockchain.
52 In order to speed up the initial catch_up phase, it is recommended to
53 locate your database in shared memory:
55 path = /run/shm/electrum_db
57 Once your server has finished catching up, copy your database to disk
58 and update the path in /etc/electrum.conf
60 During the catch_up phase, you can interrupt the server with Ctrl-C;
61 it will safely write the current status in the database and exit.
63 _________________________________
67 Once the server is synchronized, it will listen to ports, and the
68 normal way to stop it is to type: ./server.py stop
70 Other commands are available:
72 ./server info : view connections
73 ./server load : view the size of the queue
76 ______________________
79 * if your server or bitcoind is killed because is uses too much
80 memory, configure bitcoind to limit the number of connections
82 * if you see "Too many open files" errors, you may need to increase
83 your user's File Descriptors limit. For this, see
84 http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/