dashpay/tenderdash

doc: notes on latest install attempt

Opened this issue · 2 comments

For updating https://github.com/dashpay/docs/blob/20.0.0/docs/user/masternodes/setup-testnet.rst

Overview

Table of Contents

System Requirements

Pre-Reqs

  • Install libgmp-dev
    sudo apt install -y libgmp-dev
  • Install Go
    curl -sS https://webi.sh/go | sh

Build Tenderdash

IMPORTANT
Check https://github.com/dashpay/tenderdash to see whether it's actually master or something else, like v0.14-dev, that's the current working "main" branch.

git clone --depth 1 --single-branch --branch v0.14-dev https://github.com/dashpay/tenderdash ./tenderdash/

pushd ./tenderdash/
    make install-bls
    make build-linux

    mkdir -p ~/bin/
    install -t ~/bin/ ./build/*
popd

Config

sed -i 's/\(^moniker.*\)/#\1/' ~/.tenderdash/config/config.toml

# this WILL NOT work
# (it seems that `timeout_commit` is no longer a valid key - nor is `timeout-commit`)
#sed -i 's/^timeout_commit.*/timeout_commit = "500ms"/' ~/.tenderdash/config/config.toml

# this must use dashes rather than underscores
# sed -i 's/^create_empty_blocks_interval.*/create_empty_blocks_interval = "3m"/' ~/.tenderdash/config/config.toml
# DO this instead
sed -i 's/^create-empty-blocks-interval.*/create-empty-blocks-interval = "3m"/' ~/.tenderdash/config/config.toml

# these all work as expected
sed -i 's/^namespace.*/namespace = "drive_tendermint"/' ~/.tenderdash/config/config.toml

sed -i 's/^bootstrap-peers.*/bootstrap-peers = "74907790a03b51ac062c8a1453dafd72a08668a3@35.92.167.154:36656,2006632eb20e670923d13d4f53abc24468eaad4d@52.12.116.10:36656"/' ~/.tenderdash/config/config.toml

sed -i 's/^core-rpc-host.*/core-rpc-host = "localhost:19998"/' ~/.tenderdash/config/config.toml
curl --fail-with-body -sS https://gist.githubusercontent.com/strophy/d8665f30aa7544785439e5973a98a1c5/raw/ab254ae5ff4e176daaf6a53c7448e527fe5800d2/genesis.json > ~/.tenderdash/config/genesis.json

Install as a service

curl -sS https://webi.sh/serviceman | sh

pushd ~/.tenderdash/
my_user="$(id -u -n)"
sudo env PATH="$PATH" \
    serviceman add --name tenderdash --system --username "${my_user}" -- \
    tenderdash node --home ~/.tenderdash/ 
popd
kxcd commented

My preference is not to install GO from a random online shell script, but rather to go to the source and then install it where ever I choose, since it is not required beyond building tenderdash, I install it to /tmp and after the build I longer refer to it. IMO these instructions reduce the clarity of what we are trying to do here and that's less desirable.

@kxcd these are my notes, not a PR.

However, I can see how someone who is more advanced like you and knows how to fix the permission issues caused by the .pkg installer and how to put things in the correct FHS dirs and add it to the PATH would want to do it manually. These instructions are ones that anyone could follow - without having to learn the peculiarities of Go, for example. And they work in containers, Docker, etc.