Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Latest commit

 

History

History
299 lines (218 loc) · 10.8 KB

README.md

File metadata and controls

299 lines (218 loc) · 10.8 KB

Table of Contents

  1. About
  2. Getting Started
    1. Installation
      1. Windows
      2. Linux/BSD/MacOSX/POSIX
      3. Gentoo Linux
    2. Configuration
    3. Controlling and Querying gcash via gctl
    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 gcash Bitcoin-related Go Packages

gcash is a full node bitcoin 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 October 2013.

It properly downloads, validates, and serves the block chain using the exact rules (including consensus bugs) for block acceptance as Bitcoin Core. We have taken great care to avoid gcash causing a fork to the block chain. It includes a full block validation testing framework which contains all of the 'official' block acceptance tests (and some additional ones) that is run on every pull request to help ensure it properly follows consensus. Also, it passes all of the JSON test data in the Bitcoin Core code.

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 by the block chain and also includes more strict checks which filter transactions based on miner requirements ("standard" transactions).

One key difference between gcash and Bitcoin Core is that gcash does NOT include wallet functionality and this was a very intentional design decision. See the blog entry here for more details. This means you can't actually make or receive payments directly with gcash. That functionality is provided by the cashwallet and Paymetheus (Windows-only) projects which are both under active development.

2.1 Installation

The first step is to install gcash. 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

  • Ensure Go was installed properly and is a supported version:

$ go version
$ go env GOROOT GOPATH

NOTE: The GOROOT and GOPATH above must not be the same path. It is recommended that GOPATH is set to a directory in your home directory such as ~/goprojects to avoid write permission issues. It is also recommended to add $GOPATH/bin to your PATH at this point.

  • Run the following commands to obtain gcash, all dependencies, and install it:
$ go get -u github.com/Masterminds/glide
$ git clone https://github.com/bcext/gcash $GOPATH/src/github.com/bcext/gcash
$ cd $GOPATH/src/github.com/bcext/gcash
$ glide install
$ go install . ./cmd/...
  • gcash (and utilities) will now be installed in $GOPATH/bin. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Updating

  • Run the following commands to update gcash, all dependencies, and install it:
$ cd $GOPATH/src/github.com/bcext/gcash
$ git pull && glide install
$ go install . ./cmd/...

2.1.2.1 Gentoo Linux Installation

  • Install Layman and enable the Bitcoin overlay.
  • Copy or symlink /var/lib/layman/bitcoin/Documentation/package.keywords/btcd-live to /etc/portage/package.keywords/
  • Install gcash: $ emerge net-p2p/gcash

2.2 Configuration

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

2.3 Controlling and Querying gcash via gctl

gctl is a command line utility that can be used to both control and query gcash via RPC. gcash 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:

  • gcash.conf configuration file
[Application Options]
rpcuser=myuser
rpcpass=SomeDecentp4ssw0rd
rpclimituser=mylimituser
rpclimitpass=Limitedp4ssw0rd
  • gctl.conf configuration file
[Application Options]
rpcuser=myuser
rpcpass=SomeDecentp4ssw0rd

OR

[Application Options]
rpclimituser=mylimituser
rpclimitpass=Limitedp4ssw0rd

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

2.4 Mining

gcash supports the getblocktemplate RPC. The limited user cannot access this RPC.

1. Add the payment addresses with the miningaddr option.

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

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

Ubuntu

  1. Copy rpc.cert to /usr/share/ca-certificates: # cp /home/user/.gcash/rpc.cert /usr/share/ca-certificates/gcash.crt
  2. Add gcash.crt to /etc/ca-certificates.conf: # echo gcash.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.1 Startup

Typically gcash 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

gcash was intentionally developed without an integrated wallet for security reasons. Please see cashwallet for more information.

4.1 IRC

  • irc.freenode.net, channel #gcash

4.2 Mailing Lists

  • gcash: discussion of gcash and its packages.
  • gcash-commits: readonly mail-out of source code changes.
  • The btcsuite Bitcoin-related Go Packages:
    • btcrpcclient - Implements a robust and easy to use Websocket-enabled Bitcoin JSON-RPC client
    • btcjson - Provides an extensive API for the underlying JSON-RPC command and return values
    • wire - Implements the Bitcoin wire protocol
    • peer - Provides a common base for creating and managing Bitcoin network peers.
    • blockchain - Implements Bitcoin block handling and chain selection rules
    • blockchain/fullblocktests - Provides a set of block tests for testing the consensus validation rules
    • txscript - Implements the Bitcoin transaction scripting language
    • btcec - Implements support for the elliptic curve cryptographic functions needed for the Bitcoin scripts
    • database - Provides a database interface for the Bitcoin block chain
    • mempool - Package mempool provides a policy-enforced pool of unmined bitcoin transactions.
    • cashutil - Provides Bitcoin-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 Bitcoin network connection manager.