-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathREADME.html
More file actions
151 lines (113 loc) · 3.64 KB
/
Copy pathREADME.html
File metadata and controls
151 lines (113 loc) · 3.64 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Grip</title>
<link rel="stylesheet" href="frontend/css/github-7fa78c4fe7b5df12714028525116e8696e587c1f.css">
<link rel="stylesheet" href="frontedn/css/github2-02d8290450626963b8341bcf949ab6f840ed92b3.css">
<style>
.previewPage {
margin: 64px auto;
width: 920px;
}
</style>
</head>
<body>
<div class="page">
<div class="previewPage">
<div id="readme" class="announce md">
<article class="markdown-body entry-content">
<h1>
<a name="solo-setup" class="anchor" href="#solo-setup"><span class="octicon octicon-link"></span></a>Solo Setup</h1>
<p>Tested under Ubuntu Server 12.04 and Ubuntu Desktop 13.04</p>
<p>Assume the code is in directory ~/mining</p>
<ol>
<li>
<p><strong>Install bitcoind</strong></p>
<pre><code>sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind curl
</code></pre>
</li>
<li>
<p><strong>Install node.js</strong></p>
<pre><code>sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
</code></pre>
</li>
<li>
<p><strong>Install node.js package</strong></p>
<pre><code>cd ~/mining
sudo npm install
sudo npm install -g forever
</code></pre>
</li>
<li>
<p><strong>bitcoind configuration</strong></p>
<p>We have a default "bitcoin.conf" in ~/mining. </p>
<pre><code>server=1
rpcport=8080
rpcuser=asicminer
rpcpassword=solo_mining_hurts
rpcallowip=192.168.*.*
blocknotify="PATH_TO blocknotify.sh"
</code></pre>
<p>"blocknotify.sh" is in directory ~/mining/script. If you login with user name "ubuntu", then modify last line as
blocknotify="/home/ubuntu/script/blocknotify.sh"</p>
<p>Copy "bitcoin.conf" to bitcoin data directory(default "~/.bitcoin") </p>
</li>
<li>
<p><strong>Solo mining configuration</strong></p>
<p>The configuration file is ~/mining/config.json</p>
<pre><code>{
"bitcoind_ip" : "127.0.0.1" ,
"bitcoind_port" : 8080 ,
"bitcoind_user" : "asicminer",
"bitcoind_pwd" : "solo_mining_hurts",
"coinbase_msg" : "Mined By ASICMiner",
"solo_addr" : "1HtUGfbDcMzTeHWx2Dbgnhc6kYnj1Hp24i"
}
</code></pre>
<p>Note "bitcoind_port", "bitcoind_user", "bitcoind_pwd" should be the same with "rpcport", "rpcuser", "rpcpassword" in your
bitcoin.conf. "coinbase_msg" is what you want to put in coinbase. And <strong>do remember to modify "solo_addr" to your own address</strong>
:-)</p>
</li>
<li>
<p><strong>Start solo mining</strong></p>
<p>Suppose we need 3 process running on port 8334, 8335, 8336.</p>
<p>Modify "blocknotify.sh" according to your ports</p>
<pre><code>#!/bin/sh
curl --data-binary '{"jsonrpc":"2","id":"1","method":"update","params":[]}' http://127.0.0.1:8334
curl --data-binary '{"jsonrpc":"2","id":"1","method":"update","params":[]}' http://127.0.0.1:8335
curl --data-binary '{"jsonrpc":"2","id":"1","method":"update","params":[]}' http://127.0.0.1:8336
</code></pre>
<p>Start bitcoind</p>
<pre><code>bitcoind --daemon
</code></pre>
<p>Check if bitcoind is running</p>
<pre><code>bitcoind getblocktemplate
</code></pre>
<p>Start mining</p>
<pre><code>forever start mining/server.js -p 8334
forever start mining/server.js -p 8335
forever start mining/server.js -p 8336
</code></pre>
<p>Stop</p>
<pre><code>forever stopall
</code></pre>
<p>Restart </p>
<pre><code>forever restartall
</code></pre>
</li>
<li>
<p><strong>Solo status</strong></p>
<p>Open mining/frontend/status.html, type server url and go. Compatabile with IE10/Firefox/Chrome</p>
</li>
</ol>
</article>
</div>
</div>
<div> </div>
</div>
</body></html>