common

package
v0.0.0-...-5cda5f8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUploadHeader

func CreateUploadHeader(params StoreParams) ([]byte, error)

func MakeCalldata

func MakeCalldata(
	params StoreParams,
	meta DisperseMeta,
	storeNumber uint32,
	msgHash [32]byte,
) []byte

Types

type AggregateSignature

type AggregateSignature struct {
	AggSig            []byte
	StoredAggPubkeyG1 []byte
	UsedAggPubkeyG2   []byte
	NonSignerPubkeys  [][]byte
}

type DisperseMeta

type DisperseMeta struct {
	Sigs            AggregateSignature
	ApkIndex        uint32
	TotalStakeIndex uint64
	StoreNumber     uint32
}

type StoreParams

type StoreParams struct {
	ReferenceBlockNumber uint32
	TotalOperatorsIndex  uint32
	OrigDataSize         uint32 // unique nonce for each data store
	NumTotal             uint32 // total number data node active on chain
	Quorum               uint32 // minimal amount of signatures from data node
	NumSys               uint32 // number of data node which contains the systematic chunk
	NumPar               uint32 // number of data node which contains the parity chunk
	Duration             uint32 // duration which data is stored

	// Data and Encoding
	KzgCommit      []byte // elliptic curve kzg commitmetn
	LowDegreeProof []byte
	Degree         uint32   // degree of the polynomial
	TotalSize      uint64   // total size of the data
	Order          []uint32 // mapping for deciding the storer of each coded data chunk

	// Chain
	Fee        *big.Int
	HeaderHash []byte
	Disperser  []byte
}

Jump to

Keyboard shortcuts

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