Documentation ¶
Overview ¶
nolint
Index ¶
Constants ¶
View Source
const ( // T is the security param which determines the number of leaves // to be included in a non-interactive proof. T uint8 = 150 // OwnerReadWrite is a standard owner read / write file permission. OwnerReadWrite = os.FileMode(0o600) )
Variables ¶
This section is empty.
Functions ¶
func FiatShamir ¶
FiatShamir generates a set of indices to include in a non-interactive proof.
func MakeLabelFunc ¶ added in v0.2.0
MakeLabelFunc returns a function which generates a PoET DAG label by concatenating a representation of the labelID with the list of left siblings and then hashing the result using the provided hash function.
⚠️ The resulting function is NOT thread-safe, however different generated instances are independent. The code is optimized for performance and memory allocations.
Types ¶
type MerkleProof ¶
func (*MerkleProof) DecodeScale ¶ added in v0.2.0
func (t *MerkleProof) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*MerkleProof) EncodeScale ¶ added in v0.2.0
func (t *MerkleProof) EncodeScale(enc *scale.Encoder) (total int, err error)
type Proof ¶ added in v0.4.0
type Proof struct { // The actual proof. MerkleProof // Members is the ordered list of miners challenges which are included // in the proof (by using the list hash digest as the proof generation input (the statement)). Members [][]byte // NumLeaves is the width of the proof-generation tree. NumLeaves uint64 }
func (*Proof) DecodeScale ¶ added in v0.4.0
func (*Proof) EncodeScale ¶ added in v0.4.0
type ProofMessage ¶ added in v0.4.0
func (*ProofMessage) DecodeScale ¶ added in v0.4.0
func (t *ProofMessage) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*ProofMessage) EncodeScale ¶ added in v0.4.0
func (t *ProofMessage) EncodeScale(enc *scale.Encoder) (total int, err error)
Click to show internal directories.
Click to hide internal directories.