laod_test

package
v0.16.2-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.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 ShareAvailability

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

ShareAvailability implements share.Availability using Data Availability Sampling technique. It is light because it does not require the downloading of all the data to verify its availability. It is assumed that there are a lot of lightAvailability instances on the network doing sampling over the same Root to collectively verify its availability.

func NewShareAvailability

func NewShareAvailability(
	getter share.Getter,
) *ShareAvailability

NewShareAvailability creates a new light Availability.

func (*ShareAvailability) SharesAvailable

func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header.ExtendedHeader) error

SharesAvailable randomly samples `params.SampleAmount` amount of Shares committed to the given ExtendedHeader. This way SharesAvailable subjectively verifies that Shares are available.

func (*ShareAvailability) WithMetrics

func (la *ShareAvailability) WithMetrics() error

Jump to

Keyboard shortcuts

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