Documentation ¶
Index ¶
- Variables
- type RandChallenger
- func (m *RandChallenger) Close()
- func (m *RandChallenger) GenerateChallenge(sliceIdxList []int, interval int64) (i [][]byte, v [][]byte, r int64, w []byte, err error)
- func (m *RandChallenger) GetChallengeConf() (a string, conf types.PairingChallengeConf)
- func (m *RandChallenger) Save(cms []ctype.Material) error
- func (m *RandChallenger) Setup(sliceData []byte, rangeAmount int) ([]ctype.RangeHash, error)
- func (m *RandChallenger) Take(fileID string, sliceID string, nodeID []byte) (ctype.RangeHash, error)
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 ¶
func New(conf *config.ChallengerMerkleConf, privkey ecdsa.PrivateKey) (*RandChallenger, error)
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
Click to show internal directories.
Click to hide internal directories.