This guide walks you through becoming a validator on the GenLayer testnet using the CLI.
For a deeper understanding of how staking works in GenLayer, see the Staking documentation.
- Node.js installed
- GenLayer CLI installed (
npm install -g genlayer) - GEN tokens for staking (minimum stake required)
The easiest way to become a validator is using the interactive wizard:
genlayer staking wizardThe wizard guides you through all steps:
- Account setup (create or select)
- Network selection
- Balance verification
- Operator setup (optional, recommended for security)
- Stake amount selection
- Validator creation
- Identity setup (moniker, website, etc.)
If you prefer manual setup, follow the steps below.
genlayer account create --name ownerYou'll be prompted to set a password. This creates an encrypted keystore file in standard web3 format.
The owner account holds your staked funds and controls the validator. Keep it secure.
genlayer account showOutput:
{
name: 'owner',
address: '0x86D0d159483CBf01E920ECfF8bB7F0Cd7E964E7E',
balance: '0 GEN',
network: 'localnet',
status: 'locked',
active: true
}
genlayer network testnet-asimovVerify with:
genlayer account showYou should see network: 'Asimov Testnet'.
Transfer GEN tokens to your address:
- Use the faucet (if available)
- Transfer from another funded account using
genlayer account send
genlayer staking epoch-infoOutput:
✔ Epoch info
Current Epoch: 5 (started 9h 30m ago)
Next Epoch: in 14h 30m
Validators: 33
Weight: 6061746783417938774454
Slashed: 0 GEN
Previous Epoch: 4 (finalized)
Inflation: 1732904.66 GEN
Claimed: 0 GEN
Unclaimed: 1732904.66 GEN
Slashed: 0 GEN
Min Epoch Duration: 24h 0m
Validator Min Stake: 42000 GEN
Delegator Min Stake: 42 GEN
You can also query a specific epoch:
genlayer staking epoch-info --epoch 4Note the validatorMinStake - you need at least this amount.
For convenience, unlock your account to avoid entering password repeatedly:
genlayer account unlockThis caches your private key in the OS keychain.
genlayer staking validator-join --amount 42000gen --operator 0xOperator...Options:
--amount <amount>- Stake amount (e.g.,42000genor42000)--operator <address>- Operator address (recommended, see below)
Recommended: Use a separate operator address for security.
- Validator wallet - Holds your staked funds (keep offline/cold)
- Operator wallet - Signs blocks and performs validator duties (hot wallet on server)
This way, if your operator server is compromised, your staked funds remain safe.
If you already have an operator wallet (e.g., from geth, foundry, or another tool), you can use its address directly. Otherwise, create one:
# Create operator account (skip if you already have one)
genlayer account create --name operator
# View operator address
genlayer account show --account operator
# Address: 0xOperator123...
# Export keystore for validator node software (standard web3 format)
genlayer account export --account operator --output ./operator-keystore.json
# Join as validator with separate operator
genlayer staking validator-join --amount 42000gen --operator 0xOperator123...Transfer operator-keystore.json to your validator server and import it into your validator node software. The keystore is in standard web3 format, compatible with geth, foundry, and other Ethereum tools.
You can change the operator later:
genlayer staking set-operator --validator 0xYourValidator... --operator 0xNewOperator...genlayer staking validator-infoOutput:
{
validator: '0x86D0d159483CBf01E920ECfF8bB7F0Cd7E964E7E',
vStake: '42000 GEN',
vShares: '42000000000000000000000',
live: true,
banned: 'Not banned',
...
}
Set your validator's public identity so delegators can find you:
genlayer staking set-identity \
--validator 0x86D0...7E \
--moniker "My Validator" \
--website "https://myvalidator.com" \
--description "Reliable validator with 99.9% uptime" \
--twitter "myvalidator" \
--github "myvalidator"Required:
--validator <address>- Your validator address--moniker <name>- Display name for your validator
Optional:
--logo-uri <uri>- Logo image URL--website <url>- Website URL--description <text>- Description of your validator--email <email>- Contact email--twitter <handle>- Twitter handle--telegram <handle>- Telegram handle--github <handle>- GitHub handle--extra-cid <cid>- Additional data as IPFS CID
Your identity will show in validator-info:
genlayer staking validator-infoOutput will include:
{
...
identity: {
moniker: 'My Validator',
website: 'https://myvalidator.com',
twitter: 'myvalidator',
github: 'myvalidator'
}
}
Validators must be "primed" each epoch to participate in consensus. Priming updates the validator's stake record for the upcoming epoch.
# Prime your validator
genlayer staking validator-prime 0xYourValidator...
# Or prime all validators at once (anyone can do this)
genlayer staking prime-allThe validators command shows priming status:
- Green
e11- Primed for current epoch - Yellow
e10- Needs priming before next epoch - Red
e9!- Urgently needs priming (behind)
genlayer staking validator-deposit --validator 0xYourValidatorWallet... --amount 1000gengenlayer staking active-validators# Show all validators with stake, primed status, and weight
genlayer staking validators
# Include banned validators
genlayer staking validators --allgenlayer staking validator-exit --validator 0xYourValidatorWallet... --shares 100This initiates a withdrawal. Your tokens enter an unbonding period of 7 epochs before they can be claimed.
Check your pending withdrawals with validator-info:
selfStakePendingWithdrawals: [
{
epoch: '5',
shares: '100',
stake: '100 GEN',
claimableAtEpoch: '12',
status: 'Unbonding (4 epochs remaining)'
}
]
After the 7-epoch unbonding period:
genlayer staking validator-claim --validator 0xYourValidatorWallet...Run genlayer account create first.
Ensure you have enough GEN. Check with genlayer account show.
Check minimum with genlayer staking epoch-info and increase your stake amount.
Check the transaction status:
genlayer receipt <tx-hash>When done, lock your account to remove the cached private key:
genlayer account lock