Skip to content
This repository was archived by the owner on Feb 11, 2019. It is now read-only.

Commit 9afc9ed

Browse files
thelazierschinzelh
authored andcommitted
Update for Dash Network
Rename config's bitcoin to dash Update Documents
1 parent 7dca19b commit 9afc9ed

15 files changed

+200
-203
lines changed

HOWTO.md

+71-75
Large diffs are not rendered by default.

INSTALL

+16-20
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,20 @@ detailed information on how to configure your server.
55
TLDR:
66
$ sudo ./configure
77
$ sudo python ./setup.py install
8-
$ electrum-server start
9-
$ electrum-server stop
8+
$ electrum-dash-server start
9+
$ electrum-dash-server stop
1010

1111

1212
Note: If you want to run the server without installing it on your
13-
system, just run 'run_electrum_server"
13+
system, just run 'run_electrum_dash_server'
1414

1515

16-
1. Install and run bitcoind.
16+
1. Install and run dashd.
1717
----------------------------
1818

19-
You will need to run bitcoind with the config option txindex=1. If you
20-
have not previously done so, you may need to reindex the bitcoind
21-
blockchain
22-
23-
Note: you cannot use a pruning bitcoind. A full bitcoin node is
24-
required in order to know for each address if it has been
25-
used. Pruning occurs only at the level of the Electrum database.
19+
A full dash node is required in order to know for each address
20+
if it has been used. Pruning occurs only at the level of the
21+
Electrum Dash database.
2622

2723

2824
2. Run the 'configure' script
@@ -32,7 +28,7 @@ You need to run the script as root:
3228
$ sudo ./configure
3329

3430
It will:
35-
* create the configuration file in /etc/electrum.conf
31+
* create the configuration file in /etc/electrum-dash.conf
3632
* create a user that will run the daemon
3733
* optionally, download a fresh database from the Electrum Foundry.
3834

@@ -57,31 +53,31 @@ Note: You will need to redo this everytime you pull code from git.
5753
4. Using the server
5854
-------------------
5955

60-
Use 'electrum-server' to start and stop the server:
56+
Use 'electrum-dash-server' to start and stop the server:
6157

62-
$ electrum-server <start|stop|status|getinfo>
58+
$ electrum-dash-server <start|stop|status|getinfo>
6359

6460
The server will write a log file in its database path.
6561

6662

67-
5. Add electrum-server to your system's services
63+
5. Add electrum-dash-server to your system's services
6864
------------------------------------------------
6965

70-
If your system supports it, you may add electrum-server to the
66+
If your system supports it, you may add electrum-dash-server to the
7167
/etc/init.d directory. This will ensure that the server is started and
7268
stopped automatically, and that the database is closed safely whenever
7369
your machine is rebooted.
7470

75-
# ln -s `which electrum-server` /etc/init.d/electrum-server
76-
# update-rc.d electrum-server defaults
71+
# ln -s `which electrum-dash-server` /etc/init.d/electrum-dash-server
72+
# update-rc.d electrum-dash-server defaults
7773

7874

7975

8076
6. Troubleshooting:
8177
-------------------
8278

83-
* if your server or bitcoind is killed because is uses too much
84-
memory, configure bitcoind to limit the number of connections
79+
* if your server or dashd is killed because is uses too much
80+
memory, configure dashd to limit the number of connections
8581

8682
* if you see "Too many open files" errors, you may need to increase
8783
your user's File Descriptors limit. For this, see

README-IRC.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
IRC is used by Electrum server to find 'peers' - other Electrum servers. The
1+
IRC is used by Electrum Dash server to find 'peers' - other Electrum Dash servers. The
22
current list can be seen by running:
33

4-
electrum-server peers
4+
electrum-dash-server peers
55

6-
The following config file options are used by the IRC part of Electrum server:
6+
The following config file options are used by the IRC part of Electrum Dash server:
77

88
[server]
99
irc = yes
@@ -13,15 +13,15 @@ The following config file options are used by the IRC part of Electrum server:
1313
# report_stratum_tcp_port = 50001
1414

1515
`irc` is used to determine whether the IRC thread will be started or
16-
the Electrum server will run in private mode (default). In private
17-
mode, `electrum-server peers` will always return an empty list.
16+
the Electrum Dash server will run in private mode (default). In private
17+
mode, `electrum-dash-server peers` will always return an empty list.
1818

19-
`host` is a fully-qualified domain name (FQDN) of your Electrum
19+
`host` is a fully-qualified domain name (FQDN) of your Electrum Dash
2020
server. It is used both when binding the listener for incoming client
2121
connections and as part of the realname field in IRC (see below).
2222

2323
`report_host` is a an optional fully-qualified domain name (FQDN) of
24-
your Electrum server instead of `host`. It is used as part of the name
24+
your Electrum Dash server instead of `host`. It is used as part of the name
2525
field in IRC for incoming client connections. This is useful in a NAT
2626
setup where you bind to a private IP locally but have an external IP
2727
set up at your router and external DNS.
@@ -32,8 +32,8 @@ field without actually binding this port locally. This is useful in a
3232
NAT setup where you might want to bind to a high port locally but DNAT
3333
a different possibly privileged port for inbound connections
3434

35-
`irc_nick` is a nick name that will be appended to the E_ suffix when
36-
composing the IRC nickname to identify your server on #electrum.
35+
`irc_nick` is a nick name that will be appended to the D_ suffix when
36+
composing the IRC nickname to identify your server on #electrum-dash .
3737

3838
Please note the IRC name field can only contain 50 chars and will be
3939
composed of `host` + protocol version number + Port numbers for the

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
Electrum-server for the Electrum client
1+
Electrum-dash-server for the Electrum Dash client
22
=========================================
33

44
* Author: Thomas Voegtlin (ThomasV on the bitcointalk forum)
5+
* Dash codebase port Authors: ELM4Ever, Propulsion
56
* Language: Python
67

78
Features
@@ -11,7 +12,7 @@ Features
1112
described by Alan Reiner (see the 'ultimate blockchain
1213
compression' thread in the Bitcointalk forum)
1314

14-
* The server requires bitcoind, leveldb and plyvel
15+
* The server requires dashd, leveldb, x11_hash and plyvel
1516

1617
* The server code is open source. Anyone can run a server, removing
1718
single points of failure concerns.
@@ -27,7 +28,7 @@ Installation
2728
1. To install and run a server, see INSTALL. For greater
2829
detail on the installation process, see HOWTO.md.
2930

30-
2. To start and stop the server, use the 'electrum-server' script
31+
2. To start and stop the server, use the 'electrum-dash-server' script
3132

3233

3334

configure

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi
1212
source_dir=$(cd "$(dirname "${BASH_SOURCE[0]}" )"; pwd)
1313

1414

15-
electrum_config="/etc/electrum.conf"
15+
electrum_config="/etc/electrum-dash.conf"
1616
function read_config()
1717
{
1818
text=$1
@@ -26,7 +26,7 @@ function write_config()
2626
# create config file
2727
if [ ! -f $electrum_config ]; then
2828
echo "Creating config file"
29-
cp $source_dir"/electrum.conf.sample" $electrum_config
29+
cp $source_dir"/electrum-dash.conf.sample" $electrum_config
3030
fi
3131

3232

@@ -53,7 +53,7 @@ fi
5353

5454

5555
# read path from config
56-
default_path="/var/electrum-server"
56+
default_path="/var/electrum-dash-server"
5757
path=$(read_config "path")
5858
if ! [ "$path" ]; then
5959
read -p "Path for database (default: $default_path) " -r
@@ -66,7 +66,7 @@ if ! [ "$path" ]; then
6666
fi
6767

6868
# read path from config
69-
default_logfile="/var/log/electrum.log"
69+
default_logfile="/var/log/electrum-dash.log"
7070
logfile=$(read_config "logfile")
7171
if ! [ "$logfile" ]; then
7272
read -p "Path of logfile (default: $default_logfile) " -r
@@ -108,16 +108,16 @@ fi
108108
chown $user:$user $logfile
109109

110110

111-
bitcoind_user=$(read_config "bitcoind_user")
112-
if ! [ "$bitcoind_user" ]; then
113-
read -p "rpcuser (from your bitcoin.conf file): " -r
114-
write_config "bitcoind_user" $REPLY
111+
dashd_user=$(read_config "dashd_user")
112+
if ! [ "$dashd_user" ]; then
113+
read -p "rpcuser (from your dash.conf file): " -r
114+
write_config "dashd_user" $REPLY
115115
fi
116116

117-
bitcoind_password=$(read_config "bitcoind_password")
118-
if ! [ "$bitcoind_password" ]; then
119-
read -p "rpcpassword (from your bitcoin.conf file): " -r
120-
write_config "bitcoind_password" $REPLY
117+
dashd_password=$(read_config "dashd_password")
118+
if ! [ "$dashd_password" ]; then
119+
read -p "rpcpassword (from your dash.conf file): " -r
120+
write_config "dashd_password" $REPLY
121121
fi
122122

123123

electrum-server renamed to electrum-dash-server

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#! /bin/bash
22

33

4-
electrum_config="/etc/electrum.conf"
4+
electrum_config="/etc/electrum-dash.conf"
55
if [ ! -f $electrum_config ]; then
66
echo "$electrum_config does not exist"
77
echo "please run 'configure'"
88
exit 1
99
fi
1010

11-
if ! hash run_electrum_server.py 2>/dev/null; then
12-
echo "run_electrum_server.py is not installed"
11+
if ! hash run_electrum_dash_server 2>/dev/null; then
12+
echo "run_electrum_dash_server is not installed"
1313
echo "Please run 'python setup.py install'"
1414
exit 1
1515
fi
@@ -29,11 +29,11 @@ user=$(read_config "username")
2929

3030
# get PID of server
3131
if [ `id -u` = 0 ] ; then
32-
if ! PID=`su $user -c "run_electrum_server.py getpid"`; then
32+
if ! PID=`su $user -c "run_electrum_dash_server getpid"`; then
3333
PID=""
3434
fi
3535
else
36-
if ! PID=`run_electrum_server.py getpid`; then
36+
if ! PID=`run_electrum_dash_server getpid`; then
3737
PID=""
3838
fi
3939
fi;
@@ -57,7 +57,7 @@ case "$1" in
5757
fi
5858

5959
echo "Starting server as daemon"
60-
cmd="ulimit -n 65536 ; nohup run_electrum_server.py > /dev/null 2>>$logfile &"
60+
cmd="ulimit -n 65536 ; nohup run_electrum_dash_server > /dev/null 2>>$logfile &"
6161
if [ `id -u` = 0 ] ; then
6262
su $user -c "$cmd"
6363
else
@@ -69,7 +69,7 @@ case "$1" in
6969
echo "Server not running"
7070
exit
7171
fi
72-
cmd="run_electrum_server.py stop"
72+
cmd="run_electrum_dash_server stop"
7373
if [ `id -u` = 0 ] ; then
7474
su $user -c "$cmd"
7575
else
@@ -91,7 +91,7 @@ case "$1" in
9191
echo "Server not running"
9292
exit
9393
fi
94-
cmd="run_electrum_server.py $1"
94+
cmd="run_electrum_dash_server $1"
9595
if [ `id -u` = 0 ] ; then
9696
su $user -c "$cmd"
9797
else
@@ -103,7 +103,7 @@ case "$1" in
103103
$0 start
104104
;;
105105
*)
106-
echo "Usage: electrum-server {start|stop|restart|status|getinfo|peers|numpeers|sessions|numsessions}"
106+
echo "Usage: electrum-dash-server {start|stop|restart|status|getinfo|peers|numpeers|sessions|numsessions}"
107107
exit 1
108108
;;
109109
esac

electrum.conf.sample renamed to electrum-dash.conf.sample

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ path =
2626
# for each address, history will be pruned if it is longer than this limit
2727
pruning_limit = 100
2828

29-
# cache sizes in bytes, the default is optimized for ~4 GB RAM setups to run bitcoind alongside
29+
# cache sizes in bytes, the default is optimized for ~4 GB RAM setups to run dashd alongside
3030
# If you have lots of RAM increase up to 16 times for best performance
3131
#hist_cache = 67108864
3232
#utxo_cache = 134217728
3333
#addr_cache = 16777216
3434

35-
[bitcoind]
36-
bitcoind_host = localhost
37-
bitcoind_port = 8332
38-
# user and password from bitcoin.conf
39-
bitcoind_user =
40-
bitcoind_password =
35+
[dashd]
36+
dashd_host = localhost
37+
dashd_port = 8332
38+
# user and password from dash.conf
39+
dashd_user =
40+
dashd_password =

kill_session

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# run this script to close a session on your server
22
# usage: su electrum -c "./kill_session ip:port"
3-
./run_electrum_server debug "dispatcher.request_dispatcher.sessions['$1'].stop()"
3+
./run_electrum_dash_server debug "dispatcher.request_dispatcher.sessions['$1'].stop()"

run_electrum_server.py renamed to run_electrum_dash_server

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ def create_config(filename=None):
113113

114114
# set network parameters
115115
config.add_section('network')
116-
config.set('network', 'type', 'bitcoin_main')
116+
config.set('network', 'type', 'dash_main')
117117

118118
# try to find the config file in the default paths
119119
if not filename:
120120
for path in ('/etc/', ''):
121-
filename = path + 'electrum.conf'
121+
filename = path + 'electrum-dash.conf'
122122
if os.path.isfile(filename):
123123
break
124124

@@ -236,7 +236,7 @@ def start_server(config):
236236
if ssl_certfile is '' or ssl_keyfile is '':
237237
stratum_tcp_ssl_port = None
238238

239-
print_log("Starting Electrum server on", host)
239+
print_log("Starting Electrum Dash server on", host)
240240

241241
# Create hub
242242
dispatcher = Dispatcher(config)

setup.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from setuptools import setup
22

33
setup(
4-
name="electrum-server",
4+
name="electrum-dash-server",
55
version="1.0",
6-
scripts=['run_electrum_server.py','electrum-server'],
7-
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
6+
scripts=['run_electrum_dash_server','electrum-dash-server'],
7+
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0', 'x11_hash'],
88
package_dir={
99
'electrumserver':'src'
1010
},
@@ -21,10 +21,10 @@
2121
'electrumserver.ircthread',
2222
'electrumserver.stratum_tcp'
2323
],
24-
description="Bitcoin Electrum Server",
25-
author="Thomas Voegtlin",
26-
author_email="[email protected]",
24+
description="Dash Electrum Server",
25+
author="Thomas Voegtlin ,ELM4ever, Propulsion, TheLazieR",
26+
2727
license="MIT Licence",
28-
url="https://github.com/spesmilo/electrum-server/",
29-
long_description="""Server for the Electrum Lightweight Bitcoin Wallet"""
28+
url="https://github.com/spesmilo/electrum-server/ , https://github.com/thelazier/electrum-dash-server/",
29+
long_description="""Server for the Electrum Lightweight Dash Wallet"""
3030
)

0 commit comments

Comments
 (0)