Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultDataDirName = "data" DefaultMaxFileSize = uint64(4294967296) // 4 GB // DefaultComputeBatchSize value must be divisible by 8, to guarantee that writing to disk // and file truncating is byte-granular regardless of `BitsPerLabel` value. DefaultComputeBatchSize = 1 << 14 DefaultBitsPerLabel = 8 DefaultMaxNumUnits = 10 DefaultMinNumUnits = 1 DefaultLabelsPerUnit = 1 << 11 // 2KB per unit. DefaultK1 = 200 DefaultK2 = 212 DefaultNonceBatchSize = 32 DefaultAESBatchSize = 4 )
View Source
const ( MaxBitsPerLabel = 256 MinBitsPerLabel = 1 MinFileSize = 1024 )
View Source
const BestProviderID = -1
BestProviderID can be used for selecting the most performant provider based on a short benchmarking session.
Variables ¶
View Source
var DefaultDataDir string
Functions ¶
Types ¶
type Config ¶
type Config struct {
MinNumUnits uint32
MaxNumUnits uint32
BitsPerLabel uint8
LabelsPerUnit uint64
K1 uint32 // K1 specifies the difficulty for a label to be a candidate for a proof.
K2 uint32 // K2 is the number of labels below the required difficulty required for a proof.
B uint32 // B is the number of labels used per AES invocation when generating a proof. Lower values speed up verification, higher values proof generation.
N uint32 // N is the number of nonces tried at the same time when generating a proof.
}
func DefaultConfig ¶
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.