Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEligibleForEPoSAuction ¶
func IsEligibleForEPoSAuction(snapshot *staking.ValidatorSnapshot, validator *staking.ValidatorWrapper) bool
IsEligibleForEPoSAuction ..
Types ¶
type CandidateOrder ¶
CandidateOrder ..
func (CandidateOrder) MarshalJSON ¶
func (p CandidateOrder) MarshalJSON() ([]byte, error)
MarshalJSON ..
type CandidatesForEPoS ¶
type CandidatesForEPoS struct { Orders map[common.Address]effective.SlotOrder OpenSlotCountForExternalValidators int }
CandidatesForEPoS ..
type ChainReader ¶
type ChainReader interface { // ReadShardState retrieves sharding state given the epoch number. // This api reads the shard state cached or saved on the chaindb. // Thus, only should be used to read the shard state of the current chain. ReadShardState(epoch *big.Int) (*shard.State, error) // GetHeader retrieves a block header from the database by hash and number. GetHeaderByHash(common.Hash) *block.Header // Config retrieves the blockchain's chain configuration. Config() *params.ChainConfig // CurrentHeader retrieves the current header from the local chain. CurrentHeader() *block.Header }
ChainReader is a subset of Engine.Blockchain, just enough to do assignment
type CompletedEPoSRound ¶
type CompletedEPoSRound struct { MedianStake numeric.Dec `json:"epos-median-stake"` MaximumExternalSlot int `json:"max-external-slots"` AuctionWinners []effective.SlotPurchase `json:"epos-slot-winners"` AuctionCandidates []*CandidateOrder `json:"epos-slot-candidates"` }
CompletedEPoSRound ..
func NewEPoSRound ¶
func NewEPoSRound(epoch *big.Int, stakedReader StakingCandidatesReader) ( *CompletedEPoSRound, error, )
NewEPoSRound runs a fresh computation of EPoS using latest data always
type DataProvider ¶
type DataProvider interface { StakingCandidatesReader ChainReader }
DataProvider ..
type Reader ¶ added in v1.10.0
type Reader interface { ValidatorListProvider }
Reader is committee.Reader and it is the API that committee membership assignment needs
type StakingCandidatesReader ¶
type StakingCandidatesReader interface { CurrentBlock() *types.Block ReadValidatorInformation(addr common.Address) (*staking.ValidatorWrapper, error) ReadValidatorSnapshot(addr common.Address) (*staking.ValidatorSnapshot, error) ValidatorCandidates() []common.Address }
StakingCandidatesReader ..
type ValidatorListProvider ¶ added in v1.10.0
type ValidatorListProvider interface { Compute( epoch *big.Int, reader DataProvider, ) (*shard.State, error) ReadFromDB(epoch *big.Int, reader DataProvider) (*shard.State, error) }
ValidatorListProvider ..
Click to show internal directories.
Click to hide internal directories.