Versions in this module Expand all Collapse all v2 v2.0.1 Oct 5, 2021 Changes in this version + type Chunker interface + CheckSlashable func(ctx context.Context, slasherDB db.SlasherDatabase, ...) (*ethpb.AttesterSlashing, error) + Chunk func() []uint16 + NeutralElement func() uint16 + NextChunkStartEpoch func(startEpoch types.Epoch) types.Epoch + StartEpoch func(sourceEpoch, currentEpoch types.Epoch) (epoch types.Epoch, exists bool) + Update func(args *chunkUpdateArgs, validatorIndex types.ValidatorIndex, ...) (keepGoing bool, err error) + type MaxSpanChunksSlice struct + func EmptyMaxSpanChunksSlice(params *Parameters) *MaxSpanChunksSlice + func MaxChunkSpansSliceFrom(params *Parameters, chunk []uint16) (*MaxSpanChunksSlice, error) + func (m *MaxSpanChunksSlice) CheckSlashable(ctx context.Context, slasherDB db.SlasherDatabase, ...) (*ethpb.AttesterSlashing, error) + func (m *MaxSpanChunksSlice) Chunk() []uint16 + func (m *MaxSpanChunksSlice) NeutralElement() uint16 + func (m *MaxSpanChunksSlice) NextChunkStartEpoch(startEpoch types.Epoch) types.Epoch + func (m *MaxSpanChunksSlice) StartEpoch(sourceEpoch, currentEpoch types.Epoch) (epoch types.Epoch, exists bool) + func (m *MaxSpanChunksSlice) Update(args *chunkUpdateArgs, validatorIndex types.ValidatorIndex, ...) (keepGoing bool, err error) + type MinSpanChunksSlice struct + func EmptyMinSpanChunksSlice(params *Parameters) *MinSpanChunksSlice + func MinChunkSpansSliceFrom(params *Parameters, chunk []uint16) (*MinSpanChunksSlice, error) + func (m *MinSpanChunksSlice) CheckSlashable(ctx context.Context, slasherDB db.SlasherDatabase, ...) (*ethpb.AttesterSlashing, error) + func (m *MinSpanChunksSlice) Chunk() []uint16 + func (m *MinSpanChunksSlice) NeutralElement() uint16 + func (m *MinSpanChunksSlice) NextChunkStartEpoch(startEpoch types.Epoch) types.Epoch + func (m *MinSpanChunksSlice) StartEpoch(sourceEpoch, currentEpoch types.Epoch) (epoch types.Epoch, exists bool) + func (m *MinSpanChunksSlice) Update(args *chunkUpdateArgs, validatorIndex types.ValidatorIndex, ...) (keepGoing bool, err error) + type MockSlashingChecker struct + AttesterSlashingFound bool + HighestAtts map[types.ValidatorIndex]*ethpb.HighestAttestation + ProposerSlashingFound bool + func (s *MockSlashingChecker) HighestAttestations(_ context.Context, indices []types.ValidatorIndex) ([]*ethpb.HighestAttestation, error) + func (s *MockSlashingChecker) IsSlashableAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) ([]*ethpb.AttesterSlashing, error) + func (s *MockSlashingChecker) IsSlashableBlock(ctx context.Context, proposal *ethpb.SignedBeaconBlockHeader) (*ethpb.ProposerSlashing, error) + type Parameters struct + func DefaultParams() *Parameters + type Service struct + func New(ctx context.Context, srvCfg *ServiceConfig) (*Service, error) + func (s *Service) HighestAttestations(ctx context.Context, validatorIndices []types.ValidatorIndex) ([]*ethpb.HighestAttestation, error) + func (s *Service) IsSlashableAttestation(ctx context.Context, attestation *ethpb.IndexedAttestation) ([]*ethpb.AttesterSlashing, error) + func (s *Service) IsSlashableBlock(ctx context.Context, block *ethpb.SignedBeaconBlockHeader) (*ethpb.ProposerSlashing, error) + func (s *Service) Start() + func (s *Service) Status() error + func (s *Service) Stop() error + type ServiceConfig struct + AttestationStateFetcher blockchain.AttestationStateFetcher + BeaconBlockHeadersFeed *event.Feed + Database db.SlasherDatabase + HeadStateFetcher blockchain.HeadFetcher + IndexedAttestationsFeed *event.Feed + SlashingPoolInserter slashings.PoolInserter + StateGen stategen.StateManager + StateNotifier statefeed.Notifier + SyncChecker sync.Checker + type SlashingChecker interface + HighestAttestations func(ctx context.Context, indices []types.ValidatorIndex) ([]*ethpb.HighestAttestation, error) + IsSlashableAttestation func(ctx context.Context, attestation *ethpb.IndexedAttestation) ([]*ethpb.AttesterSlashing, error) + IsSlashableBlock func(ctx context.Context, proposal *ethpb.SignedBeaconBlockHeader) (*ethpb.ProposerSlashing, 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