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

Commit ec3fb9b

Browse files
committed
Fix version back to 0.7.4, update README.md.
1 parent 0d74a08 commit ec3fb9b

File tree

4 files changed

+39
-33
lines changed

4 files changed

+39
-33
lines changed

README.md

+34-28
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,59 @@
33
<!--- #[![release version](https://badge.fury.io/gh/chappjc%2Fdcrspy.svg)](https://badge.fury.io/gh/chappjc%2Fdcrspy) -->
44
[![Build Status](http://img.shields.io/travis/chappjc/dcrspy.svg)](https://travis-ci.org/chappjc/dcrspy)
55
[![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)
67
[![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)
88

99
dcrspy is a program to continuously monitor and log changes in various data
1010
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
1212
dcrd over a websocket][1]. Communication with dcrd and dcrwallet uses the [Decred JSON-RPC API][2].
1313

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
1820
"Millbarge"](https://github.com/chappjc/dcrspy/releases/tag/v0.6.0) or the
1921
[old-ntfns branch](https://github.com/chappjc/dcrspy/tree/old-ntfns), and for
2022
any Decred release *after* 0.6.0 use *at least* dcrspy v0.7.0, preferably
2123
[latest](https://github.com/chappjc/dcrspy/releases), or master. The version of
2224
dcrspy on master will use the new `version` RPC to check that the RPC server has
2325
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.
2430

2531
## Types of Data
2632

2733
The types of information monitored are:
2834

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)
3538

39+
A connection to dcrwallet is optional, but required for stake info and balances.
3640
See [Data Details](#data-details) below for more information.
3741

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).
4144

4245
## Output
4346

4447
Multiple destinations for the data are planned:
4548

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.
4949
1. **Plain text summary**: balances, votes, current ticket price, mean fees,
5050
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**.
5253
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**.
5356

5457
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_):
5659

5760
~~~none
5861
Block 35561:
@@ -61,6 +64,7 @@ Block 35561:
6164
Window progress: 138 / 144 of price window number 246
6265
Ticket fees: 0.0101, 0.0101, 0.0000 (mean, median, std), n=1
6366
Ticket pool: 42048 (size), 17.721 (avg. price), 745115.63 (total DCR locked)
67+
Node connections: 49
6468
6569
Wallet and Stake Info at Height 35561:
6670
- Balances
@@ -73,6 +77,7 @@ Wallet and Stake Info at Height 35561:
7377
mempool tickets: 0 (own), 6 (all)
7478
Ticket price: 22.663 | Window progress: 138 / 144
7579
Wallet's price: 23.8100; fee: 0.1940 / KiB
80+
(Approximately N tickets may be purchased with the set fee.)
7681
Totals: 541 votes, 919.84 subsidy
7782
1 missed, 1 revoked
7883
~~~
@@ -208,22 +213,22 @@ dcrspy is functional, but also a **work-in-progress**. However, I will try to k
208213

209214
* Verify Go installation:
210215

211-
go env GOROOT GOPATH
216+
go env GOROOT GOPATH
212217

213218
* Ensure $GOPATH/bin is on your $PATH
214219
* Install glide
215220

216-
go get -u -v github.com/Masterminds/glide
221+
go get -u -v github.com/Masterminds/glide
217222

218223
* Clone dcrspy repo
219224

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
221226

222227
* Glide install, and build executable
223228

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)
227232

228233
* Find dcrspy executable in `$GOPATH/bin`, and copy elsewhere (recommended).
229234

@@ -233,7 +238,7 @@ folders.
233238

234239
## Updating
235240

236-
First, update the repository:
241+
First, update the repository (assuming you have `master` checked out):
237242

238243
cd $GOPATH/src/github.com/chappjc/dcrspy
239244
git pull
@@ -277,6 +282,7 @@ Application Options:
277282
-d, --debuglevel= Logging level {trace, debug, info, warn, error, critical} (info)
278283
-q, --quiet Easy way to set debuglevel to error
279284
--logdir= Directory to log output (./logs)
285+
--cpuprofile= File for CPU profiling.
280286
-c, --cmdname= Command name to run. Must be on %PATH%.
281287
-a, --cmdargs= Comma-separated list of arguments for command to run. The specifier %n is substituted for block height at execution, and %h is
282288
substituted for block hash.
@@ -333,7 +339,7 @@ debuglevel=debug
333339
;cmdargs="127.0.0.1,-n,8"
334340

335341
; Monitor mempool for new tickets, displaying fees
336-
;mempool=true
342+
mempool=true
337343
;mp-min-interval=4
338344
;mp-max-interval=120
339345
;mp-ticket-trigger=4

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
// Types of information monitored:
77
// 1. Block chain data (from dcrd)
8-
// 2. Stake information (from your wallet)
8+
// 2. Wallet and stake information (from dcrwallet)
99
// 3. mempool (from dcrd)
1010
//
1111
// See README.md and TODO for more information.
@@ -25,6 +25,7 @@ import (
2525
"net"
2626
"os"
2727
"os/signal"
28+
"runtime/pprof"
2829
"strconv"
2930
"strings"
3031
"sync"
@@ -33,7 +34,6 @@ import (
3334
"github.com/decred/dcrd/chaincfg/chainhash"
3435
"github.com/decred/dcrrpcclient"
3536
"github.com/decred/dcrutil"
36-
"runtime/pprof"
3737
)
3838

3939
const (

sample-dcrspy.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ debuglevel=debug
99
;cmdargs="127.0.0.1,-n,8"
1010

1111
; Monitor mempool for new tickets, displaying fees
12-
;mempool=true
12+
mempool=true
1313
;mp-min-interval=4
1414
;mp-max-interval=120
1515
;mp-ticket-trigger=4

version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ type version struct {
1010

1111
var ver = version{
1212
Major: 0,
13-
Minor: 8,
14-
Patch: 0,
13+
Minor: 7,
14+
Patch: 4,
1515
Label: "beta",
1616
Nick: "Fletch Lives"}
1717

0 commit comments

Comments
 (0)