3
3
<!-- - #[](https://badge.fury.io/gh/chappjc%2Fdcrspy) -->
4
4
[ ![ Build Status] ( http://img.shields.io/travis/chappjc/dcrspy.svg )] ( https://travis-ci.org/chappjc/dcrspy )
5
5
[ ![ GitHub release] ( https://img.shields.io/github/release/chappjc/dcrspy.svg )] ( https://github.com/chappjc/dcrspy/releases )
6
+ [ ![ Latest tag] ( https://img.shields.io/github/tag/chappjc/dcrspy.svg )
6
7
[ ![ ISC License] ( http://img.shields.io/badge/license-ISC-blue.svg )] ( http://copyfree.org )
7
- [ ![ Gitter] ( https://badges.gitter.im/chappjc/dcrspy.svg )] ( https://gitter.im/chappjc/dcrspy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge )
8
8
9
9
dcrspy is a program to continuously monitor and log changes in various data
10
10
on the Decred network. It works by connecting to both dcrd and dcrwallet
11
- and responding when a new block is detected via a [ notifier registered with
11
+ and responding to varioius event detected on the network via [ notifiers registered with
12
12
dcrd over a websocket] [ 1 ] . Communication with dcrd and dcrwallet uses the [ Decred JSON-RPC API] [ 2 ] .
13
13
14
- *** Compatibility Notice*** - After Decred (i.e. dcrwallet and dcrd) version
15
- 0.6.0, the notifications API was changed, requiring dcrspy to update it's
16
- notification handlers. Practically, this means that for version 0.6.0 and
17
- earlier of Decred it is required to use the [ compatibility release
14
+ *** Compatibility Notices***
15
+
16
+ * After Decred (i.e. dcrwallet and dcrd) v0.6.0, the notifications API was
17
+ changed, requiring dcrspy to update it's notification handlers. Practically,
18
+ this means that for version 0.6.0 and earlier of Decred it is required to use
19
+ the [ compatibility release
18
20
"Millbarge"] ( https://github.com/chappjc/dcrspy/releases/tag/v0.6.0 ) or the
19
21
[ old-ntfns branch] ( https://github.com/chappjc/dcrspy/tree/old-ntfns ) , and for
20
22
any Decred release * after* 0.6.0 use * at least* dcrspy v0.7.0, preferably
21
23
[ latest] ( https://github.com/chappjc/dcrspy/releases ) , or master. The version of
22
24
dcrspy on master will use the new ` version ` RPC to check that the RPC server has
23
25
a compatible API version.
26
+ * After Decred v0.7.0, the getbalance RPC response was changed. For
27
+ Decred release 0.8.0 and builds of using dcrd commit
28
+ [ ` f5c0b7e ` ] ( https://github.com/decred/dcrd/commit/f5c0b7eff2f9336a01a31a344a0bdb1572403e06 )
29
+ and later, it is necessary to use at least v0.8.0 of dcrspy.
24
30
25
31
## Types of Data
26
32
27
33
The types of information monitored are:
28
34
29
- * Block chain data (from dcrd)
30
- * Stake and wallet information (from your wallet, optional).
31
- * Mempool ticket info (from dcrd)
32
-
33
- A connection to dcrwallet is optional. Only block data will be obtained when no
34
- wallet connection is available.
35
+ * Block chain (from dcrd)
36
+ * Stake and wallet (from your wallet, optional).
37
+ * Mempool, including ticket fees and transactions of interest (from dcrd)
35
38
39
+ A connection to dcrwallet is optional, but required for stake info and balances.
36
40
See [ Data Details] ( #data-details ) below for more information.
37
41
38
- Transactions involving ** watched addresses** may also be logged (using the
39
- ` watchaddress ` flag). Watching for addresses receiving funds seems to be OK,
40
- but watching for sending funds from a watched address is experimental.
42
+ Transactions sending to ** watched addresses** may be reported (using the
43
+ ` watchaddress ` flag).
41
44
42
45
## Output
43
46
44
47
Multiple destinations for the data are planned:
45
48
46
- 1 . ** stdout** . JSON-formatted data is send to stdout. ** DONE** .
47
- 1 . ** File system** . JSON-formatted data is written to the file system. ** DONE** .
48
- 1 . ** Database** . Data is inserted into a MySQL database. NOT IMPLEMENTED.
49
49
1 . ** Plain text summary** : balances, votes, current ticket price, mean fees,
50
50
wallet status. ** DONE** .
51
- 1 . ** RESTful API** over HTTPS. IN PROGRESS.
51
+ 1 . ** JSON (stdout)** . JSON-formatted data is send to stdout. ** DONE** .
52
+ 1 . ** File system** . JSON-formatted data is written to the file system. ** DONE** .
52
53
1 . ** email** : email notification upon receiving to a watched address. ** DONE** .
54
+ 1 . ** Database** . Data is inserted into a MySQL or MongoDB database.
55
+ 1 . ** RESTful API** .
53
56
54
57
Details of the JSON output may be found in [ Data Details] ( #data-details ) . The
55
- plain text summary looks something like the following (_ wallet data redacted _ ):
58
+ plain text summary looks something like the following (_ wallet data simulated _ ):
56
59
57
60
~~~ none
58
61
Block 35561:
@@ -61,6 +64,7 @@ Block 35561:
61
64
Window progress: 138 / 144 of price window number 246
62
65
Ticket fees: 0.0101, 0.0101, 0.0000 (mean, median, std), n=1
63
66
Ticket pool: 42048 (size), 17.721 (avg. price), 745115.63 (total DCR locked)
67
+ Node connections: 49
64
68
65
69
Wallet and Stake Info at Height 35561:
66
70
- Balances
@@ -73,6 +77,7 @@ Wallet and Stake Info at Height 35561:
73
77
mempool tickets: 0 (own), 6 (all)
74
78
Ticket price: 22.663 | Window progress: 138 / 144
75
79
Wallet's price: 23.8100; fee: 0.1940 / KiB
80
+ (Approximately N tickets may be purchased with the set fee.)
76
81
Totals: 541 votes, 919.84 subsidy
77
82
1 missed, 1 revoked
78
83
~~~
@@ -208,22 +213,22 @@ dcrspy is functional, but also a **work-in-progress**. However, I will try to k
208
213
209
214
* Verify Go installation:
210
215
211
- go env GOROOT GOPATH
216
+ go env GOROOT GOPATH
212
217
213
218
* Ensure $GOPATH/bin is on your $PATH
214
219
* Install glide
215
220
216
- go get -u -v github.com/Masterminds/glide
221
+ go get -u -v github.com/Masterminds/glide
217
222
218
223
* Clone dcrspy repo
219
224
220
- git clone https://github.com/chappjc/dcrspy.git $GOPATH/src/github.com/chappjc/dcrspy
225
+ git clone https://github.com/chappjc/dcrspy.git $GOPATH/src/github.com/chappjc/dcrspy
221
226
222
227
* Glide install, and build executable
223
228
224
- cd $GOPATH/src/github.com/chappjc/dcrspy
225
- glide install
226
- go install $(glide nv)
229
+ cd $GOPATH/src/github.com/chappjc/dcrspy
230
+ glide install
231
+ go install $(glide nv)
227
232
228
233
* Find dcrspy executable in ` $GOPATH/bin ` , and copy elsewhere (recommended).
229
234
@@ -233,7 +238,7 @@ folders.
233
238
234
239
## Updating
235
240
236
- First, update the repository:
241
+ First, update the repository (assuming you have ` master ` checked out) :
237
242
238
243
cd $GOPATH/src/github.com/chappjc/dcrspy
239
244
git pull
@@ -277,6 +282,7 @@ Application Options:
277
282
-d, --debuglevel= Logging level {trace, debug, info, warn, error, critical} (info)
278
283
-q, --quiet Easy way to set debuglevel to error
279
284
--logdir= Directory to log output (./logs)
285
+ --cpuprofile= File for CPU profiling.
280
286
-c, --cmdname= Command name to run. Must be on %PATH%.
281
287
-a, --cmdargs= Comma-separated list of arguments for command to run. The specifier %n is substituted for block height at execution, and %h is
282
288
substituted for block hash.
@@ -333,7 +339,7 @@ debuglevel=debug
333
339
; cmdargs="127.0.0.1,-n,8"
334
340
335
341
; Monitor mempool for new tickets, displaying fees
336
- ; mempool=true
342
+ mempool =true
337
343
; mp-min-interval=4
338
344
; mp-max-interval=120
339
345
; mp-ticket-trigger=4
0 commit comments