Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
209 lines (158 sloc) 7.69 KB

Table of Contents

  1. About
  2. Getting Started
    1. Installation
      1. Windows
      2. Linux/BSD/MacOSX/POSIX
    2. Configuration
    3. Controlling and Querying hcd via hcctl
    4. Mining
  3. Help
    1. Startup
      1. Using bootstrap.dat
    2. Network Configuration
    3. Wallet
  4. Contact
    1. IRC
    2. Mailing Lists
  5. Developer Resources
    1. Code Contribution Guidelines
    2. JSON-RPC Reference
    3. The Hc-related Go Packages

1. About

hcd is a full node hc implementation written in Go, licensed under the copyfree ISC License.

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

2.1 Installation

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

2.1.2 Linux/BSD/MacOSX/POSIX Installation

2.2 Configuration

hcd has a number of configuration options, which can be viewed by running: $ hcd --help.

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]
  • hcctl.conf configuration file
[Application Options]


[Application Options]

For a list of available options, run: $ hcctl --help

2.4 Mining
hcd supports both the getwork and 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 miningaddr option.

[Application Options]

2. Add hcd's RPC TLS certificate to system Certificate Authority list.

cgminer uses curl to fetch data from the RPC server. Since curl validates the certificate by default, we must install the hcd RPC certificate into the default system Certificate Authority list.


  1. Copy rpc.cert to /usr/share/ca-certificates: # cp /home/user/.hcd/rpc.cert /usr/share/ca-certificates/hcd.crt
  2. Add hcd.crt to /etc/ca-certificates.conf: # echo hcd.crt >> /etc/ca-certificates.conf
  3. Update the CA certificate list: # update-ca-certificates

3. Set your mining software url to use https.

$ cgminer -o -u rpcuser -p rpcpassword

3. Help

3.1 Startup

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.1 bootstrap.dat

3.1.2 Network Configuration

3.1 Wallet

hcd was intentionally developed without an integrated wallet for security reasons. Please see hcwallet for more information.

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.