-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation on node debug page #26
Open
janewang
wants to merge
2
commits into
main
Choose a base branch
from
monitor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
id: node-debug | ||
title: Node Debug Page | ||
sidebar_label: Node Debug Page | ||
description: How to Use the Node Debug Page | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Node Debug Page | ||
|
||
The nearcore 1.27.0 release will introduce a node debug page on your NEAR node which provides detailed info on last blocks, sync info, chain info, and epoch info. Node operators will have the option to enable this node debug page. | ||
|
||
### Enable Node Debug Page | ||
To enable this debug page on the node, a modificiation is require on `config.json`. Under `rpc` struct, set `enable_debug_rpc`: true. If this line doesn't exist the node's `config.json`, the node operator may add the following: | ||
|
||
``` | ||
"rpc": { | ||
... | ||
"enable_debug_rpc": true | ||
... | ||
``` | ||
|
||
After the node starts, head to `http://<your-node-ip>/debug` to view the Node Debug Page. | ||
|
||
![img](/images/node-debug.png) | ||
|
||
### Last Blocks | ||
This page displays the most recent 50 blocks on the node. For each block, the following fields are shown: | ||
- Block hash | ||
- Validator who validated the block | ||
- Processing time for the block | ||
- Estimated Next block time | ||
- Gas Price Ratio: How much gas it costs to generate this block. The ratio is the current cost of generating the block in comparison to the cost of genesis block. | ||
- For each shard, the fields are the chunk hash / validator who validated the chunk / Gas / Time (in ms) | ||
|
||
|
||
### Sync Info | ||
This page displays the current point-in-time status of node's peers. | ||
|
||
`Current Sync Status: NoSync (#64817610 DakWGcEUsNpRSXEgBm4FUGEqnJy9qVKouB8V9ek8BqYr)` | ||
- Current Sync Status: NoSync means the node is synced and not syncing. What follows is the block number and block hash. Other status that can be shown are header sync and block sync. | ||
|
||
`Number of peers: 30/40` | ||
This means there are 30 active peers. 40 is the max number of peers. | ||
|
||
`Validators: 100 Known: 100 Reachable: 100` | ||
- `Validators: 100`: is determined in the last epoch by the network. | ||
- `Known: 100`: is that the current node has the validator accountID present in this node's database. | ||
- `Reachable: 100`: If a validator is not reachable from the current node, it will not be included in the count. | ||
|
||
What follows is a table of the node peers. | ||
- `Address`: node IP and port. | ||
- `Validator?`: Shows if the node is a validator. If it is, it shows the pool name. | ||
- `AccountID`: The first line shows the account id for the peer. The second line shows the peer id. | ||
- `Height`: shows the latest block height. | ||
- `Tracked Shards`: shows which shards the node is tracking. | ||
- `Archival`: shows whether the node is archival or not. | ||
- `Route to validators`: List of validators, the paths to which contain this current node as a peer. | ||
|
||
### Chain Info | ||
This page displays the current point-in-time status of the node in terms of orphan blocks and missing chunks. | ||
|
||
`Current head: 3mivFUczgGWM6RvwvaT2oQ93zRQQTn3riXNtWxByntD1 @ 64818564`: The current head is the latest block of this node. | ||
|
||
`Current header head: 3mivFUczgGWM6RvwvaT2oQ93zRQQTn3riXNtWxByntD1 @ 64818564`: | ||
The header_head is the latest 'header' that we know of. If node is up-to-date, then head is equal to header_head. If the node is syncing, the header_head may be larger than the head. | ||
|
||
`Orphan Pool`: This table shows a list of orphan blocks for this current node. The block hash and block height are listed. (e.g. It is possible that this node received a block for which its predecessor is unknown. Once the predecessor is known, the orphan block would no longer be in the pool.) | ||
|
||
`Missing Chunks Pool` | ||
This table shows a list of blocks that are missing some of its chunks in this node. The block hash and block height are listed. As your node request for missed chunks, you can refresh the page to see the latest status and to see if the chunk has been received and stored. If a chunk has been no longer missing, it will be removed from this table. | ||
|
||
|
||
### Epoch Info | ||
|
||
The epoch displays the current epoch and the most recent five epoches. | ||
|
||
- `Epoch id`: block hash of the final block in epoch T-2. | ||
- `Start height`: the first block of the epoch. | ||
- `Protocol version`: The protocol version of the epoch. | ||
- `First block`: Block hash of the first block in the epoch. | ||
- `Epoch start`: How long ago the epoch has started. | ||
|
||
The table below displays the validator history in the current epoch and the last five epochs (represented by the epoch hash) with either TRUE or FALSE. | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could also mention, that they can see the example here: (but we might want to get a 'better URL' in the future, as this IP can change) |
||
>Got a question? | ||
<a href="https://stackoverflow.com/questions/tagged/nearprotocol"> | ||
<h8>Ask it on StackOverflow!</h8></a> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jc-near we might want to change the naming of the pages a little ;-)
As stuff on this page (orphans, missing chunks etc) - are more related with 'Sync'
And maybe we should rename the 'sync info' page to 'network' (and move current Sync Status here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I will create a PR to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jc-near @mm-near. Ok we will do another round of documentation when those are finalized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jc-near @mm-near What do you think about adding on the Sync Page, which peer has missed a block in the epoch and is a bad peer? Also any updates on the PR, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of this data is already there (for example: if a peer missed a block, we show it on the last_blocks page -- but only for the last 50 blocks).
But yes, we could show it more explicitly. Could you create an issue for that?
(preferably with more details - how bad peers should be shown etc etc).