Skip to content

Latest commit

 

History

History
141 lines (98 loc) · 4.86 KB

build.md

File metadata and controls

141 lines (98 loc) · 4.86 KB

GrinGron - Build, Configuration, and Running

Read this in other languages: Español, Korean, 日本語, 简体中文.

Supported Platforms

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

What's working so far?

  • Linux x86_64 and macOS [gringron + mining + development]
  • Not Windows 10 yet [gringron kind-of builds. No mining yet. Help wanted!]

Requirements

  • rust: Install using rustup: https://rustup.rs
    • GrinGron currently does not support a minimum version of Rust, it is recommended to build using the latest version.
    • If rust is already installed, you can update to the latest version by running 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, Mint, 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/groncoin/gringron.git
cd gringron
cargo build --release

GrinGron 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/gringron - the main gringron binary

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

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

gringron server config

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

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

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

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

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

Configuration

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

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

For help on gringron commands and their switches, try:

gringron help
gringron server --help
gringron client --help

Docker

docker build -t gringron -f etc/Dockerfile .

For testnet, use etc/Dockerfile.testnet instead

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

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

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

Cross-platform builds

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

Using gringron

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

Mining in GrinGron

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

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