Versions in this module Expand all Collapse all v0 v0.0.1 Oct 19, 2023 Changes in this version + var ErrFutureBlock = errors.New("block in the future") + var ErrInvalidNumber = errors.New("invalid block number") + var ErrInvalidTerminalBlock = errors.New("invalid terminal block") + var ErrPrunedAncestor = errors.New("pruned ancestor") + var ErrUnknownAncestor = errors.New("unknown ancestor") + var SystemAddress = common.HexToAddress("0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE") + type ChainHeaderReader interface + Config func() *params.ChainConfig + CurrentHeader func() *types.Header + GetHeader func(hash common.Hash, number uint64) *types.Header + GetHeaderByHash func(hash common.Hash) *types.Header + GetHeaderByNumber func(number uint64) *types.Header + GetHighestVerifiedHeader func() *types.Header + GetTd func(hash common.Hash, number uint64) *big.Int + type ChainReader interface + GetBlock func(hash common.Hash, number uint64) *types.Block + type Engine interface + APIs func(chain ChainHeaderReader) []rpc.API + Author func(header *types.Header) (common.Address, error) + CalcDifficulty func(chain ChainHeaderReader, time uint64, parent *types.Header) *big.Int + Close func() error + Delay func(chain ChainReader, header *types.Header, leftOver *time.Duration) *time.Duration + Finalize func(chain ChainHeaderReader, header *types.Header, state *state.StateDB, ...) error + FinalizeAndAssemble func(chain ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, []*types.Receipt, error) + Prepare func(chain ChainHeaderReader, header *types.Header) error + Seal func(chain ChainHeaderReader, block *types.Block, results chan<- *types.Block, ...) error + SealHash func(header *types.Header) common.Hash + VerifyHeader func(chain ChainHeaderReader, header *types.Header) error + VerifyHeaders func(chain ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) + VerifyUncles func(chain ChainReader, block *types.Block) error + type Merger struct + func NewMerger(db ethdb.KeyValueStore) *Merger + func (m *Merger) FinalizePoS() + func (m *Merger) PoSFinalized() bool + func (m *Merger) ReachTTD() + func (m *Merger) TDDReached() bool + type PoSA interface + EnoughDistance func(chain ChainReader, header *types.Header) bool + GetFinalizedHeader func(chain ChainHeaderReader, header *types.Header) *types.Header + GetJustifiedNumberAndHash func(chain ChainHeaderReader, header *types.Header) (uint64, common.Hash, error) + IsActiveValidatorAt func(chain ChainHeaderReader, header *types.Header, ...) bool + IsLocalBlock func(header *types.Header) bool + IsSystemContract func(to *common.Address) bool + IsSystemTransaction func(tx *types.Transaction, header *types.Header) (bool, error) + VerifyVote func(chain ChainHeaderReader, vote *types.VoteEnvelope) error + type PoW interface + Hashrate func() float64 + type VotePool interface + FetchVoteByBlockHash func(blockHash common.Hash) []*types.VoteEnvelope