Conversation
Add How to get notify
Update guide.md
doc: epoch sync
|
@walnut-the-cat |
Add Config.json link for Mainnet - Validator
staffik
left a comment
There was a problem hiding this comment.
Thanks @DDeAlmeida!
The content looks good, but the formatting needs improvement.
docs/validator/guide.md
Outdated
|
|
||
| During the building time, let's make a wallet. | ||
|
|
||
| We recommand to use a partner wallet like Meteor, MyNearWallet or SenderWallet. |
docs/validator/guide.md
Outdated
|
|
||
| https://wallet.meteorwallet.app/ | ||
|
|
||
|  |
There was a problem hiding this comment.
local path, here and in other places
docs/validator/guide.md
Outdated
|
|
||
| #### Wallet Authorization | ||
|
|
||
| A full access key needs to be installed locally to be able transactions via NEAR-CLI. |
There was a problem hiding this comment.
"to be able to send transactions"
docs/validator/guide.md
Outdated
| near contract call-function as-transaction pool-details.near update_field json-args '{"pool_id": "<full_pool_id>", "name": "name", "value": "PandaPool"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as <accountId> network-config mainnet sign-with-keychain | ||
| near contract call-function as-transaction pool-details.near update_field json-args '{"pool_id": "<full_pool_id>", "name": "description", "value": "PandaPool Description"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' sign-as <accountId> network-config mainnet sign-with-keychain |
There was a problem hiding this comment.
please format as code, here and below
docs/validator/guide.md
Outdated
| You can use: | ||
| Discord: https://discord.gg/nearprotocol | ||
| Telegram: https://t.me/near_validators | ||
| X: https://x.com/NEARChainStatus (Only Mainnet) | ||
| Email : https://near.us14.list-manage.com/subscribe?u=faedf5dec8739fb92e05b4131&id=befd133f18 |
There was a problem hiding this comment.
When rendered, it is all in one line
docs/validator/guide.md
Outdated
|
|
||
| Make sure the config file have store.load_mem_tries_for_tracked_shards with true value | ||
|
|
||
| #### Usefull links: |
Review from Adam
Update images
Review from Adam
staffik
left a comment
There was a problem hiding this comment.
@DDeAlmeida I changed the formatting, PTAL.
VanBarbascu
left a comment
There was a problem hiding this comment.
@DDeAlmeida, thanks for taking the time to update the docs!
I left a couple of suggestions. Please take a look
docs/validator/guide.md
Outdated
| curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | ||
| "jsonrpc": "2.0", | ||
| "method": "network_info", | ||
| "params": [], | ||
| "id": "dontcare" | ||
| }' | \ | ||
| jq --arg newBootNodes "$(curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | ||
| "jsonrpc": "2.0", | ||
| "method": "network_info", | ||
| "params": [], | ||
| "id": "dontcare" | ||
| }' | jq -r '.result.active_peers as $list1 | .result.known_producers as $list2 | | ||
| $list1[] as $active_peer | $list2[] | | ||
| select(.peer_id == $active_peer.id) | | ||
| "\(.peer_id)@\($active_peer.addr)"' | paste -sd "," -)" \ | ||
| '.network.boot_nodes = $newBootNodes' ~/.near/config.json > ~/.near/config.tmp && mv ~/.near/config.json ~/.near/config.json.backup && mv ~/.near/config.tmp ~/.near/config.json |
There was a problem hiding this comment.
There are a couple of redundant commands there. It is cleaner this way:
| curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | |
| "jsonrpc": "2.0", | |
| "method": "network_info", | |
| "params": [], | |
| "id": "dontcare" | |
| }' | \ | |
| jq --arg newBootNodes "$(curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | |
| "jsonrpc": "2.0", | |
| "method": "network_info", | |
| "params": [], | |
| "id": "dontcare" | |
| }' | jq -r '.result.active_peers as $list1 | .result.known_producers as $list2 | | |
| $list1[] as $active_peer | $list2[] | | |
| select(.peer_id == $active_peer.id) | | |
| "\(.peer_id)@\($active_peer.addr)"' | paste -sd "," -)" \ | |
| '.network.boot_nodes = $newBootNodes' ~/.near/config.json > ~/.near/config.tmp && mv ~/.near/config.json ~/.near/config.json.backup && mv ~/.near/config.tmp ~/.near/config.json | |
| BOOT_NODES=$(curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | |
| "jsonrpc": "2.0", | |
| "method": "network_info", | |
| "params": [], | |
| "id": "dontcare" | |
| }' | jq -r '.result.active_peers as $list1 | .result.known_producers as $list2 | | |
| $list1[] as $active_peer | $list2[] | | |
| select(.peer_id == $active_peer.id) | | |
| "\(.peer_id)@\($active_peer.addr)"' | paste -sd "," -) | |
| jq --arg newBootNodes $BOOT_NODES '.network.boot_nodes = $newBootNodes' ~/.near/config.json > ~/.near/config.tmp && mv ~/.near/config.json ~/.near/config.json.backup && mv ~/.near/config.tmp ~/.near/config.json |
docs/validator/guide.md
Outdated
| - `<accountId>` or `accountId` – `xxx.near`, where `xxx` is your account name, for example `validator_near.near`. | ||
|
|
||
| ```sh | ||
| cd ~/nearcore && target/release/neard init --chain-id="mainnet" --account-id=<full_pool_id> |
There was a problem hiding this comment.
Add these lines here to download the latest config.json and to configure the boot nodes to facilitate the epoch sync.
| cd ~/nearcore && target/release/neard init --chain-id="mainnet" --account-id=<full_pool_id> | |
| # You can use any RPC provider for this command. | |
| BOOT_NODES=$(curl -s -X POST https://rpc.mainnet.near.org -H "Content-Type: application/json" -d '{ | |
| "jsonrpc": "2.0", | |
| "method": "network_info", | |
| "params": [], | |
| "id": "dontcare" | |
| }' | jq -r '.result.active_peers as $list1 | .result.known_producers as $list2 | | |
| $list1[] as $active_peer | $list2[] | | |
| select(.peer_id == $active_peer.id) | | |
| "\(.peer_id)@\($active_peer.addr)"' | paste -sd "," -) | |
| cd ~/nearcore && target/release/neard init --chain-id="mainnet" --account-id=<full_pool_id> --download-genesis --download-config validator --boot-nodes $BOOT_NODES |
docs/validator/guide.md
Outdated
|
|
||
| #### Update `config.json` to activate the validator config | ||
| ```sh | ||
| sed -i 's/"tracked_shards": \[\s*0\s*\]/"tracked_shards": []/' ~/.near/config.json |
There was a problem hiding this comment.
Keep it consistent and use jq for any amendments to the config.json files. This is because the tracked_shards may not be in the config.json file. Also, this commands assumes the previous value of the field, which may not be '[0]' all the time.
If the user follows the init command that I suggested above, the config is already dedicated to the validator node so there is no need to overwrite it.
docs/validator/guide.md
Outdated
|
|
||
| [Service] | ||
| Type=simple | ||
| User=root |
There was a problem hiding this comment.
Do encourage operation of any service under the root user. Leave a comment here to change User to a dedicated one.
There was a problem hiding this comment.
If you don't want to change this Service, add a warning at the top of it about the risk of running services as root.
I cannot start to enumerate the disadvantages. There are both operational and security implications.
If the user opts for a dedicated vm/docker for this service, there are still some security concerns.
docs/validator/guide.md
Outdated
|
|
||
| Now you only need to have enough token staked to start earning Rewards. | ||
|
|
||
| #### Network optimizations |
There was a problem hiding this comment.
Move/reference this in the node startup instructions.
Co-authored-by: Razvan Barbascu <r.barbascu@gmail.com>
|
@VanBarbascu doc updated |
VanBarbascu
left a comment
There was a problem hiding this comment.
Great stuff! Please address these 2 commens and we are good to go.
VanBarbascu
left a comment
There was a problem hiding this comment.
I committed those changes as they were quite trivial.
Thank, i was going this right now ;) |
No description provided.