Table of Contents
- Getting Started
- Developer Resources
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 also properly relays newly mined blocks, maintains a transaction pool, and relays individual transactions that have not yet made it into a block. It ensures all individual transactions admitted to the pool follow the rules required into the block chain and also includes the vast majority of the more strict checks which filter transactions based on miner requirements ("standard" transactions).
2. Getting Started
The first step is to install hcd. See one of the following sections for details on how to install on the supported operating systems.
2.1.1 Windows Installation
- Install the MSI available at: https://github.com/HcashOrg/hcd/releases
- Launch hcd from the Start Menu
2.1.2 Linux/BSD/MacOSX/POSIX Installation
- Install Go according to the installation instructions here: http://golang.org/doc/install
- Run the following command to ensure your Go version is at least version 1.2:
$ go version
- Run the following command to obtain hcd, its dependencies, and install it:
$ go get github.com/HcashOrg/hcd/...
- To upgrade, run the following command:
$ go get -u github.com/HcashOrg/hcd/...
- To upgrade, run the following command:
- Run hcd:
2.3 Controlling and Querying hcd via hcctl
hcctl is a command line utility that can be used to both control and query hcd via RPC. hcd does not enable its RPC server by default; You must configure at minimum both an RPC username and password or both an RPC limited username and password:
- hcd.conf configuration file
[Application Options] rpcuser=myuser rpcpass=SomeDecentp4ssw0rd rpclimituser=mylimituser rpclimitpass=Limitedp4ssw0rd
- hcctl.conf configuration file
[Application Options] rpcuser=myuser rpcpass=SomeDecentp4ssw0rd
[Application Options] rpclimituser=mylimituser rpclimitpass=Limitedp4ssw0rd
For a list of available options, run:
$ hcctl --help
hcd supports both the
getblocktemplate RPCs although the
getwork RPC is deprecated and will likely be removed in a future release.
The limited user cannot access these RPCs.
1. Add the payment addresses with the
[Application Options] rpcuser=myuser rpcpass=SomeDecentp4ssw0rd miningaddr=12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX miningaddr=1M83ju3EChKYyysmM2FXtLNftbacagd8FR
2. Add hcd's RPC TLS certificate to system Certificate Authority list.
- Copy rpc.cert to /usr/share/ca-certificates:
# cp /home/user/.hcd/rpc.cert /usr/share/ca-certificates/hcd.crt
- Add hcd.crt to /etc/ca-certificates.conf:
# echo hcd.crt >> /etc/ca-certificates.conf
- Update the CA certificate list:
3. Set your mining software url to use https.
$ cgminer -o https://127.0.0.1:14009 -u rpcuser -p rpcpassword
Typically hcd will run and start downloading the block chain with no extra
configuration necessary, however, there is an optional method to use a
bootstrap.dat file that may speed up the initial block chain download process.
3.1.2 Network Configuration
- What Ports Are Used by Default?
- How To Listen on Specific Interfaces
- How To Configure RPC Server to Listen on Specific Interfaces
- Configuring hcd with Tor
4. Developer Resources
- The Hc-related Go Packages:
- hcrpcclient - Implements a robust and easy to use Websocket-enabled Hc JSON-RPC client
- hcjson - Provides an extensive API for the underlying JSON-RPC command and return values
- wire - Implements the Hc wire protocol
- peer - Provides a common base for creating and managing Hc network peers.
- blockchain - Implements Hc block handling and chain selection rules
- txscript - Implements the Hc transaction scripting language
- hcec - Implements support for the elliptic curve cryptographic functions needed for the Hc scripts
- database - Provides a database interface for the Hc block chain
- hcutil - Provides Hc-specific convenience functions and types
- chainhash - Provides a generic hash type and associated functions that allows the specific hash algorithm to be abstracted.
- connmgr - Package connmgr implements a generic Hc network connection manager.