As mentioned in the ports article, port 8888 contains various bits of information pertaining to the state of the node running at that IP.
If you are curious about the node’s status pertaining to the blockchain and synchronization/network info, the /status endpoint provides a JSON response that can be parsed with jq
. The node provides a response that will look similar to:
{
"api_version": "",
"chainspec_name": "",
"starting_state_root_hash": "",
"peers": [
{
"node_id": "tls:24fb..d176",
"address": "<ip_address>:35000"
},
{
"node_id": "tls:24fb..d176",
"address": "<ip_address>:35000"
},
...
],
"last_added_block_info": {
"hash": "",
"timestamp": "",
"era_id": XXXX,
"height": YYYYYYY,
"state_root_hash": "<state_root_hash>",
"creator": "<creating_validator_public_key>"
},
"our_public_signing_key": "<public_key_hex_of_node>",
"round_length": "",
"next_upgrade": null,
"build_version": "",
"uptime": ""
}
The jq
parseable endpoints are:
api_version
chainspec_name
starting_state_root_hash
peers
last_added_block_info
--- hash
--- timestamp
--- era_id
--- height
--- state_root_hash
--- creator
our_public_signing_key
round_length
next_upgrade
build_version
uptime
You can parse the result with jq and dot notation like so:
curl -s $NODE_IP:8888/status | jq -r '.api_version, .last_added_block_info, .build_version, .uptime'
which would return something similar to:
"node_api_version"
{
"hash": "<block_hash>",
"timestamp": "<block_timestamp>",
"era_id": <era_id>,
"height": <block_height>,
"state_root_hash": "<state_root_hash>",
"creator": "<creating_validator_public_key>"
}
"<build_version>"
"<node_uptime>"
If you have any concerns, questions, or issues, please submit a request to our support team here:
https://support.casperlabs.io/hc/en-gb/requests/new
Comments
0 comments
Please sign in to leave a comment.