Peerplays Launched! Your guide on how to become a witness

Now that PeerPlays has launched, many people are still lost on how to set up a witness.

What is PeerPlays?

PeerPlays is a decentralized platform for gambling, based on BitShares (the precursor to Steemit). It could have a variety of uses including sports betting, lotteries, dice games, etc.

How do I get a witness?

Luckily, I've ported over my popular Steem-in-a-box software, so setting up a witness is a breeze!

My company @privex can even get you a server paid with STEEM for your PeerPlays witness. (@privex actually runs a seed inside the network, meaning you'll sync in 30 seconds flat)

Let's get started.

Since the account faucet isn't online yet, you'll need to ask in the Telegram for an account: https://telegram.me/PeerplaysWitness

Once you have an account, you'll need to get a Linux server, I recommend using Ubuntu 16.04. Right now PeerPlays has low requirements, you'll only need a 1-2GB RAM server (but you might want to invest in more RAM for when it gets bigger).

Setting up the server

Now that you have a Linux server online, you'll need to install Docker. This is fast and easy, just 2 commands:

sudo apt update && sudo apt install curl git
curl https://get.docker.com | sh

If you're using a normal user, make sure to add that user to the docker group, e.g. if your user is called ubuntu:

  sudo usermod -aG docker ubuntu

Once you've installed Docker, download my PeerPlays-in-a-box system:

git clone https://github.com/Someguy123/peerplays-docker.git
cd peerplays-docker

Now, change to the peerplays-docker folder, and let's install and start peerplays (this may take a minute)

./run.sh install
./run.sh start

For the next part, you'll need to have a PeerPlays account. Since the account faucet isn't online yet, you'll need to ask in the Telegram for an account: https://telegram.me/PeerplaysWitness

Once you have an account, we can continue setting up the witness:

./run.sh wallet

You should see a prompt like this:

new >>>

Set a wallet password (this is unrelated to your account password, it's similar to a bitcoin wallet password)

set_password "some_secure_password"
unlock "some_secure_password"

Now, get your private keys based on your password (if you already have your keys, skip this step)

unlocked >>> get_private_key_from_password USERNAME active PASSWORD 
[ 'PPYxxx', 'xxxx' ] 
unlocked >>> get_private_key_from_password USERNAME owner PASSWORD 
[ 'PPYxxx', 'xxxx' ]

Import your owner and active key into the wallet

unlocked >>> import_key "USERNAME" xxxx 
unlocked >>> import_key "USERNAME" xxxx

You need to "upgrade your account". You may need to ask someone to send you some PPY tokens on the Telegram before you can do this.

unlocked >>> upgrade_account USERNAME true 

Once you've successfully upgraded, you can now create a witness:

create_witness USERNAME "url" true

You should see something like this:

{
  "ref_block_num": 6936,
  "ref_block_prefix": 4050013610,
  "expiration": "2017-06-06T21:48:12",
  "operations": [[
      20,{
        "fee": {
          "amount": 800000,
          "asset_id": "1.3.0"
        },
        "witness_account": "1.2.8892",
        "url": "",
        "block_signing_key": "PPY5ipyg232HNHTCGR52EZtR6wyCdZPYJoMVmcpfiPRrEyMFUxeJG",
        "initial_secret": ""
      }
}

Make a note of the block_signing_key, it's important!

Now, do this following to get your private block signing key

get_private_key THE_BLOCK_SIGNING_KEY_WHICH_IS_ABOVE

You should see a private key, beginning with 5. Note this down somewhere with your public block signing key.

Now, get your witness ID:

get_witness USERNAME

Make note of the "id" (make sure to not copy the wrong ID)

{
 ..... 
 "id": "1.6.x" 
 ..... 
}

Now. Press CTRL-D to exit the wallet.

We'll now update the config for the server:

nano data/witness_node_data_dir/config.ini

Comment out the line starting with p2p-endpoint (i.e. put a # in front of it)

#p2p-endpoint = 0.0.0.0:7777

Put these shortly after the seed nodes:

# the witness ID you got earlier
witness-id = "1.6.x"
# the block keys you were supposed to note down earlier! public and then private
private-keys = ["P...","5..."]

# now save the file! if nano, press CTRL-X and type yes to save

Finally, we restart the server:

 ./run.sh restart

Now hopefully you should have a witness :)

Check the logs to make sure it's working:

./run.sh logs

You should see something like this:

336001ms th_a       witness.cpp:201               block_production_loo ] Not producing block because it isn't my turn
336159ms th_a       application.cpp:506           handle_block         ] Got block: #7273 time: 2017-06-06T22:05:36 latency: 157 ms from: billbutler-witness  irreversible: 7260 (-13)
337001ms th_a       witness.cpp:204               block_production_loo ] Not producing block because slot has not yet arrived
338001ms th_a       witness.cpp:204               block_production_loo ] Not producing block because slot has not yet arrived

If you see that, you're probably set up :) - remember you can ask people on the Telegram for help if you're stuck. Join our witness Telegram: https://telegram.me/PeerplaysWitness


Do you like what I'm doing for STEEM/Steemit?


Vote for me to be a witness - every vote counts.


Don't forget to follow me for more like this.

--
Have you ever thought about being a witness yourself? Contact me on STEEMIT.CHAT, I'm happy to guide you! Join in shaping the STEEM economy.

Are you looking for a new server provider? My company @privex offers highly-reliable and affordable dedicated and virtual servers for STEEM, LTC, and BTC! Contact me on STEEMIT.CHAT for more information.

H2
H3
H4
3 columns
2 columns
1 column
18 Comments