Documentation ¶
Index ¶
- Constants
- Variables
- func AccumulateRewardsAndCountSigs(bc engine.ChainReader, state *state.DB, header *block.Header, ...) (reward.Reader, error)
- func GetLockPeriodInEpoch(chain engine.ChainReader, epoch *big.Int) int
- func GetPublicKeys(chain engine.ChainReader, header *block.Header, reCalculate bool) ([]harmony_bls.PublicKeyWrapper, error)
- func IsCommitteeSelectionBlock(chain engine.ChainReader, header *block.Header) bool
- func QuorumForBlock(chain engine.ChainReader, h *block.Header, reCalculate bool) (quorum int, err error)
- func ReadPublicKeysFromLastBlock(bc engine.ChainReader, header *block.Header) ([]harmony_bls.PublicKeyWrapper, error)
- func ReadSignatureBitmapByPublicKeys(recvPayload []byte, publicKeys []bls.PublicKeyWrapper) (*bls_core.Sign, *bls.Mask, error)
Constants ¶
const ( // AsyncBlockProposalTimeout is the timeout which will abort the async block proposal. AsyncBlockProposalTimeout = 9 * time.Second )
timeout constant
Variables ¶
var Engine = &engineImpl{nil}
Engine is an algorithm-agnostic consensus engine.
Functions ¶
func AccumulateRewardsAndCountSigs ¶ added in v1.3.8
func AccumulateRewardsAndCountSigs( bc engine.ChainReader, state *state.DB, header *block.Header, beaconChain engine.ChainReader, sigsReady chan bool, ) (reward.Reader, error)
AccumulateRewardsAndCountSigs credits the coinbase of the given block with the mining reward. The total reward consists of the static block reward This func also do IncrementValidatorSigningCounts for validators
func GetLockPeriodInEpoch ¶ added in v1.10.0
func GetLockPeriodInEpoch(chain engine.ChainReader, epoch *big.Int) int
GetLockPeriodInEpoch returns the delegation lock period for the given chain
func GetPublicKeys ¶
func GetPublicKeys( chain engine.ChainReader, header *block.Header, reCalculate bool, ) ([]harmony_bls.PublicKeyWrapper, error)
GetPublicKeys finds the public keys of the committee that signed the block header
func IsCommitteeSelectionBlock ¶ added in v1.10.0
func IsCommitteeSelectionBlock(chain engine.ChainReader, header *block.Header) bool
IsCommitteeSelectionBlock checks if the given header is for the committee selection block which can only occur on beacon chain and if epoch > pre-staking epoch.
func QuorumForBlock ¶
func QuorumForBlock( chain engine.ChainReader, h *block.Header, reCalculate bool, ) (quorum int, err error)
QuorumForBlock returns the quorum for the given block header.
func ReadPublicKeysFromLastBlock ¶
func ReadPublicKeysFromLastBlock( bc engine.ChainReader, header *block.Header, ) ([]harmony_bls.PublicKeyWrapper, error)
ReadPublicKeysFromLastBlock finds the public keys of last block's committee
func ReadSignatureBitmapByPublicKeys ¶
func ReadSignatureBitmapByPublicKeys(recvPayload []byte, publicKeys []bls.PublicKeyWrapper) (*bls_core.Sign, *bls.Mask, error)
ReadSignatureBitmapByPublicKeys read the payload of signature and bitmap based on public keys
Types ¶
This section is empty.