forked from spesmilo/electrum-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.leveldb
84 lines (54 loc) · 2.44 KB
/
README.leveldb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
How to run a pruning node with leveldb
Pruning nodes use a lightweight database to store address histories.
Only unspent coins are kept in that database; spent outputs are
pruned.
__________________________________________________________
1. patch and compile bitcoind.
Install version 0.8 or equivalent.
Patch it with the patch distributed with Electrum.
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.
__________________________________________________________
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 :
[server]
backend = leveldb
[leveldb]
path = /path/to/your/database
pruning_limit = 10
______________________________________________________________
4. catch up with the blockchain.
In order to speed up the initial catch_up phase, it is recommended to
locate your database in shared memory:
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
During the catch_up phase, you can interrupt the server with Ctrl-C;
it will safely write the current status in the database and exit.
_________________________________
5. enjoy!
Once the server is synchronized, it will listen to ports, and the
normal way to stop it is to type: ./server.py stop
Other commands are available:
./server info : view connections
./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/