coldstuff

package
v0.10.4-reload-pending... Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColdStuff

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

ColdStuff implements coldstuff.

func New

func New(
	log zerolog.Logger,
	state protocol.State,
	me module.Local,
	comms Communicator,
	builder module.Builder,
	finalizer module.Finalizer,
	memberFilter flow.IdentityFilter,
	interval time.Duration,
	timeout time.Duration,
	head func() (*flow.Header, error),
) (*ColdStuff, error)

func (*ColdStuff) Done

func (e *ColdStuff) Done() <-chan struct{}

func (*ColdStuff) Ready

func (e *ColdStuff) Ready() <-chan struct{}

func (*ColdStuff) SubmitCommit

func (e *ColdStuff) SubmitCommit(commit *model.Commit)

func (*ColdStuff) SubmitProposal

func (e *ColdStuff) SubmitProposal(proposal *flow.Header, parentView uint64)

func (*ColdStuff) SubmitVote

func (e *ColdStuff) SubmitVote(originID, blockID flow.Identifier, view uint64, sigData []byte)

type Communicator

type Communicator interface {
	hotstuff.Communicator

	BroadcastCommit(commit *model.Commit) error
}

Communicator is the interface for sending messages to other nodes within a ColdStuff consensus.

NOTE: It re-uses as much of the HotStuff interface and models as possible to simplify swapping between the two.

type Follower

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

func NewFollower

func NewFollower(log zerolog.Logger, state protocol.State, me module.Local) *Follower

func (*Follower) Done

func (f *Follower) Done() <-chan struct{}

func (*Follower) Ready

func (f *Follower) Ready() <-chan struct{}

func (*Follower) SubmitProposal

func (f *Follower) SubmitProposal(proposal *flow.Header, parentView uint64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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