use set instead of list in memorypool_update
[electrum-server.git] / README.leveldb
index e57b3a7..ff08823 100644 (file)
@@ -4,23 +4,39 @@ Pruning nodes use a lightweight database to store address histories.
 Only unspent coins are kept in that database; spent outputs are
 pruned.
 
-
+As of November 2013 all public servers operate this way.
+Please see HOWTO.md for more detailled information. The following is a 
+short outline:
 __________________________________________________________
-1. patch and compile bitcoind.
+1. Run bitcoind.
 
-Install version 0.8 or equivalent.
+Install version 0.8.5 or higher.
+There is no need to patch bitcoind anymore.
+You need to run it with the config option txindex=1 .
+If you have not previously done so, you may need to reindex the bitcoind blockchain
 
 Note: Even though Electrum's database uses pruning, you cannot use it
-with a pruning bitcoind. A full bitcoin node is required in order to
-know for each address if it has been used. Pruning occurs only at the
-level of the Electrum database.
+with a ultra-pruning bitcoind (forthcoming in 0.9 or later).
+A full bitcoin node is required in order to know for each address 
+if it has been used. Pruning occurs only at the level of the Electrum database.
 
 __________________________________________________________
 
 2. Install python-leveldb: 
 
+Starting at Ubuntu 12.10 you can use apt to install leveldb. If you 
+rather stay on 12.04 LTS you can use the backport and add 
+"deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe"
+to your sources file. Install the package with: 
+
 sudo apt-get install python-leveldb
 
+alternatively build yourself, see
+http://code.google.com/p/py-leveldb/ 
+and
+http://peter-hoffmann.com/2011/installation-leveldb-ubuntu-python.html
+make sure you have libtool, automake and pkg-config
+
 __________________________________________________________
 
 3. edit /etc/electrum.conf : 
@@ -29,7 +45,8 @@ __________________________________________________________
 backend = leveldb
 
 [leveldb]
-dbpath = /path/to/your/database
+path = /path/to/your/database
+pruning_limit = 10
 
 ______________________________________________________________
 
@@ -38,7 +55,7 @@ ______________________________________________________________
 In order to speed up the initial catch_up phase, it is recommended to
 locate your database in shared memory:
 
- dbpath = /run/shm/electrum_db
+ path = /run/shm/electrum_db
 
 Once your server has finished catching up, copy your database to disk
 and update the path in /etc/electrum.conf
@@ -59,4 +76,13 @@ Other commands are available:
 ./server load   : view the size of the queue
 
 
+______________________
+Troubleshooting:
+
+* if your server or bitcoind is killed because is uses too much
+memory, configure bitcoind to limit the number of connections
+
+* if you see "Too many open files" errors, you may need to increase
+your user's File Descriptors limit. For this, see
+http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/