committees

package
v0.25.14-cadence-v0.23... Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: AGPL-3.0 Imports: 14 Imported by: 8

Documentation

Overview

(c) 2020 Dapper Labs - ALL RIGHTS RESERVED

Index

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 NewClusterCommittee(
	state protocol.State,
	payloads storage.ClusterPayloads,
	cluster protocol.Cluster,
	epoch protocol.Epoch,
	me flow.Identifier,
) (*Cluster, error)

func (*Cluster) DKG

func (c *Cluster) DKG(_ flow.Identifier) (hotstuff.DKG, error)

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 (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

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 NewConsensusCommittee(state protocol.State, me flow.Identifier) (*Consensus, error)

func (*Consensus) DKG

func (c *Consensus) DKG(blockID flow.Identifier) (hotstuff.DKG, error)

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) DKG

func (s Static) DKG(_ flow.Identifier) (hotstuff.DKG, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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