Skip to content

Commit c4b4238

Browse files
committed
reorganize - server 1st - personal machine 2nd
1 parent 4ed9151 commit c4b4238

File tree

1 file changed

+73
-47
lines changed

1 file changed

+73
-47
lines changed

new_node_setup.md

Lines changed: 73 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ We'd appreciate your contribution and feedback on this guide.
44

55
## Content for setting up a node
66
1. [Server Requirements](#Server-Requirements)
7-
2. [Create a wallet](#Create-a-wallet-on-GuildNet)
8-
3. [Install Near-Cli](#Install-Near-Cli)
9-
4. [Setting up Environment](#Setting-up-your-environment)
10-
5. [Authorize the Shell](#Authorize-The-Shell)
11-
6. [Install Nearup](#Install-Nearup)
12-
7. [Start the Validator](#Launch-validator-node)
13-
8. [Create Staking Pool](#Create-staking-pool)
14-
9. [Delegate Tokens](#Delegate-tokens-and-get-rewards)
15-
10. [Monitor Validator Status](#Monitor-validator-node-status)
7+
2. [Launch validator node](#Launch-validator-node)
8+
3. [Create a wallet](#Create-a-wallet-on-GuildNet)
9+
4. [Install Near-Cli](#Install-Near-Cli)
10+
5. [Setting up Environment](#Setting-up-your-environment)
11+
6. [Authorize NEAR-Cli](#Authorize-NEAR-Cli)
12+
7. [Create Staking Pool](#Create-staking-pool)
13+
8. [Delegate Tokens](#Delegate-tokens-and-get-rewards)
14+
9. [Monitor Validator Status](#Monitor-validator-node-status)
1615

1716

1817
## Server Requirements
@@ -22,22 +21,60 @@ At least 2-Core (4-Thread) Intel i7/Xeon equivalent
2221
At least 16GB RAM
2322
At least 100GB SSD (Note: HDD will not work)
2423
```
25-
## Create a wallet on GuildNet
26-
You will need a wallet.
27-
To create a [guildnet wallet](https://wallet.openshards.io) go to: [https://wallet.openshards.io](https://wallet.openshards.io) be sure to record your wallet address and seed phrase (12 words)
28-
_Tip: You may request 75,000 faucet from Near team for staking test._
29-
30-
## Install Near-Cli
31-
NEAR CLI is a Node.js application that relies on near-api-js to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.
32-
_note that Node.js version 10+ is required to run NEAR CLI_
33-
3424

35-
**Near-Cli doesn't need to be installed on the same machine as the validator, which is recommend to installed on a separate machine for increased security and performance. However it still can be installed on the same machine.**
25+
You'll be working with two machines, a server for the validator node, and your personal machie/monitor machine to install near-cli, create the wallet, monitor and control the validator node.
3626

3727
### Ubuntu Prerequisite Installation
28+
*On the Server:*
29+
3830
```bash
3931
sudo apt install python3 git curl clang build-essential
4032
```
33+
34+
## Launch validator node
35+
36+
### Step 1. Install Nearup
37+
*On the Server:*
38+
The Prerequisite has python3, git and curl toolset, which have been installed in previous step. please run command prompt.
39+
```bash
40+
curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/near-guildnet/nearup/master/nearup | python3
41+
```
42+
Nearup automatically adds itself to PATH: **restart the terminal**, or issue the command: . ~/.profile. On each run, nearup self-updates to the latest version.
43+
44+
### Step 2. Choose a staking-pool AccountId
45+
On the first run, nearup will ask you to enter a staking-pool AccountId, please choose a name for your staking-pool AccountId, it must end with ".stake.guildnet", e.g. *MyStakingPool.stake.guildnet*.
46+
47+
You should go to [https://near-guildnet.github.io/staking-pool-factory](https://near-guildnet.github.io/staking-pool-factory/) to check if the name is available. Don't create your staking-pool contract yet, just check if the name is available.
48+
49+
### Step 3. Start nearup guildnet
50+
We recommand to use Officially Compiled Binary to launch a validator node, which is suitable to run on VPS. Then, input your staking pool ID in the prompt by this command:
51+
```bash
52+
nearup guildnet --nodocker
53+
```
54+
55+
Check validator_key.json is generated for staking pool.
56+
```bash
57+
ls ~/.near/guildnet
58+
validator_key.json node_key.json config.json data genesis.json
59+
cat ~/.near/guildnet/validator_key.json | grep public_key
60+
```
61+
Take note of the **validator public_key**
62+
```json
63+
"public_key": "ed25519:**TAKE-NOTE-OF-THIS**"
64+
```
65+
66+
67+
Check running status of validator node. If "V/" is showning up, your pool is selected in current validators list.
68+
```bash
69+
nearup logs -f
70+
```
71+
72+
## Create a wallet on GuildNet
73+
*On your personal machine:*
74+
You will need a wallet.
75+
To create a [guildnet wallet](https://wallet.openshards.io) go to: [https://wallet.openshards.io](https://wallet.openshards.io) be sure to record your wallet address and seed phrase (12 words)
76+
_Tip: You may request 75,000 faucet from Near team for staking test._
77+
4178
#### Install Node Version 12.x and npm
4279
Nodes.js and npm can be install by
4380
```bash
@@ -59,12 +96,19 @@ npm -v
5996
##### Alternative
6097
If "n" is not working for you to upgrade node (node -v doesn't change) you can try [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) to manage node versions
6198

62-
### Install near-cli
99+
## Install Near-Cli
100+
*On your personal machine:*
101+
NEAR CLI is a Node.js application that relies on near-api-js to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.
102+
_note that Node.js version 10+ is required to run NEAR CLI_
103+
104+
**Note: You don't need to install Near-Cli on the server. We reccomend to install near-cli on your personal machine or a separate machine for increased security and performance. However it still can be installed on the same machine.**
105+
106+
107+
### Install the guild's near-cli
63108
```bash
64109
git clone https://github.com/near-guildnet/near-cli.git
65110
cd near-cli
66-
# sudo may be needed.
67-
npm install -g
111+
sudo npm install -g
68112
```
69113
## Setting up your environment
70114
To use the guildnet network you need to update the environment via the command line.
@@ -77,7 +121,7 @@ Add (export NODE_ENV=guildnet) to the end of the ~/.bashrc file to ensure it per
77121
echo 'export NODE_ENV=guildnet' >> ~/.bashrc
78122
```
79123

80-
## Authorize The Shell
124+
## Authorize NEAR-Cli
81125
To authorize NEAR-Cli access we need to login via the command prompt.
82126
```bash
83127
near login
@@ -110,32 +154,13 @@ check your public key file of main account.
110154
ls ~/.near-credentials/guildnet
111155
staketest.guildnet.json
112156
```
113-
## Install Nearup
114-
The Prerequisite has python3, git and curl toolset, which have been installed in previous step. please run command prompt.
115-
```bash
116-
curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/near-guildnet/nearup/master/nearup | python3
117-
```
118-
Nearup automatically adds itself to PATH: restart the terminal, or issue the command source ~/.profile. On each run, nearup self-updates to the latest version.
119157

120-
## Launch validator node
121-
We recommand to use Officially Compiled Binary to launch a validator node, which is suitable to run on VPS.
122-
Then, input your staking pool ID in the prompt by this command.
123-
```bash
124-
nearup guildnet --nodocker
125-
```
126-
Check validator_key.json is generated for staking pool.
127-
```bash
128-
ls ~/.near/guildnet
129-
validator_key.json node_key.json config.json data genesis.json
130-
```
131-
Check running status of validator node. If "V/" is showning up, your pool is selected in current validators list.
132-
```bash
133-
nearup logs -f
134-
```
158+
## Create your staking pool
159+
You need to setup a staking pool, the easiest way is to go back to [https://near-guildnet.github.io/staking-pool-factory/](https://near-guildnet.github.io/staking-pool-factory/) with the staking-pool AccountId you selected, and the **validator public_key** you got while starting nearup and complete the process to create the staking-pool contract.
135160

136-
## Create staking pool
137-
You need to setup a staking pool which can be generated by create_staking_pool command.
138-
Check public key from ~/.near/guildnet/validator_key.json
161+
#### Alternative:
162+
You can also setup a staking pool from the command line using the *create_staking_pool* method.
163+
Check public key from ~/.near/guildnet/validator_key.json on your validator server:
139164
```bash
140165
cat ~/.near/guildnet/validator_key.json | grep public_key
141166
```
@@ -144,6 +169,7 @@ near call stake.guildnet create_staking_pool '{"staking_pool_id": "<Pool ID need
144169
example:
145170
near call stake.guildnet create_staking_pool '{"staking_pool_id": "testpool", "owner_id": "staketest.guildnet", "stake_public_key": "ed25519:4x1LrkFvxnh8Aeh8NQc9cn15XuYAVHA2aN6WVhFfCdaE", "reward_fee_fraction": {"numerator": 10, "denominator": 100}}' --accountId="blaze.guildnet" --amount=30 --gas=300000000000000
146171
```
172+
147173
## Delegate tokens and get rewards
148174
* As a user, to deposit and stake NEAR tokens
149175
```bash

0 commit comments

Comments
 (0)