dutydb

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDB

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

MemDB is an in-memory dutyDB implementation. It is a placeholder for the badgerDB implementation.

func NewMemDB

func NewMemDB(deadliner core.Deadliner) *MemDB

NewMemDB returns a new in-memory dutyDB instance.

func (*MemDB) AwaitAggAttestation added in v0.10.1

func (db *MemDB) AwaitAggAttestation(ctx context.Context, slot int64, attestationRoot eth2p0.Root,
) (*eth2p0.Attestation, error)

AwaitAggAttestation blocks and returns the aggregated attestation for the slot and attestation when available.

func (*MemDB) AwaitAttestation

func (db *MemDB) AwaitAttestation(ctx context.Context, slot int64, commIdx int64) (*eth2p0.AttestationData, error)

AwaitAttestation implements core.DutyDB, see its godoc.

func (*MemDB) AwaitBeaconBlock added in v0.3.0

func (db *MemDB) AwaitBeaconBlock(ctx context.Context, slot int64) (*spec.VersionedBeaconBlock, error)

AwaitBeaconBlock implements core.DutyDB, see its godoc.

func (*MemDB) AwaitBlindedBeaconBlock added in v0.9.0

func (db *MemDB) AwaitBlindedBeaconBlock(ctx context.Context, slot int64) (*eth2api.VersionedBlindedBeaconBlock, error)

AwaitBlindedBeaconBlock implements core.DutyDB, see its godoc.

func (*MemDB) AwaitSyncContribution added in v0.12.0

func (db *MemDB) AwaitSyncContribution(ctx context.Context, slot, subcommIdx int64, beaconBlockRoot eth2p0.Root) (*altair.SyncCommitteeContribution, error)

AwaitSyncContribution blocks and returns the sync committee contribution data for the slot and the subcommittee and the beacon block root when available.

func (*MemDB) PubKeyByAttestation

func (db *MemDB) PubKeyByAttestation(_ context.Context, slot, commIdx, valCommIdx int64) (core.PubKey, error)

PubKeyByAttestation implements core.DutyDB, see its godoc.

func (*MemDB) Shutdown added in v0.4.0

func (db *MemDB) Shutdown()

Shutdown results in all blocking queries to return shutdown errors. Note this may only be called *once*.

func (*MemDB) Store

func (db *MemDB) Store(_ context.Context, duty core.Duty, unsignedSet core.UnsignedDataSet) error

Store implements core.DutyDB, see its godoc.

Jump to

Keyboard shortcuts

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