👷 Validator management
This section will guide you through how you can run and manage your own validator.
Validator key export
View your validator keys
story validator export
Export the derived EVM private key of your validator into .env
file.
story validator export --export-evm-key --evm-key-path .env
Output example:
------------------------------------------------------
EVM Public Key: 0x277E70bFc5e855CF4B2D84e41526c632EdFB0baF
Compressed Public Key (base64): A0pKRURc/VhwdV7eKkZr1Yv5xd6tzQLYHeyDVAJA7Lgl
Compressed Public Key (hex): 034a4a45445cfd5870755ede2a466bd58bf9c5deadcd02d81dec83540240ecb825
Uncompressed Public Key: 044a4a45445cfd5870755ede2a466bd58bf9c5deadcd02d81dec83540240ecb825a39a0e6596ed7b101778b92a281ca5ea68817fa740a5dc2edaef044a67a790e7
------------------------------------------------------
EVM Private Key saved to: .env
WARNING: The EVM private key is highly sensitive. Store this file in a secure location.
Validator creation
Before setting up a validator, ensure your wallet (EVM Public Key from step above) is funded with testnet tokens from a faucet. Currenlty to create validator you have to stake 1024 IP.
Create a new validator
story validator create --stake ${AMOUNT_TO_STAKE_IN_WEI}
This will create the validator corresponding to your validator key saved in priv_validator_key.json
, providing the validator with {$AMOUNT_TO_STAKE_IN_WEI}
IP to self-stake. Note that to participate in consensus, at least 1 IP must be staked (equivalent to 1000000000000000000 wei)!
Validator staking
Stake to an existing validator
story validator stake --validator-pubkey ${VALIDATOR_PUB_KEY_IN_BASE64} --stake ${AMOUNT_TO_STAKE_IN_WEI}
You must stake at least 1 ETH worth (1,000,000,000,000,000,000 wei)
for the transaction to be valid.
Validator unstaking
Unstake from the selected validator
story validator unstake --validator-pubkey ${VALIDATOR_PUB_KEY_IN_BASE64} --unstake ${AMOUNT_TO_UNSTAKE_IN_WEI}
Validator stake-on-behalf
Stake on behalf of another delegator. This will stake ${AMOUNT_TO_STAKE_IN_WEI}
IP to the validator on behalf of the provided delegator.
story validator stake-on-behalf --delegator-pubkey ${DELEGATOR_PUB_KEY_IN_BASE64} --validator-pubkey ${VALIDATOR_PUB_KEY_IN_BASE64} --stake ${AMOUNT_TO_STAKE_IN_WEI}
Validator unstake-on-behalf
Unstake on behalf of another delegator as an operator
story validator unstake-on-behalf --delegator-pubkey ${DELEGATOR_PUB_KEY_IN_BASE64} --validator-pubkey ${VALIDATOR_PUB_KEY_IN_BASE64} --unstake ${AMOUNT_TO_STAKE_IN_WEI}
To unstake on behalf of delegators you must be registered as an authorized operator for that delegator.
👷 Operator management
Delegators may add operators to unstake or redelegate on their behalf.
Add operator
story validator add-operator --operator ${OPERATOR_EVM_ADDRESS}
Remove operator
story validator remove-operator --operator ${OPERATOR_EVM_ADDRESS}
Get valoper address
Synergy Nodes team have built Bench32 converter tool where by entering your validator HEX address you can transform it into valoper
address.
Use command below to get validator HEX address
curl -s http://localhost:26657/status | jq -r .result.validator_info.address
Remove node
Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json!
# Stop and remove services
sudo systemctl stop story-testnet.service
sudo systemctl disable story-testnet.service
sudo rm /etc/systemd/system/story-testnet.service
sudo systemctl stop story-testnet-geth.service
sudo systemctl disable story-testnet-geth.service
sudo rm /etc/systemd/system/story-testnet-geth.service
# Reload systemd configuration
sudo systemctl daemon-reload
# Remove binaries
sudo rm -f $(which story)
sudo rm -f $(which geth)
# Delete data
sudo rm -rf $HOME/.story