Documentation ¶
Index ¶
- Constants
- Variables
- func CalcMaxFaultyNodes(s validators.Validators) int
- func CalcProposer(validators validators.Validators, round uint64, lastProposer types.Address) validators.Validator
- func Factory(params *consensus.Params) (consensus.Consensus, error)
- func LegacyQuorumSize(set validators.Validators) int
- func OptimalQuorumSize(set validators.Validators) int
- type IBFTConsensus
- type QuorumImplementation
- type Votable
Constants ¶
View Source
const ( DefaultEpochSize = 100000 IbftKeyName = "validator.key" KeyEpochSize = "epochSize" )
Variables ¶
View Source
var ( ErrInvalidHookParam = errors.New("invalid IBFT hook param passed in") ErrProposerSealByNonValidator = errors.New("proposer seal by non-validator") ErrInvalidMixHash = errors.New("invalid mixhash") ErrInvalidSha3Uncles = errors.New("invalid sha3 uncles") ErrWrongDifficulty = errors.New("wrong difficulty") ErrParentCommittedSealsNotFound = errors.New("parent committed seals not found") )
View Source
var ( ErrVotingNotSupported = errors.New("voting is not supported") ErrHeaderNotFound = errors.New("header not found") )
Functions ¶
func CalcMaxFaultyNodes ¶
func CalcMaxFaultyNodes(s validators.Validators) int
func CalcProposer ¶
func CalcProposer( validators validators.Validators, round uint64, lastProposer types.Address, ) validators.Validator
func LegacyQuorumSize ¶
func LegacyQuorumSize(set validators.Validators) int
LegacyQuorumSize returns the legacy quorum size for the given validator set
func OptimalQuorumSize ¶
func OptimalQuorumSize(set validators.Validators) int
OptimalQuorumSize returns the optimal quorum size for the given validator set
Types ¶
type IBFTConsensus ¶
IBFTConsensus is a convenience wrapper for the go-ibft package
type QuorumImplementation ¶
type QuorumImplementation func(validators.Validators) int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.