Go to file
Josh Rickmar 71500c80f2 multi: Add initial committed filter (CF) support
This change begins the work of bringing committed filters to the
network consensus daemon.  Committed filters are designed to enable
light wallets without many of the privacy issues associated with
server-side bloom filtering.

The new gcs package provides the primitives for creating and matching
against Golomb-coded sets (GCS) filters while the blockcf package
provides creation of filters and filter entries for data structures
found in blocks.

The wire package has been updated to define a new protocol version and
service flag for advertising CF support and includes types for the
following new messages: cfheaders, cfilter, cftypes, getcfheaders,
getcfilter, getcftypes.  The peer package and server implementation
have been updated to include support for the new protocol version and
messages.

Filters are created using a collision probability of 2^-20 and are
saved to a new optional database index when running with committed
filter support enabled (the default).  At first startup, if support is
not disabled, the index will be created and populated with filters and
filter headers for all preexisting blocks, and new filters will be
recorded for processed blocks.

Multiple filter types are supported.  The regular filter commits to
output scripts and previous outpoints that any non-voting wallet will
require access to.  Scripts and previous outpoints that can only be
spent by votes and revocations are not committed to the filter.  The
extended filter is a supplementary filter which commits to all
transaction hashes and script data pushes from the input scripts of
non-coinbase regular and ticket purchase transactions.  Creating these
filters is based on the algorithm defined by BIP0158 but is modified
to only commit "regular" data in stake transactions to prevent
committed filters from being used to create SPV voting wallets.
2018-03-30 13:52:12 -04:00
addrmgr addrmgr: Improve isBad() performance. 2018-03-06 21:50:18 -06:00
blockchain multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
bloom docs: document packages and fix typo 2018-01-08 16:04:45 -06:00
certgen certgen: Add doc.go and README.md (#883) 2017-10-11 11:32:50 -04:00
chaincfg chainec/dcrec: Remove hybrid pubkey support 2018-03-20 17:45:09 -04:00
cmd release: Bump for v1.2.0. 2018-03-07 13:19:37 -06:00
connmgr connmgr: Use same Dial func signature as net.Dial 2018-03-05 12:29:26 -06:00
database indexers: Provide interface for index removal. 2018-03-27 18:50:03 -04:00
dcrec chainec/dcrec: Remove hybrid pubkey support 2018-03-20 17:45:09 -04:00
dcrjson multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
dcrutil dcrutil: Disallow creation of hybrid P2PK addrs. 2018-03-20 17:44:25 -04:00
docs docs: Fix links for internal packages. 2018-03-09 16:16:58 +00:00
gcs multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
hdkeychain multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
limits docs: document packages and fix typo 2018-01-08 16:04:45 -06:00
mempool mempool/mining: TxSource separation. 2018-03-05 11:38:36 -06:00
mining mempool/mining: TxSource separation. 2018-03-05 11:38:36 -06:00
peer multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
release Add example service files. 2017-03-23 02:07:08 -05:00
rpcclient multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
rpctest multi: fix some maligned linter warnings 2018-02-13 14:50:33 -06:00
sampleconfig multi: Rename BIP0111Version to NodeBloomVersion. 2018-03-02 22:29:14 -06:00
txscript chainec/dcrec: Remove hybrid pubkey support 2018-03-20 17:45:09 -04:00
wire multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
.dockerignore Run testing and linting in a Dockerfile. 2017-05-30 11:39:19 -04:00
.gitignore Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
.travis.yml travis: test in docker container 2018-02-18 10:27:18 -06:00
blocklogger.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
blockmanager.go mining: Use single uint64 coinbase extra nonce. 2018-03-04 16:40:01 -06:00
CHANGES multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
config.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
cpuminer.go cpuminer: Use header for extra nonce. 2018-03-05 12:59:32 -06:00
dcrd.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
doc.go multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
Dockerfile-1.9 travis: test in docker container 2018-02-18 10:27:18 -06:00
Dockerfile-1.10 travis: test in docker container 2018-02-18 10:27:18 -06:00
Gopkg.lock multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
Gopkg.toml dep: sync 2018-02-26 19:33:48 -06:00
ipc.go travis: add ineffassign linter 2017-12-01 09:14:04 -05:00
LICENSE multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
log.go multi: remove unused funcs and vars 2017-12-07 21:46:25 -06:00
mining_test.go mining_test: add edge conditions from btcd. 2017-08-31 00:28:36 -05:00
mining.go mining: Correct initial template generation. 2018-03-05 12:57:36 -06:00
miningerror.go blockchain: Rework to use new db interface. 2016-08-18 15:42:18 -04:00
params.go multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
README.md Adjust README.md for new Go version 2018-03-01 20:15:08 -06:00
rpcserver_test.go rpctest: Gate rpctest-based behind a build tag. 2017-07-26 12:43:26 -05:00
rpcserver.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
rpcserverhelp_test.go blockchain: Rework to use new db interface. 2016-08-18 15:42:18 -04:00
rpcserverhelp.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
rpcwebsocket.go main: Make func definition style consistent. 2018-03-04 14:31:43 -06:00
run_tests.sh travis: test in docker container 2018-02-18 10:27:18 -06:00
server.go multi: Add initial committed filter (CF) support 2018-03-30 13:52:12 -04:00
service_windows.go multi: Properly capitalize Decred. 2018-03-01 17:41:35 -06:00
signal.go dcrd: Simplify shutdown signal handling logic sync. 2016-11-18 12:06:55 -06:00
signalsigterm.go Add pipes for parent process IPC. (#311) 2016-08-31 10:45:16 -04:00
upnp.go multi: Error descriptions are in lower case. 2017-09-08 18:03:59 +02:00
version.go release: Bump for v1.2.0. 2018-03-07 13:19:37 -06:00

dcrd

Build Status ISC License GoDoc

dcrd is a Decred full node implementation written in Go (golang).

This acts as a chain daemon for the Decred cryptocurrency. dcrd maintains the entire past transactional ledger of Decred and allows relaying of transactions to other Decred nodes across the world. To read more about Decred please see the project documentation.

Note: To send or receive funds and join Proof-of-Stake mining, you will also need dcrwallet.

This project is currently under active development and is in a Beta state. It is extremely stable and has been in production use since February 2016.

It is forked from btcd which is a bitcoin full node implementation written in Go. btcd is a ongoing project under active development. Because dcrd is constantly synced with btcd codebase, it will get the benefit of btcd's ongoing upgrades to peer and connection handling, database optimization and other blockchain related technology improvements.

Requirements

Go 1.9 or newer.

Getting Started

  • dcrd (and utilities) will now be installed in either $GOROOT/bin or $GOPATH/bin depending on your configuration. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Updating

Windows

Install a newer MSI

Linux/BSD/MacOSX/POSIX - Build from Source

  • Dep

    Dep is used to manage project dependencies and provide reproducible builds. To install:

    go get -u github.com/golang/dep/cmd/dep

Unfortunately, the use of dep prevents a handy tool such as go get from automatically downloading, building, and installing the source in a single command. Instead, the latest project and dependency sources must be first obtained manually with git and dep, and then go is used to build and install the project.

Getting the source:

For a first time installation, the project and dependency sources can be obtained manually with git and dep (create directories as needed):

git clone https://github.com/decred/dcrd $GOPATH/src/github.com/decred/dcrd
cd $GOPATH/src/github.com/decred/dcrd
dep ensure
go install . ./cmd/...

To update an existing source tree, pull the latest changes and install the matching dependencies:

cd $GOPATH/src/github.com/decred/dcrd
git pull
dep ensure
go install . ./cmd/...

For more information about Decred and how to set up your software please go to our docs page at docs.decred.org.

Docker

All tests and linters may be run in a docker container using the script run_tests.sh. This script defaults to using the current supported version of go. You can run it with the major version of Go you would like to use as the only arguement to test a previous on a previous version of Go (generally Decred supports the current version of Go and the previous one).

./run_tests.sh 1.9

To run the tests locally without docker:

./run_tests.sh local

Contact

If you have any further questions you can find us at:

  • irc.freenode.net (channel #decred)
  • webchat
  • forum.decred.org
  • decred.slack.com

Issue Tracker

The integrated github issue tracker is used for this project.

Documentation

The documentation is a work-in-progress. It is located in the docs folder.

License

dcrd is licensed under the copyfree ISC License.