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") )
View Source
var ( ErrVotingNotSupported = errors.New("voting is not supported") ErrHeaderNotFound = errors.New("header not found") )
Functions ¶
func CalcMaxFaultyNodes ¶ added in v0.6.0
func CalcMaxFaultyNodes(s validators.Validators) int
func CalcProposer ¶ added in v0.6.0
func CalcProposer( validators validators.Validators, round uint64, lastProposer types.Address, ) validators.Validator
func LegacyQuorumSize ¶ added in v0.4.0
func LegacyQuorumSize(set validators.Validators) int
LegacyQuorumSize returns the legacy quorum size for the given validator set
func OptimalQuorumSize ¶ added in v0.4.0
func OptimalQuorumSize(set validators.Validators) int
OptimalQuorumSize returns the optimal quorum size for the given validator set
Types ¶
type IBFTConsensus ¶ added in v0.5.0
IBFTConsensus is a convenience wrapper for the go-ibft package
type QuorumImplementation ¶ added in v0.4.0
type QuorumImplementation func(validators.Validators) int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.