cache

package
v7.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cache holds in-memory caches shared across the validator client's API backends (beacon-api and grpc-api). It is the validator-side analog of beacon-chain/cache, which is walled off from the validator by Bazel visibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionPayloadEnvelopeCache

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

ExecutionPayloadEnvelopeCache is a slot-keyed cache that carries the execution payload envelope and its blob data from block production to the self-build envelope publisher, avoiding a second fetch. It is the validator-side counterpart to beacon-chain/cache's same-named BN cache.

func NewExecutionPayloadEnvelopeCache

func NewExecutionPayloadEnvelopeCache() *ExecutionPayloadEnvelopeCache

NewExecutionPayloadEnvelopeCache returns an initialized ExecutionPayloadEnvelopeCache.

func (*ExecutionPayloadEnvelopeCache) Add

func (c *ExecutionPayloadEnvelopeCache) Add(slot primitives.Slot, envelope *ethpb.ExecutionPayloadEnvelope, blobs, kzgProofs [][]byte)

Add stores an envelope and its blob data for the slot and drops entries for older slots (a lingering older entry belongs to an aborted proposal). No-op on a nil receiver.

func (*ExecutionPayloadEnvelopeCache) Peek

Peek returns the cached envelope and blob data for the slot without removing the entry.

func (*ExecutionPayloadEnvelopeCache) Take

Take returns the cached envelope and blob data for the slot and removes the entry.

Jump to

Keyboard shortcuts

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