full

package
v0.5.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Node

Node creates a new empty Full Node.

func RandNode

func RandNode(dn *availability_test.TestDagNet, squareSize int) (*availability_test.TestNode, *share.Root)

RandNode creates a Full Node filled with a random block of the given size.

func RandServiceWithSquare

func RandServiceWithSquare(t *testing.T, n int) (*service.ShareService, *share.Root)

RandServiceWithSquare provides a service.ShareService filled with 'n' NMT trees of 'n' random shares, essentially storing a whole square.

Types

type ShareAvailability

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

ShareAvailability implements share.Availability using the full data square recovery technique. It is considered "full" because it is required to download enough shares to fully reconstruct the data square.

func NewShareAvailability

func NewShareAvailability(bServ blockservice.BlockService, disc *discovery.Discovery) *ShareAvailability

NewShareAvailability creates a new full ShareAvailability.

func TestAvailability

func TestAvailability(bServ blockservice.BlockService) *ShareAvailability

func (*ShareAvailability) ProbabilityOfAvailability

func (fa *ShareAvailability) ProbabilityOfAvailability() float64

func (*ShareAvailability) SharesAvailable

func (fa *ShareAvailability) SharesAvailable(ctx context.Context, root *share.Root) error

SharesAvailable reconstructs the data committed to the given Root by requesting enough Shares from the network.

func (*ShareAvailability) Start

func (*ShareAvailability) Stop

Jump to

Keyboard shortcuts

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