package
0.19.0-rc4
Repository: https://github.com/eeonevision/tendermint.git
Documentation: pkg.go.dev

# README

The core consensus algorithm.

  • state.go - The state machine as detailed in the whitepaper
  • reactor.go - A reactor that connects the state machine to the gossip network

Go-routine summary

The reactor runs 2 go-routines for each added peer: gossipDataRoutine and gossipVotesRoutine.

The consensus state runs two persistent go-routines: timeoutRoutine and receiveRoutine. Go-routines are also started to trigger timeouts and to avoid blocking when the internalMsgQueue is really backed up.

Replay/WAL

A write-ahead log is used to record all messages processed by the receiveRoutine, which amounts to all inputs to the consensus state machine: messages from peers, messages from ourselves, and timeouts. They can be played back deterministically at startup or using the replay console.

# Packages

No description provided by the author

# Functions

No description provided by the author
DecodeMessage decodes the given bytes into a ConsensusMessage.
IsDataCorruptionError returns true if data has been corrupted inside WAL.
NewConsensusReactor returns a new ConsensusReactor with the given consensusState.
NewConsensusState returns a new ConsensusState.
No description provided by the author
NewPeerState returns a new PeerState for the given Peer.
NewTimeoutTicker returns a new TimeoutTicker.
No description provided by the author
NewWALDecoder returns a new decoder that reads from rd.
NewWALEncoder returns a new encoder that writes to wr.
No description provided by the author
No description provided by the author
No description provided by the author
WALWithNBlocks generates a consensus WAL.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
.
replay refactor.
validation -> commit.
async.
No description provided by the author

# Structs

BlockPartMessage is sent when gossipping a piece of the proposed block.
CommitStepMessage is sent when a block is committed.
ConsensusReactor defines a reactor for the consensus service.
ConsensusState handles execution of the consensus algorithm.
DataCorruptionError is an error that occures if data on disk was corrupted.
EndHeightMessage marks the end of the given height inside WAL.
No description provided by the author
HasVoteMessage is sent to indicate that a particular vote has been received.
NewRoundStepMessage is sent for every step taken in the ConsensusState.
PeerState contains the known state of a peer, including its connection and threadsafe access to its PeerRoundState.
ProposalHeartbeatMessage is sent to signal that a node is alive and waiting for transactions for a proposal.
ProposalMessage is sent when a new block is proposed.
ProposalPOLMessage is sent when a previous proposal is re-proposed.
No description provided by the author
VoteMessage is sent when voting for a proposal (or lack thereof).
VoteSetBitsMessage is sent to communicate the bit-array of votes seen for the BlockID.
VoteSetMaj23Message is sent to indicate that a given BlockID has seen +2/3 votes.
A WALDecoder reads and decodes custom-encoded WAL messages from an input stream.
A WALEncoder writes custom-encoded WAL messages to an output stream.
WALSearchOptions are optional arguments to SearchForEndHeight.

# Interfaces

ConsensusMessage is a message that can be sent and received on the ConsensusReactor.
TimeoutTicker is a timer that schedules timeouts conditional on the height/round/step in the timeoutInfo.
WAL is an interface for any write-ahead logger.
No description provided by the author