Configuring Chains.json

Configure chains.json

In order to connect your Pocket Core instance to your blockchain node(s), you'll need to modify your chains.json file that has all of the information your pocket node needs to connect your Pocket Node to your existing blockchain node.

For Binary Configurations:

If you configured the Pocket Core CLI from by building from source, the chains.json is automatically generated after you have run your pocket node (via pocket start).

Mac or Linux OS:

To access your chains.json go into your root dir and navigate into .pocket/config and you will see a few files:

  • genesis.json: Network genesis file
  • chains.json: Node's chains file
  • addrbook.json: A list of nodes that you have seeded to when connecting your node to the network.

Inside your chains you will see the following(or something similar)

{
    "6d3c...": {
        "addr": "6d3c...",
        "url": "http://pokt.com"
    	}

}

addr is the address of your Pocket Node.

url is the url in which you are running the specified blockchain node. Make sure your Docker Container has network access to this url, if Pocket Core cannot reach it, it won't spin up. Depending on your node setup, you can add a specific port number at the end of your URL(e.g., myaionmasterynode.com:123), if none are specified, it defaults to 80. For more information on Docker Networking please refer to this link.

Connecting Multiple Blockchain Nodes:

You can service multiple blockchain nodes under one Pocket Node. To do so, you would have to
1) Create a load balancer with a single URL to properly route in/outbound requests.
2) Add your URL inside the chains.json file(as shown above)

Updated about a month ago



Configuring Chains.json


Suggested Edits are limited on API Reference Pages

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