Skip to content

Instantly share code, notes, and snippets.

@moocowmoo
Last active November 27, 2016 10:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save moocowmoo/66049a781f8eaa1021306072f19363d4 to your computer and use it in GitHub Desktop.
Save moocowmoo/66049a781f8eaa1021306072f19363d4 to your computer and use it in GitHub Desktop.
Sentinel Install Instructions

Dash 12.1 Installation (DRAFT)

This document outlines the steps required to install and create a Dash 12.1 masternode for testnet testing.

Platforms

Below tested on ubuntu 14, ubuntu 16

Requirements

  • Linux OS
  • sudo
  • Mysql 5.5 or 5.7
  • Python 2

INSTALLATION

The following assumes a fresh ubuntu install with no dash installed.

###filesystem changes in 12.1

If working on an existing testnet install, note that

  • the config and runtime folder ~/.dash has been moved to ~/.dashcore

install prerequisites

Get all packages up to date

sudo apt-get update ; sudo apt-get upgrade ;

Install mysql-server, set a strong root password when prompted. (you will need it during the sentinel install.)

sudo apt-get install git mysql-server python-dev python-virtualenv ;

install dashd

mkdir .dashcore
cd .dashcore

download the version for your platform

# 32 bit
wget https://dashpay.atlassian.net/builds/browse/DASHL-DEV/latestSuccessful/artifact/JOB1/gitian-linux-dash-dist/dashcore-0.12.1-linux32.tar.gz
# 64 bit
wget https://dashpay.atlassian.net/builds/browse/DASHL-DEV/latestSuccessful/artifact/JOB1/gitian-linux-dash-dist/dashcore-0.12.1-linux64.tar.gz

unpack dashd

tar zxvf dashcore-0.12.1-linux64.tar.gz

create symlinks

ln -s dashcore-0.12.1/bin/dashd .
ln -s dashcore-0.12.1/bin/dash-cli .

add to path

export PATH=~/.dashcore:$PATH ; echo 'export PATH=~/.dashcore:$PATH' >> ~/.bash_aliases;

create testnet dash.conf

echo 'daemon=1
server=1
listen=1
testnet=1
rpcuser=anythingyoulike
rpcpassword=anythingyoulike

#masternode=1
#masternodeprivkey=
#externalip=' >> dash.conf

start up dashd

dashd

wait for testnet sync (few minutes)

dash-cli getinfo

compare getinfo block count with one of:

* https://test.explorer.dash.org/
* http://test-insight.dev.dash.org/

create masternode

get masternode funding address from wallet

dash-cli getnewaddress

send 1000 tDash to your address from one of

####add masternode values to dash.conf

generate masternode privkey

dash-cli masternode genkey

get public ip address

curl https://icanhazip.com

update dash.conf

nano dash.conf
# uncomment all masternode lines (remove #'s)
# add genkey output to end of masternodeprivkey line
# add public ip address and ':19999' to externalip

it should look something like this example conf

masternode=1
masternodeprivkey=92yN5JgXVda1DmTY49n68pRvrJX7zavzGiUn9VL12TEj6VnBFEV
externalip=123.123.123.123:19999

####add masternode values to masternode.conf

get your funding transaction id and index

dash-cli masternode outputs

add your values to the end of testnet3/masternode.conf

nano testnet3/masternode.conf
# add the following line to the end of the conf, replacing your values from above 
mn1 <externalip> <masternodeprivkey> <funding_txid> <funding_index>
# it should look something like this
mn1 123.123.123.123:19999 92yN5JgXVda1DmTY49n68pRvrJX7zavzGiUn9VL12TEj6VnBFEV 3306cc39dcef6f33ae703e9d634c019ea1d70e1b6da5125648eff3b650f63d0b 1

restart dashd

dash-cli stop ; sleep 15 
dashd

####start masternode

wait a few minutes after restart to allow full synchronizatin

dash-cli masternode start-missing

check for start

dash-cli masternode debug

should return

Masternode successfully started

install sentinel

git clone https://github.com/nmarley/sentinel.git && cd sentinel
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

configure database

supply the mysql root password when prompted

./setup-mysql.sh

run sentinel tests

py.test test

###install crontab script

####verify crontab script works

the following command should show NO output (replace YOURUSERNAME with yours)

cd /home/YOURUSERNAME/.dashcore/sentinel && venv/bin/python scripts/crontab.py

####configure crontab

crontab -e

insert the following line into crontab to invoke sentinel every two minutes. (replace YOURUSERNAME with yours)

*/2 * * * * cd /home/YOURUSERNAME/.dashcore/sentinel && venv/bin/python scripts/crontab.py >/dev/null 2>&1

##celebrate!

@eduffield222
Copy link

With recent updates to 12.1, masternodeaddr=ADDR should be updated to externalip=ADDR.

@schinzelh
Copy link

schinzelh commented Oct 31, 2016

Recent packaging update changed the distribution file/archive name:

It's

wget https://dashpay.atlassian.net/builds/browse/DASHL-DEV/latestSuccessful/artifact/JOB1/gitian-linux-dash-dist/dashcore-0.12.1-linux64.tar.gz

now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment