Validators are the most reliable authorities eligible to vote for blocks finalization. In order to become one the node must not only declare a block authirship, but also put some funds on a collateral. Validators get rewarded 30% for every block in the network. Rewards are to divide in equal among the current validator set members.
GRANDPA (PoA) protocol is implemented in 3DPass as a number of traits, such as: Validator set pallet - to control the set of authorities, Session pallet - to ensure the rotation in the set, imOnline pallet - to check is everyone online in the set, Grandpa pallet - GRANDPA PoA consesnsus protocol.
Once a new member headed in the validator set, the Session pallet takes over its keys. The Session pallet is going to wait until the next session begins (session length = 30 blocks) to put the validator in the queue, which is going to last one more session to add it into the actual GRANDPA Authority list. This cycle is designed to ensure secure rotation in the set, and it always takes ~ 2 sessions.
The most common way for a beginner to run a miner and validator is to leverage a cloud server running Linux. You may choose whatever VPS provider that your prefer, and whatever operating system you are comfortable with. The transactions weights in PoScan were benchmarked on standard hardware. It is recommended that miners and validators run at least the standard hardware in order to ensure they are able to process all blocks in time. The following are not minimum requirements but if you decide to run with less than this beware that you might have performance issue.
- CPU - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
- Storage - A NVMe solid state drive. Should be reasonably sized to deal with blockchain growth. Starting around 80GB - 160GB will be okay for the first six months of Realis, but will need to be re-evaluated every six months.
- Memory - 64GB.
The specs posted above are by no means the minimum specs that you could use when running a validator, however you should be aware that if you are using less you may need to toggle some extra optimizations in order to be equal to other validators that are running the standard.
- Online: 24/7
- Firewall: no Firewall (the locations such as China and Singapore are not allowed for validator hosting)
- Internet trafic: no limits
- Performance: no problem to keep up with the chain
There is a threshold for new validator to pass, which depends on the amount of P3D locked up for the collateral. It is required to prove block authirship in the time frame of N recent blocks back. Block authorship check is required to pass just once. Hovewer, the collateral needs to remain locked up all the way through the node operating period. If the lock out period expires, the node is being moved from the validator set. In order to get back the threshold is required to pass again.
- 100 000 P3D locked + 1 block authorship in 100 recent blocks back
- 200 000 P3D locked + 1 block authorship in 2000 recent blocks back
- 300 000 P3D locked + 1 blok authorship in 4000 recent blocks back
- 400 000 P3D locked + 1 block authorship in 8000 recent blocks back
- PreVote Equivocation (voting for two different chains simultaneously): 40 000 P3D and get off the validator set
- Not being online/available: 20 000 P3D and get off the validator set
- Not being able to vote for any reason (Firewall, incorrect keys set up, etc.): 20 000 P3D and get off the validator set
Setting up procedure:
It is assumed that you already have set up a regular node before getting started with this tutorial.
- Set up imOnline key.
Open Terminal and insert imOnline key into the keystore by means of using this command:
./target/release/poscan-consensus key insert --scheme Sr25519 --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json --key-type imon --suri 0x4934fa3a959af00a0caccf2be77d82f4cbf2154c3c7bebc021f2c1573f44fbb3
--suriis the Secret seed (hex) from your GRANDPA key
Check your keystore
~/3dp-chain/chains/3dpass/keystore. There supposed to be 3 keys now: Mining key, Grandpa and Imonline key. Imonline key looks almost the same to your Minig key, but with the different prefix
696...Your keystore should look this way:
- Run the Node without mining as it's described here >>
- Connect Polka wallet to the Node in local (on the same server wss://127.0.0.1.:9944)
- Lock up your funds until a certain block number in the future. There is no way to unlock until it's expired.
- Amount u128 (in min units): +12 zeros at the tail e.x. 400 000 P3D becomes 400 000 000 000 000 000)
- Minimum lock time: 1 month (+ 43200 blocks ahead the current best block)
- Auto re-lock option (period): a period in blocks every which funds are going to be re-locked automatically. For example, if 45000 is chosen, then the funds are going to be re-locked for the next 45000 blocks every 45000 blocks.
- Add your mining address into the Validator set:
Make sure, that you can see your mining address in the validatorSet:
- Do rotateKeys and get "proof Bytes":
- Use your GRANDPA Public key (hex), Mining public key (hex) and the proof Bytes to set up session keys:
GRANDPA Public key (hex) is:
- Wait for 60 blocks to pass
- Make sure, that you can see your GRANDPA SS58 Address in the Grandpa Authorities:
- Would you like to highlight your node with the "dot" on the telemetry list, use this flag with the running comand:
--telemetry-url "wss://submit.telemetry.3dpass.org/submit 1"like this:
./target/release/poscan-consensus --base-path ~/3dp-chain/ --chain mainnetSpecRaw.json --name MyNodeName --validator --telemetry-url "wss://submit.telemetry.3dpass.org/submit 1" --author 0xccc201f5b3e7036c5ea534096d75befbda68a9b285025csd7105bc4726f02f7e --threads 2 --no-mdns
- Check if your node is not being exposed on the missing list. If your node is unable to vofe for some reason (incorrect setup keys, firewall, server responce longer than 333 ms, etc.) it's going to show up as missing, like this:
Rejoinig the validator set
There is a "comeback window" a validator can rejoin the validator set after getting ruled out and witout a necessity of having yet a block mined.
- Ban period: 3 hours, since heading off the validator set
- Comeback window: 1 week, since the ban period got expired
rejoinValidator method to get the validator back on track:
How to check my locks
If a Validator was rulled out the validator set and the punishment took place, it's likely that its account was slashed for penalties. In order to rejoin the new actual lock must be submitted. Use the standard guidelines above to set up new lock. Refill you account if it's needed.
Check the actual lock state with
validatorSet > validatorLock:
Check the state at wich the lock was submitted initially with
ValidatorSet > enterDeposit:
There is a legitimate way for Validators to exit without getting penalties, which is to wait until after the lock period expires and do "unlock funds". If the auto re-lock option have been used so far, new lock is required to cancel autolocking. Just set up a new lock without auto re-lock period specified and wait till it has expired.
Unlock funds with
validatorSet > unlock: