Skip to main content

Validator Setup

Validator Setup

1. Systemd service setup

Copy the following file to /home/koii/ and make it executable

exec /home/koii/.local/share/koii/install/active_release/bin/koii-validator \
--identity /home/koii/validator-keypair.json \
--vote-account /home/koii/vote-account-keypair.json \
--ledger /home/koii/ledger/ledgerdb \
--accounts /home/koii/accounts/accountdb \
--log /home/koii/koii-rpc.log \
--rpc-bind-address \
--rpc-port 10899 \
--gossip-port 10001 \
--dynamic-port-range 10002-10500 \
--enable-rpc-transaction-history \
--enable-cpi-and-log-storage \
--known-validator Bs3LDTq3rApDqjU4vCfDrQFjixHk1cW8rYoyc47bCog6 \
--entrypoint \
--entrypoint \
--rpc-faucet-address \
--init-complete-file /home/koii/init-completed \
--no-wait-for-vote-to-start-leader \
--enable-extended-tx-metadata-storage \
--maximum-full-snapshots-to-retain 20 \
--maximum-incremental-snapshots-to-retain 20 \
--limit-ledger-size 200000000 \
--only-known-rpc \
--wal-recovery-mode skip_any_corrupted_record
--expected-genesis-hash 3J1UybSMw4hCdTnQoVqVC3TSeZ4cd9SkrDQp3Q9j49VF

Create a systemd unit file at /etc/systemd/system/koii-validator.service

Description=Koii Validator

2. Create a vote account


🚧 You will need your validator keypair account to be funded with KOII tokens before continuing


Please make sure your Koii CLI is configured for and using your validator identity before continuing: koii config set --url []( --keypair ~/validator-keypair.json

Run the following command to create a vote-account on the network:

koii create-vote-account ~/vote-account-keypair.json ~/validator-keypair.json ~/authorized-withdrawer-keypair.json

3. Enable and Start the Koii validator

sudo systemctl enable koii-validator.service
sudo systemctl start koii-validator.service
sudo systemctl status koii-validator.service

Staking KOII in the validator

Commands in this section are to be run on the computer which has the stake account key pair (NOT ON VALIDATOR)

1. Create a stake account

Run the following command, AFTER replacing <AMOUNT_TO_STAKE>.

koii create-stake-account ~/stake-account-keypair.json <AMOUNT_TO_STAKE> --stake-authority ~/validator-keypair.json --withdraw-authority ~/authorized-withdrawer-keypair.json

2. Delegate the stake to your validator

koii delegate-stake ~/stake-account-keypair.json ~/vote-account-keypair.json --stake-authority ~/validator-keypair.json --force

3. Check your delegated stake’s status

Your validator will not show up in the koii validators list for 12 to 24 hours, you can check your stake to make sure it is properly delegated by running the following command

koii stake-account ~/stake-account-keypair.json

Expected output:

Balance: <Amount of KOII>
Rent Exempt Reserve: <Amount of KOII>
Delegated Stake: <Amount of KOII>
Activating Stake: <Amount of KOII>
Delegated Vote Account Address: <pubkey>
Stake Authority: <pubkey>
Withdraw Authority: <pubkey>

If you see a value in “Activating Stake” then you should be successfully voting within 24 hours