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 DependencyInjectionWriter SetVoters(subCommittee *shard.Committee, epoch *big.Int) (*TallyResult, error) Policy() Policy IsQuorumAchieved(Phase) bool IsQuorumAchievedByMask(mask *bls_cosi.Mask) bool QuorumThreshold() numeric.Dec AmIMemberOfCommitee() bool IsAllSigsCollected() bool ResetPrepareAndCommitVotes() ResetViewChangeVotes() }
Decider ..
type DependencyInjectionReader ¶ added in v1.3.0
DependencyInjectionReader ..
type DependencyInjectionWriter ¶ added in v1.3.0
type DependencyInjectionWriter interface {
SetMyPublicKeyProvider(func() (*multibls.PublicKey, error))
}
DependencyInjectionWriter ..
type ParticipantTracker ¶
type ParticipantTracker interface { Participants() []*bls.PublicKey IndexOf(*bls.PublicKey) int ParticipantsCount() int64 NextAfter(*bls.PublicKey) (bool, *bls.PublicKey) UpdateParticipants(pubKeys []*bls.PublicKey) }
ParticipantTracker ..
type Registry ¶ added in v1.3.2
type Registry struct { Deciders map[string]Decider `json:"quorum-deciders"` ExternalCount int `json:"external-slot-count"` MedianStake numeric.Dec `json:"epos-median-stake"` }
Registry ..
type SignatoryTracker ¶
type SignatoryTracker interface { ParticipantTracker SubmitVote( p Phase, PubKey *bls.PublicKey, sig *bls.Sign, headerHash common.Hash, height, viewID uint64, ) (*votepower.Ballot, error) // Caller assumes concurrency protection SignersCount(Phase) int64 // contains filtered or unexported methods }
SignatoryTracker ..
type SignatureReader ¶
type SignatureReader interface { SignatoryTracker ReadAllBallots(Phase) []*votepower.Ballot ReadBallot(p Phase, PubKey *bls.PublicKey) *votepower.Ballot TwoThirdsSignersCount() int64 // 96 bytes aggregated signature AggregateVotes(p Phase) *bls.Sign }
SignatureReader ..
type TallyResult ¶ added in v1.3.0
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 ¶ added in v1.3.2
Transition ..
Click to show internal directories.
Click to hide internal directories.