Skip to content

Instantly share code, notes, and snippets.

@kaypon
Last active July 11, 2019 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaypon/6498a3df63d1f2551a6a7d1d14195ce9 to your computer and use it in GitHub Desktop.
Save kaypon/6498a3df63d1f2551a6a7d1d14195ce9 to your computer and use it in GitHub Desktop.
Script followed during 'How to set up an ANON masternode' tutorial

Masternode Setup

Hello and welcome! My name is kevin, I'm a core developer at ANON. Today I'll be going over what is a Masternode, and the process of how to set one up.

What is a masternode?

What is a masternode, and why would you want one?

Please note: I am by no means a financial advisor, this video is intended to inform and demonstrate to you the process of setting up a masternode. As with everything in crypto, do your due diligence and do not invest any money you are not prepared to lose.

Similar to bitcoin, ANON offers a reward to the miners who use their hardware to mine blocks, this reward is paid out to whichever miner finds the correct solution linked to that block. Unlike bitcoin, however, ANON implements masternodes which enable faster transactions and implement governance on the blockchain. A masternode is required to be online 24/7 and vote on active governance proposals. As a reward for providing these services, masternodes receive a percentage of the block rewards.

Block rewards are then divided:

- 65% to the MINERS
- 35% to the MASTERNODES

Masternodes are a great way to participate in crypto if you don't have the time to be actively trading on markets or keeping up with the ever changing crypto universe. Masternodes at the most basic level, can be thought of as interest bearing savings accounts.

Requirements:

To run a masternode you will need the following:

- 10000 ANON
- VPS (virtual private server) running Linux with a dedicated/static IP address with ANON FULL NODE installed.
- A home computer/laptop with ANON FULL NODE installed to monitor your master node.

For this tutorial, I will be working in the command line. The command line may be confusing but if you follow correctly you will have zero problems setting up your own masternode.

As of right now, there are no online solutions to set up masternodes or masternode pooling.

Local setup

This tutorial assumes that you have a basic understanding of how to operate within the command line, and have run a crypto full node before. Also important to note, you will need to have installed the ANON full node on both your local computer and the VPS detailed below.

The following commands are run on your local computer, lets check if ANON is running correctly.

./src/anon-cli -testnet getinfo

If that doesn't work, make sure you are running the full node on testnet by including the flag -testnet

./src/anond -testnet

For the sake of this video, I'm going to set up an alias to speed things along.

alias ant="./src/anon-cli -testnet

Super handy. Now we need to set up our addresses and move money.

ant getaccountaddress 0

This will give you the address 0 linked to your account. Copy this and save it on a new text document. Next, send exactly 500 ANON to that address.

ant sendtoaddress <accountaddress0> 10000

This will return a transaction. Copy that transaction and save it. Now we need a private key for your masternode.

ant masternode genkey

This returns a newly generated private key. Copy this and save it. Now you will need to modify the masternode.conf file which is stored in the same directory as you anon.conf file.

The final bit of information you will need is the masternodes output. Run the following:

ant masternode outputs

You should receive a response with your transaction output hash you received from sending the 500 ANON, and transaction output index of either "0" or "1".

cd /Users/kevinvanderpoll/Library/Application Support/anon

You'll need to edit the masternode.conf file and add the following lines:

FORMAT: <alias_name> <externalip> <mn_priv_key> <tx_hash> <output_index>

Insert the values you received from earlier.

VPS setup

Lets go ahead and get a server to work on. There are many solutions out there such as Linode, Digital Ocean, Vultr and more.

I've already set up my VPS, if you need more information on how to set the VPS up, check the links in the description.

Next, install the ANON full node client on the VPS as normal as described in the readme.md. The link can be found here

Now lets ssh into our server.

ssh name@ip.ip.ip.ip

So now you can see I'm inside my server and I can access it just like any normal Linux system through terminal.

Now we need to move into the directory where masternode.conf is stored. On Linux this can be found in the hidden directory where you installed ANON.

Now you will need to open you anon.conf file where ever it may be stored.

Add the following lines to your anon.conf:

masternode=1
masternodeprivkey=<mn_priv_key>
externalip=<this_node_ip>

Restart the node.

@Zorro-Aster
Copy link

Hey Kevin - could this be updated to 10,000 ANON or removed if you don't want to keep it updated? Some people are finding it and getting confused by the collateral amount. Thanks!

@kaypon
Copy link
Author

kaypon commented Jul 11, 2019

Hey Kevin - could this be updated to 10,000 ANON or removed if you don't want to keep it updated? Some people are finding it and getting confused by the collateral amount. Thanks!

Done Z, sorry for that!

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