Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Latest commit

 

History

History
126 lines (86 loc) · 4.26 KB

build.md

File metadata and controls

126 lines (86 loc) · 4.26 KB

Gotts - Build, Configuration, and Running

Supported Platforms

Longer term, most platforms will likely be supported to some extent. Gotts's programming language rust has build targets for most platforms.

Requirements

  • rust 1.35+ (use rustup- i.e. curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env)
    • if rust is already installed, you can simply update version with rustup update
  • clang
  • ncurses and libs (ncurses, ncursesw5)
  • zlib libs (zlib1g-dev or zlib-devel)
  • pkg-config
  • libssl-dev
  • linux-headers (reported needed on Alpine linux)
  • llvm

For Debian-based distributions (Debian, Ubuntu, etc), all in one line (except Rust):

apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm

For Mac:

xcode-select --install
brew install --with-toolchain llvm
brew install pkg-config
brew install openssl

Build steps

git clone https://github.com/gottstech/gotts.git
cd gotts
cargo build --release

Gotts can also be built in debug mode (without the --release flag, but using the --debug or the --verbose flag) but this will render fast sync prohibitively slow due to the large overhead of cryptographic operations.

Build errors

See Troubleshooting

What was built?

A successful build gets you:

  • target/release/gotts - the main gotts binary

All data, configuration and log files created and used by gotts are located in the hidden ~/.gotts directory (under your user home directory) by default. You can modify all configuration values by editing the file ~/.gotts/main/gotts-server.toml.

It is also possible to have gotts create its data files in the current directory. To do this, run

gotts server config

Which will generate a gotts-server.toml file in the current directory, pre-configured to use the current directory for all of its data. Running gotts from a directory that contains a gotts-server.toml file will use the values in that file instead of the default ~/.gotts/main/gotts-server.toml.

While testing, put the gotts binary on your path like this:

export PATH=`pwd`/target/release:$PATH

assuming you are running from the root directory of your Gotts installation.

You can then run gotts directly (try gotts help for more options).

Configuration

Gotts attempts to run with sensible defaults, and can be further configured via the gotts-server.toml file. This file is generated by gotts on its first run, and contains documentation on each available option.

While it's recommended that you perform all gotts server configuration via gotts-server.toml, it's also possible to supply command line switches to gotts that override any settings in the file.

For help on gotts commands and their switches, try:

gotts help

Docker

docker build -t gotts -f etc/Dockerfile .

For floonet, use etc/Dockerfile.floonet instead

You can bind-mount your gotts cache to run inside the container.

docker run -it -d -v $HOME/.gotts:/root/.gotts gotts

If you prefer to use a docker named volume, you can pass -v dotgotts:/root/.gotts instead. Using a named volume copies default configurations upon volume creation.

Cross-platform builds

Rust (cargo) can build gotts for many platforms, so in theory running gotts as a validating node on your low powered device might be possible. To cross-compile gotts on a x86 Linux platform and produce ARM binaries, say, for a Raspberry Pi.

Using gotts

The wiki page Wallet User Guide and linked pages have more information on what features we have, troubleshooting, etc.

Mining in Gotts

Please note that all mining functions for Gotts have moved into a separate, standalone package called gotts-miner. Once your Gotts code node is up and running, you can start mining by building and running gotts-miner against your running Gotts node.

For gotts-miner to be able to communicate with your gotts node, make sure that you have enable_stratum_server = true in your gotts-server.toml configuration file and you have a wallet listener running (gotts wallet listen).