Documentation
¶
Index ¶
- type ForkWithClients
- type IndexerCtx
- func (ictx *IndexerCtx) AddClientInfo(client *execution.Client, priority int, archive bool)
- func (ictx *IndexerCtx) GetClientsOnFork(forkId beacon.ForkKey, clientType execution.ClientType) []*execution.Client
- func (ictx *IndexerCtx) GetFinalizedClients(clientType execution.ClientType) []*execution.Client
- func (ictx *IndexerCtx) GetForksWithClients(clientType execution.ClientType) []*ForkWithClients
- func (ictx *IndexerCtx) GetSystemContractAddress(contractType string) common.Address
- func (ictx *IndexerCtx) SortClients(clientA *execution.Client, clientB *execution.Client, preferArchive bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForkWithClients ¶ added in v1.19.9
type ForkWithClients struct {
Canonical bool
ForkId beacon.ForkKey
ForkHead *beacon.ForkHead
Clients []*execution.Client
}
forkWithClients holds information about a fork and the clients following it
type IndexerCtx ¶
type IndexerCtx struct {
Logger logrus.FieldLogger
BeaconIndexer *beacon.Indexer
ExecutionPool *execution.Pool
ConsensusPool *consensus.Pool
ChainState *consensus.ChainState
// contains filtered or unexported fields
}
IndexerCtx is the context for the execution indexer
func NewIndexerCtx ¶
func NewIndexerCtx(logger logrus.FieldLogger, executionPool *execution.Pool, consensusPool *consensus.Pool, beaconIndexer *beacon.Indexer) *IndexerCtx
NewIndexerCtx creates a new IndexerCtx
func (*IndexerCtx) AddClientInfo ¶
func (ictx *IndexerCtx) AddClientInfo(client *execution.Client, priority int, archive bool)
AddClientInfo adds client info to the indexer context
func (*IndexerCtx) GetClientsOnFork ¶ added in v1.19.9
func (ictx *IndexerCtx) GetClientsOnFork(forkId beacon.ForkKey, clientType execution.ClientType) []*execution.Client
getFinalizedClients returns a list of clients that have reached the finalized el block
func (*IndexerCtx) GetFinalizedClients ¶ added in v1.19.9
func (ictx *IndexerCtx) GetFinalizedClients(clientType execution.ClientType) []*execution.Client
getFinalizedClients returns a list of clients that have reached the finalized el block
func (*IndexerCtx) GetForksWithClients ¶ added in v1.19.9
func (ictx *IndexerCtx) GetForksWithClients(clientType execution.ClientType) []*ForkWithClients
getForksWithClients returns a list of forks with their clients the list is sorted by the canonical head and the number of clients
func (*IndexerCtx) GetSystemContractAddress ¶ added in v1.19.0
func (ictx *IndexerCtx) GetSystemContractAddress(contractType string) common.Address
GetSystemContractAddress returns the address of a system contract from the first available client's config
func (*IndexerCtx) SortClients ¶ added in v1.19.9
func (ictx *IndexerCtx) SortClients(clientA *execution.Client, clientB *execution.Client, preferArchive bool) bool
SortClients sorts clients by priority, but randomizes the order for equal priority. Returns true if clientA should come before clientB.