package
0.1.0
Repository: https://github.com/brc20-collab/brczero.git
Documentation: pkg.go.dev

# README

See the consensus spec and the reactor consensus spec for more information.

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
IsDataCorruptionError returns true if data has been corrupted inside WAL.
No description provided by the author
NewPeerState returns a new PeerState for the given Peer.
NewReactor returns a new Reactor with the given consensusState.
NewState returns a new State.
NewTimeoutTicker returns a new TimeoutTicker.
NewWAL returns a new write-ahead logger based on `baseWAL`, which implements WAL.
NewWALDecoder returns a new decoder that reads from rd.
NewWALEncoder returns a new encoder that writes to wr.
NopMetrics returns no-op Metrics.
PrometheusMetrics returns Metrics build using Prometheus client library.
ReactorMetrics sets the metrics.
No description provided by the author
No description provided by the author
replay the wal file.
No description provided by the author
StateMetrics sets the metrics.
WALGenerateNBlocks generates a consensus WAL.
WALWithNBlocks returns a WAL content with numBlocks.

# 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
No description provided by the author
No description provided by the author
MetricsSubsystem is a subsystem shared by all metrics exposed by this package.
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

# Structs

Write ahead logger writes msgs to disk before they are processed.
BlockPartMessage is sent when gossipping a piece of the proposed block.
No description provided by the author
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
HasBlockPartMessage is sent to indicate that a particular vote has been received.
HasVoteMessage is sent to indicate that a particular vote has been received.
Metrics contains metrics exposed by this package.
NewRoundStepMessage is sent for every step taken in the ConsensusState.
NewValidBlockMessage is sent when a validator observes a valid block B in some round r, i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
PeerState contains the known state of a peer, including its connection and threadsafe access to its PeerRoundState.
ProposalMessage is sent when a new block is proposed.
ProposalPOLMessage is sent when a previous proposal is re-proposed.
ProposeRequestMessage from other peer for request the latest height of consensus block.
ProposeResponseMessage is the response of prMsg.
Reactor defines a reactor for the consensus service.
State handles execution of the consensus algorithm.
TimedWALMessage wraps WALMessage and adds Time for debugging purposes.
ViewChangeMessage is sent for remind peer to do vc.
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

Message is a message that can be sent and received on the Reactor.
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

# Type aliases

No description provided by the author
StateOption sets an optional parameter on the State.