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 pruning bitcoind. A full bitcoin node is required in order to
16 know for each address if it has been used. Pruning occurs only at the
17 level of the Electrum database.
19 __________________________________________________________
21 2. Install python-leveldb:
23 Starting at Ubuntu 12.10 you can use apt to install leveldb. If you
24 rather stay on 12.04 LTS you can use the backport and add
25 "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe"
26 to your sources file. Install the package with:
28 sudo apt-get install python-leveldb
30 alternatively build yourself, see
31 http://code.google.com/p/py-leveldb/
33 http://peter-hoffmann.com/2011/installation-leveldb-ubuntu-python.html
34 make sure you have libtool, automake and pkg-config
36 __________________________________________________________
38 3. edit /etc/electrum.conf :
44 path = /path/to/your/database
47 ______________________________________________________________
49 4. catch up with the blockchain.
51 In order to speed up the initial catch_up phase, it is recommended to
52 locate your database in shared memory:
54 path = /run/shm/electrum_db
56 Once your server has finished catching up, copy your database to disk
57 and update the path in /etc/electrum.conf
59 During the catch_up phase, you can interrupt the server with Ctrl-C;
60 it will safely write the current status in the database and exit.
62 _________________________________
66 Once the server is synchronized, it will listen to ports, and the
67 normal way to stop it is to type: ./server.py stop
69 Other commands are available:
71 ./server info : view connections
72 ./server load : view the size of the queue
75 ______________________
78 * if your server or bitcoind is killed because is uses too much
79 memory, configure bitcoind to limit the number of connections
81 * if you see "Too many open files" errors, you may need to increase
82 your user's File Descriptors limit. For this, see
83 http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/