Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultDataDirName = "data" // DefaultComputeBatchSize value must be divisible by 8, to guarantee that writing to disk // and file truncating is byte-granular. DefaultComputeBatchSize = 1 << 14 MinBitsPerLabel = 1 MaxBitsPerLabel = 256 BitsPerLabel = 8 * 16 KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB )
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
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.
K3 uint32 // K3 is the size of the subset of proof indices that is validated.
K2PowDifficulty uint64
K3PowDifficulty uint64
}
func DefaultConfig ¶
func DefaultConfig() Config
type InitOpts ¶
type InitOpts struct {
DataDir string
NumUnits uint32
MaxFileSize uint64
ComputeProviderID int
Throttle bool
Scrypt ScryptParams
}
func DefaultInitOpts ¶
func DefaultInitOpts() InitOpts
type ScryptParams ¶ added in v0.5.1
type ScryptParams struct {
N, R, P uint32
}
func DefaultLabelParams ¶ added in v0.5.1
func DefaultLabelParams() ScryptParams
func DefaultPowParams ¶ added in v0.5.1
func DefaultPowParams() ScryptParams
func (*ScryptParams) Validate ¶ added in v0.5.1
func (p *ScryptParams) Validate() error
Click to show internal directories.
Click to hide internal directories.