5-3: Test everything
After your Pocket Node is running, you'll want to test it. The following are some of the things you can do to test your Pocket Node.
Make sure the Pocket process is running
The first thing to check is that the pocket service is running. You can do that by running the following command:
top -b -n 1 | grep pocket
You should see output similar to the following:
44871 root 20 0 1018268 33948 21448 S 0.0 0.4 0:00.17 pocket
Next you'll want to check that the node is fully synced with the Pocket blockchain.
Block Height
You can check to see if your node is fully synced a few ways. The easiest way is to run the following command:
pocket query height
The result should look something like the following.
{
"height": 48161
}
Network Status
Another way to see if your node is fully synced is to check the status with the following command:
curl http://127.0.0.1:26657/status
The result should look something like the following. Note the highlighted property catching_up
which indicates if the node is catching up with the blockchain or fully synced. In example below, the node is fully synced.
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"node_info": {
"protocol_version": {
"p2p": "7",
"block": "10",
"app": "0"
},
"id": "80b80c106115259349df8ef06267cff7bbabd194",
"listen_addr": "tcp://0.0.0.0:26656",
"network": "mainnet",
"version": "0.33.7",
"channels": "4020212223303800",
"moniker": "localhost",
"other": {
"tx_index": "on",
"rpc_address": "tcp://127.0.0.1:26657"
}
},
"sync_info": {
"latest_block_hash": "F39BBF5C64D9E02E28DDBB8640F84A22CFAE1727CFBC72537982EF5914E4BB25",
"latest_app_hash": "6198835747411135C1F812CB45FA5621D5ADB63342EC0678C20879D7D39F03B5",
"latest_block_height": "50021",
"latest_block_time": "2022-02-04T12:16:10.77575197Z",
"earliest_block_hash": "7D551967CB8BBC9F8C0EAE78797D0576951DDA25CE63DF1801C020478C0B02F8",
"earliest_app_hash": "",
"earliest_block_height": "1",
"earliest_block_time": "2020-07-28T15:00:00Z",
"catching_up": false
},
"validator_info": {
"address": "80B80C106115259349DF8EF06267CFF7BBABD194",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ee+o9bKqCbAO13FgWTLmJdi9hhfYg8AHsif5430uz8A="
},
"voting_power": "0"
}
}
}
These commands let you know the node running and connected to the network but you'll also want to make sure your node is accessible other nodes.
Make sure your node is visible to other nodes
To test and confirm you node is visible to other nodes on the public network, you'll make an HTTP request using the public DNS name for the node. You can use the following command to make that request. Just change the yourhost
and yourdomain
to the correct values.
curl https://pokt001.dabble.run:8081/v1
This should return something like the following. This is the version of pocket-core that is running.
"RC-0.7.0.1"