Versions in this module Expand all Collapse all v0 v0.1.0 Apr 21, 2023 Changes in this version + const KeyType + const KeyTypes + const KeyValidatorType + var ErrForkNotFound = errors.New("fork not found") + var ErrKeyManagerNotFound = errors.New("key manager not found") + var ErrSignerNotFound = errors.New("signer not found") + var ErrTxInLastEpochOfBlock = errors.New("block must not have transactions in the last of epoch") + var ErrUndefinedIBFTConfig = errors.New("IBFT config is not defined") + var ErrValidatorStoreNotFound = errors.New("validator set not found") + type ContractValidatorStoreWrapper struct + func NewContractValidatorStoreWrapper(logger hclog.Logger, blockchain store.HeaderGetter, executor contract.Executor, ...) (*ContractValidatorStoreWrapper, error) + func (w *ContractValidatorStoreWrapper) Close() error + func (w *ContractValidatorStoreWrapper) GetValidators(height, epochSize, forkFrom uint64) (validators.Validators, error) + type ForkManager struct + func NewForkManager(logger hclog.Logger, blockchain store.HeaderGetter, executor contract.Executor, ...) (*ForkManager, error) + func (m *ForkManager) Close() error + func (m *ForkManager) GetHooks(height uint64) HooksInterface + func (m *ForkManager) GetSigner(height uint64) (signer.Signer, error) + func (m *ForkManager) GetValidatorStore(height uint64) (ValidatorStore, error) + func (m *ForkManager) GetValidators(height uint64) (validators.Validators, error) + func (m *ForkManager) Initialize() error + type HeaderModifier interface + ModifyHeader func(*types.Header, types.Address) error + ProcessHeader func(*types.Header) error + VerifyHeader func(*types.Header) error + type HooksInterface interface + ModifyHeader func(*types.Header, types.Address) error + PostInsertBlock func(*types.Block) error + PreCommitState func(*types.Header, *state.Transition) error + ProcessHeader func(*types.Header) error + ShouldWriteTransactions func(uint64) bool + VerifyBlock func(*types.Block) error + VerifyHeader func(*types.Header) error + type HooksRegister interface + RegisterHooks func(hooks *hook.Hooks, height uint64) + type IBFTFork struct + Deployment *common.JSONNumber + From common.JSONNumber + MaxValidatorCount *common.JSONNumber + MinValidatorCount *common.JSONNumber + To *common.JSONNumber + Type IBFTType + ValidatorType validators.ValidatorType + Validators validators.Validators + func (f *IBFTFork) UnmarshalJSON(data []byte) error + type IBFTForks []*IBFTFork + func GetIBFTForks(ibftConfig map[string]interface{}) (IBFTForks, error) + type IBFTType string + const PoA + const PoS + func ParseIBFTType(ibftType string) (IBFTType, error) + func (t IBFTType) String() string + type PoAHookRegister struct + func NewPoAHookRegisterer(getValidatorsStore func(*IBFTFork) ValidatorStore, forks IBFTForks) *PoAHookRegister + func (r *PoAHookRegister) RegisterHooks(hooks *hook.Hooks, height uint64) + type PoSHookRegister struct + func NewPoSHookRegister(forks IBFTForks, epochSize uint64) *PoSHookRegister + func (r *PoSHookRegister) RegisterHooks(hooks *hook.Hooks, height uint64) + type SnapshotValidatorStoreWrapper struct + func NewSnapshotValidatorStoreWrapper(logger hclog.Logger, blockchain store.HeaderGetter, ...) (*SnapshotValidatorStoreWrapper, error) + func (w *SnapshotValidatorStoreWrapper) Close() error + func (w *SnapshotValidatorStoreWrapper) GetValidators(height, _, _ uint64) (validators.Validators, error) + type Updatable interface + UpdateValidatorSet func(validators.Validators, uint64) error + type ValidatorStore interface + Close func() error + GetValidators func(height, epochSize, forkFrom uint64) (validators.Validators, error)