Skip to content

Latest commit

 

History

History
174 lines (140 loc) · 7.72 KB

installation.rst

File metadata and controls

174 lines (140 loc) · 7.72 KB

Unofficial FAQ: Sawtooth Installation and Configuration

[PREVIOUS | HOME | NEXT]

Warning

This FAQ was written by a non-expert so may contain both fiction and fact!

The following setups the Sawtooth stable repository, lists the packages, and installs the core packages (sawtooth, python3-sawtooth-cli, python3-sawtooth-sdk, python3-sawtooth-signing):

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD
$ sudo add-apt-repository 'deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe'
$ sudo apt update
$ aptitude install sawtooth python3-sawtooth-*
$ aptitude search sawtooth
p  python3-sawtooth-block-info     - Sawtooth Block Info Transaction Processor
iA python3-sawtooth-cli            - Sawtooth CLI
p  python3-sawtooth-config         - Sawtooth Config Transaction Processor
p  python3-sawtooth-ias-client     - Sawtooth IAS Client
p  python3-sawtooth-ias-proxy      - Sawtooth IAS Proxy
c  python3-sawtooth-identity       - Sawtooth Identity Transaction Processor
iA python3-sawtooth-intkey         - Sawtooth Intkey Python Example
p  python3-sawtooth-manage         - Sawtooth Lake Management Library
iA python3-sawtooth-poet-cli       - Sawtooth PoET CLI
iA python3-sawtooth-poet-common    - Sawtooth PoET Common Modules
iA python3-sawtooth-poet-core      - Sawtooth Core Consensus Module
iA python3-sawtooth-poet-families  - Sawtooth Transaction Processor Families
p  python3-sawtooth-poet-sgx       - Sawtooth PoET SGX Enclave
iA python3-sawtooth-poet-simulator - Sawtooth PoET Simulator Enclave
iA python3-sawtooth-rest-api       - Sawtooth REST API
i  python3-sawtooth-sdk            - Sawtooth Python SDK
iA python3-sawtooth-settings       - Sawtooth Settings Transaction Processor
iA python3-sawtooth-signing        - Sawtooth Signing Library
iA python3-sawtooth-validator      - Sawtooth Validator
iA python3-sawtooth-xo             - Sawtooth XO Example
i  sawtooth                        - Hyperledger Sawtooth Distributed Ledger
p  sawtooth-admin-tools            - Sawtooth Admin Tools
BB sawtooth-cxx-sdk                - Hyperledger Sawtooth C++ SDK
p  sawtooth-intkey-tp-go           - Sawtooth Intkey TP Go
p  sawtooth-noop-tp-go             - Sawtooth Noop TP Go
p  sawtooth-smallbank-tp-go        - Sawtooth Smallbank TP Go
p  sawtooth-xo-tp-go               - Sawtooth Go XO TP

For more, up-to-date installation information see https://sawtooth.hyperledger.org/docs/core/releases/latest/sysadmin_guide/installation.html

With .toml configuration files in /etc/sawtooth . Examples are in the directory as .toml.example . For details, see https://sawtooth.hyperledger.org/docs/core/nightly/master/sysadmin_guide/configuring_sawtooth.html

Configuration files include:

validator.toml
Validator configuration file
rest_api.toml
REST API configuration file
cli.toml
Sawtooth CLI configuration file
poet_enclave.toml
PoET SGX Enclave configuration file
path.toml
Directory path configuration (or use $SAWTOOTH_HOME)
identity.toml
Identity TP configuration file
settings.toml
Settings TP configuration file
log_config.toml
Log configuration file

More transaction-processor specific configuration files may be present.

The C++ SDK package is in the nightly repository. Until the package dependency is fixed, here's a workaround to force an install:

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 44FC67F19B2466EA
$ sudo apt-add-repository "deb [trusted=yes] http://repo.sawtooth.me/ubuntu/nightly xenial universe"
$ sudo apt update
$ apt download sawtooth-cxx-sdk
$ sudo dpkg -i  sawtooth-cxx-sdk_1.1.1.dev808_amd64.deb
$ pkg contents sawtooth-cxx-sdk

This usually occurs when there is no genesis node created. To create, type the following:

# Create the genesis node:
sawtooth keygen
sawset genesis
sudo -u sawtooth sawadm genesis config-genesis.batch
# Start the validator:
sudo sawadm keygen
sudo -u sawtooth sawtooth-validator -vv

The ownership or permission is wrong. To fix it, type:

$ sudo chown sawtooth:sawtooth /var/lib/sawtooth
$ sudo chmod 750 sawtooth:sawtooth /var/lib/sawtooth
$ ls -ld /var/lib/sawtooth
drwxr-x--- 2 sawtooth sawtooth 4096 Jun  2 14:43 /var/lib/sawtooth

Type the following: sudo -u sawtooth rm -rf /var/lib/sawtooth/*

These commands were added after the Sawtooth 1.0.4 release and are not available in earlier releases.

Use the sawset command. This allows you to change settings such as maximum batches per block or target wait time.

You installed on a 32-bit-only system. Install on a 64-bit system.

Something went wrong with installing Python dependencies or they were removed. In this case, install colorlog with sudo apt install python3-colorlog or with``pip3 install colorlog``

Besides the obvious problem of no disk space, it could be your OS or filesystem does not support sparse files. The LMDB databases used by Sawtooth are 1TB sparse (mostly unallocated) files.

This error can occur when there is no sawtooth user and group. This should have been done by the package postinst script. To add, type addgroup --system sawtooth; adduser --system --ingroup sawtooth sawtooth .

Use git to download the source, then build_all to build. Type ./bin/build_all for options. For example:

$ sawtooth --version
$ git clone https://github.com/hyperledger/sawtooth-core
$ cd sawtooth-core
$ ./bin/build_all -l python

For details, see https://github.com/hyperledger/sawtooth-core/blob/master/BUILD.md

[PREVIOUS | HOME | NEXT]

© Copyright 2018, Intel Corporation.