Skip to content

Commit 5f0c437

Browse files
committed
doc: update validators docs
1 parent 01f8aa8 commit 5f0c437

File tree

2 files changed

+110
-1
lines changed

2 files changed

+110
-1
lines changed

docs/misc/adding_validators.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Take note of the following:
5656
- **Public Key (hex)**
5757
- **SS58 Address**: This is your validator's account address.
5858

59-
This key will serve as your validator controller account and session key for Aura. It'll used also to derive the GRANDPA key.
59+
This key will serve as your validator controller account and session key for Aura (validator node/author account). It'll used also to derive the GRANDPA key.
6060

6161
### 1.2 Generate the Node (aka Network) Key
6262

@@ -335,6 +335,59 @@ Insert the Aura and GRANDPA keys into your node's keystore.
335335

336336
You can restart your node at this point.
337337

338+
#### 2.4 Managing TFChain with systemd (Optional)
339+
340+
Example systemd file:
341+
342+
```ini
343+
[Unit]
344+
Description=TFchain service
345+
After=network.target
346+
StartLimitIntervalSec=0
347+
348+
[Service]
349+
Type=simple
350+
Restart=always
351+
RestartSec=1
352+
User=user
353+
ExecStart=/home/user/tfchain/substrate-node/target/release/tfchain --chain /home/user/tfchain/substrate-node/chainspecs/dev/chainSpec.json --pruning=archive --bootnodes /ip4/185.206.122.7/tcp/30333/p2p/12D3KooWLcMLBg9itjQL1EXsAqkJFPhqESHqJKY7CBKmhhhL8fdp --validator --telemetry-url 'wss://shard1.telemetry.tfchain.grid.tf/submit 1'
354+
355+
[Install]
356+
WantedBy=multi-user.target
357+
```
358+
359+
Replace `user` by your username.
360+
361+
```bash
362+
sudo vim /etc/systemd/system/tfchain.service
363+
```
364+
365+
then paste the file content, save and exit vim.
366+
367+
Starting service:
368+
369+
```bash
370+
sudo systemctl start tfchain
371+
```
372+
373+
Stopping service:
374+
375+
```bash
376+
sudo systemctl stop tfchain
377+
```
378+
379+
Reload config:
380+
381+
```bash
382+
sudo systemctl stop tfchain
383+
```
384+
385+
Edit File:
386+
387+
```bash
388+
sudo systemctl start tfchain
389+
```
390+
338391
## 3. Synchronize the Node Using Warp Sync
339392

340393
With warp sync enabled, your node will sync much faster by downloading key block headers and skipping state transitions. To monitor the syncing progress, you can view the logs.

docs/misc/validatorship.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Apply for a Validatorship
2+
3+
## Requirements
4+
5+
Check [adding validators guide](./adding_validators.md) and make sure you meet the [Prerequisites](./adding_validators.md#prerequisites) and hardware [requiremnts](./adding_validators.md#hardware).
6+
7+
## 1 Generate Keys
8+
9+
Follow [step 1](./adding_validators.md#1-generate-keys)
10+
11+
Optionally, generate a third account (a stash account) similary to how you [genrate the validator account key](./adding_validators.md#11-generate-the-validator-account-key)
12+
13+
## 2 Insert AURA/GRAN Keys
14+
15+
Follow [step 2](./adding_validators.md#2-start-the-validator-node) and [step 3](./adding_validators.md#3-synchronize-the-node-using-warp-sync)
16+
17+
## 3 Connect The Session Key To The Controller Account
18+
19+
Follow [step 4](./adding_validators.md#4-set-session-keys-on-chain)
20+
21+
Your node is now running in validator mode. Next up you need to apply for a Validatorship and manualy activate the validator.
22+
23+
## 4 Setup a Stash Account (Optional)
24+
25+
Bonding an account is optional, you can skip this step and continue to the next step.
26+
27+
- Open the Polkadot.js browser extension.
28+
- Import your stach account using the mnemonic from step 1 in this document.
29+
- Go to `Developer` -> `Extrinsicis` and Select your `Stash` account. Now from the left dropdown (modules) search `validator`
30+
- Select `bond(validator)` and select the target account to be your account that manages the Validator and manages your council membership (voting). (You previously created).
31+
- Now click `Submit Transaction`.
32+
33+
![bond](../assets/bond.png)
34+
35+
## 5 Apply for a Validatorship
36+
37+
- Now go to `Developer` -> `Extrinsicis` and Select your `VALIDATOR_ACCOUNT` account. Now from the left dropdown (modules) search `validator` and select the method: `createValidator(...)`
38+
- This call needs to be signed with your account (`VALIDATOR_ACCOUNT`) that manages the Validator and manages your council membership (voting). (You previously created).
39+
- Information needed:
40+
- validator\_node\_account: Account ID generated from previous step (`VALIDATOR_NODE_ACCOUNT`)
41+
- stash\_account: Stash account, can be your `VALIDATOR_ACCOUNT`
42+
- description: Reason why I want to become a validator
43+
- tfconnectid: Your Threefold connect name
44+
- info: link to webpage or linked in profile
45+
- If all information is filled in correctly. Click on `Submit transaction` and sign. If all goes well, the Council will approve your request.
46+
47+
![create](../assets/create_val.png)
48+
49+
## 6 Activate The Validator
50+
51+
If your request is approved by the council AND your tfchain node is fully synced with the network you can activate your validator. This will kickstart block production after 2 era.
52+
53+
- go to `Developer` -> `Extrinsicis` and Select your account that manages the Validator and manages your council membership (voting). (You previously created).. Now from the left dropdown (modules) search `validator`.
54+
- Select `ActivateValidatorNode` and click Submit Transaction.
55+
56+
![activate](../assets/activate.png)

0 commit comments

Comments
 (0)