How To Become A New Validator[advanced]
Last updated
Last updated
In order to make your assets safer, we need you to set some necessary identification parameters to become a validator. We also set the corresponding threshold so that we can screen those who really want to contribute to the chain. Of course, we will give corresponding rewards to these people.
The following steps are regarded as your first operation, because you only need to perform the following operations once to become a validator. Unless you log off the validator or cancel the corresponding operation, you will not need to perform the second operation to avoid wasting your gas fee.
In this step, you need to transfer your identification information to the corresponding management contract, which will manage your account, keys, and metadata.
The purpose of this step is keep your locked MAP
more secure by authorizing alternative keys to be used for signing attestations、voting、validating. By doing so, you can continue to participate in the protocol while keeping the key with access to your locked MAP
in storage.
You need createAccount
command to perform the above operations,more detail about createAccount
command please to see .
Authorizes an address to sign consensus messages on behalf of the account. This authorized address is called the signer. As his name is, he is only responsible for signing, your reward will not be issued to the signer, but to the account created in the previous step。
MAP
The threshold we set to be the validator is to lock 1000,000 MAP
into the corresponding management smart contract.
This part of the locked MAP
will be used for future punishment, which is also one of the conditions for being elected.
You need lockedMAP
command to perform the above operations,more detail about lockedMAP
command please to see .
This step is a key step for registering as a new validator.
Validators must have at least 0.001 proportion of the total votes to be considered for the election. So the validator can't have no votes.
We can use our validator account to vote for ourselves, or we can let other validators or voters vote for ourselves.
We've locked in 1,000,000 MAP in step 3, and it's a great decision to vote for ourselves now
Clone repositories
Build
The file generated by build is in the build/bin directory
First, you need to prepare two keystore, one for staking is called account, and one for mining is called signer
keystore of account
: account.json
keystore of signer
: signer.json
If you want node to run in the background and not hang up, you can use nohup and & in combination, or screen or similar. Below we will demonstrate using screen
--miner.validator is used to specify the address of the signer
--port 30321
to make sure the port is opend on the firewall
After the node starts, it will automatically connect to other nodes, and then start to synchronize blocks.
--target is used to specify the address of the account
--signerPriv is used to specify the private key of the signer
--validator is used to specify the address of the account
--signerPriv is used to specify the private key of the signer
--keystore is used to specify the address of the account
--keystore is used to specify the keystore of the account
(account.json)
--signer is used to specify the address key of the signer
(signer.json)
--keystore is used to specify the keystore of the account
--keystore is used to specify the keystore of the account
So far we have completed the registration steps of validator, now let's verify whether it has become a validator.
As can be seen from the above results, we have become a validator. But our vote count is 0, which prevents us from being elected as a validator that can participate in the block, which is not what we want. So we also need to vote for validators.
The number of votes cannot be greater than the number of votes locked.
For more information on voting and elections, click on the links below to view:
--keystore is used to specify the keystore of the account
Let's verify that our vote was successful.
Judging from the results, I've successfully voted for myself, but it's not enough. We need to call RPC in the next epoch to finally determine whether we are selected as validators who can participate in block generation,Just like the following:
You need register
command to perform the above operations,more detail about register
command please to see .
At this step, you will successfully register as a validator. Next, you can try to vote for yourself. How to vote please to see.
You can start a node that provides RPC services by yourself, or you can use the we provide.
How to build the atlas
Authorize using the signature (0x59dff185...32f0d700) generated from
Register the validator using the proof (0xf90149b8...0e56f0ab1) generated by
For more information on istanbul_getValidators
ps: We recommend using to create the keystore, export the private key, and use the private key to restore the keystore