PoS class
PoS toolkit with a registry and deterministic, reproducible selection.
Advanced features:
- weighted sampling with alias table support for O(1) draws (fallback to linear)
- stake normalization and total-stake tracking
- deterministic proposer selection for a slot using a seeded RNG derived from slot
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalStake → double
-
no setter
-
validators
→ List<
Validator> -
final
Methods
-
addStake(
String id, double amount) → void - Add stake to a validator (create if missing).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
selectProposer(
int slot) → Validator -
Deterministic proposer selection for
slotusing a slot-derived seed. -
slash(
String validatorId, double amount) → double - Slash a validator, returning the new stake.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited