committee

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PregenerationAmount uint8 = 1

PregenerationAmount is the size of a pregenerated committee.

Functions

This section is empty.

Types

type Handler added in v0.2.0

type Handler struct {
	key.Keys
	Provisioners user.Provisioners
	Committees   []user.VotingCommittee
	// contains filtered or unexported fields
}

Handler is injected in the consensus components that work with the various committee. It generates and maintains a list of active and valid committee members and handle the votes.

func NewHandler added in v0.2.0

func NewHandler(keys key.Keys, p user.Provisioners, seed []byte) *Handler

NewHandler creates a new committee.Handler by instantiating the committee slice, setting the keys and setting the Provisioner set.

func (*Handler) AmMember added in v0.2.0

func (b *Handler) AmMember(round uint64, step uint8, maxSize int) bool

AmMember checks if we are part of the committee for a given round and step.

func (*Handler) Committee added in v0.2.0

func (b *Handler) Committee(round uint64, step uint8, maxSize int) user.VotingCommittee

Committee returns a VotingCommittee for a given round and step.

func (*Handler) CommitteeSize added in v0.2.0

func (b *Handler) CommitteeSize(round uint64, maxSize int) int

CommitteeSize returns the size of a VotingCommittee, depending on how many provisioners are in the set.

func (*Handler) IsMember added in v0.2.0

func (b *Handler) IsMember(pubKeyBLS []byte, round uint64, step uint8, maxSize int) bool

IsMember checks if a provisioner with a given BLS public key is part of the committee for a given round and step.

func (*Handler) Seed added in v0.6.0

func (b *Handler) Seed() []byte

Seed returns seed value.

func (*Handler) VotesFor added in v0.2.0

func (b *Handler) VotesFor(pubKeyBLS []byte, round uint64, step uint8, maxSize int) int

VotesFor returns the amount of votes for a public key for a given round and step.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL