Documentation
¶
Index ¶
- Constants
- func DBBeaconBadBlobToProtoBeaconBadBlob(bs *persistence.BeaconBadBlob) *indexer.BeaconBadBlob
- func DBBeaconBadBlockToProtoBeaconBadBlock(bs *persistence.BeaconBadBlock) *indexer.BeaconBadBlock
- func DBBeaconBlockToProtoBeaconBlock(bs *persistence.BeaconBlock) *indexer.BeaconBlock
- func DBBeaconStateToProtoBeaconState(bs *persistence.BeaconState) *indexer.BeaconState
- func DBBlobToProtoBlob(b *persistence.Blob) *indexer.Blob
- func DBExecutionBadBlockToProtoExecutionBadBlock(eb *persistence.ExecutionBadBlock) *indexer.ExecutionBadBlock
- func DBExecutionBlockTraceToProtoExecutionBlockTrace(eb *persistence.ExecutionBlockTrace) *indexer.ExecutionBlockTrace
- func DBExecutionPayloadEnvelopeToProtoExecutionPayloadEnvelope(bs *persistence.ExecutionPayloadEnvelope) *indexer.ExecutionPayloadEnvelope
- func DBPaginationCursorToProtoPaginationCursor(pc *persistence.PaginationCursor) *indexer.PaginationCursor
- func DBPayloadDivergenceToProtoPayloadDivergence(d *persistence.PayloadDivergence) *indexer.PayloadDivergence
- func ProtoBeaconBadBlobToDBBeaconBadBlob(bs *indexer.BeaconBadBlob) *persistence.BeaconBadBlob
- func ProtoBeaconBadBlockToDBBeaconBadBlock(bs *indexer.BeaconBadBlock) *persistence.BeaconBadBlock
- func ProtoBeaconBlockToDBBeaconBlock(bs *indexer.BeaconBlock) *persistence.BeaconBlock
- func ProtoBeaconStateToDBBeaconState(bs *indexer.BeaconState) *persistence.BeaconState
- func ProtoExecutionBadBlockToDBExecutionBadBlock(eb *indexer.ExecutionBadBlock) *persistence.ExecutionBadBlock
- func ProtoExecutionBlockTraceToDBExecutionBlockTrace(eb *indexer.ExecutionBlockTrace) *persistence.ExecutionBlockTrace
- func ProtoExecutionPayloadEnvelopeToDBExecutionPayloadEnvelope(bs *indexer.ExecutionPayloadEnvelope) *persistence.ExecutionPayloadEnvelope
- func ProtoPaginationCursorToDBPaginationCursor(pc *indexer.PaginationCursor) (*persistence.PaginationCursor, error)
- func ProtoPayloadDivergenceToDBPayloadDivergence(d *indexer.PayloadDivergence) *persistence.PayloadDivergence
- type BlockConfig
- type Config
- type Indexer
- func (i *Indexer) CountBeaconBadBlob(ctx context.Context, req *indexer.CountBeaconBadBlobRequest) (*indexer.CountBeaconBadBlobResponse, error)
- func (i *Indexer) CountBeaconBadBlock(ctx context.Context, req *indexer.CountBeaconBadBlockRequest) (*indexer.CountBeaconBadBlockResponse, error)
- func (i *Indexer) CountBeaconBlock(ctx context.Context, req *indexer.CountBeaconBlockRequest) (*indexer.CountBeaconBlockResponse, error)
- func (i *Indexer) CountBeaconState(ctx context.Context, req *indexer.CountBeaconStateRequest) (*indexer.CountBeaconStateResponse, error)
- func (i *Indexer) CountExecutionBadBlock(ctx context.Context, req *indexer.CountExecutionBadBlockRequest) (*indexer.CountExecutionBadBlockResponse, error)
- func (i *Indexer) CountExecutionBlockTrace(ctx context.Context, req *indexer.CountExecutionBlockTraceRequest) (*indexer.CountExecutionBlockTraceResponse, error)
- func (i *Indexer) CountExecutionPayloadEnvelope(ctx context.Context, req *indexer.CountExecutionPayloadEnvelopeRequest) (*indexer.CountExecutionPayloadEnvelopeResponse, error)
- func (i *Indexer) CreateBeaconBadBlob(ctx context.Context, req *indexer.CreateBeaconBadBlobRequest) (*indexer.CreateBeaconBadBlobResponse, error)
- func (i *Indexer) CreateBeaconBadBlock(ctx context.Context, req *indexer.CreateBeaconBadBlockRequest) (*indexer.CreateBeaconBadBlockResponse, error)
- func (i *Indexer) CreateBeaconBlock(ctx context.Context, req *indexer.CreateBeaconBlockRequest) (*indexer.CreateBeaconBlockResponse, error)
- func (i *Indexer) CreateBeaconState(ctx context.Context, req *indexer.CreateBeaconStateRequest) (*indexer.CreateBeaconStateResponse, error)
- func (i *Indexer) CreateBlob(ctx context.Context, req *indexer.CreateBlobRequest) (*indexer.CreateBlobResponse, error)
- func (i *Indexer) CreateExecutionBadBlock(ctx context.Context, req *indexer.CreateExecutionBadBlockRequest) (*indexer.CreateExecutionBadBlockResponse, error)
- func (i *Indexer) CreateExecutionBlockTrace(ctx context.Context, req *indexer.CreateExecutionBlockTraceRequest) (*indexer.CreateExecutionBlockTraceResponse, error)
- func (i *Indexer) CreateExecutionPayloadEnvelope(ctx context.Context, req *indexer.CreateExecutionPayloadEnvelopeRequest) (*indexer.CreateExecutionPayloadEnvelopeResponse, error)
- func (i *Indexer) CreatePayloadDivergence(ctx context.Context, req *indexer.CreatePayloadDivergenceRequest) (*indexer.CreatePayloadDivergenceResponse, error)
- func (i *Indexer) GetBlob(ctx context.Context, req *indexer.GetBlobRequest) (*indexer.GetBlobResponse, error)
- func (i *Indexer) GetConfig(ctx context.Context, req *indexer.GetConfigRequest) (*indexer.GetConfigResponse, error)
- func (i *Indexer) GetStorageHandshakeToken(ctx context.Context, req *indexer.GetStorageHandshakeTokenRequest) (*indexer.GetStorageHandshakeTokenResponse, error)
- func (i *Indexer) ListBeaconBadBlob(ctx context.Context, req *indexer.ListBeaconBadBlobRequest) (*indexer.ListBeaconBadBlobResponse, error)
- func (i *Indexer) ListBeaconBadBlock(ctx context.Context, req *indexer.ListBeaconBadBlockRequest) (*indexer.ListBeaconBadBlockResponse, error)
- func (i *Indexer) ListBeaconBlock(ctx context.Context, req *indexer.ListBeaconBlockRequest) (*indexer.ListBeaconBlockResponse, error)
- func (i *Indexer) ListBeaconState(ctx context.Context, req *indexer.ListBeaconStateRequest) (*indexer.ListBeaconStateResponse, error)
- func (i *Indexer) ListExecutionBadBlock(ctx context.Context, req *indexer.ListExecutionBadBlockRequest) (*indexer.ListExecutionBadBlockResponse, error)
- func (i *Indexer) ListExecutionBlockTrace(ctx context.Context, req *indexer.ListExecutionBlockTraceRequest) (*indexer.ListExecutionBlockTraceResponse, error)
- func (i *Indexer) ListExecutionPayloadEnvelope(ctx context.Context, req *indexer.ListExecutionPayloadEnvelopeRequest) (*indexer.ListExecutionPayloadEnvelopeResponse, error)
- func (i *Indexer) ListPayloadDivergence(ctx context.Context, req *indexer.ListPayloadDivergenceRequest) (*indexer.ListPayloadDivergenceResponse, error)
- func (i *Indexer) ListUniqueBeaconBadBlobValues(ctx context.Context, req *indexer.ListUniqueBeaconBadBlobValuesRequest) (*indexer.ListUniqueBeaconBadBlobValuesResponse, error)
- func (i *Indexer) ListUniqueBeaconBadBlockValues(ctx context.Context, req *indexer.ListUniqueBeaconBadBlockValuesRequest) (*indexer.ListUniqueBeaconBadBlockValuesResponse, error)
- func (i *Indexer) ListUniqueBeaconBlockValues(ctx context.Context, req *indexer.ListUniqueBeaconBlockValuesRequest) (*indexer.ListUniqueBeaconBlockValuesResponse, error)
- func (i *Indexer) ListUniqueBeaconStateValues(ctx context.Context, req *indexer.ListUniqueBeaconStateValuesRequest) (*indexer.ListUniqueBeaconStateValuesResponse, error)
- func (i *Indexer) ListUniqueExecutionBadBlockValues(ctx context.Context, req *indexer.ListUniqueExecutionBadBlockValuesRequest) (*indexer.ListUniqueExecutionBadBlockValuesResponse, error)
- func (i *Indexer) ListUniqueExecutionBlockTraceValues(ctx context.Context, req *indexer.ListUniqueExecutionBlockTraceValuesRequest) (*indexer.ListUniqueExecutionBlockTraceValuesResponse, error)
- func (i *Indexer) ListUniqueExecutionPayloadEnvelopeValues(ctx context.Context, ...) (*indexer.ListUniqueExecutionPayloadEnvelopeValuesResponse, error)
- func (i *Indexer) Start(ctx context.Context, grpcServer *grpc.Server) error
- func (i *Indexer) Stop(ctx context.Context) error
- func (i *Indexer) Store() store.Store
- type Metrics
- func (m *Metrics) ObserveArchiveHoldback(reason string, count int64)
- func (m *Metrics) ObserveBlobCollected()
- func (m *Metrics) ObserveBlobGCSkipped(reason string)
- func (m *Metrics) ObservePurgeDuration(kind string, seconds float64)
- func (m *Metrics) ObserveRootDivergence(network, kind, cause string)
- func (m *Metrics) ObserveRowsPurged(kind string, count int64)
- func (m *Metrics) SetPurgeBacklog(kind string, rows int64)
- type PermanentStore
- func (p *PermanentStore) GetPermanentLocation(block PermanentStoreBlock) string
- func (p *PermanentStore) IsEnabled() bool
- func (p *PermanentStore) IsEnabledFor(kind string) bool
- func (p *PermanentStore) QueueBlock(block PermanentStoreBlock)
- func (p *PermanentStore) Start(ctx context.Context) error
- func (p *PermanentStore) Stop(ctx context.Context) error
- type PermanentStoreBlock
- type PermanentStoreConfig
- type PermanentStoreResult
- type RetentionConfig
Constants ¶
const ( ServiceType = "tracoor.indexer" KeyNode = "node" KeyBlockRoot = "block_root" KeyBlockHash = "block_hash" KeyBlockNumber = "block_number" KeyExecutionImplementation = "execution_implementation" KeyNetwork = "network" KeySlot = "slot" KeyEpoch = "epoch" KeyStateRoot = "state_root" KeyContentEncoding = "content_encoding" KeyNodeVersion = "node_version" KeyLocation = "location" KeyFetchedAt = "fetched_at" KeyBeaconImplementation = "beacon_implementation" KeyID = "id" KeyIndex = "index" KeyLockKey = "lock_key" KeyKind = "kind" KeyDedupKey = "dedup_key" OrderFetchedAtDesc = "fetched_at DESC" OrderFetchedAtAsc = "fetched_at ASC" )
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 DBBlobToProtoBlob ¶ added in v0.1.0
func DBBlobToProtoBlob(b *persistence.Blob) *indexer.Blob
func DBExecutionBadBlockToProtoExecutionBadBlock ¶
func DBExecutionBadBlockToProtoExecutionBadBlock(eb *persistence.ExecutionBadBlock) *indexer.ExecutionBadBlock
func DBExecutionBlockTraceToProtoExecutionBlockTrace ¶
func DBExecutionBlockTraceToProtoExecutionBlockTrace(eb *persistence.ExecutionBlockTrace) *indexer.ExecutionBlockTrace
func DBExecutionPayloadEnvelopeToProtoExecutionPayloadEnvelope ¶ added in v0.1.0
func DBExecutionPayloadEnvelopeToProtoExecutionPayloadEnvelope(bs *persistence.ExecutionPayloadEnvelope) *indexer.ExecutionPayloadEnvelope
func DBPaginationCursorToProtoPaginationCursor ¶
func DBPaginationCursorToProtoPaginationCursor(pc *persistence.PaginationCursor) *indexer.PaginationCursor
func DBPayloadDivergenceToProtoPayloadDivergence ¶ added in v0.1.0
func DBPayloadDivergenceToProtoPayloadDivergence(d *persistence.PayloadDivergence) *indexer.PayloadDivergence
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 ProtoExecutionPayloadEnvelopeToDBExecutionPayloadEnvelope ¶ added in v0.1.0
func ProtoExecutionPayloadEnvelopeToDBExecutionPayloadEnvelope(bs *indexer.ExecutionPayloadEnvelope) *persistence.ExecutionPayloadEnvelope
func ProtoPaginationCursorToDBPaginationCursor ¶
func ProtoPaginationCursorToDBPaginationCursor(pc *indexer.PaginationCursor) (*persistence.PaginationCursor, error)
func ProtoPayloadDivergenceToDBPayloadDivergence ¶ added in v0.1.0
func ProtoPayloadDivergenceToDBPayloadDivergence(d *indexer.PayloadDivergence) *persistence.PayloadDivergence
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"`
// BlobGCGracePeriod is the minimum age of a zero-reference payload before it may be
// collected. It must exceed the longest plausible fetch-plus-upload plus the agents'
// payload-lookup cache TTL, so an agent mid-hash cannot link to a payload being deleted.
BlobGCGracePeriod human.Duration `yaml:"blobGcGracePeriod" default:"10m"`
}
type Indexer ¶
type Indexer struct {
indexer.IndexerServer
// contains filtered or unexported fields
}
func NewIndexer ¶
func NewMockIndexer ¶ added in v0.0.15
func (*Indexer) CountBeaconBadBlob ¶ added in v0.0.16
func (i *Indexer) CountBeaconBadBlob(ctx context.Context, req *indexer.CountBeaconBadBlobRequest) (*indexer.CountBeaconBadBlobResponse, error)
func (*Indexer) CountBeaconBadBlock ¶ added in v0.0.16
func (i *Indexer) CountBeaconBadBlock(ctx context.Context, req *indexer.CountBeaconBadBlockRequest) (*indexer.CountBeaconBadBlockResponse, error)
func (*Indexer) CountBeaconBlock ¶ added in v0.0.16
func (i *Indexer) CountBeaconBlock(ctx context.Context, req *indexer.CountBeaconBlockRequest) (*indexer.CountBeaconBlockResponse, error)
func (*Indexer) CountBeaconState ¶
func (i *Indexer) CountBeaconState(ctx context.Context, req *indexer.CountBeaconStateRequest) (*indexer.CountBeaconStateResponse, error)
func (*Indexer) CountExecutionBadBlock ¶
func (i *Indexer) CountExecutionBadBlock(ctx context.Context, req *indexer.CountExecutionBadBlockRequest) (*indexer.CountExecutionBadBlockResponse, error)
func (*Indexer) CountExecutionBlockTrace ¶
func (i *Indexer) CountExecutionBlockTrace(ctx context.Context, req *indexer.CountExecutionBlockTraceRequest) (*indexer.CountExecutionBlockTraceResponse, error)
func (*Indexer) CountExecutionPayloadEnvelope ¶ added in v0.1.0
func (i *Indexer) CountExecutionPayloadEnvelope(ctx context.Context, req *indexer.CountExecutionPayloadEnvelopeRequest) (*indexer.CountExecutionPayloadEnvelopeResponse, error)
func (*Indexer) CreateBeaconBadBlob ¶ added in v0.0.16
func (i *Indexer) CreateBeaconBadBlob(ctx context.Context, req *indexer.CreateBeaconBadBlobRequest) (*indexer.CreateBeaconBadBlobResponse, error)
func (*Indexer) CreateBeaconBadBlock ¶ added in v0.0.16
func (i *Indexer) CreateBeaconBadBlock(ctx context.Context, req *indexer.CreateBeaconBadBlockRequest) (*indexer.CreateBeaconBadBlockResponse, error)
func (*Indexer) CreateBeaconBlock ¶ added in v0.0.16
func (i *Indexer) CreateBeaconBlock(ctx context.Context, req *indexer.CreateBeaconBlockRequest) (*indexer.CreateBeaconBlockResponse, error)
func (*Indexer) CreateBeaconState ¶
func (i *Indexer) CreateBeaconState(ctx context.Context, req *indexer.CreateBeaconStateRequest) (*indexer.CreateBeaconStateResponse, error)
func (*Indexer) CreateBlob ¶ added in v0.1.0
func (i *Indexer) CreateBlob(ctx context.Context, req *indexer.CreateBlobRequest) (*indexer.CreateBlobResponse, error)
func (*Indexer) CreateExecutionBadBlock ¶
func (i *Indexer) CreateExecutionBadBlock(ctx context.Context, req *indexer.CreateExecutionBadBlockRequest) (*indexer.CreateExecutionBadBlockResponse, error)
func (*Indexer) CreateExecutionBlockTrace ¶
func (i *Indexer) CreateExecutionBlockTrace(ctx context.Context, req *indexer.CreateExecutionBlockTraceRequest) (*indexer.CreateExecutionBlockTraceResponse, error)
func (*Indexer) CreateExecutionPayloadEnvelope ¶ added in v0.1.0
func (i *Indexer) CreateExecutionPayloadEnvelope(ctx context.Context, req *indexer.CreateExecutionPayloadEnvelopeRequest) (*indexer.CreateExecutionPayloadEnvelopeResponse, error)
func (*Indexer) CreatePayloadDivergence ¶ added in v0.1.0
func (i *Indexer) CreatePayloadDivergence(ctx context.Context, req *indexer.CreatePayloadDivergenceRequest) (*indexer.CreatePayloadDivergenceResponse, error)
func (*Indexer) GetBlob ¶ added in v0.1.0
func (i *Indexer) GetBlob(ctx context.Context, req *indexer.GetBlobRequest) (*indexer.GetBlobResponse, error)
func (*Indexer) GetConfig ¶ added in v0.0.22
func (i *Indexer) GetConfig(ctx context.Context, req *indexer.GetConfigRequest) (*indexer.GetConfigResponse, error)
func (*Indexer) GetStorageHandshakeToken ¶
func (i *Indexer) GetStorageHandshakeToken(ctx context.Context, req *indexer.GetStorageHandshakeTokenRequest) (*indexer.GetStorageHandshakeTokenResponse, error)
func (*Indexer) ListBeaconBadBlob ¶ added in v0.0.16
func (i *Indexer) ListBeaconBadBlob(ctx context.Context, req *indexer.ListBeaconBadBlobRequest) (*indexer.ListBeaconBadBlobResponse, error)
func (*Indexer) ListBeaconBadBlock ¶ added in v0.0.16
func (i *Indexer) ListBeaconBadBlock(ctx context.Context, req *indexer.ListBeaconBadBlockRequest) (*indexer.ListBeaconBadBlockResponse, error)
func (*Indexer) ListBeaconBlock ¶ added in v0.0.16
func (i *Indexer) ListBeaconBlock(ctx context.Context, req *indexer.ListBeaconBlockRequest) (*indexer.ListBeaconBlockResponse, error)
func (*Indexer) ListBeaconState ¶
func (i *Indexer) ListBeaconState(ctx context.Context, req *indexer.ListBeaconStateRequest) (*indexer.ListBeaconStateResponse, error)
func (*Indexer) ListExecutionBadBlock ¶
func (i *Indexer) ListExecutionBadBlock(ctx context.Context, req *indexer.ListExecutionBadBlockRequest) (*indexer.ListExecutionBadBlockResponse, error)
func (*Indexer) ListExecutionBlockTrace ¶
func (i *Indexer) ListExecutionBlockTrace(ctx context.Context, req *indexer.ListExecutionBlockTraceRequest) (*indexer.ListExecutionBlockTraceResponse, error)
func (*Indexer) ListExecutionPayloadEnvelope ¶ added in v0.1.0
func (i *Indexer) ListExecutionPayloadEnvelope(ctx context.Context, req *indexer.ListExecutionPayloadEnvelopeRequest) (*indexer.ListExecutionPayloadEnvelopeResponse, error)
func (*Indexer) ListPayloadDivergence ¶ added in v0.1.0
func (i *Indexer) ListPayloadDivergence(ctx context.Context, req *indexer.ListPayloadDivergenceRequest) (*indexer.ListPayloadDivergenceResponse, error)
func (*Indexer) ListUniqueBeaconBadBlobValues ¶ added in v0.0.16
func (i *Indexer) ListUniqueBeaconBadBlobValues(ctx context.Context, req *indexer.ListUniqueBeaconBadBlobValuesRequest) (*indexer.ListUniqueBeaconBadBlobValuesResponse, error)
func (*Indexer) ListUniqueBeaconBadBlockValues ¶ added in v0.0.16
func (i *Indexer) ListUniqueBeaconBadBlockValues(ctx context.Context, req *indexer.ListUniqueBeaconBadBlockValuesRequest) (*indexer.ListUniqueBeaconBadBlockValuesResponse, error)
func (*Indexer) ListUniqueBeaconBlockValues ¶ added in v0.0.16
func (i *Indexer) ListUniqueBeaconBlockValues(ctx context.Context, req *indexer.ListUniqueBeaconBlockValuesRequest) (*indexer.ListUniqueBeaconBlockValuesResponse, error)
func (*Indexer) ListUniqueBeaconStateValues ¶
func (i *Indexer) ListUniqueBeaconStateValues(ctx context.Context, req *indexer.ListUniqueBeaconStateValuesRequest) (*indexer.ListUniqueBeaconStateValuesResponse, error)
func (*Indexer) ListUniqueExecutionBadBlockValues ¶
func (i *Indexer) ListUniqueExecutionBadBlockValues(ctx context.Context, req *indexer.ListUniqueExecutionBadBlockValuesRequest) (*indexer.ListUniqueExecutionBadBlockValuesResponse, error)
func (*Indexer) ListUniqueExecutionBlockTraceValues ¶
func (i *Indexer) ListUniqueExecutionBlockTraceValues(ctx context.Context, req *indexer.ListUniqueExecutionBlockTraceValuesRequest) (*indexer.ListUniqueExecutionBlockTraceValuesResponse, error)
func (*Indexer) ListUniqueExecutionPayloadEnvelopeValues ¶ added in v0.1.0
func (i *Indexer) ListUniqueExecutionPayloadEnvelopeValues(ctx context.Context, req *indexer.ListUniqueExecutionPayloadEnvelopeValuesRequest) (*indexer.ListUniqueExecutionPayloadEnvelopeValuesResponse, error)
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics covers what retention does and what it declines to do. The skip reasons matter as much as the successes: a collector that keeps deciding not to collect is the failure mode that would otherwise be invisible.
func NewMetrics ¶
NewMetrics returns the process-wide indexer metrics. Collectors are registered once: a second indexer in the same process shares them rather than fighting the registry.
func (*Metrics) ObserveArchiveHoldback ¶ added in v0.1.0
ObserveArchiveHoldback records block rows a purge pass left in place because the permanent store had not confirmed them. A rising count is the archive falling behind retention — the failure mode that silently lost blocks before rows were held back.
func (*Metrics) ObserveBlobCollected ¶ added in v0.1.0
func (m *Metrics) ObserveBlobCollected()
func (*Metrics) ObserveBlobGCSkipped ¶ added in v0.1.0
func (*Metrics) ObservePurgeDuration ¶ added in v0.1.0
func (*Metrics) ObserveRootDivergence ¶ added in v0.1.0
func (*Metrics) ObserveRowsPurged ¶ added in v0.1.0
func (*Metrics) SetPurgeBacklog ¶ added in v0.1.0
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 an artifact. Beacon blocks keep the layout they have always had, so archives written before envelopes existed still resolve; every other kind gets its own subdirectory, which is also what keeps a block and its envelope - same root, same extension - from being the same object.
func (*PermanentStore) IsEnabled ¶ added in v0.0.27
func (p *PermanentStore) IsEnabled() bool
IsEnabled reports whether the permanent store archives anything at all.
func (*PermanentStore) IsEnabledFor ¶ added in v0.1.0
func (p *PermanentStore) IsEnabledFor(kind string) bool
IsEnabledFor reports whether this kind of artifact is archived.
func (*PermanentStore) QueueBlock ¶ added in v0.0.27
func (p *PermanentStore) QueueBlock(block PermanentStoreBlock)
QueueBlock adds a block to the queue for processing. Every path that does not hand the block to a worker signals ProcessedChan itself — with a not-archived result — so a caller waiting on it is never stranded and never mistakes a dropped block for an archived one.
type PermanentStoreBlock ¶ added in v0.0.27
type PermanentStoreBlock struct {
Kind string
Location string
BlockRoot string
Network string
Slot phase0.Slot
// ProcessedChan, when non-nil, receives exactly one result and is then closed. It must
// be buffered: the send never blocks, so on an unbuffered channel a waiter that has
// already given up costs the result its value and the close reads as not archived.
ProcessedChan chan PermanentStoreResult
}
PermanentStoreBlock contains the minimal information needed to identify an archivable artifact. Kind distinguishes the two artifacts that share a block root from gloas on - the beacon block and its execution payload envelope - and an empty Kind means persistence.KindBeaconBlock, which is what every caller meant before envelopes existed.
type PermanentStoreConfig ¶ added in v0.0.27
type PermanentStoreConfig struct {
Blocks BlockConfig `yaml:"blocks"`
// ExecutionPayloadEnvelopes is its own switch, but archiving gloas blocks without it
// keeps only half of each slot: the payload lives in the envelope from that fork on.
ExecutionPayloadEnvelopes BlockConfig `yaml:"executionPayloadEnvelopes"`
}
type PermanentStoreResult ¶ added in v0.1.0
type PermanentStoreResult struct {
Archived bool
}
PermanentStoreResult is what became of a queued block. Archived is true only when the block is known to be present in the permanent store; a full queue, a lost lock or a worker error all report false, so a waiter can hold its row back rather than purge an object the archive never received.
type RetentionConfig ¶
type RetentionConfig struct {
BeaconStates human.Duration `yaml:"beaconStates" default:"30m"`
BeaconBlocks human.Duration `yaml:"beaconBlocks" default:"30m"`
ExecutionPayloadEnvelopes human.Duration `yaml:"executionPayloadEnvelopes" 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
// PayloadDivergences bounds the divergence log. It is deliberately long: the record of a
// node serving the wrong bytes is the finding, and it outlives the payload it describes.
PayloadDivergences human.Duration `yaml:"payloadDivergences" default:"312480m"` // 6 months
}