Documentation ¶
Overview ¶
(c) 2020 Dapper Labs - ALL RIGHTS RESERVED
Index ¶
- type Cluster
- func (c *Cluster) DKG(_ flow.Identifier) (hotstuff.DKG, error)
- func (c *Cluster) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
- func (c *Cluster) Identity(blockID flow.Identifier, nodeID flow.Identifier) (*flow.Identity, error)
- func (c *Cluster) LeaderForView(view uint64) (flow.Identifier, error)
- func (c *Cluster) Self() flow.Identifier
- type CommitteeMetricsWrapper
- func (w CommitteeMetricsWrapper) DKG(blockID flow.Identifier) (hotstuff.DKG, error)
- func (w CommitteeMetricsWrapper) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
- func (w CommitteeMetricsWrapper) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
- func (w CommitteeMetricsWrapper) LeaderForView(view uint64) (flow.Identifier, error)
- func (w CommitteeMetricsWrapper) Self() flow.Identifier
- type Consensus
- func (c *Consensus) DKG(blockID flow.Identifier) (hotstuff.DKG, error)
- func (c *Consensus) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
- func (c *Consensus) Identity(blockID flow.Identifier, nodeID flow.Identifier) (*flow.Identity, error)
- func (c *Consensus) LeaderForView(view uint64) (flow.Identifier, error)
- func (c *Consensus) Self() flow.Identifier
- type Static
- func (s Static) DKG(_ flow.Identifier) (hotstuff.DKG, error)
- func (s Static) Identities(_ flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
- func (s Static) Identity(_ flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
- func (s Static) LeaderForView(_ uint64) (flow.Identifier, error)
- func (s Static) Self() flow.Identifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents the committee for a cluster of collection nodes. Cluster committees are epoch-scoped.
Clusters build blocks on a cluster chain but must obtain identity table information from the main chain. Thus, block ID parameters in this Committee implementation reference blocks on the cluster chain, which in turn reference blocks on the main chain - this implementation manages that translation.
func NewClusterCommittee ¶
func (*Cluster) Identities ¶
func (c *Cluster) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
func (*Cluster) Identity ¶
func (c *Cluster) Identity(blockID flow.Identifier, nodeID flow.Identifier) (*flow.Identity, error)
func (*Cluster) LeaderForView ¶
func (c *Cluster) LeaderForView(view uint64) (flow.Identifier, error)
func (*Cluster) Self ¶
func (c *Cluster) Self() flow.Identifier
type CommitteeMetricsWrapper ¶
type CommitteeMetricsWrapper struct {
// contains filtered or unexported fields
}
CommitteeMetricsWrapper implements the hotstuff.Committee interface. It wraps a hotstuff.Committee instance and measures the time which the HotStuff's core logic spends in the hotstuff.Committee component, i.e. the time determining consensus committee relations. The measured time durations are reported as values for the CommitteeProcessingDuration metric.
func NewMetricsWrapper ¶
func NewMetricsWrapper(committee hotstuff.Committee, metrics module.HotstuffMetrics) *CommitteeMetricsWrapper
func (CommitteeMetricsWrapper) DKG ¶
func (w CommitteeMetricsWrapper) DKG(blockID flow.Identifier) (hotstuff.DKG, error)
func (CommitteeMetricsWrapper) Identities ¶
func (w CommitteeMetricsWrapper) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
func (CommitteeMetricsWrapper) Identity ¶
func (w CommitteeMetricsWrapper) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
func (CommitteeMetricsWrapper) LeaderForView ¶
func (w CommitteeMetricsWrapper) LeaderForView(view uint64) (flow.Identifier, error)
func (CommitteeMetricsWrapper) Self ¶
func (w CommitteeMetricsWrapper) Self() flow.Identifier
type Consensus ¶
type Consensus struct {
// contains filtered or unexported fields
}
Consensus represents the main committee for consensus nodes. The consensus committee persists across epochs.
func NewConsensusCommittee ¶
func (*Consensus) Identities ¶
func (c *Consensus) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
func (*Consensus) Identity ¶
func (c *Consensus) Identity(blockID flow.Identifier, nodeID flow.Identifier) (*flow.Identity, error)
func (*Consensus) LeaderForView ¶
func (c *Consensus) LeaderForView(view uint64) (flow.Identifier, error)
LeaderForView returns the node ID of the leader for the given view. Returns the following errors:
- epoch containing the requested view has not been set up (protocol.ErrNextEpochNotSetup)
- epoch is too far in the past (leader.InvalidViewError)
- any other error indicates an unexpected internal error
func (*Consensus) Self ¶
func (c *Consensus) Self() flow.Identifier
type Static ¶
type Static struct {
// contains filtered or unexported fields
}
Static represents a committee with a static participant set. It is used for bootstrapping purposes.
func NewStaticCommittee ¶
func NewStaticCommittee(participants flow.IdentityList, myID flow.Identifier, dkgParticipants map[flow.Identifier]flow.DKGParticipant, dkgGroupKey crypto.PublicKey) (*Static, error)
NewStaticCommittee returns a new committee with a static participant set.
func NewStaticCommitteeWithDKG ¶ added in v0.25.0
func NewStaticCommitteeWithDKG(participants flow.IdentityList, myID flow.Identifier, dkg protocol.DKG) (*Static, error)
NewStaticCommitteeWithDKG returns a new committee with a static participant set.
func (Static) Identities ¶
func (s Static) Identities(_ flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
func (Static) Identity ¶
func (s Static) Identity(_ flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
func (Static) LeaderForView ¶
func (s Static) LeaderForView(_ uint64) (flow.Identifier, error)
func (Static) Self ¶
func (s Static) Self() flow.Identifier