Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HarmonysShare = numeric.MustNewDecFromStr("0.68") StakersShare = numeric.MustNewDecFromStr("0.32") // ErrVotingPowerNotEqualOne .. ErrVotingPowerNotEqualOne = errors.New("voting power not equal to one") )
Functions ¶
func AggregateRosters ¶
func AggregateRosters(rosters []RosterPerShard) map[common.Address]Staker
AggregateRosters ..
Types ¶
type Ballot ¶
type Ballot struct {
SignerPubKey shard.BlsPublicKey `json:"bls-public-key"`
Signature *bls.Sign `json:"signature"`
OptSerializedBlock []byte `json:"opt-rlp-encoded-block"`
}
Ballot is a vote cast by a validator
type BallotResults ¶ added in v1.3.1
type BallotResults struct {
Signature shard.BLSSignature // (aggregated) signature
Bitmap []byte // corresponding bitmap mask for agg signature
}
BallotResults are a completed round of votes
func (BallotResults) EncodePair ¶ added in v1.3.1
func (b BallotResults) EncodePair() (string, string)
EncodePair returns hex encoded tuple (signature, bitmap)
type Roster ¶
type Roster struct {
Voters map[shard.BlsPublicKey]stakedVoter
OurVotingPowerTotalPercentage numeric.Dec
TheirVotingPowerTotalPercentage numeric.Dec
RawStakedTotal numeric.Dec
HmySlotCount int64
}
Roster ..
type RosterPerShard ¶
RosterPerShard ..
type Staker ¶
type Staker struct {
TotalEffectiveStake numeric.Dec
VotingPower []staking.VotePerShard
BLSPublicKeysOwned []staking.KeysPerShard
}
Staker ..
Click to show internal directories.
Click to hide internal directories.