# Packages
Package dpor implements the dpor consensus engine.
# Constants
Commit state is the third state.
Idle state is served as the first state in PBFT, ready to receive the proposed block.
ImpeachCommit Once a impeach prepare certificate is collected, a validator enters impeach prepared state.
ImpeachPrepare The validator transit to impeach pre-prepared state whenever the timer expires It is about to broadcast impeach prepare messages.
Prepare state is the second state.
Validate state.
# Variables
ErrFutureBlock is returned when a block's timestamp is in the future according to the current node.
ErrInvalidImpeachCoinbase is returned if an impeach block's coinbase is not 0x00.
ErrInvalidImpeachDporSnap is returned if an impeach block's DporSnap is not valid.
ErrInvalidImpeachExtra is returned if an impeach block's Extra is not valid.
ErrInvalidImpeachGasLimit is returned if an impeach block's GasLimit is not valid.
ErrInvalidImpeachGasUsed is returned if an impeach block's GasUsed is not valid.
ErrInvalidImpeachLogsBloom is returned if an impeach block's LogsBloom is not valid.
ErrInvalidImpeachReceiptsRoot is returned if an impeach block's ReceiptsRoot is not valid.
ErrInvalidImpeachStateRoot is returned if an impeach block's StateRoot is not equal to parents'.
ErrInvalidImpeachTimestamp is returned if an impeach block's Timestamp is not valid.
ErrInvalidImpeachTxs is returned if an impeach block contrains txs.
ErrInvalidImpeachTxsRoot is returned if an impeach block's TxsRoot is not valid.
ErrInvalidNormalCoinbase is returned if a normal block's coinbase is 0x00.
ErrInvalidNumber is returned if a block's number doesn't equal it's parent's plus one.
ErrInvalidSigners is returned if a block contains an invalid extra sigers bytes.
ErrInvalidTimestamp is returned when a block's timestamp is larger than parent's timestamp + period + timeout.
ErrNotEnoughSigs is returned if there is not enough signatures for a block.
ErrNotInProposerCommittee is returned if the account is not in proposer committee.
ErrorInvalidValidatorsList is returned if the validators list is invalid.
ErrPrunedAncestor is returned when validating a block requires an ancestor that is known, but the state of which is not available.
ErrUnauthorized is returned if a header is signed by a non-authorized entity.
ErrUnknownAncestor is returned when validating a block requires an ancestor that is unknown.
ErrUnknownLbftState is returned if committee handler's state is unknown.
# Structs
PbftStatus represents a state of a dpor replica.
# Interfaces
ChainReader defines a small collection of methods needed to access the local blockchain.
ChainReadWriter includes reader and writer.
ChainWriter reads and writes pending block to blockchain.
Engine is an algorithm agnostic consensus engine.
PbftEngine is a pbft based consensus engine.
Proposer is used to produce a block in our PV(Producer-Validator) model.
Protocol represents interfaces a protocol can provide.
Validator is used to validate and sign a block.
# Type aliases
State is the pbft state.