merkle

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MerkleChallengeSetUpRange = 20000
)

Functions

This section is empty.

Types

type RandChallenger

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

RandChallenger is the Merkle-Tree based Challenger

func New

New new a challenger by challenge related configuration

func (*RandChallenger) Close

func (m *RandChallenger) Close()

func (*RandChallenger) GenerateChallenge

func (m *RandChallenger) GenerateChallenge(sliceIdxList []int, interval int64) (i [][]byte, v [][]byte, r int64, w []byte, err error)

GenerateChallenge not implemented for merkle challenge

func (*RandChallenger) GetChallengeConf

func (m *RandChallenger) GetChallengeConf() (a string, conf types.PairingChallengeConf)

GetChallengeConf get challenge configuration

func (*RandChallenger) Save

func (m *RandChallenger) Save(cms []ctype.Material) error

Save save challenge material

func (*RandChallenger) Setup

func (m *RandChallenger) Setup(sliceData []byte, rangeAmount int) ([]ctype.RangeHash, error)

Setup prepare challenge materials for challenge loop later

func (*RandChallenger) Take

func (m *RandChallenger) Take(fileID string, sliceID string, nodeID []byte) (
	ctype.RangeHash, error)

Take take a challenge material for publishing a challenge

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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