This document is meant for people familiar with writing software, and/or blockdag|blockchain technology.
For a description of terms you'll find in this project, please refer to the Glossary of Terms document.
Since most of the code is based off of earlier btcd efforts, soterd's peer communication and RPC protocol are very similar to those used in bitcoin nodes; Knowledge you have of bitcoin node implementations like btcd or bitcoind is transferrable to this project. README files are placed throughout this repository to help you become familiar with the layout and functionality of soterd code.
Soterd can generate, validate, download and advertise blockdag using rules similar to those in Bitcoin Core. Some of Bitcoin Core's BIPs don't apply to blockdag, so features that don't make sense for use with blockdag may be disabled and removed as development continues.
Soterd inherits and extends btcd's block validation testing framework, which contains all of the 'official' bitcoin block acceptance tests (and some additional ones).
Soterd 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).
Like btcd, soterd does not include wallet functionality. soterwallet is intended for making or receive payments with soterd, however it is still being updated from the btcwallet fork to be compatible with soterd. In the meantime, transactions can be demonstrated with the gentx command.
Refer to the Getting started with Docker document for instructions on running soterd without the need for golang and git tooling.
Go 1.11.1 or newer. (It may compile on earlier versions, but is tested on Go 1.11.1 and later)
graphviz, for DAG rendering functionality
-
Install Go according to the installation instructions
-
Ensure Go was installed properly and is a supported version:
$ go version $ go env GOROOT GOPATH GO111MODULE
NOTE: The
GOROOT
andGOPATH
above must not be the same path. It is recommended thatGOPATH
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 yourPATH
at this point. -
If soteria-dag projects aren't publicly available yet, you may need to redirect git requests using https to use ssh instead. This allows
go mod
and related package-management tools to work without prompting you for github credentials.# Add this section to your ~/.gitconfig file [url "ssh://[email protected]/soteria-dag/"] insteadOf = https://github.com/soteria-dag/
-
Run the following commands to obtain soterd, all dependencies, and install it:
$ git clone https://github.com/soteria-dag/soterd $GOPATH/src/github.com/soteria-dag/soterd $ cd $GOPATH/src/github.com/soteria-dag/soterd $ go get -u github.com/Masterminds/glide $ glide install $ GO111MODULE=on go install . ./cmd/...
soterd (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.
- Run the following commands to update soterd, all dependencies, and install it:
$ cd $GOPATH/src/github.com/soteria-dag/soterd
$ git pull && glide install
$ GO111MODULE=on go install . ./cmd/...
Refer to the Getting started with Docker document for instructions on running soterd without the need for golang tooling.
The following command will run a soterd node on testnet
$ soterd --testnet
Refer to the Configuration section of the main README file in the docs folder for information on setting soterd configuration.
If you are interested in seeing a quick demonstration of blockdag in action, dagviz is a good starting point.
See the Developer Resources section of the main docs/README.md file.