- Published on: 2022-07-13
- Updated on: 2022-07-13
- Submitted by: Open Shards Alliance
- Rewards: 15 Unlocked NEAR Points (UNP)
Setup tools for monitoring node status. Install and use RPC on port 3030 to get useful information for keep your node working.
Wallet: https://wallet.shardnet.near.org/
Explorer: https://explorer.shardnet.near.org/
An email notification can make it more comfortable to maintain a validator up and running. Achieve to be a validator confirming transactions on testnet and get >95% of uptime.
The log file is stored either in the ~/.nearup/logs directory or in systemd depending on your setup.
Systemd Command:
journalctl -n 100 -f -u neard | ccze -A
Log file sample:
Validator | 1 validator
INFO stats: #85079829 H1GUabkB7TW2K2yhZqZ7G47gnpS7ESqicDMNyb9EE6tf Validator 73 validators 30 peers ⬇ 506.1kiB/s ⬆ 428.3kiB/s 1.20 bps 62.08 Tgas/s CPU: 23%, Mem: 7.4 GiB
- Validator: A “Validator” will indicate you are an active validator
- 73 validators: Total 73 validators on the network
- 30 peers: You current have 30 peers. You need at least 3 peers to reach consensus and start validating
- #46199418: block – Look to ensure blocks are moving
Any node within the network offers RPC services on port 3030 as long as the port is open in the nodes firewall. The NEAR-CLI uses RPC calls behind the scenes. Common uses for RPC are to check on validator stats, node version and to see delegator stake, although it can be used to interact with the blockchain, accounts and contracts overall.
Find many commands and how to use them in more detail here:
https://docs.near.org/api/rpc/introduction
Command:
sudo apt install curl jq
Command:
curl -s http://127.0.0.1:3030/status | jq .version
Command:
near view <your pool>.factory.shardnet.near get_accounts '{"from_index": 0, "limit": 10}' --accountId <accountId>.shardnet.near
Command:
curl -s -d '{"jsonrpc": "2.0", "method": "validators", "id": "dontcare", "params": [null]}' -H 'Content-Type: application/json' 127.0.0.1:3030 | jq -c '.result.prev_epoch_kickout[] | select(.account_id | contains ("<POOL_ID>"))' | jq .reason
Command:
curl -r -s -d '{"jsonrpc": "2.0", "method": "validators", "id": "dontcare", "params": [null]}' -H 'Content-Type: application/json' 127.0.0.1:3030 | jq -c '.result.current_validators[] | select(.account_id | contains ("POOL_ID"))'
Run on multiple cloud providers.
Updated 2022-07-13: Creation
Updated 2022-07-13: Creation
Updated 2022-07-20: Clarified the rewards for solving the challenge