Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
Block is a preblock that has been processed and signed by committee members. It is the final building block of the blockchain produced by the protocol.
type BlockSink ¶
type BlockSink chan<- *Block
BlockSink is an output channel for the blockchain produced.
type BuildInterpreter ¶
type BuildInterpreter func(config io.Reader, log zerolog.Logger) (Interpreter, BlockSource, error)
BuildInterpreter using the given config and logger.
type BuildOrderer ¶
BuildOrderer using the given config and logger.
type BuildValidator ¶
BuildValidator using the given config and logger.
type Interpreter ¶
type Interpreter interface { Service Set(PreblockSource) }
Interpreter represents a process for interpreting preblocks into blocks.
type Orderer ¶
type Orderer interface { Service Set(DataSource) }
Orderer represents a process used for ordering data into preblocks.
type Preblock ¶
Preblock is a set of Data from units contained in one timing round (block) together with some RandomBytes produced by common randomness.
func NewPreblock ¶
NewPreblock constructs a preblock from given data and randomBytes.
type PreblockSink ¶
type PreblockSink chan<- *Preblock
PreblockSink is a channel on which preblocks are written.
type PreblockSource ¶
type PreblockSource <-chan *Preblock
PreblockSource is a channel providing new preblocks.
type Service ¶
type Service interface { Start() error Stop() }
Service that can be started and stopped.
type Validator ¶
type Validator interface { Service Set(BlockSource) }
Validator represents a process that accepts data and pushes it to the orderer, while waiting for blocks from the interpreter.