Running a Validator
⚠️ This section may change without prior notice
Critical information in this section may be subject to change as the network is in early stages.
🔓 The Moca Chain source code is publicly available on GitHub.
Minimum System Requirements
Number of $MOCA to be staked: Refer to the latest network parameters for current staking requirements.
Slashing details: Refer to the latest network parameters for current slashing conditions.
Setting up Validator Node
Install Fullnode
Follow the instructions here to set up a full node.
Prepare validator, validator BLS, relayer, and challenger accounts
Warning
The current key generation and storage procedures are not very secure. It is highly recommended to implement a more robust method, particularly when dealing with keys like the validator operator key.
For enhanced security and best practices, the usage of the Cold Wallet and MPC Wallet is strongly encouraged.
Tip
Alternatively, if you choose a different $KEY_HOME location and you are not using the suggested default ~/.mocad, you may start the full node by using below script, where $KEY_HOME is your selected directory.
Obtain validator, validator BLS, relayer, and challenger account addresses
Note
Ensure you choose the correct –keyring-backend and that –home is set correctly if you saved the files in a custom folder in step 2.
Note: For the MsgCreateValidator proposal, the delegator and validator addresses must be the same account.
Warning
The file ~/.mocad/config/priv_validator_key.json contains your validator’s consensus key. This key is used to sign blocks. Keep it secure — if compromised, your validator can be slashed.
Ensure your validator account is funded with sufficient $MOCA before proceeding.
Authorize Governance Module to allow Delegation
Generic Authorization
OR Limited Authorization
Submit a Create Validator Proposal
Replace the values in the following JSON and save it as create_validator_proposal.json:
$: A custom human-readable name for this node.
$: The consensus key generated in step 1 (stored in $/.mocad/config/priv_validator_key.json by default).
$: The operator address created in step 2.
$: The delegator address created in step 2.
$: The BLS key created in step 2.
$: The BLS proof created in step2.
$: The relayer address created in step 2.
$: The challenger address created in step 2.
You can also use the gen_validator_proposal.sh script to create:
Run the script
and you will see the output:
Submit the governance proposal. Ensure the validator account has enough $MOCA.
Info
If you are utilizing the Cold Wallet or MPC wallet, please proceed to next step
You can see the following output:
Find the proposal ID:
Query proposal status
Output:
You can find the proposal status is PROPOSAL_STATUS_VOTING_PERIOD
Wait for the voting until the Proposal is passed.
After submitting the proposal successfully, you must wait for the voting to be completed and the proposal to be approved. The voting period varies by network. Once it has passed and is successfully executed, you can verify that the node has become a validator.
Please announce your proposal ID to the existing validators, as they must vote in favour of it for it to pass.
For existing validators — run the following to vote on the proposal:
Warning
Please ensure that the validator node is running before it is selected and if the validator is also responsible for running relayer and/or running challenger, then please ensure all these services are running as expected before selection.
Query all validators
You will see the following output:
One-step
For ease of execution, we have encapsulated the above process into a script.
Prepare validator, validator BLS, relayer, and challenger accounts
This will print the generated validator_address (which is also used as the delegator address).
You need to ensure that the validator address is funded with sufficient Moca to be used for the subsequent proposal submission. Check the balance:
Submit a Create Validator Proposal
Wait for the Proposal to pass
Alternatively, you can also check the proposal status with the following command: