consensus

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 11 Imported by: 7 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consensus

type Consensus struct {
	Config             types.Configuration
	Application        bft.Application
	Assembler          bft.Assembler
	WAL                bft.WriteAheadLog
	WALInitialContent  [][]byte
	Comm               bft.Comm
	Signer             bft.Signer
	Verifier           bft.Verifier
	MembershipNotifier bft.MembershipNotifier
	RequestInspector   bft.RequestInspector
	Synchronizer       bft.Synchronizer
	Logger             bft.Logger
	Metadata           protos.ViewMetadata
	LastProposal       types.Proposal
	LastSignatures     []types.Signature
	Scheduler          <-chan time.Time
	ViewChangerTicker  <-chan time.Time

	Pool *algorithm.Pool
	// contains filtered or unexported fields
}

Consensus submits requests to be total ordered, and delivers to the application proposals by invoking Deliver() on it. The proposals contain batches of requests assembled together by the Assembler.

func (*Consensus) Complain

func (c *Consensus) Complain(viewNum uint64, stopView bool)

func (*Consensus) Deliver

func (c *Consensus) Deliver(proposal types.Proposal, signatures []types.Signature) types.Reconfig

func (*Consensus) GetLeaderID

func (c *Consensus) GetLeaderID() uint64

GetLeaderID returns the current leader ID or zero if Consensus is not running

func (*Consensus) HandleMessage

func (c *Consensus) HandleMessage(sender uint64, m *protos.Message)

func (*Consensus) HandleRequest

func (c *Consensus) HandleRequest(sender uint64, req []byte)

func (*Consensus) Start

func (c *Consensus) Start() error

func (*Consensus) Stop

func (c *Consensus) Stop()

func (*Consensus) SubmitRequest

func (c *Consensus) SubmitRequest(req []byte) error

func (*Consensus) Sync

func (c *Consensus) Sync() types.SyncResponse

func (*Consensus) ValidateConfiguration

func (c *Consensus) ValidateConfiguration(nodes []uint64) error

Jump to

Keyboard shortcuts

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