Skip to main content

7. Monitoring (Optional)

Node and Gateway monitoring has several aspects and options:

  • Getting elected
  • XX Chain activity
  • cMixx activity
  • Other monitoring

Getting elected

After every election for the next era (which happens hours prior to the start of an era, roughly 7:03am UTC), election results are indicated in the wallet.

Go to [https://wallet.xx.network/#/staking/targets](Staking > Targets) and look for the Next session (blue "greater than") icon next to your node. If it is displayed to a node, the node has been elected to validator set for the next era.

Prior to the start of next era, there is no special activity on the Node or Gateway that has been elected, but is currently in Waiting state. cMixx log may seem stuck, but it's simply waiting. This is normal and may last until more than 10 minutes after the beginning of the era in which a validator has become active.

[INFO] 25-Aug-21 07:14:07: Waiting on IDF for consensus...
[INFO] 25-Aug-21 07:14:07: Waiting on consensus ready state...

XX Chain activity

Block activity may be observed on both the Node and Gateway, but only elected Nodes author new blocks on XX Chain.

Block authoring count is incremented in the XX Network Wallet, indicating that a Node is a part of current era's validator set.

Block generation isn't regular and directly depends on the size of the validator set (the larger the set, the less frequently a Node authors blocks), but at the time of writing this content it rarely takes more than two hours and usually it's less.

Block authoring may also be observed in your Node's chain log when it's active. As mentioned earlier, Gateways do not author blocks.

2022-07-30 02:30:30 🎁 Prepared block for proposing at 3639224 (19 ms) [hash: 0x...] 
2022-07-30 02:30:30 🔖 Pre-sealed block for proposal at 3639224. Hash now 0x..., previously 0x...

A validator whose chain fails to work for over eight hours is (involuntarily) "chilled", meaning removed from election for the next era. In other words, if no new blocks have been authored for three hours, your node may have been chilled or dropped out of the active validator set.

cMixx activity

cMixx activity is frequently, regular, and may be observed in the XX Network Dashboard.

Every active validator is expected to participate in a cMixx round at least once a minute.

You can find a Node's cMixx ID in the wallet (cmix id column in Staking > Targets) and click on it to view the node in the XX Network Dashboard.

If a node is not a part of the validator set, its dashboard status will indicate that. If it is, but isn't online, it may say OFFLINE.

It is possible for an elected Node to be offline in terms of cMixx service, but remain elected because its chain service status is normal.

Node status and info

xx Network Node Status API provides Node status. Provide a URL-friendly node_id (the one the Dashboard URLs uses) when querying.

Use the base URL + /node/status/ + the URL friendly Node ID. You'll get one of the following results: online, offline, error or not currently a validator.

You may see this sample link for an XX Foundation node.

The site can return JSON responses as well. For that use the base URL + /node/info/ + the URL friendly Node ID. The info for xx west:

{
"name": "xx west",
"location": "Columbus, United States",
"geoBin": "NorthAmerica",
"id": "c6wptSinakErZHrk0SlgGQXExETPYYLB2CwpLNze6FMC",
"base64Url": "c6wptSinakErZHrk0SlgGQXExETPYYLB2CwpLNze6FMC",
"uptime": 0.92,
"realtimeFailureAvg": 0.55,
"precompFailureAvg": 3.1,
"status": "not currently a validator"
}

API lookups may be subject to rate limits, so lower the frequency of polling if your requests return nothing.

Other monitoring

XX Chain can export Prometheus metrics (run xxnetwork-chain --help), but as far as node failures go, chain service itself is rarely a problem.

It is more useful (or "just as useful") to monitor free disk capacity than some obscure chain metrics.

There may be community services for monitoring of cMixx and other essential Node & Gateawy services. Please inquire within the community regarding current options.