Advertisement
Guest User

force-setup.md

a guest
Dec 8th, 2017
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.94 KB | None | 0 0
  1. # Masternode Guide
  2.  
  3. Steps below setup a cold storage node, this means the collateral remains in your main wallet that you can take offline to keep the funds secure.
  4.  
  5. ## Required
  6.  
  7. * 500.000 force as collateral for the masternode.
  8. * Remote computer to run the masternode, this is usaly a vps.
  9. * A secure computer to run the cold wallet that holds collateral.
  10.  
  11. ## Setup
  12.  
  13. ### Stage 01
  14.  
  15. On the cold wallet
  16.  
  17. 1) Generate a masternode key
  18.  
  19. In the wallet menu go to:
  20. Help > Debug Window > Console
  21.  
  22. A new window opens up with the console in here type:
  23. ~~~
  24. masternode genkey
  25. ~~~
  26.  
  27. The return value of this command is your masternodes key, this key is used to prove you own the collateral for the node without having to share the private key that is able to spend the coins.
  28.  
  29. 2) Create a collateral address
  30.  
  31. In the wallet menu go to:
  32. Help > Debug Window > Console
  33.  
  34. A new window opens up with the console in here type:
  35. ~~~
  36. getaccountaddress masternode
  37. ~~~
  38.  
  39. This command will return an address you send the fund to. Note: 'masternode' is the label of the address in the wallet, if you have multiple masternodes it is best to create a unique address and label per node.
  40.  
  41. 3) Setup the collateral
  42.  
  43. Send 500k force to the address generated in the previous step.
  44.  
  45. To use the collateral one needs to get the transaction id (txid) and the index of the output index (vin) in that transaction.
  46.  
  47. a) Use the debug console
  48.  
  49. Type in command:
  50. ~~~
  51. masternode outputs
  52. ~~~
  53.  
  54. This returns a list of key value pairs (or just one value pair) that holds the info needed. One of the key value pair is new txid and vin for the node.
  55.  
  56. ~~~
  57. {
  58. "<letters and numbers>":"<0 or 1>",
  59. "<letters and numbers>":"<0 or 1>",
  60. ...
  61. }
  62. ~~~
  63.  
  64. b) Use the explorer
  65.  
  66. Look up the address on the explorer http://for.explorerz.top:3027, sins it is a new address and only one transaction should be send to it you can see the transaction id.
  67.  
  68. By clicking on the transaction id you can see the outputs, assuming that the transaction has a remainder you will see two Recipients. One is the collateral the other is the change; if the collateral is above the change or there is no change your vin is 0 else it is 1.
  69.  
  70. ### Stage 02
  71.  
  72. On the remote server.
  73.  
  74. Note: Setting up a secure and stable server is a whole topic of it's own. Sins this guide only looks at a cold wallet setup your funds are never at risk sins they remain on the cold wallet and the server has no info to spend them.
  75.  
  76. Note: I assume you are able to rent a vps and connect to it using putty or some other secure shell. Second assumption is that you are using Ubuntu 16.04 as OS.
  77.  
  78. Providers:
  79. https://www.vultr.com/
  80. https://www.digitalocean.com/
  81.  
  82. a) Using setup script
  83.  
  84. ~~~
  85. wget https://raw.githubusercontent.com/forceunited/force-masternode-setup-ubuntu/master/16-04-setup.sh
  86. ~~~
  87.  
  88. Next make the script executable and then execute it.
  89. ~~~
  90. chmod +x 16-04-setup.sh
  91. ./16-04-setup.sh
  92. ~~~
  93.  
  94. b) Manual setup
  95.  
  96. Update and install deps:
  97. ~~~
  98. sudo apt-get update -y
  99. sudo apt-get dist-upgrade -y
  100. sudo apt-get -y update
  101. sudo apt-get -y install build-essential libssl-dev libdb+-dev libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev libgmp-dev libgmp3-dev autoconf autogen automake libtool unzip
  102. ~~~
  103.  
  104. Get source (adjust for last version)
  105. ~~~
  106. wget https://github.com/forceunited/force/archive/v3.6.0.0.tar.gz
  107. tar xvf v3.6.0.0.tar.gz
  108. rm v3.6.0.0.tar.gz
  109. cd force-3.6.0.0/
  110. ~~~
  111.  
  112. Build and copy the executable
  113. (the make command will take a while)
  114. ~~~
  115. cd src
  116. make -f makefile.unix
  117. cp ./Forced ~/Forced
  118. cd ~/
  119. ~~~
  120.  
  121. Setup the configuration
  122. ~~~
  123. mkdir ~/.Force
  124. nano ~/.Force/Force.conf
  125. ~~~
  126.  
  127. Put the info below in the configuration file and replace '<...>' with your info.
  128. ~~~
  129. rpcuser=<my-random-unused-name>
  130. rpcpassword=<my-random-unused-pass>
  131. rpcallowip=127.0.0.1
  132. listen=1
  133. server=1
  134. daemon=1
  135. staking=0
  136. masternodeaddr=<vps ip>:37246
  137. masternode=1
  138. masternodeprivkey=<masternode key>
  139. ~~~
  140.  
  141. Start the node (enter to go back)
  142. ~~~
  143. ./Forced -daemon
  144. ~~~
  145.  
  146. Make sure it is running
  147. ~~~
  148. ./Forced getinfo
  149. ~~~
  150.  
  151. At this point your node is ready for the start command to be send from the cold wallet. Log out of the vps and make sure it keeps running.
  152.  
  153. ### Stage 03
  154.  
  155. Back on the cold wallet.
  156.  
  157. In the wallet go to:
  158. Supernodes > My Master Nodes > Create ...
  159.  
  160. A new window pops up asking you for node info.
  161.  
  162. ~~~
  163. Alias: <a name for the node>
  164. Address: <vps ip>:37246
  165. PrivKey: <masternode key>
  166. TxHash: <txid>
  167. Output Index: <vin>
  168. Reward Address: <optional other address to recieve rewards>
  169. Reward %: <optional percentage of coins to send to other address>
  170. ~~~
  171.  
  172. Press 'ok' and then 'update' in the main window. The node should now be visable in the list and you can select it followed by the start command to get it running. Leave the
  173. cold wallet open for a while so it can send the command and shortly after you should see rewards comming in.
  174.  
  175. ## Done
  176.  
  177. That is all there is to it, enjoy the returns and hodl.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement