supraffi

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func C1

func C1(blockOffset uint64, numSectors, sectorSlot int, replicaID, seed, ticket []byte, cachePath, parentsFilename, replicaPath string, sectorSize uint64) int

C1 performs the c1 operation.

func GenerateMultiString

func GenerateMultiString(paths []Path) (string, error)

GenerateMultiString generates a //multi// string from an array of Path structs

func GetCCCommD

func GetCCCommD(commD []byte, sectorSize int) bool

GetCCCommD returns comm_d for a cc sector.

func GetCommC

func GetCommC(commC []byte, cachePath string) bool

GetCommC returns comm_c from p_aux file.

func GetCommCFromTree

func GetCommCFromTree(commC []byte, cachePath string, sectorSize uint64) bool

GetCommCFromTree returns comm_c after calculating from tree file(s).

func GetCommD

func GetCommD(commD []byte, cachePath string) bool

GetCommD returns comm_d from tree_d file.

func GetCommR

func GetCommR(commR []byte, cachePath string) bool

GetCommR returns comm_r after calculating from p_aux file.

func GetCommRLast

func GetCommRLast(commRLast []byte, cachePath string) bool

GetCommRLast returns comm_r_last from p_aux file.

func GetCommRLastFromTree

func GetCommRLastFromTree(commRLast []byte, cachePath string, sectorSize uint64) bool

GetCommRLastFromTree returns comm_r_last after calculating from tree file(s).

func GetMaxBlockOffset

func GetMaxBlockOffset(sectorSize uint64) uint64

GetMaxBlockOffset returns the highest available block offset.

func GetSlotSize

func GetSlotSize(numSectors int, sectorSize uint64) uint64

GetSlotSize returns the size in blocks required for the given number of sectors.

func Pc1

func Pc1(blockOffset uint64, replicaIDs [][32]byte, parentsFilename string, sectorSize uint64) int

Pc1 performs the pc1 operation.

func Pc2

func Pc2(blockOffset uint64, numSectors int, outputDir string, sectorSize uint64) int

Pc2 performs the pc2 operation.

func Pc2Cleanup

func Pc2Cleanup(numSectors int, outputDir string, sectorSize uint64) int

Pc2Cleanup deletes files associated with pc2.

func SetCommC

func SetCommC(commC []byte, cachePath string) bool

SetCommC sets comm_c in the p_aux file.

func SetCommRLast

func SetCommRLast(commRLast []byte, cachePath string) bool

SetCommRLast sets comm_r_last in the p_aux file.

func SupraSealInit

func SupraSealInit(sectorSize uint64, configFile string)

SupraSealInit initializes the supra seal with a sector size and optional config file.

Types

type Path

type Path struct {
	Replica string
	Cache   string
}

Jump to

Keyboard shortcuts

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