Documentation ¶
Index ¶
- func VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx context.Context, storage BlobStorage, ...) (uint64, uint64, error)
- type BlobStorage
- type BlobStore
- func (bs *BlobStore) KzgCommitmentsCount(ctx context.Context, blockRoot libcommon.Hash) (uint32, error)
- func (bs *BlobStore) Prune() error
- func (bs *BlobStore) ReadBlobSidecars(ctx context.Context, slot uint64, blockRoot libcommon.Hash) ([]*cltypes.BlobSidecar, bool, error)
- func (bs *BlobStore) RemoveBlobSidecars(ctx context.Context, slot uint64, blockRoot libcommon.Hash) error
- func (bs *BlobStore) WriteBlobSidecars(ctx context.Context, blockRoot libcommon.Hash, ...) error
- func (bs *BlobStore) WriteStream(w io.Writer, slot uint64, blockRoot libcommon.Hash, idx uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyAgainstIdentifiersAndInsertIntoTheBlobStore ¶
func VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx context.Context, storage BlobStorage, identifiers *solid.ListSSZ[*cltypes.BlobIdentifier], sidecars []*cltypes.BlobSidecar, verifySignatureFn verifyHeaderSignatureFn) (uint64, uint64, error)
VerifyAgainstIdentifiersAndInsertIntoTheBlobStore does all due verification for blobs before database insertion. it also returns the latest correctly return blob.
Types ¶
type BlobStorage ¶
type BlobStorage interface { WriteBlobSidecars(ctx context.Context, blockRoot libcommon.Hash, blobSidecars []*cltypes.BlobSidecar) error RemoveBlobSidecars(ctx context.Context, slot uint64, blockRoot libcommon.Hash) error ReadBlobSidecars(ctx context.Context, slot uint64, blockRoot libcommon.Hash) (out []*cltypes.BlobSidecar, found bool, err error) WriteStream(w io.Writer, slot uint64, blockRoot libcommon.Hash, idx uint64) error // Used for P2P networking KzgCommitmentsCount(ctx context.Context, blockRoot libcommon.Hash) (uint32, error) Prune() error }
func NewBlobStore ¶
func NewBlobStore(db kv.RwDB, fs afero.Fs, slotsKept uint64, beaconChainConfig *clparams.BeaconChainConfig, ethClock eth_clock.EthereumClock) BlobStorage
type BlobStore ¶
type BlobStore struct {
// contains filtered or unexported fields
}
func (*BlobStore) KzgCommitmentsCount ¶
func (*BlobStore) ReadBlobSidecars ¶
func (bs *BlobStore) ReadBlobSidecars(ctx context.Context, slot uint64, blockRoot libcommon.Hash) ([]*cltypes.BlobSidecar, bool, error)
ReadBlobSidecars reads the sidecars from the database. it assumes that all blobSidecars are for the same blockRoot and we have all of them.
func (*BlobStore) RemoveBlobSidecars ¶
func (*BlobStore) WriteBlobSidecars ¶
func (bs *BlobStore) WriteBlobSidecars(ctx context.Context, blockRoot libcommon.Hash, blobSidecars []*cltypes.BlobSidecar) error
WriteBlobSidecars writes the sidecars on the database. it assumes that all blobSidecars are for the same blockRoot and we have all of them.
Click to show internal directories.
Click to hide internal directories.