Skip to content

Latest commit

 

History

History
260 lines (177 loc) · 11.4 KB

README.md

File metadata and controls

260 lines (177 loc) · 11.4 KB

Table of Contents

  1. About
  2. Getting Started
    1. Docker
    2. Install from source
    3. Configuration
    4. Controlling and Querying soterd via soterctl
    5. Mining
  3. Help
    1. Network Configuration
    2. Wallet
  4. Contact
  5. Developer Resources
    1. Code Contribution Guidelines
    2. JSON-RPC Reference
    3. Utility commands
    4. The soter-related Go Packages
    5. Managers and handlers (goroutines)
    6. Updating RPC Calls
    7. Updating P2P Wire Protocol
    8. Soterd profiling
    9. Soterd startup
  6. Other Soteria projects

soterd is a full soter node implementation written in Go (golang). It started as a fork of the btcd project, where development focus has changed from providing a bitcoin node to providing an implementation of blockdag for soter.

The intent of this project is for it to act as a component in Soteria's Trade Anything Platform (TAP); a pillar of Soteria's Self Sustainable Decentralized Economy vision (SSDE).

For a description of terms you'll find in this project, please refer to the Glossary of Terms document.

Current functionality

Blocks

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

Transactions

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

Excluded functionality

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.

Refer to the Setting up soterd document for instructions on building soterd from source, installing, and running it.

soterd has several configuration options, which you can see with soterd --help.

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

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

OR

[Application Options]
rpclimituser=mylimituser
rpclimitpass=Limitedp4ssw0rd

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

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

    Ubuntu

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

Soterd doesn't include a wallet. 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.

Please refer to the (Soteria website)

  • The cmd directory contains stand-alone utilities that assist in the setup and management of soterd nodes
  • The soter-related Go Packages:
    • addrmgr - A p2p address manager, to help decide which nodes to connect to
    • blockdag - Provides Soter block handling and dag selection rules
    • chaincfg - Defines dag configuration parameters for soter networks * chainhash - Provides a generic hash type and related functions
    • connmgr - A p2p connection manager
    • database - Provides block and metadata storage
    • integration - Integration test suites (inter-node communication, etc)
    • mempool - Provides a policy-enforced pool of unmined soter transactions
    • metrics - Handles receiving runtime metrics from other managers, and makes data available via RPC calls.
    • miningdag - A work-in-progress CPU-based block miner mining/cpuminer
    • netsync - Provides block synchronization between peers
    • peer - Provides p2p communication protocol and functionality for creating and managing network peers
    • rpcclient - A Websocket-enabled Soter JSON-RPC client
    • soterec - Provides support for the elliptic curve cryptographic functions needed for Soter scripts
    • soterjson - Provides an extensive API for the underlying JSON-RPC command and return values
    • soterlog - Provides a logging interface for other packages
    • soterutil - Provides Soter convenience functions and types
    • txscript - Implements the Soter transaction scripting language
    • wire - Implements and extends the Soter wire protocol

Some functionality in soterd is separated out into goroutines that communicate with each other and soterd via channels. There are managers/handlers for:

  • P2P node address tracking
  • P2P network connections
  • Peer state and communication
  • Metrics collection
  • Block mining
  • Block synchronization between this node and the P2P network

For more information on managers and handlers, refer to the Managers and Handlers documentation.

If you're interested in making changes to or adding new RPC calls, see the Adding RPC Calls documentation for notes on what parts of codebase you may need to touch during your efforts.

If you're interested in making changes to the P2P wire protocol for things like blocks or transactions, see the Updating P2P Wire Protocol documentation for notes on what parts of the codebase you may need to touch during your efforts.

When working on soterd code you may want to measure potential performance changes related to your changes. The Soterd profiling document describes how you can do this.

The Soterd startup document has a brief description of the soterd startup process.

These projects are related to soterd, and provide additional functionality:

  • soterwallet - for making or receiving payments with soterd and the soter network. See the Wallet section for a note about its current functionality.
  • soterdash - a web ui that provides information about the soter network.
    • Soterd node info
    • BlockDAG info
      • Blocks
      • Transactions
    • P2P network connectivity