Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decider ¶
type Decider interface { fmt.Stringer SignatureReader SetVoters(subCommittee *shard.Committee, epoch *big.Int) (*TallyResult, error) Policy() Policy AddNewVote( p Phase, pubkeys []*bls_cosi.PublicKeyWrapper, sig *bls_core.Sign, headerHash common.Hash, height, viewID uint64, ) (*votepower.Ballot, error) IsQuorumAchieved(Phase) bool IsQuorumAchievedByMask(mask *bls_cosi.Mask) bool QuorumThreshold() numeric.Dec IsAllSigsCollected() bool ResetPrepareAndCommitVotes() ResetViewChangeVotes() CurrentTotalPower(p Phase) (*numeric.Dec, error) }
Decider ..
type ParticipantTracker ¶
type ParticipantTracker interface { Participants() multibls.PublicKeys IndexOf(bls.SerializedPublicKey) int ParticipantsCount() int64 // NthNextValidator returns key for next validator. It assumes external validators and leader rotation. NthNextValidator(slotList shard.SlotList, pubKey *bls.PublicKeyWrapper, next int) (bool, *bls.PublicKeyWrapper) NthNextItc(instance shardingconfig.Instance, pubkey *bls.PublicKeyWrapper, next int) (bool, *bls.PublicKeyWrapper) NthNextItcExt(shardingconfig.Instance, *bls.PublicKeyWrapper, int) (bool, *bls.PublicKeyWrapper) FirstParticipant(shardingconfig.Instance) *bls.PublicKeyWrapper UpdateParticipants(pubKeys, allowlist []bls.PublicKeyWrapper) }
ParticipantTracker ..
type Registry ¶
type Registry struct { Deciders map[string]Decider `json:"quorum-deciders"` ExternalCount int `json:"external-slot-count"` MedianStake numeric.Dec `json:"epos-median-stake"` Epoch int `json:"epoch"` }
Registry ..
type SignatoryTracker ¶
type SignatoryTracker interface { ParticipantTracker // Caller assumes concurrency protection SignersCount(Phase) int64 // contains filtered or unexported methods }
SignatoryTracker ..
type SignatureReader ¶
type SignatureReader interface { SignatoryTracker ReadBallot(p Phase, pubkey bls.SerializedPublicKey) *votepower.Ballot TwoThirdsSignersCount() int64 // 96 bytes aggregated signature AggregateVotes(p Phase) *bls_core.Sign }
SignatureReader ..
type TallyResult ¶
type TallyResult struct {
// contains filtered or unexported fields
}
TallyResult is the result of when we calculate voting power, recall that it happens to us at epoch change
type Transition ¶
Transition ..
Click to show internal directories.
Click to hide internal directories.