Versions in this module Expand all Collapse all v2 v2.0.1 Oct 5, 2021 Changes in this version + var CommitteeCacheHit = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var CommitteeCacheMiss = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var ErrAlreadyInProgress = errors.New("already in progress") + var ErrIncorrectType = errors.New("incorrect state type provided") + var ErrNilValueProvided = errors.New("nil value provided on Put()") + var ErrNonExistingSyncCommitteeKey = errors.New("does not exist sync committee key") + var ErrNotCommittee = errors.New("object is not a committee struct") + var ErrNotFound = errors.New("not found in cache") + var ErrNotProposerIndices = errors.New("object is not a proposer indices struct") + var ProposerIndicesCacheHit = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var ProposerIndicesCacheMiss = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var SubnetIDs = newSubnetIDs() + var SyncCommitteeCacheHit = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var SyncCommitteeCacheMiss = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var SyncSubnetIDs = newSyncSubnetIDs() + type AttestationCache struct + func NewAttestationCache() *AttestationCache + func (c *AttestationCache) Get(ctx context.Context, req *ethpb.AttestationDataRequest) (*ethpb.AttestationData, error) + func (c *AttestationCache) MarkInProgress(req *ethpb.AttestationDataRequest) error + func (c *AttestationCache) MarkNotInProgress(req *ethpb.AttestationDataRequest) error + func (c *AttestationCache) Put(_ context.Context, req *ethpb.AttestationDataRequest, ...) error + type BalanceCache struct + func NewEffectiveBalanceCache() *BalanceCache + func (c *BalanceCache) AddTotalEffectiveBalance(st state.ReadOnlyBeaconState, balance uint64) error + func (c *BalanceCache) Get(st state.ReadOnlyBeaconState) (uint64, error) + type CheckpointStateCache struct + func NewCheckpointStateCache() *CheckpointStateCache + func (c *CheckpointStateCache) AddCheckpointState(cp *ethpb.Checkpoint, s state.ReadOnlyBeaconState) error + func (c *CheckpointStateCache) StateByCheckpoint(cp *ethpb.Checkpoint) (state.BeaconState, error) + type CommitteeCache struct + CommitteeCache *lru.Cache + func NewCommitteesCache() *CommitteeCache + func (c *CommitteeCache) ActiveIndices(ctx context.Context, seed [32]byte) ([]types.ValidatorIndex, error) + func (c *CommitteeCache) ActiveIndicesCount(ctx context.Context, seed [32]byte) (int, error) + func (c *CommitteeCache) AddCommitteeShuffledList(committees *Committees) error + func (c *CommitteeCache) Committee(ctx context.Context, slot types.Slot, seed [32]byte, ...) ([]types.ValidatorIndex, error) + func (c *CommitteeCache) HasEntry(seed string) bool + func (c *CommitteeCache) MarkInProgress(seed [32]byte) error + func (c *CommitteeCache) MarkNotInProgress(seed [32]byte) error + type Committees struct + CommitteeCount uint64 + Seed [32]byte + ShuffledIndices []types.ValidatorIndex + SortedIndices []types.ValidatorIndex + type ProposerIndices struct + BlockRoot [32]byte + ProposerIndices []types.ValidatorIndex + type ProposerIndicesCache struct + ProposerIndicesCache *cache.FIFO + func NewProposerIndicesCache() *ProposerIndicesCache + func (c *ProposerIndicesCache) AddProposerIndices(p *ProposerIndices) error + func (c *ProposerIndicesCache) HasProposerIndices(r [32]byte) (bool, error) + func (c *ProposerIndicesCache) ProposerIndices(r [32]byte) ([]types.ValidatorIndex, error) + type SkipSlotCache struct + func NewSkipSlotCache() *SkipSlotCache + func (c *SkipSlotCache) Disable() + func (c *SkipSlotCache) Enable() + func (c *SkipSlotCache) Get(ctx context.Context, r [32]byte) (state.BeaconState, error) + func (c *SkipSlotCache) MarkInProgress(r [32]byte) error + func (c *SkipSlotCache) MarkNotInProgress(r [32]byte) error + func (c *SkipSlotCache) Put(_ context.Context, r [32]byte, state state.BeaconState) error + type SyncCommitteeCache struct + func NewSyncCommittee() *SyncCommitteeCache + func (s *SyncCommitteeCache) CurrentPeriodIndexPosition(root [32]byte, valIdx types.ValidatorIndex) ([]types.CommitteeIndex, error) + func (s *SyncCommitteeCache) NextPeriodIndexPosition(root [32]byte, valIdx types.ValidatorIndex) ([]types.CommitteeIndex, error) + func (s *SyncCommitteeCache) UpdatePositionsInCommittee(syncCommitteeBoundaryRoot [32]byte, st state.BeaconStateAltair) error + type SyncCommitteeHeadStateCache struct + func NewSyncCommitteeHeadState() *SyncCommitteeHeadStateCache + func (c *SyncCommitteeHeadStateCache) Get(slot types.Slot) (state.BeaconState, error) + func (c *SyncCommitteeHeadStateCache) Put(slot types.Slot, st state.BeaconState) error Other modules containing this package github.com/prysmaticlabs/prysm github.com/prysmaticlabs/prysm/v3 github.com/prysmaticlabs/prysm/v4 github.com/prysmaticlabs/prysm/v5