Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Masternode start-many Guide

Discussion in 'Masternode Guides' started by DrkMiner, Nov 16, 2014.

  1. DrkMiner

    DrkMiner Member

    Joined:
    Jun 7, 2014
    Messages:
    204
    Likes Received:
    63
    Trophy Points:
    88
    Masternode start-many Guide

    The command Masternode start-many is still under development and might not function as good as the regular setup!

    Running and updating several Masternodes means you must have a separate wallet containing the 1000 DRK for each node. All wallets and their data folders have to be synchronized with the network in order to run properly.

    The latest release 10.16.15 supports the option to run a number of nodes from a single wallet with one data folder. Running the nodes from that wallet and starting the nodes with one command is much easier.

    We will still need a separate DRK address (with 1000 DRK) per node in the new wallet.

    This is not a beginner guide and some knowledge in setup and running a masternode is needed.

    How it works
    Was explained by UdjinM6
    "https://darkcointalk.org/threads/v10-16-onyx-v2.2982/page-16#post-29792
    Wallet just reads IP + masternodeprivatekey from single line in masternode conf and takes the first vin that is available (contains unspent 1000 DRK) and use it to start masternode.
    Then it repeats until the end of the file.
    So there is no right or wrong public key for the ip address because there is no column for vin or corresponding public key in masternode.conf - they are not tied now."

    Let's Start!

    1. We have two setup options:

    a. New wallet setup - creation on new addresses and DRK transfer.
    b. Consolidation - transfer several "old" wallets into one new wallet.​

    2. darkcoin.conf and masternode.conf setup.

    a. New wallet setup
    • Create a new address per Masternode and encrypt the wallet.
    • IMPORTENT! Please backup the wallet now. Always backup the wallet BEFORE transferring any DRK!
    • Transfer 1000 DRK to each newly created address.

    b. Consolidation of old wallets setup
    • Get the private keys of all "old" addresses (Hot wallets). Command : "dumpprivkey <your-old-Darkcoin-address-here>"
    • Install a new wallet (one address zero DRK).
    • If you encrypted your wallet, you will need to unlock it before you import the keys. Command: "walletpassphrase <passphrase> <timeout>"
    • Now on the new wallet "importprivkey <my priv key>" be patient might take some time to rescan the blockchain and import all the previous transactions of that address.
    • All newly imported address end up in the "Addresses" Tab. Right mouse click the address and edit its Label (Ex. MN1, MN2 etc). Leave the Address field as is!
      Click "OK", that will move the address to the "Receive" Tab.
    • After all addresses were imported encrypt the wallet and create a backup!
    • Keep a backup of ALL "old" wallets for security.
    darkcoin.conf setup
    Local darkcoin.conf
    masternodeprivkey was generated from Local wallet and used just to get the client to load.
    (qt refuses to load without masternodeprivkey when masternode=1)
    Code:
    rpcuser=your-user-name
    rpcpassword=your-long-password
    rpcallowip=127.0.0.1
    listen=0
    server=1
    daemon=1
    logtimestamps=1
    masternode=1
    masternodeprivkey=7aaaaaaaaaaaaaaaaaaa Generated from LOCAL wallet!
    addnode=23.23.186.131
    
    Remote darkcoin.conf
    masternodeprivkey was generated from Local wallet.
    Code:
    rpcuser=your-user-name
    rpcpassword=your-long-password
    rpcallowip=127.0.0.1
    listen=1
    server=1
    daemon=1
    logtimestamps=1
    maxconnections=256
    masternode=1
    masternodeprivkey=7bbbbbbbbbbbbbbbbbbb Generated from LOCAL wallet!
    addnode=23.23.186.131
    
    masternode.conf setup
    Location of masternode.conf: under same directory as darkcoin-qt.exe
    Code:
    178.25.36.78:9999 7bbbbbbbbbbbbbbbbbbb Generated from LOCAL wallet!
    
    Please note that the masternodeprivkey of the remote darkcoin.conf and the masternode.conf must be identical!

    Exaple of masternode.conf (5 nodes)
    Code:
    178.25.36.78:9999 7bbbbbbbbbbbbbbbbbbb
    100.20.6.70:9999 7ccccccccccccccccccccc
    78.45.77.99:9999 7ddddddddddddddddddd
    108.122.10.53:9999 7eeeeeeeeeeeeeeeeeee
    85.63.14.7:9999 7ffffffffffffffffffff
    
    A new masternodeprivkey must be generated for each Masternode.
    The masternodeprivkey is identical to the one in the remote darkcoin.conf of that IP.

    How to start the Masternodes

    masternode start-many

    since the wallet doesn't confirm the start, the best way is to grep and check if your IP's are on the list.

    I'm running a script that greps all the IP's to check if they are on the list.

    Currently there is no "stop-many" and stopping the nodes is an issue.

    Since there are no documentation on start-many, it was trial and error for me.
    would love to get input from members that are using start-many so we could correct and update this guide.

    Good Luck! ;)
     
    #1 DrkMiner, Nov 16, 2014
    Last edited by a moderator: Nov 25, 2014
    • Like Like x 11
  2. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,205
    Likes Received:
    1,117
    Trophy Points:
    1,183
    This statement is ambiguous and confusing.

    Is it listed in darcoin.conf one time?

    Did you run the qt with this in it one time, then close the qt, then delete this line, then run qt again without this line?

    What does "used only once" mean?

    Is this masternodeprivkey a copy of one that also exists in the masternode.conf? Or is it standalone? Is it a throw away used just to get the client to load the first time, then deleted and not included in masternode.conf?

    qt refuses to load if this line is removed and masternode=1 is also present. There is no "used once" possibility, it has to be used always and forever.
     
  3. DrkMiner

    DrkMiner Member

    Joined:
    Jun 7, 2014
    Messages:
    204
    Likes Received:
    63
    Trophy Points:
    88
    Thanks! removed. Is it is used just to get the client to load.
     
  4. Lariondos

    Lariondos Well-known Member
    Foundation Member

    Joined:
    Apr 8, 2014
    Messages:
    89
    Likes Received:
    61
    Trophy Points:
    158
    A small correction: You can unlock an encrypted wallet with
    walletpassphrase <passphrase> <timeout>
    So it's still possible to add more privkeys to an encrypted wallet later on.
     
  5. DrkMiner

    DrkMiner Member

    Joined:
    Jun 7, 2014
    Messages:
    204
    Likes Received:
    63
    Trophy Points:
    88
    Thanks! will Correct.
     
  6. Diirk

    Diirk New Member

    Joined:
    May 27, 2014
    Messages:
    21
    Likes Received:
    31
    Trophy Points:
    13
    Question: Does each masternode using the same start-many batch need a different masternodeprivkey or should they all be the same?

    I'm asking because the following implies that different keys are needed (copy+pasted from first post):
    1. 178.25.36.78:9999 7bbbbbbbbbbbbbbbbbbb
    2. 100.20.6.70:9999 7ccccccccccccccccccccc
    3. 78.45.77.99:9999 7ddddddddddddddddddd
    4. 108.122.10.53:9999 7eeeeeeeeeeeeeeeeeee
    5. 85.63.14.7:9999 7ffffffffffffffffffff

    However, the rest of the explanation kind of implies that all should use the same privkey. If they should all use the same, you might want to change the example of the masternode.conf file.
     
    #6 Diirk, Nov 25, 2014
    Last edited by a moderator: Nov 25, 2014
  7. oblox

    oblox Well-known Member

    Joined:
    Aug 6, 2014
    Messages:
    1,032
    Likes Received:
    537
    Trophy Points:
    183
    All different, just like each masternode is unique.
     
  8. Diirk

    Diirk New Member

    Joined:
    May 27, 2014
    Messages:
    21
    Likes Received:
    31
    Trophy Points:
    13
    Is the masternode start-many command broken since last update? I can't get it to work anymore, all my masternodes report "not capable masternode" after running the command. Before the update everything worked fine.
     
  9. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    it is reported to not work anymore. not sure what the plans are currently.
     
  10. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,139
    Likes Received:
    815
    Trophy Points:
    283
  11. Propulsion

    Propulsion The buck stops here.

    Joined:
    Feb 26, 2014
    Messages:
    1,008
    Likes Received:
    467
    Trophy Points:
    183
    Dash Address:
    XerHCGryyfZttUc6mnuRY3FNJzU1Jm9u5L
    New version doesn't seem to work still. Only the first MN is propagating in the updated version.

    When issuing the command 'start-many' it returns "successfully started MNcount of nodes."

    Also masternode list-config returns the correct format as well. Possibly some more bugs that need to be worked out with "Start-many".
     
  12. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,205
    Likes Received:
    1,117
    Trophy Points:
    1,183
    https://github.com/darkcoin/darkcoin/pull/75

    I still think there is more to the issues tho...
    Code:
    $ ssh -t [email protected] "~/.darkcoin/darkcoind masternode list"
    ...
      "xxx.xxx.xxx.xxx:9999" : 1
    ...
    Connection to xxx.xxx.xxx.xxx closed.
    $
    
    Cool, lets fire it up!
    Code:
    $ ssh -t [email protected] "~/.darkcoin/darkcoind masternode start"
    [email protected]'s password:
    not capable masternode: Unknown.
    $
    
    But it just told me that it was there...
    Code:
    $ ssh -t [email protected] "~/.darkcoin/darkcoind masternode list"
    ...
      "xxx.xxx.xxx.xxx:9999" : 1
    ...
    Connection to xxx.xxx.xxx.xxx closed.
    $
    
    sadface

    It doesn't identify itself when it is on the list, either. So it's not just the announcement that has issues...

    I miss the old start-many. Crude, but effective. Hard to screw it up. Like a 12ga zip gun. Fancy stuff takes time I guess...
     
    #12 camosoul, Dec 16, 2014
    Last edited by a moderator: Dec 17, 2014
  13. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,205
    Likes Received:
    1,117
    Trophy Points:
    1,183
    Isn't that Heady whats-her-name with the band hopping whatchamajigger?
     
    • Like Like x 1
  14. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,139
    Likes Received:
    815
    Trophy Points:
    283
    One of my heroes.
     
  15. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,205
    Likes Received:
    1,117
    Trophy Points:
    1,183
    Too bad she's all dead now, she had such a sexy brain...
     
  16. BolehVPN

    BolehVPN Active Member

    Joined:
    Nov 24, 2014
    Messages:
    195
    Likes Received:
    301
    Trophy Points:
    123
    • Like Like x 1
  17. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,945
    Likes Received:
    6,728
    Trophy Points:
    1,283
    Can you please start working on "rebranding" the guide ?!
    that would be great and super appreciated
    Tx
     
  18. orangecycle

    orangecycle Well-known Member
    Foundation Member

    Joined:
    Oct 2, 2014
    Messages:
    169
    Likes Received:
    239
    Trophy Points:
    203
    There is a guide up on GitHub. I just created a pull request that changes the DRK references to DASH.
    https://github.com/darkcoin/darkcoin/pull/283
     
    • Like Like x 1
  19. zoro1

    zoro1 New Member

    Joined:
    Jun 18, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    hi guys,
    i have setup ubuntu 14.04 in my machine and run succesfully a dashd instance resulting in a masternode.
    i have a second wallet with 1000 dash and want to run a second instance of dashd to the same machine to run a second masternode as a different user but i cannot!
    do i need to run the second dashd at a different port than 9999 and how can i do that?
    thanks