# README

Consensus

This package implements all needed components to run the SBA* consensus algorithm in isolation. This means, that all the "pieces" of the consensus are housed within this package, including communication infrastructure and testing frameworks. However, it still needs to be put together in order to have a fully running consensus. This code is defined in the loop package in this repo.

Values

Message Header

FieldType
pubkeyBLSBLS Signature
rounduint64
stepuint64
blockhashuint256

# Packages

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

# Functions

InitAcceptedBlockUpdate init listener to get updates about lastly accepted block in the chain.
MockEmitter is a utility to quickly wire up an emitter in tests.
MockMember mocks a Provisioner.
MockNewBlockMsg ...
MockPhase mocks up a consensus phase.
MockProvisioners mock a Provisioner set.
MockRoundUpdate mocks a round update.
NewPublisher returns an initialized Publisher.
NewQueue creates a new Queue.
NewTestPhase returns a Phase implementation suitable for testing steps.
StupidEmitter ...
WithFields builds a list of common Consensus logging fields.

# Structs

No description provided by the author
Publisher is used to direct consensus messages from the peer.MessageProcessor to the consensus components.
Queue is a Queue of Events grouped by rounds and steps.
No description provided by the author
No description provided by the author
TestPhase is the phase to inject in the step under test to allow for table testing.

# Interfaces

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

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
TestCallback is a callback to allow for table testing based on step results.