indexer

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDbDeposits

func BuildDbDeposits(block *CacheBlock, depositIndex *uint64) []*dbtypes.Deposit

func BuildDbSlashings

func BuildDbSlashings(block *CacheBlock) []*dbtypes.Slashing

func BuildDbVoluntaryExits

func BuildDbVoluntaryExits(block *CacheBlock) []*dbtypes.VoluntaryExit

func GetExecutionExtraData

func GetExecutionExtraData(v *spec.VersionedSignedBeaconBlock) ([]byte, error)

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

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 *ConsensusClient) (*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 ConsensusClient

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

func (*ConsensusClient) GetIndex

func (client *ConsensusClient) GetIndex() uint16

func (*ConsensusClient) GetLastClientError

func (client *ConsensusClient) GetLastClientError() string

func (*ConsensusClient) GetLastHead

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

func (*ConsensusClient) GetName

func (client *ConsensusClient) GetName() string

func (*ConsensusClient) GetNodePeers added in v1.10.0

func (client *ConsensusClient) GetNodePeers() []*v1.Peer

func (*ConsensusClient) GetPeerID added in v1.10.0

func (client *ConsensusClient) GetPeerID() string

func (*ConsensusClient) GetRpcClient

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

func (*ConsensusClient) GetStatus

func (client *ConsensusClient) GetStatus() string

func (*ConsensusClient) GetVersion

func (client *ConsensusClient) GetVersion() string

type DepositIndexer

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

type EpochStateStats

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

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) GetInitialDepositIndex

func (epochStats *EpochStats) GetInitialDepositIndex() *uint64

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) IsStateStatsReady

func (epochStats *EpochStats) IsStateStatsReady() bool

func (*EpochStats) TryGetProposerAssignments

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

func (*EpochStats) TryGetSyncAssignments

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

type EpochVotes

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

type ExecutionClient

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

func (*ExecutionClient) DidFetchPeers added in v1.10.0

func (client *ExecutionClient) DidFetchPeers() bool

func (*ExecutionClient) GetIndex

func (client *ExecutionClient) GetIndex() uint16

func (*ExecutionClient) GetLastClientError

func (client *ExecutionClient) GetLastClientError() string

func (*ExecutionClient) GetLastHead

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

func (*ExecutionClient) GetName

func (client *ExecutionClient) GetName() string

func (*ExecutionClient) GetNodeInfo added in v1.10.0

func (client *ExecutionClient) GetNodeInfo() *p2p.NodeInfo

func (*ExecutionClient) GetNodePeers added in v1.10.0

func (client *ExecutionClient) GetNodePeers() []*p2p.PeerInfo

func (*ExecutionClient) GetRpcClient

func (client *ExecutionClient) GetRpcClient() *rpc.ExecutionClient

func (*ExecutionClient) GetStatus

func (client *ExecutionClient) GetStatus() string

func (*ExecutionClient) GetVersion

func (client *ExecutionClient) GetVersion() string

type HeadFork

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

type Indexer

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

func NewIndexer

func NewIndexer() (*Indexer, error)

func (*Indexer) AddConsensusClient

func (indexer *Indexer) AddConsensusClient(index uint16, endpoint *types.EndpointConfig) *ConsensusClient

func (*Indexer) AddExecutionClient

func (indexer *Indexer) AddExecutionClient(index uint16, endpoint *types.EndpointConfig) *ExecutionClient

func (*Indexer) BuildLiveBlock

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

func (*Indexer) BuildLiveEpoch

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

func (*Indexer) GetCacheState

func (indexer *Indexer) GetCacheState() (highestSlot int64, finalizedEpoch int64, persistedEpoch int64, processedEpoch int64)

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) GetCachedValidatorPubkeyMap

func (indexer *Indexer) GetCachedValidatorPubkeyMap() map[phase0.BLSPubKey]*v1.Validator

func (*Indexer) GetCachedValidatorSet

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

func (*Indexer) GetCanonicalHead

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

func (*Indexer) GetConsensusClients

func (indexer *Indexer) GetConsensusClients() []*ConsensusClient

func (*Indexer) GetConsensusRpc

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

func (*Indexer) GetEpochVotes

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

func (*Indexer) GetExecutionClients

func (indexer *Indexer) GetExecutionClients() []*ExecutionClient

func (*Indexer) GetFinalizationCheckpoints

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

func (*Indexer) GetFinalizedElBlockNumber

func (indexer *Indexer) GetFinalizedElBlockNumber() uint64

func (*Indexer) GetFirstCachedCanonicalBlock

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

func (*Indexer) GetHeadForks

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

func (*Indexer) GetHighestElBlockNumber

func (indexer *Indexer) GetHighestElBlockNumber(head []byte) uint64

func (*Indexer) GetHighestSlot

func (indexer *Indexer) GetHighestSlot() uint64

func (*Indexer) GetReadyClClient

func (indexer *Indexer) GetReadyClClient(archive bool, head []byte, skip []*ConsensusClient) *ConsensusClient

func (*Indexer) GetReadyElClient

func (indexer *Indexer) GetReadyElClient(archive bool, head []byte, skip []*ExecutionClient) *ExecutionClient

Jump to

Keyboard shortcuts

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