Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 38 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,14 @@ COMMANDS:
delegator-join [options] Join as a delegator by staking with a validator
delegator-exit [options] Exit as a delegator by withdrawing shares
delegator-claim [options] Claim delegator withdrawals after unbonding period
validator-info [options] Get information about a validator
delegation-info [options] Get delegation info for a delegator with a validator
epoch-info [options] Get epoch info with timing estimates
validator-info [validator] Get information about a validator
validator-history [validator] Show slash and reward history for a validator
delegation-info [validator] Get delegation info for a delegator with a validator
epoch-info [options] Get current/previous epoch info (--epoch <n> for specific)
validators [options] Show validator set with stake, status, and weight
active-validators [options] List all active validators
quarantined-validators List all quarantined validators
banned-validators List all banned validators

COMMON OPTIONS (all commands):
--network <network> Network to use (localnet, testnet-asimov)
Expand Down Expand Up @@ -360,20 +364,24 @@ EXAMPLES:
# banned: 'Not banned'
# }

# Get current epoch info (includes timing estimates)
# Get current epoch info (shows current + previous epoch)
genlayer staking epoch-info
# Output:
# {
# currentEpoch: '2',
# epochStarted: '2025-11-28T09:57:49.000Z',
# epochEnded: 'Not ended',
# nextEpochEstimate: '2025-11-29T09:57:49.000Z',
# timeUntilNextEpoch: '19h 56m',
# minEpochDuration: '24h 0m',
# validatorMinStake: '0.01 GEN',
# delegatorMinStake: '42 GEN',
# activeValidatorsCount: '6'
# }
# ✔ Epoch info
#
# Current Epoch: 5 (started 9h 30m ago)
# Next Epoch: in 14h 30m
# Validators: 33
# ...
#
# Previous Epoch: 4 (finalized)
# Inflation: 1732904.66 GEN
# Claimed: 0 GEN
# Unclaimed: 1732904.66 GEN
# ...

# Query specific epoch data
genlayer staking epoch-info --epoch 4

# List active validators
genlayer staking active-validators
Expand All @@ -387,6 +395,21 @@ EXAMPLES:
# ]
# }

# Show validator set table with stake, status, weight
genlayer staking validators
genlayer staking validators --all # Include banned validators

# Show validator slash/reward history (testnet only)
genlayer staking validator-history 0x...
genlayer staking validator-history 0x... --limit 20
# Output:
# ┌─────────────┬───────┬────────┬────────────────────────┬─────────┐
# │ Time │ Epoch │ Type │ Details │ Block │
# ├─────────────┼───────┼────────┼────────────────────────┼─────────┤
# │ 12-11 14:20 │ 5 │ REWARD │ Val: 0 GEN, Del: 0 GEN │ 4725136 │
# │ 12-10 18:39 │ 4 │ SLASH │ 1.00% penalty │ 4717431 │
# └─────────────┴───────┴────────┴────────────────────────┴─────────┘

# Exit and claim (requires validator wallet address)
genlayer staking validator-exit --validator 0x... --shares 100
genlayer staking validator-claim --validator 0x...
Expand Down
35 changes: 22 additions & 13 deletions docs/validator-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,28 @@ genlayer staking epoch-info

Output:
```
{
currentEpoch: '2',
epochStarted: '2025-01-15T00:00:00.000Z',
nextEpochEstimate: '2025-01-16T00:00:00.000Z',
timeUntilNextEpoch: '12h 30m',
minEpochDuration: '24h 0m',
validatorMinStake: '42000 GEN',
delegatorMinStake: '42 GEN',
activeValidatorsCount: '6',
epochInflation: '1000 GEN',
totalWeight: '500000000000000000000000',
totalClaimed: '500 GEN'
}
✔ 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:
```bash
genlayer staking epoch-info --epoch 4
```

Note the `validatorMinStake` - you need at least this amount.
Expand Down
75 changes: 71 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@
},
"dependencies": {
"chalk": "^5.4.1",
"cli-table3": "^0.6.5",
"commander": "^14.0.0",
"dockerode": "^4.0.2",
"dotenv": "^17.0.0",
"ethers": "^6.13.4",
"fs-extra": "^11.3.0",
"genlayer-js": "^0.18.8",
"genlayer-js": "^0.18.9",
"inquirer": "^12.0.0",
"keytar": "^7.9.0",
"node-fetch": "^3.0.0",
Expand Down
Loading