Setting DAS masternode

in #das7 years ago

This tutorial works fine for those who would like to follow the steps without really thinking what is going on. Just follow the instructions and everything is going to be fine.

Initial setup:

  • Fresh out of the box Ubuntu 16.
  • A local up-to-date DAS wallet (currently, version 12.2).
  • 1000 DAS for the masternode + fees for sending them around.
  • Putty if you are on Windows.
  • http://das.explorerz.top:3002/ to check transactions and block height

We will compile the binaries and apply the checkpoint fix which isn't merged on GitHub by the time this guide was published.

Lazy people can use the precompiled binaries posted on git repository but without any warranty.

Means

  • Remote: Virtual Private Server (VPS), e.g. this one.
  • Local: Your desktop computer.

Connect to the remote server via SSH using putty or from your shell.

Remote

Perform the following commands on the remote server:

sudo apt-get install update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install nano htop git
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install libboost-all-dev

Berkley 4.8:

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

For lazy people only

Download the compiled version from git:

cd
sudo git clone https://github.com/whywefight/DAS-12.2 DAS-Source
cd DAS-Source
sudo mkdir src
sudo cp das* ./src

Start the wallet and keep reading while it is syncing.

Wallet

sudo git clone https://github.com/Truckman83/DAS-source
sudo nano ~/DAS-source/src/chainparams.cpp

Checkpoint fix

Search for:
( 20282, uint256S("0x0000000000089ac18dd60904abddf2345fbe7632b94b8a243646124a656a0055")),

Replace 20282 with 16281 so it looks like:
( 16281, uint256S("0x0000000000089ac18dd60904abddf2345fbe7632b94b8a243646124a656a0055")),

Coming back to the wallet

cd DAS-Source
./autogen.sh
./configure
make
make install # optional
cd src
strip dasd # optional
strip das-cli # optional
strip das-tx # optional

Starting wallet for the initial sync:

sudo ./dasd -daemon
sudo ./das-cli getinfo # Compare the block height against the explorer

While the wallet is syncing we will switch to the local wallet.

Windows local wallet

  • Open the notepad because we will have to copy/paste some data.
  • Open the debug console from the wallet menu.
  • In the wallets debug console type getaccountaddress 0.
  • Copy that value to the notepad (we will call this address "Acc 0" from now on).
  • Copy the output into notepad and head back to the debug console, type masternode genkey.
  • Copy that output into the notepad as well.
  • Send exactly 1000 DAS to the Acc 0 address we just got. Pay attention to the fees that will be charged!
  • Close the wallet (shut it down).

You will now need to navigate to your Roaming Folder, in order to do so:

  • Press the windows key and directly type: %appdata% and hit return.
  • A new window will open, search for the DAS folder and enter it. You will find the das.conf inside.

Unix local wallet

  • Navigate to wherever your local wallet is currently located:

sudo ./das-cli getaccountaddress 0 (we will call this address "Acc 0" from now on).
sudo ./das-cli masternode genkey

  • Copy both outputs in a notepad so that you can copy/paste them later on.
  • Send exactly 1000 DAS to the Acc 0 address we just got. Pay attention to the fees that will be charged!

sudo ./das-cli sendtoaddress <Acc 0> 1000
sudo nano ~/.das/das.conf

For windows and unix local wallets

  • Put the following text in the das.conf file. Remember to change the parameters accordingly.
rpcuser=<username you prefer>
rpcpassword=<password you prefer>
rpcport=9399
masternode=1
masternodeaddr=<your public ip>:9399
masternodeprivkey=<your key, the one you copied to the notepad >
addnode=24.244.180.55
addnode=185.137.97.24
addnode=185.137.97.15
  • Save the file.

Remote

The wallet should be synced by now. Double check it with sudo ./das-cli getblockcount.

Before going on, we will wait for 15 confirmations on the chain for the 1000 DAS transaction. This might take some time. You can check your TX on the explorer. Once it has 15 we are good to go on.

sudo ./das-cli stop (assuming you are still in ~/DAS-source/src/ )
sudo nano ~/.das/das.conf

  • Copy everything from local das.conf and put the same information in the remote das.conf:
rpcuser=<username you prefer>
rpcpassword=<password you prefer>
rpcport=9399
masternode=1
masternodeaddr=<your public ip>:9399
masternodeprivkey=<your key, the one you copied to the notepad >
addnode=24.244.180.55
addnode=185.137.97.24
addnode=185.137.97.15
  • Save and exit.
  • Start the wallet again sudo ./dasd -daemon.
  • Wait a few seconds and run sudo ./das-cli masternode status.

You should get:

{
"vin": "CTxIn(COutPoint(f98d1b1bb96caec4fee3956df907a60c05ef1c74ca9136f07707ea70e9d0b86f, 1), scriptSig=)",
"service": "195.181.243.208:9399",
"pubkey": "D5PDW272NBGBFCzguGTboxp2ABQfp6GUGx",
"status": "Masternode successfully started"
} 

Job's done. You can double check if you see your node in the wallets Masternode list by looking for the Acc 0 address or Public IP.

Issues

  • Acc 0 TX doesn't have 15 confirms: just wait and check the explorer. A restart of the daemon can help.
  • Masternode waiting for remote activation: go to you local wallets debug console and type masternode start. On the Masternode type:sudo ./das-cli masternode start`. Just in case restart the remote wallet.

2 Masternodes on 1 VPS

Follow the above guide once again. You don't have to install the dependencies again and you don't have to compile the wallet.

However, you need a new Acc 0 address and a new Masternode key. You can get them using a separate data directory. In order to get one perform the following steps:

Local wallet

  • Rename your existing wallet.dat or create a shortcut of das-qt.ex, right click it -> properties:

Target needs to be in "" like "C:\das-qt.exe". Put -datadir=<WHAT/EVER/FULL/PATH/YOU/WANT/IT> at the end. Will look like: "C:\das-qt.exe" -datadir=<WHAT/EVER/FULL/PATH/YOU/WANT/IT>

  • Create that folder in the location you have chosen.
  • Start the wallet and let it sync. You have to create an Acc 0 and key again as mentioned above. Send 1000 DAS to that new Acc 0.

Remote

sudo mkdir ~/.das2
cd ~/DAS-source/src
sudo ./dasd -datadir=~/.das2 (sometime this doesnt work, in that case use the absolute path /home/YOURUSERNAME/.das2)

sudo ./das-cli -datadir=~/.das2 stop
sudo nano ~/.das2/.das.conf

Put the following in you das.conf file:

rpcuser=<username you prefer>
rpcpassword=<password you prefer>
rpcport=9499 
bind=<you send public api>:9499 
masternode=1
masternodeaddr=<your public ip>:9399
masternodeprivkey=<your key, the one you copied to the notepad >
addnode=24.244.180.55
addnode=185.137.97.24
addnode=185.137.97.15

Pay attention that you have to use the different port!

Save and exit it.

sudo ./dasd -datadir=~/.das2 -config=~/.das2/.das.conf -daemon

Keep track if its sync with:

sudo ./das-cli -datadir=~/.das2 -config=~/.das2/.das.conf getinfo

Check your Masternode status with:

sudo ./das-cli -datadir=~/.das2 -config=~/.das2/.das.conf masternode status

More masternodes on 1 VPS

Repeat the above steps for setting up more Masternodes. You obviously need a new data dir and conf. Daemons will be controlled by adding the data dir and conf to sudo ./dasd.

Disclaimer:
This guide was originally posted here by @whywefight and was adjusted to make it more readable. Please, consider supporting the author of the guide.

BTC: 1HVgDLFT3xx2RX9H9ZSp3WrCDJevc2CWg5
DAS: DL9LXJWckQZkghLmdeUh2NdyufsdujuceG

Sort:  

How to find masternodeaddr

where to get your public ip for masternoeaddr

Congratulations @m-bernini! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got a First Reply

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @m-bernini! You have received a personal award!

1 Year on Steemit
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - Quarter Finals - Day 2


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @m-bernini! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 97288.28
ETH 3596.14
USDT 1.00
SBD 3.87