Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agreement ¶
type Agreement struct {
*Extractor
}
func NewAgreement ¶
func NewAgreement(eventBroker wire.EventBroker, db database.DB) *Agreement
func (*Agreement) IsMember ¶
IsMember checks if the BLS key belongs to one of the Provisioners in the committee
func (*Agreement) Pack ¶
Pack creates a uint64 bitset representation of a Committee subset for a given round and step
type Committee ¶
Committee is the interface for operations depending on the set of Provisioners extracted for a given step
type Extractor ¶
type Extractor struct { *Store // contains filtered or unexported fields }
Extractor is a wrapper around the Store struct, and contains the phase-specific information, as well as a voting committee cache. It calls methods on the Store, passing its own parameters to extract the desired info for a specific phase.
func NewExtractor ¶
func NewExtractor(eventBroker wire.EventBroker, db database.DB) *Extractor
NewExtractor returns a committee extractor which maintains its own store and cache.
func (*Extractor) UpsertCommitteeCache ¶
UpsertCommitteeCache will return a voting committee for a given round, step and size. If the committee has not yet been produced before, it is put on the cache. If it has, it is simply retrieved and returned.
type Foldable ¶
type Foldable interface { Committee Pack(sortedset.Set, uint64, uint8) uint64 Unpack(uint64, uint64, uint8) sortedset.Set }
Foldable represents a Committee which can be packed into a bitset, to drastically decrease the size needed for committee representation over the wire.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the component that contains a set of provisioners, and provides access to this set, allowing clients to obtain consensus-related information. This struct is shared by Extractor structs in the node.
func (*Store) AddProvisioner ¶
AddProvisioner will add a provisioner to the Store's Provisioners object.
func (*Store) Provisioners ¶
func (s *Store) Provisioners() *user.Provisioners
Provisioners returns a copy of the user.Provisioners object maintained by the Store.