Setting Up a Validator for PundiXChain
Last updated
Last updated
Information on how to join the mainnet (genesis.json
file and seeds) is held in our PundiX CLI Commands
repo.
If you plan to use a KMS (key management system), you should go through these steps first.
The role of a validator is to run a full-node and participate in consensus by broadcasting votes. Validators commit new blocks in the blockchain and receive rewards in exchange for their work. They must also participate in governance by voting on proposals. Validators are weighted according to their total stake.
Before you proceed to the next section, ensure that you have already set up a full-node
.
We support ledger for sending transactions, we recommend using ledger as it is more secure, note that such transactions require PundiX to be on both the remote vm and the host vm, which is a bit of a pain but worth doing.
Here we will create a new token holding account for the validator which we will bind later to the node consensus.
This creates a new token holding account for you, do record the mnemonic phrase in a safe place. Take note of the address so that you can fund the account. The _name
will be used again later.
It returns something like this when adding new account and mnemonic is stored in ledger:
if you already have an existing Pundi Wallet and would like to import it you may run the following command and follow the prompts:
Now we will bind the node consensus and validator's token holding account, once this is done you will have successfully set up a validator!
Couple of items to ensure before continuing
Ensure that entire node has synchronised to the latest block height, to prevent risk of being jailed. Using curl localhost:26657/status
or pundixd status
to check "catching_up":false
. If "catching_up":true
, please continue to wait until entire node has synchronised, this could take up to a day depending on network usage.
Great! You can now bind the node consensus and validator's token holding account.
The command to run will be pundixd tx staking create-validator
, copy the entire command below, after editing the required fields:
chain-id=payalebar
is set as our pundix testnet chain ie payalebar. for mainnet, set the chain-id=PUNDIX
.
gas="auto"
automatically assesses the gas used for this create-validator
transaction.
gas-adjustment=1.5
there will be a 20% buffer added to the automatically assessed gas amount.
gas-prices="0.000002PUNDIX"
this will be the gas price you will be paying for (you may check the gas price you will need to pay for your node).
from=<_name>
this is the token holding account created above that you will be binding your consensus account to to create a validator.
amount=100PUNDIX
this is the amount you will be self-delegating for your validator.
pubkey=$(pundixd tendermint show-validator)
this is your pubkey of your validator.
commission-rate="0.01"
this is the commission you will be charging as a validator.
commission-max-rate="0.2"
the maximum commission rate which this validator can charge. This parameter cannot be changed after create-validator
is processed.
commission-max-change-rate="0.01"
the maximum daily increase of the validator commission. This parameter cannot be changed after create-validator
is processed.
min-self-delegation="10000000000000000000000"
minimum amount of PUNDIX the validator needs to have bonded at all time. If the validator's self-delegated stake falls below this limit, their entire staking pool will unbond.
moniker="choose a moniker"
this will be the name of your validator for easier identification.
website="https://pundix.com"
this will be the website for delegators or the public to read more about your validator
details="To infinity and beyond!"
you can add some additional details about your validator.
Ensure both these outputs are the same.
Ensure the second to the last value from the first command has the same output as the second command before running the following:
Output:
Hit y
and enter! If successful, You will get an object data from the terminal with code = 0
similar to what is shown below.
Output:
min-self-delegation
is a stritly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A min-self-delegation
of 100000000000000000000
means your validator will never have a self-delegation lower than 100
PUNDIX
Your pxvalconspub
is used to create a new validator by staking tokens (this is the account used by the node consensus). You can find your validator pubkey by running:
You can edit your validator's public description. This info is to identify your validator, and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below. If a flag is not included in the command the field will default to empty (--moniker
defaults to the machine name) if the field has never been set or remain the same if it has been set in the past.
The <key_name>
specifies which validator you are editing. If you choose to not include certain flags, remember that the --from
flag must be included to identify the validator to update.
There are only a few parameters that can be edited they are listed below:
commission-rate string
: The new commission rate percentage
details string
: The validator's (optional) details (default "[do-not-modify]")
identity string
: The (optional) identity signature (ex. UPort or Keybase) (default "[do-not-modify]")
moniker string
: The validator's name (default "[do-not-modify]")
security-contract string
: The validator's (optional) security contact email (default "[do-not-modify]")
website string
: The validator's (optional) website (default "[do-not-modify]")
Note: The commission-rate
value must adhere to the following invariants:
Must be between 0 and the validator's commission-max-rate
Must not exceed the validator's commission-max-change-rate
which is maximum % point change rate per day. In other words, a validator can only change its commission once per day and within commission-max-change-rate
bounds.
View the validator's information with this command:
In order to keep track of a validator's signatures in the past you can do so by using the signing-info
command:
When a validator is "jailed" for downtime, you must submit an Unjail
transaction from the operator account in order to be able to get block proposer rewards again (depends on the zone fee distribution).
Your validator is active if the following command returns anything:
You should now see your validator in one of the PundiX explorers. You are looking for the bech32
encoded address
in the ~/.pundix/config/priv_validator.json
file.
When attempting to perform routine maintenance or planning for an upcoming coordinated upgrade, it can be useful to have your validator systematically and gracefully halt. You can achieve this by either setting the halt-height
to the height at which you want your node to shutdown or by passing the --halt-height
flag to pundixd
. The node will shutdown with a zero exit code at that given height after committing the block.
pundixd tx staking create-validator
command does not work for meGet your _pubkey
using pundixd tendermint show-validator
.
You will have to type out the command as follows:
insufficient fees
Example of the error as shown:
You will have to add --fees
to your command, to find out how much fees to input you can copy paste from the required
that is given to you.
Example of input:
voting_power: 0
Your validator has become jailed. Validators get jailed, for example get removed from the active validator set, if they DO NOT vote on 500
of the last 10000
blocks, or if they double sign.
If you got jailed for downtime, you can get your voting power back to your validator. First, if pundixd
is not running, start it up again:
Lastly, check your validator again to see if your voting power is back.
You may notice that your voting power is less than it used to be. That's because you got slashed for downtime!
pundixd
crashes because of too many open files
The default number of files Linux can open (per-process) is 1024
. pundixd
is known to open more than 1024
files. This causes the process to crash. A quick fix is to run ulimit -n 4096
(increase the number of open files allowed) and then restart the process with pundixd start
. If you are using systemd
or another process manager to launch pundixd
this may require some configuration at that level. A sample systemd
file to fix this issue is below:
Ensure that your token holding account has enough PUNDIX tokens
before creating a validator. For Testnet version
, you may obtain PUNDIX tokens
via . For more information on how to obtain PUNDIX tokens
on . A minimum of 100 PUNDIX
is needed to create an active validator. You will need more than 100 testnet PUNDIX
in your account because some is needed to pay for the creation of your validator. PUNDIX has 18 decimal points.
If this does not work for you, please check the Common Problem section or get help on the . Before you proceed and set your validator up, make sure you do some final checks (ensure your .pundix
path is set correctly). If you are in the root folder:
Do record the validator_address
as this is the only time you can see it on the terminal, or else you will have to use the explorer / to obtain the validator_address
. The explorer option can only be done if the binding is successful.
You can confirm that you are in the validator set by using a third party explorer for /.
This command is very important for in the future.
The --identity
can be used as to verify identity with systems like Keybase or UPort. When using with Keybase --identity
should be populated with a 16-digit string that is generated with a account. It's a cryptographically secure method of verifying your identity across multiple online networks. The Keybase API allows us to retrieve your Keybase avatar. This is how you can add a logo to your validator profile.
Wait for your full node to catch up to the latest block. Then, you can