da

package
v0.1.1-experimental.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAttemptedToStoreNilSidecar is returned when an attempt is made to
	// store a
	// nil sidecar.
	ErrAttemptedToStoreNilSidecar = errors.New("attempted to store nil sidecar")

	// ErrAttemptedToVerifyNilSidecars is returned when an attempt is made to
	// verify
	// nil sidecars.
	ErrAttemptedToVerifyNilSidecars = errors.New(
		"attempted to verify nil sidecars",
	)
)

Functions

func NewBlobProofVerifier

func NewBlobProofVerifier(
	impl string,
	ts *gokzg4844.JSONTrustedSetup,
) (proof.BlobProofVerifier, error)

NewBlobProofVerifier creates a new BlobVerifier with the given implementation.

Types

type BlobVerifier

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

BlobProofVerifier is a verifier for blobs.

func NewBlobVerifier

func NewBlobVerifier(
	proofVerifier proof.BlobProofVerifier,
) *BlobVerifier

NewBlobVerifier creates a new BlobVerifier with the given proof verifier.

func (*BlobVerifier) VerifyKZGProofs

func (bv *BlobVerifier) VerifyKZGProofs(
	scs *types.BlobSidecars,
) error

VerifyKZGProofs verifies the sidecars.

type Store

type Store struct {
	*filedb.RangeDB
	// contains filtered or unexported fields
}

Store is the default implementation of the AvailabilityStore.

func NewStore

func NewStore(
	beaconCfg *params.BeaconChainConfig,
	db db.DB,
) *Store

NewStore creates a new instance of the AvailabilityStore.

func (*Store) IsDataAvailable

func (s *Store) IsDataAvailable(
	ctx context.Context,
	slot primitives.Slot,
	b beacontypes.ReadOnlyBeaconBlock,
) bool

IsDataAvailable ensures that all blobs referenced in the block are stored before it returns without an error.

func (*Store) Persist

func (s *Store) Persist(
	slot primitives.Slot,
	sidecars *types.BlobSidecars,
) error

Persist ensures the sidecar data remains accessible, utilizing parallel processing for efficiency.

Directories

Path Synopsis
Code generated by fastssz.
Code generated by fastssz.

Jump to

Keyboard shortcuts

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