Create A Pocket Validator Node

Use this quick start to set up your Pocket node and make it a validator.

Prerequisites:

Before you begin configuring your Pocket Validator Node, you'll need to have installed the following:

Create or Import an Account:

Every node needs an account in order to connect to the Pocket Network. To create or import an account, enter:

pocket accounts create
$  pocket accounts import-raw <private key>

Whether you've created or imported an account, it will prompt you to enter a passphrase that will be used to locally encrypt your private key and generate a success message(see below):

Account generated successfully:
Address: 45D50DB64E90C0109C778DAAB7EF36676FC03866
Account imported successfully:
45d50db64e90c0109c778daab7ef36676fc03866

Lastly, you will need to set the account as a validator address to sets the main validator account so you can register your address on the network.

pocket accounts set-validator 45D50DB64E90C0109C778DAAB7EF36676FC03866

Start Up A Pocket Validator Node:

Pocket Validator Node

To start your pocket node as a validator, simply enter in:

pocket start

Generate Chains.json

To generate your chains.json in the CLI, open up another terminal window, and enter:

pocket util generate-chains

# returns 
Enter the ID of the network identifier:
0002
Enter the URL of the network identifier:
http://food.com
Would you like to enter another network identifier? (y/n)
  • Network Identifier: The subnetwork of the external chains you're trying to connect to(eth mainnet, BTC mainnet, etc).
  • URL: The URL of your non-native blockchain node that you will connect your Pocket Validator Node to.

If you have any more blockchains you would like to connect your node to, enter: Y and if you don't then enter: n

Fund Your Validator Node

You are almost done completely setting up our Pocket Validator node, and all that is left is funding your validator address and sending a staking transaction.

Funding your wallet is different for Testnet and mainnet:

Testnet


To fund your wallet, you're going to use the faucet to send test POKT tokens to your validator account. While your node is running, open a new terminal window and do the following:

  1. Enter: pocket accounts get-validator
  2. Copy your validator address and paste it in your validator address below. and click Get Testnet POKT

🚧

Note

It is recommended to wait 15 minutes before you go to the next step to ensure the staking transaction goes through and propagates throughout the network.

Mainnet:

Before you can purchase POKT, visit the Pocket Dashboard(coming soon) and follow the instructions on how to register your account.

Staking Your Node

Stake your validator on the Pocket blockchain by entering:

# Staking Command
pocket nodes stake  <fromAddr> <amount in uPOKT> <chains> <serviceURI w/ rpc port> <chainID> <fees in Upokt> 

# example with dummy values
pocket nodes stake 45D50DB64E90C0109C778DAAB7EF36676FC03866 15001000000 0002 https://my-pocket-url:<port> testnet-r1 100000

Note: when you're declaring the serviceURI, you have to include the Pocket RPC port.

You are now running a pocket validator node! If you would like to test your node to make sure it can relay data, check out our testing guide.

See Your Validator Node Online:

When you stake your node, you can check the status by querying your node by using the following command:

pocket query node <address>

# example: 
pocket query node 76907c33817648fca58c61bf3db07a0cce4083d2

# return:
http://localhost:8081/v1/query/node
{
    "address": "76907c33817648fca58c61bf3db07a0cce4083d2",
    "chains": [
        "0022"
    ],
    "jailed": false,
    "public_key": "a75a438203a8e37bc5cd44badf44617bb6a965f36b575e6ac1958b95b8b71c92",
    "service_url": "https://my-pocket-url:8081",
    "status": 2,
    "tokens": "15000000000",
    "unstaking_time": "1970-01-01T00:00:00Z"
}

In addition to querying your node, you can check your node directly in a web browser by entering:
http://<your Service URL>:26657/status or https://<your Service URL>:26657/status

The page that comes up will look similar to this:

{
  "jsonrpc": "2.0",
  "id": "",
  "result": {
    "node_info": {
      "protocol_version": {
        "p2p": "7",
        "block": "10",
        "app": "0"
      },
      "id": "7674a47cc977326f1df6cb92c7b5a2ad36557ea2",
      "listen_addr": "tcp://node3.testnet.pokt.network:26656",
      "network": "testnet",
      "version": "0.32.10",
      "channels": "4020212223303800",
      "moniker": "pocket-core-testnet3",
      "other": {
        "tx_index": "on",
        "rpc_address": "tcp://0.0.0.0:26657"
      }
    },
    "sync_info": {
      "latest_block_hash": "77DC7D9CA7CD6A2A9B7624476375CA151C9447B62946822A95870B2CFA737136",
      "latest_app_hash": "D68544EB83285B2A8BFEC4CA24DA5AB37FC96B15F3032BA0568E862BD2073BE1",
      "latest_block_height": "297",
      "latest_block_time": "2020-06-04T01:52:26.323139673Z",
      "catching_up": false
    },
    "validator_info": {
      "address": "7674A47CC977326F1DF6CB92C7B5A2AD36557EA2",
      "pub_key": {
        "type": "tendermint/PubKeyEd25519",
        "value": "JXlD1CVdYPmgQqLNgf9ktxG+2/cttk0fhLDiRVzh39E="
      },
      "voting_power": "1500000"
    }
  }
}

Updated 6 days ago



Create A Pocket Validator Node


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.