indexer

package
v1.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalVersionedSignedBeaconBlockSSZ

func MarshalVersionedSignedBeaconBlockSSZ(block *spec.VersionedSignedBeaconBlock) (version uint64, ssz []byte, err error)

func UnmarshalVersionedSignedBeaconBlockSSZ

func UnmarshalVersionedSignedBeaconBlockSSZ(version uint64, ssz []byte) (*spec.VersionedSignedBeaconBlock, error)

Types

type BlobAssignment added in v1.7.0

type BlobAssignment struct {
	Root []byte
	Slot uint64
	Blob *deneb.BlobSidecar
}

type BlobStore

type BlobStore struct {
	// contains filtered or unexported fields
}

func (*BlobStore) LoadBlob

func (store *BlobStore) LoadBlob(commitment []byte, blockroot []byte, client *IndexerClient) (*dbtypes.Blob, error)

type CacheBlock

type CacheBlock struct {
	Root []byte
	Slot uint64

	Refs struct {
		ExecutionHash   []byte
		ExecutionNumber uint64
	}
	// contains filtered or unexported fields
}

func (*CacheBlock) GetBlockBody

func (block *CacheBlock) GetBlockBody() *spec.VersionedSignedBeaconBlock

func (*CacheBlock) GetHeader

func (block *CacheBlock) GetHeader() *phase0.SignedBeaconBlockHeader

func (*CacheBlock) GetParentRoot

func (block *CacheBlock) GetParentRoot() []byte

func (*CacheBlock) IsCanonical

func (block *CacheBlock) IsCanonical(indexer *Indexer, head []byte) bool

func (*CacheBlock) IsReady

func (block *CacheBlock) IsReady() bool

type EpochStats

type EpochStats struct {
	Epoch         uint64
	DependentRoot []byte
	// contains filtered or unexported fields
}

func (*EpochStats) GetAttestorAssignments

func (epochStats *EpochStats) GetAttestorAssignments() map[string][]uint64

func (*EpochStats) GetDependentStateRef

func (epochStats *EpochStats) GetDependentStateRef() string

func (*EpochStats) GetProposerAssignments

func (epochStats *EpochStats) GetProposerAssignments() map[uint64]uint64

func (*EpochStats) GetSyncAssignments

func (epochStats *EpochStats) GetSyncAssignments() []uint64

func (*EpochStats) IsReady

func (epochStats *EpochStats) IsReady() bool

func (*EpochStats) IsValidatorsReady

func (epochStats *EpochStats) IsValidatorsReady() bool

func (*EpochStats) TryGetProposerAssignments

func (epochStats *EpochStats) TryGetProposerAssignments() map[uint64]uint64

func (*EpochStats) TryGetSyncAssignments

func (epochStats *EpochStats) TryGetSyncAssignments() []uint64

type EpochValidatorStats

type EpochValidatorStats struct {
	ValidatorCount    uint64
	ValidatorBalance  uint64
	EligibleAmount    uint64
	ValidatorBalances map[uint64]uint64
}

type EpochVotes

type EpochVotes struct {
	VoteCounts  bool
	ActivityMap map[uint64]bool
	// contains filtered or unexported fields
}

type HeadFork

type HeadFork struct {
	Slot         uint64
	Root         []byte
	ReadyClients []*IndexerClient
	AllClients   []*IndexerClient
}

type Indexer

type Indexer struct {
	BlobStore *BlobStore
	// contains filtered or unexported fields
}

func NewIndexer

func NewIndexer() (*Indexer, error)

func (*Indexer) AddClient

func (indexer *Indexer) AddClient(index uint16, endpoint *types.EndpointConfig) *IndexerClient

func (*Indexer) BuildLiveBlock

func (indexer *Indexer) BuildLiveBlock(block *CacheBlock) *dbtypes.Block

func (*Indexer) BuildLiveEpoch

func (indexer *Indexer) BuildLiveEpoch(epoch uint64) *dbtypes.Epoch

func (*Indexer) GetCachedBlock

func (indexer *Indexer) GetCachedBlock(root []byte) *CacheBlock

func (*Indexer) GetCachedBlockByStateroot

func (indexer *Indexer) GetCachedBlockByStateroot(stateroot []byte) *CacheBlock

func (*Indexer) GetCachedBlocks

func (indexer *Indexer) GetCachedBlocks(slot uint64) []*CacheBlock

func (*Indexer) GetCachedBlocksByExecutionBlockHash

func (indexer *Indexer) GetCachedBlocksByExecutionBlockHash(hash []byte) []*CacheBlock

func (*Indexer) GetCachedBlocksByExecutionBlockNumber

func (indexer *Indexer) GetCachedBlocksByExecutionBlockNumber(number uint64) []*CacheBlock

func (*Indexer) GetCachedBlocksByParentRoot

func (indexer *Indexer) GetCachedBlocksByParentRoot(parentRoot []byte) []*CacheBlock

func (*Indexer) GetCachedBlocksByProposer

func (indexer *Indexer) GetCachedBlocksByProposer(proposer uint64) []*CacheBlock

func (*Indexer) GetCachedEpochStats

func (indexer *Indexer) GetCachedEpochStats(epoch uint64) *EpochStats

func (*Indexer) GetCachedGenesis

func (indexer *Indexer) GetCachedGenesis() *v1.Genesis

func (*Indexer) GetCachedValidatorSet

func (indexer *Indexer) GetCachedValidatorSet() map[phase0.ValidatorIndex]*v1.Validator

func (*Indexer) GetCanonicalHead

func (indexer *Indexer) GetCanonicalHead() (uint64, []byte)

func (*Indexer) GetClients

func (indexer *Indexer) GetClients() []*IndexerClient

func (*Indexer) GetEpochVotes

func (indexer *Indexer) GetEpochVotes(epoch uint64) (*EpochStats, *EpochVotes)

func (*Indexer) GetFinalizationCheckpoints

func (indexer *Indexer) GetFinalizationCheckpoints() (int64, []byte, int64, []byte)

func (*Indexer) GetFirstCachedCanonicalBlock

func (indexer *Indexer) GetFirstCachedCanonicalBlock(epoch uint64, head []byte) *CacheBlock

func (*Indexer) GetHeadForks

func (indexer *Indexer) GetHeadForks(readyOnly bool) []*HeadFork

func (*Indexer) GetHighestSlot

func (indexer *Indexer) GetHighestSlot() uint64

func (*Indexer) GetReadyClient

func (indexer *Indexer) GetReadyClient(archive bool, head []byte, skip []*IndexerClient) *IndexerClient

func (*Indexer) GetRpcClient

func (indexer *Indexer) GetRpcClient(archive bool, head []byte) *rpc.BeaconClient

type IndexerClient

type IndexerClient struct {
	// contains filtered or unexported fields
}

func (*IndexerClient) GetIndex

func (client *IndexerClient) GetIndex() uint16

func (*IndexerClient) GetLastClientError added in v1.7.0

func (client *IndexerClient) GetLastClientError() string

func (*IndexerClient) GetLastHead

func (client *IndexerClient) GetLastHead() (int64, []byte, time.Time)

func (*IndexerClient) GetName

func (client *IndexerClient) GetName() string

func (*IndexerClient) GetRpcClient

func (client *IndexerClient) GetRpcClient() *rpc.BeaconClient

func (*IndexerClient) GetStatus

func (client *IndexerClient) GetStatus() string

func (*IndexerClient) GetVersion

func (client *IndexerClient) GetVersion() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL