Skip to content
Dave Collins edited this page May 13, 2014 · 58 revisions

Table of Contents

  1. About
  2. Getting Started
    1. Installation
      1. Windows
      2. Linux/BSD/MacOSX/POSIX
    2. Configuration
    3. Controlling and Querying btcd via btcctl
    4. Mining
  3. Help
    1. Startup
      1. Using bootstrap.data
    2. Network Configuration
    3. Wallet
  4. Contact
    1. IRC
    2. Mailing Lists
  5. Developer Resources
    1. Code Contribution Guidelines
    2. JSON-RPC Reference
    3. Conformal Bitcoin-related Go Packages
### 1. About btcd is a full node bitcoin implementation written in [Go](http://golang.org), licensed under the [copyfree](http://www.copyfree.org) ISC License.

This project is currently under active development and is in an Alpha state.

It currently properly downloads, validates, and serves the block chain using the exact rules (including bugs) for block acceptance as the reference implementation, bitcoind. We have taken great care to avoid btcd causing a fork to the block chain. It passes all of the 'official' block acceptance tests.

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

One key difference between btcd and bitcoind is that btcd does NOT include wallet functionality and this was a very intentional design decision. See the blog entry for more details. This means you can't actually make or receive payments directly with btcd. That functionality is provided by the btcwallet and btcgui projects which are both under active development.

### 2. Getting Started **2.1 Installation**

The first step is to install btcd. 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**
  • 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 btcd, its dependencies, and install it: $ go get github.com/conformal/btcd/...
    • To upgrade, run the following command: $ go get -u github.com/conformal/btcd/...
  • Run btcd: $ btcd
**2.2 Configuration**

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

**2.3 Controlling and Querying btcd via btcctl**

btcctl is a command line utility that can be used to both control and query btcd via RPC. btcd does not enable its RPC server by default; You must configure at minimum both an RPC username and password:

  • btcd.conf configuration file
[Application Options]
rpcuser=myuser
rpcpass=SomeDecentp4ssw0rd
  • btcctl.conf configuration file
[Application Options]
rpcuser=myuser
rpcpass=SomeDecentp4ssw0rd

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

**2.4 Mining**
btcd currently only supports the `getwork` RPC call; `getblocktemplate` support is under development.

1. Add the payment addresses with the getworkkey option.

[Application Options]
rpcuser=myuser
rpcpass=SomeDecentp4ssw0rd
getworkkey=12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX
getworkkey=1M83ju3EChKYyysmM2FXtLNftbacagd8FR

2. Add btcd'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 btcd RPC certificate into the default system Certificate Authority list.

Ubuntu

  1. Copy rpc.cert to /usr/share/ca-certificates: # cp /home/user/.btcd/rpc.cert /usr/share/ca-certificates/btcd.crt
  2. Add btcd.crt to /etc/ca-certificates.conf: # echo btcd.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 https://127.0.0.1:8334 -u rpcuser -p rpcpassword` ``` ### 3. Help **3.1 Startup**

Typically btcd 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**
* [Using bootstrap.dat](https://github.com/conformal/btcd/wiki/Using-bootstrap.dat) **3.1.2 Network Configuration**
* [What Ports Are Used by Default?](https://github.com/conformal/btcd/wiki/What-Ports-Are-Used-by-Default%3F) * [How To Listen on Specific Interfaces](https://github.com/conformal/btcd/wiki/How-To-Listen-on-Specific-Interfaces) * [Configuring btcd with Tor](https://github.com/conformal/btcd/wiki/Configuring-Tor) **3.1 Wallet**

btcd was intentionally developed without an integrated wallet for security reasons. Please see btcwallet for more information.

### 4. Contact **4.1 IRC**
* [irc.conformal.com](irc://irc.conformal.com:+6697), port 6697, tls, channel #btcd **4.2 Mailing Lists**
* btcd: discussion of btcd and its packages. * btcd-commits: readonly mail-out of source code changes. ### 5. Developer Resources * [Code Contribution Guidelines](https://github.com/conformal/btcd/wiki/Code-Contribution-Guidelines) * [JSON-RPC Reference](https://github.com/conformal/btcd/wiki/JSON-RPC-API) * [RPC Examples](https://github.com/conformal/btcd/wiki/JSON-RPC-API#ExampleCode) * Conformal Bitcoin-related Go Packages: * [btcrpcclient](https://github.com/conformal/btcrpcclient) - Implements a robust and easy to use Websocket-enabled Bitcoin JSON-RPC client * [btcjson](https://github.com/conformal/btcjson) - Provides an extensive API for the underlying JSON-RPC command and return values * [btcws](https://github.com/conformal/btcws) - Custom types for btcd websocket extension commands (registers the extension commands with [btcjson](https://github.com/conformal/btcjson)) * [btcwire](https://github.com/conformal/btcwire) - Implements the Bitcoin wire protocol * [btcchain](https://github.com/conformal/btcchain) - Implements Bitcoin block handling and chain selection rules * [btcscript](https://github.com/conformal/btcscript) - Implements the Bitcoin transaction scripting language * [btcec](https://github.com/conformal/btcec) - Implements support for the elliptic curve cryptographic functions needed for the Bitcoin scripts * [btcdb](https://github.com/conformal/btcdb) - Provides a database interface for the Bitcoin block chain * [btcutil](https://github.com/conformal/btcutil) - Provides Bitcoin-specific convenience functions and types
Clone this wiki locally