Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrVotingPowerNotEqualOne .. ErrVotingPowerNotEqualOne = errors.New("voting power not equal to one") )
Functions ¶
func AggregateRosters ¶
func AggregateRosters( rosters []*Roster, ) map[common.Address][]VoteOnSubcomittee
AggregateRosters ..
Types ¶
type AccommodateFeechainVote ¶
type AccommodateFeechainVote struct { PureStakedVote IsFeechainNode bool `json:"-"` OverallPercent numeric.Dec `json:"overall-percent"` }
AccommodateFeechainVote ..
type Ballot ¶
type Ballot struct { SignerPubKeys []bls.SerializedPublicKey `json:"bls-public-keys"` BlockHeaderHash common.Hash `json:"block-header-hash"` Signature []byte `json:"bls-signature"` Height uint64 `json:"block-height"` ViewID uint64 `json:"view-id"` }
Ballot is a vote cast by a validator
type PureStakedVote ¶
type PureStakedVote struct { EarningAccount common.Address `json:"earning-account"` Identity bls.SerializedPublicKey `json:"bls-public-key"` GroupPercent numeric.Dec `json:"group-percent"` EffectiveStake numeric.Dec `json:"effective-stake"` RawStake numeric.Dec `json:"raw-stake"` }
PureStakedVote ..
type Roster ¶
type Roster struct { Voters map[bls.SerializedPublicKey]*AccommodateFeechainVote ShardID uint32 OrderedSlots []bls.SerializedPublicKey // contains filtered or unexported fields }
Roster ..
type Round ¶
type Round struct { AggregatedVote *bls_core.Sign BallotBox map[bls.SerializedPublicKey]*Ballot }
Round is a round of voting in any FBFT phase
type VoteOnSubcomittee ¶
type VoteOnSubcomittee struct { AccommodateFeechainVote ShardID uint32 }
VoteOnSubcomittee ..
func (VoteOnSubcomittee) MarshalJSON ¶
func (v VoteOnSubcomittee) MarshalJSON() ([]byte, error)
MarshalJSON ..
Click to show internal directories.
Click to hide internal directories.