consensus

package
v2.3.0 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: 0

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