This document outlines the steps required to install and create a Dash 12.1 masternode for testnet testing.
Below tested on ubuntu 14, ubuntu 16
- Linux OS
- sudo
- Mysql 5.5 or 5.7
- Python 2
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
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 ;
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/
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
git clone https://github.com/nmarley/sentinel.git && cd sentinel
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
supply the mysql root password when prompted
./setup-mysql.sh
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!
With recent updates to 12.1, masternodeaddr=ADDR should be updated to externalip=ADDR.