epochs

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: AGPL-3.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootQCVoter

type RootQCVoter struct {
	// contains filtered or unexported fields
}

RootQCVoter is responsible for generating and submitting votes for the root quorum certificate of the upcoming epoch for this node's cluster.

func NewRootQCVoter

func NewRootQCVoter(
	log zerolog.Logger,
	me module.Local,
	signer hotstuff.Signer,
	state protocol.State,
	client module.QCContractClient,
) *RootQCVoter

NewRootQCVoter returns a new root QC voter, configured for a particular epoch.

func (*RootQCVoter) Vote

func (voter *RootQCVoter) Vote(ctx context.Context, epoch protocol.Epoch) error

Vote handles the full procedure of generating a vote, submitting it to the epoch smart contract, and verifying submission. Returns an error only if there is a critical error that would make it impossible for the vote to be submitted. Otherwise, exits when the vote has been successfully submitted.

It is safe to run multiple times within a single setup phase.

Jump to

Keyboard shortcuts

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