Versions in this module Expand all Collapse all v0 v0.0.4 Jan 15, 2025 v0.0.1 Jan 15, 2025 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 primitives.Epoch) primitives.Epoch + StartEpoch func(sourceEpoch, currentEpoch primitives.Epoch) (epoch primitives.Epoch, exists bool) + Update func(args *chunkUpdateArgs, validatorIndex primitives.ValidatorIndex, ...) (keepGoing bool, err error) + type MaxSpanChunksSlice struct + func EmptyMaxSpanChunksSlice(params *Parameters) *MaxSpanChunksSlice + func MaxChunkSpansSliceFrom(params *Parameters, chunk []uint16) (*MaxSpanChunksSlice, error) + func (_ *MaxSpanChunksSlice) NeutralElement() uint16 + func (_ *MaxSpanChunksSlice) StartEpoch(sourceEpoch, currentEpoch primitives.Epoch) (epoch primitives.Epoch, exists bool) + func (m *MaxSpanChunksSlice) CheckSlashable(ctx context.Context, slasherDB db.SlasherDatabase, ...) (*ethpb.AttesterSlashing, error) + func (m *MaxSpanChunksSlice) Chunk() []uint16 + func (m *MaxSpanChunksSlice) NextChunkStartEpoch(startEpoch primitives.Epoch) primitives.Epoch + func (m *MaxSpanChunksSlice) Update(args *chunkUpdateArgs, validatorIndex primitives.ValidatorIndex, ...) (keepGoing bool, err error) + type MinSpanChunksSlice struct + func EmptyMinSpanChunksSlice(params *Parameters) *MinSpanChunksSlice + func MinChunkSpansSliceFrom(params *Parameters, chunk []uint16) (*MinSpanChunksSlice, error) + func (_ *MinSpanChunksSlice) NeutralElement() uint16 + func (m *MinSpanChunksSlice) CheckSlashable(ctx context.Context, slasherDB db.SlasherDatabase, ...) (*ethpb.AttesterSlashing, error) + func (m *MinSpanChunksSlice) Chunk() []uint16 + func (m *MinSpanChunksSlice) NextChunkStartEpoch(startEpoch primitives.Epoch) primitives.Epoch + func (m *MinSpanChunksSlice) StartEpoch(sourceEpoch, currentEpoch primitives.Epoch) (epoch primitives.Epoch, exists bool) + func (m *MinSpanChunksSlice) Update(args *chunkUpdateArgs, validatorIndex primitives.ValidatorIndex, ...) (keepGoing bool, err error) + type Parameters struct + func DefaultParams() *Parameters + type Service struct + func New(ctx context.Context, srvCfg *ServiceConfig) (*Service, error) + func (*Service) Status() error + func (s *Service) HighestAttestations(ctx context.Context, validatorIndices []primitives.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) Stop() error + type ServiceConfig struct + AttestationStateFetcher blockchain.AttestationStateFetcher + BeaconBlockHeadersFeed *event.Feed + ClockWaiter startup.ClockWaiter + 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 []primitives.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)