DPoS class

Delegated Proof of Stake (DPoS) - delegate scheduling

Features:

  • delegation registry mapping delegator->delegate->amount
  • aggregated effective weight per delegate
  • deterministic slot schedule derived from slot seed and weights

Constructors

DPoS(List<Delegate> delegates)

Properties

delegates List<Delegate>
final
delegations Map<String, Map<String, double>>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

aggregatedWeights() Map<String, double>
Aggregate effective weights for delegates from the delegation registry.
delegate(String delegator, String delegateId, double amount) → void
Register a delegation: delegator delegates amount to delegateId.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scheduleForSlots(int slots) List<String>
Deterministic schedule for slots using a slot-derived seed. Picks delegates proportionally to their aggregated effective weights.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited