indexer

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceType = "tracoor.indexer"
)

Variables

This section is empty.

Functions

func DBBeaconBadBlobToProtoBeaconBadBlob added in v0.0.16

func DBBeaconBadBlobToProtoBeaconBadBlob(bs *persistence.BeaconBadBlob) *indexer.BeaconBadBlob

func DBBeaconBadBlockToProtoBeaconBadBlock added in v0.0.16

func DBBeaconBadBlockToProtoBeaconBadBlock(bs *persistence.BeaconBadBlock) *indexer.BeaconBadBlock

func DBBeaconBlockToProtoBeaconBlock added in v0.0.16

func DBBeaconBlockToProtoBeaconBlock(bs *persistence.BeaconBlock) *indexer.BeaconBlock

func DBBeaconStateToProtoBeaconState

func DBBeaconStateToProtoBeaconState(bs *persistence.BeaconState) *indexer.BeaconState

func DBExecutionBadBlockToProtoExecutionBadBlock

func DBExecutionBadBlockToProtoExecutionBadBlock(eb *persistence.ExecutionBadBlock) *indexer.ExecutionBadBlock

func DBExecutionBlockTraceToProtoExecutionBlockTrace

func DBExecutionBlockTraceToProtoExecutionBlockTrace(eb *persistence.ExecutionBlockTrace) *indexer.ExecutionBlockTrace

func DBPaginationCursorToProtoPaginationCursor

func DBPaginationCursorToProtoPaginationCursor(pc *persistence.PaginationCursor) *indexer.PaginationCursor

func ProtoBeaconBadBlobToDBBeaconBadBlob added in v0.0.16

func ProtoBeaconBadBlobToDBBeaconBadBlob(bs *indexer.BeaconBadBlob) *persistence.BeaconBadBlob

func ProtoBeaconBadBlockToDBBeaconBadBlock added in v0.0.16

func ProtoBeaconBadBlockToDBBeaconBadBlock(bs *indexer.BeaconBadBlock) *persistence.BeaconBadBlock

func ProtoBeaconBlockToDBBeaconBlock added in v0.0.16

func ProtoBeaconBlockToDBBeaconBlock(bs *indexer.BeaconBlock) *persistence.BeaconBlock

func ProtoBeaconStateToDBBeaconState

func ProtoBeaconStateToDBBeaconState(bs *indexer.BeaconState) *persistence.BeaconState

func ProtoExecutionBadBlockToDBExecutionBadBlock

func ProtoExecutionBadBlockToDBExecutionBadBlock(eb *indexer.ExecutionBadBlock) *persistence.ExecutionBadBlock

func ProtoExecutionBlockTraceToDBExecutionBlockTrace

func ProtoExecutionBlockTraceToDBExecutionBlockTrace(eb *indexer.ExecutionBlockTrace) *persistence.ExecutionBlockTrace

func ProtoPaginationCursorToDBPaginationCursor

func ProtoPaginationCursorToDBPaginationCursor(pc *indexer.PaginationCursor) *persistence.PaginationCursor

Types

type BlockConfig added in v0.0.27

type BlockConfig struct {
	Enabled bool `yaml:"enabled" default:"false"`
}

type Config

type Config struct {
	Retention      RetentionConfig      `yaml:"retention"`
	PermanentStore PermanentStoreConfig `yaml:"permanentStore"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Indexer

type Indexer struct {
	indexer.IndexerServer
	// contains filtered or unexported fields
}

func NewIndexer

func NewIndexer(ctx context.Context, log logrus.FieldLogger, conf *Config, db *persistence.Indexer, st store.Store, ethereumConfig *ethereum.Config) (*Indexer, error)

func NewMockIndexer added in v0.0.15

func NewMockIndexer(ctx context.Context, config *Config) (*Indexer, func() error, error)

func (*Indexer) CountBeaconBadBlob added in v0.0.16

func (*Indexer) CountBeaconBadBlock added in v0.0.16

func (*Indexer) CountBeaconBlock added in v0.0.16

func (*Indexer) CreateBeaconBadBlob added in v0.0.16

func (*Indexer) CreateBeaconBadBlock added in v0.0.16

func (*Indexer) CreateBeaconBlock added in v0.0.16

func (*Indexer) GetConfig added in v0.0.22

func (*Indexer) ListBeaconBadBlob added in v0.0.16

func (*Indexer) ListBeaconBadBlock added in v0.0.16

func (*Indexer) ListBeaconBlock added in v0.0.16

func (*Indexer) ListBeaconState

func (*Indexer) ListUniqueBeaconBadBlobValues added in v0.0.16

func (*Indexer) ListUniqueBeaconBadBlockValues added in v0.0.16

func (*Indexer) ListUniqueBeaconBlockValues added in v0.0.16

func (*Indexer) Start

func (i *Indexer) Start(ctx context.Context, grpcServer *grpc.Server) error

func (*Indexer) Stop

func (i *Indexer) Stop(ctx context.Context) error

func (*Indexer) Store added in v0.0.15

func (i *Indexer) Store() store.Store

type Metrics

type Metrics struct {
}

func NewMetrics

func NewMetrics(namespace string) *Metrics

type PermanentStore added in v0.0.27

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

PermanentStore ensures that at least one copy of each block per network is retained by copying it to a permanent location in the store.

func NewPermanentStore added in v0.0.27

func NewPermanentStore(log logrus.FieldLogger, st store.Store, db *persistence.Indexer, nodeID string, conf *PermanentStoreConfig) (*PermanentStore, error)

NewPermanentStore creates a new permanent store.

func (*PermanentStore) GetPermanentLocation added in v0.0.28

func (p *PermanentStore) GetPermanentLocation(block PermanentStoreBlock) string

GetPermanentLocation returns the permanent location for a block.

func (*PermanentStore) IsEnabled added in v0.0.27

func (p *PermanentStore) IsEnabled() bool

func (*PermanentStore) QueueBlock added in v0.0.27

func (p *PermanentStore) QueueBlock(block PermanentStoreBlock)

QueueBlock adds a block to the queue for processing.

func (*PermanentStore) Start added in v0.0.27

func (p *PermanentStore) Start(ctx context.Context) error

Start starts the permanent store.

func (*PermanentStore) Stop added in v0.0.27

func (p *PermanentStore) Stop(ctx context.Context) error

Stop stops the permanent store.

type PermanentStoreBlock added in v0.0.27

type PermanentStoreBlock struct {
	Location      string
	BlockRoot     string
	Network       string
	Slot          phase0.Slot
	ProcessedChan chan struct{}
}

PermanentStoreBlock contains the minimal information needed to identify a block

type PermanentStoreConfig added in v0.0.27

type PermanentStoreConfig struct {
	Blocks BlockConfig `yaml:"blocks"`
}

type RetentionConfig

type RetentionConfig struct {
	BeaconStates         human.Duration `yaml:"beaconStates" default:"30m"`
	BeaconBlocks         human.Duration `yaml:"beaconBlocks" default:"30m"`
	BeaconBadBlocks      human.Duration `yaml:"beaconBadBlocks" default:"312480m"` // 6 months
	BeaconBadBlobs       human.Duration `yaml:"beaconBadBlobs" default:"312480m"`  // 6 months
	ExecutionBlockTraces human.Duration `yaml:"executionBlockTraces" default:"30m"`
	ExecutionBadBlocks   human.Duration `yaml:"executionBadBlocks" default:"312480m"` // 6 months
}

Jump to

Keyboard shortcuts

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