1. Run a new full node on a new machine.
We recommend starting with 0.25uscrt
per gas unit:
perl -i -pe 's/^minimum-gas-prices = .+?$/minimum-gas-prices = "0.25uscrt"/' ~/.secretd/config/app.toml
sudo systemctl restart secret-node
Your validator will not accept transactions that specify --gas-price
lower than the minimun-gas-price
you set here.
3. Generate a new key pair for yourself (change <key-alias>
with any word of your choice, this is just for your internal/personal reference):
secretcli keys add <key-alias>
Note: If you already have a key you can import it with the bip39 mnemonic with secretcli keys add <key-alias> --recover
or with secretcli keys export
(exports to stderr
!!) & secretcli keys import
.
This is the secret
wallet from which you delegate your funds to you own validator. You must delegate at least 1 SCRT (1000000uscrt) from this wallet to your validator.
To create a secret
wallet, run:
secretcli keys add <key-alias>
Make sure to backup the mnemonic you got from the above command!
Then transfer funds to address you just created.
secretcli q account $(secretcli keys show -a <key-alias>)
If you get the following message, it means that you have no tokens yet:
ERROR: unknown address: account secret1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist
6. Join the network as a new validator: replace <MONIKER>
with the moniker you configured in step 3 of creating a full-node, and adjust the amount you want to stake
(remember 1 SCRT = 1,000,000 uSCRT, and so the command below stakes 100k SCRT).
secretcli tx staking create-validator \
--amount=<amount-to-delegate-to-yourself>uscrt \
--pubkey=$(secretd tendermint show-validator) \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas-prices 0.25uscrt \
--moniker=<MONIKER> \
--from=<key-alias>
secretcli q staking validators | jq '.[] | select(.description.moniker == "<MONIKER>")'
Or run: secretcli q staking validators | grep moniker
. You should see your moniker listed.
There are a couple of scenarios that can lead to losing a precentage of your and your delegators' stake. These are called slashing events.
The following is updated as of March 23, 2020.
Conditions for downtime:
- Signing less than 2500 blocks out of every 5000-block window. For a block time of 5.8 seconds, this roughly translates to being up for 4 hours out of every 8-hour window.
Penalties for downtime:
- Slashing of 1% of your and your delegators' staking amount.
- Jailing for 10 minutes of your validator node. You don't earn block rewards for this period and at the end must manually unjail your node with
secretcli tx slashing unjail --from <key-alias> --gas-prices 0.25uscrt
.
Conditions for double-signing:
- Your validator signs the same block height twice.
Penalties for double-signing:
- Slashing of 5% of your and your delegators' staking amount.
- Jailing forever (tombstoned) of your validator node. You cannot earn block rewards anymore with this validator and you and your delegators must redelegate your stake to a different validator.
See Sentry Nodes.
(remember 1 SCRT = 1,000,000 uSCRT)
In order to stake more tokens beyond those in the initial transaction, run:
secretcli tx staking delegate $(secretcli keys show <key-alias> --bech=val -a) <amount>uscrt --from <key-alias> --gas-prices 0.25uscrt
secretcli tx staking edit-validator --moniker <new-moniker> --from <key-alias> --gas-prices 0.25uscrt
secretcli q distribution rewards $(secretcli keys show -a <key-alias>)
secretcli q distribution commission $(secretcli keys show -a <key-alias> --bech=val)
secretcli tx distribution withdraw-rewards $(secretcli keys show --bech=val -a <key-alias>) --from <key-alias> --gas-prices 0.25uscrt
secretcli tx distribution withdraw-rewards $(secretcli keys show --bech=val -a <key-alias>) --from <key-alias> --commission --gas-prices 0.25uscrt
Currently deleting a validator is not possible. If you redelegate or unbond your self-delegations then your validator will become offline and all your delegators will start to unbond.
You are currently unable to modify the --commission-max-rate
and --commission-max-change-rate"
parameters.
Modifying the commision-rate can be done using this:
secretcli tx staking edit-validator --commission-rate="0.05" --from <key-alias> --gas-prices 0.25uscrt
To unjail your jailed validator
secretcli tx slashing unjail --from <key-alias> --gas-prices 0.25uscrt
To retrieve a validator's signing info:
secretcli q slashing signing-info <validator-conspub-key>
You can get the current slashing parameters via:
secretcli q slashing params
You can get the current slashing parameters via:
secretcli q slashing params