Validator List
Validators with commission, uptime and voting power. Flags membership of the smallest set controlling a third of the stake, and sorts ascending by default — the conventional descending sort pushes delegators toward whoever is already largest.
src/components/ui/validator-list.tsxAbout
From the component's own source, where it was written.
Validators to delegate to, with commission, uptime and voting power.
Cumulative voting power is the column nobody ships and everybody needs. A chain where the top third of validators control a third of the stake is one where those validators can halt it, and a list sorted by size actively pushes delegators toward the validators that make that worse. Flagging membership of the top-third set is the honest version.
Sorted by voting power ascending by default, deliberately — the conventional descending sort concentrates stake in whoever is already largest.
Install
npx astralyx-ui add validator-list
Usage
import { ValidatorList } from '@/components/ui/validator-list'
<ValidatorList validators={validators} onSelect={delegate} />Composer
Change the props and the source below follows.
| Validator | |||
|---|---|---|---|
| Halted NodeHalted NodeJailed | 10.0% | 42.10% | 0.10% |
| NodeifyNodeifyTop third | 0.0% | 96.20% | 0.40% |
| StakelyStakelyTop third | 3.0% | 99.40% | 2.10% |
| P2P.orgP2P.orgTop third | 4.0% | 99.99% | 6.60% |
| FigmentFigmentTop third | 5.0% | 99.91% | 7.40% |
| Chorus OneChorus OneTop third | 8.0% | 99.98% | 8.10% |
<ValidatorList validators={validators} onSelect={delegate} />Examples
A validator set
<ValidatorList validators={validators} />API
Generated from the source, so it cannot fall behind the code. One table per exported component, then hooks, functions and types.
ValidatorList
Extends Omit<ComponentProps<'div'>, 'onSelect'>.
| Prop | Type | Default | Description |
|---|---|---|---|
| validators | Validator[] | required | { id, name, avatar?, commission, uptime?, votingPower, jailed? }. |
| onSelect | (id: string) => void | — | Omit for a read-only table. |
| validatorHeader | ReactNode | 'Validator' | — |
| commissionHeader | string | 'Commission' | — |
| uptimeHeader | string | 'Uptime' | — |
| votingPowerHeader | string | 'Voting power' | — |
| jailedLabel | ReactNode | 'Jailed' | Badge on a jailed validator. |
| concentrationLabel | ReactNode | 'Top third' | Badge on a validator inside the concentrated top third of stake. |
Types
Validator
Validators to delegate to, with commission, uptime and voting power.
| Field | Type | Description |
|---|---|---|
| id | string | — |
| name | ReactNode | — |
| avatar? | ReactNode | — |
| commission | number | Percentage, e.g. 5 for 5%. |
| uptime? | number | Percentage. |
| votingPower | number | Share of total stake, 0–1. |
| stake? | ReactNode | — |
| jailed? | boolean | — |
| onSelect? | () => void | — |
Behaviour
| Topic | Detail | Description |
|---|---|---|
| concentration | computed | Marks the validators making up the smallest set that controls a third of the stake — the threshold that matters for halting a chain. |
| sort | ascending by default | Descending by voting power is the conventional order and it pushes delegators toward whoever is already largest. |