Implement novacoin mining support
[stratum-mining.git] / INSTALL
1 Installation Instructions
2 =========================
3
4 Step 0: Install novacoind
5         It MUST be a recent version of novacoind
6         Set it up and start it!
7         Downloading the blockchain can take some time!
8
9 Step 1: Install the stratum core
10         git pull https://github.com/slush0/stratum.git
11         sudo easy_install stratum
12           (or if using alternate python: sudo /usr/local/bin/easy_install stratum)
13
14 Step 2: Pull a copy of the miner
15         git pull https://github.com/CryptoManiac/stratum-mining.git
16
17 Step 3: Configure the Miner
18         cp conf/config_sample.py conf/config.py
19         make your changes to conf/config.py 
20         Make sure you set the values in BASIC SETTINGS! These are how to connect to novacoind 
21         and where your money goes! Please read comments carefully, this may be helpful.
22         
23 Step 4: Run the pool
24         twistd -ny launcher.tac -l -
25         OR - using alternate python
26         /usr/local/bin/twistd -ny launcher.tac -l -
27
28 You can now set the URL on your stratum proxy (or miner that supports stratum) to:
29 http://YOURHOSTNAME:3333
30
31 Novacoindd blocknotify Setup
32 =========================
33 Although scary (for me), this is actually pretty easy.
34
35 Step 1: Set Admin Password
36         Ensure that you have set the ADMIN_PASSWORD_SHA256 parameter in conf/config.py
37         To make life easy you can run the generateAdminHash script to make the hash
38                 ./scripts/generateAdminHash.sh <password>
39
40 Step 2: Test It
41         Restart the pool if it's already running
42         run ./scripts/blocknotify.sh --password <password> --host localhost --port 3333
43         Ensure everything is ok.
44
45 Step 3: Run bitcoind with blocknotify
46         Stop bitcoind if it's already running
47         bitcoind stop
48         Wait till it ends
49         novacoind -blocknotify="/absolute/path/to/scripts/blocknotify.sh --password <password> --host localhost --port 3333"
50
51 Step 4: Adjust pool polling
52         Now you should be able to watch the pools debug messages for awhile and see the blocknotify come in
53         once you are sure it's working edit conf/config.py and set
54                 PREVHASH_REFRESH_INTERVAL = to the same value as MERKLE_REFRESH_INTERVAL
55         restart the pool
56
57 Database Setup
58 =========================
59 Table Creation: Tables are auto-created if they don't exist
60
61 None:
62 Well, this doesn't do anything, so there is nothing to set up
63
64 Sqlite:
65 THIS IS THE DEFAULT!
66 Just set the file path in the config file (or keep the default.)
67 Support for sqlite3 is built into recent python versions.
68 A couple notes for Sqlite:
69         - Sqlite and threading/concurancy just doesn't work right for that reason it is disabled.
70         - Since threading is disabled, The server will "pause" when archiving happens, this will affect
71                 your miners. However this will not happen often (24 hours after finding a share)
72
73 Postgresql:
74 1: Set up your parameters in the config file.
75 2: Install the postgresql libraries in your os:
76         Redhat and the like:
77                 yum install postgresql-libs postgresql-devel
78         Ubuntu and the like:
79                 apt-get install postgresql postgresql-devel
80 3: Install the python bindings
81         easy_install psycopg2
82
83 Mysql:
84 1: Set up your parameters in the config file.
85 2: Install the postgresql libraries in your os:
86         Redhat and the like:
87                 yum install mysql mysql-devel
88         Ubuntu and the like:
89                 apt-get install mysql mysql-devel
90 3: Install the python bindings
91         easy_install mysql-python
92
93 Problems????
94 =========================
95
96 Is your firewall off?
97 Is novacoind running?
98
99 TODO: are there other problems?
100