Documentation
¶
Index ¶
- Variables
- func Benchmark(p Provider) (int, error)
- func CPUProviderID() uint
- func GetFiles(dir string, predicate func(os.FileInfo) bool) ([]os.FileInfo, error)
- func LoadMetadata(dir string) (*shared.PostMetadata, error)
- func SaveMetadata(dir string, v *shared.PostMetadata) error
- type Config
- type ConfigMismatchError
- type DiskState
- type InitOpts
- type Initializer
- type Logger
- type OptionFunc
- type Provider
- type Status
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Benchmark ¶ added in v0.6.0
Benchmark returns the hashes per second the selected compute provider achieves on the current machine.
func CPUProviderID ¶
func CPUProviderID() uint
CPUProviderID returns the ID of the CPU provider or nil if the CPU provider is not available.
func LoadMetadata ¶
func LoadMetadata(dir string) (*shared.PostMetadata, error)
func SaveMetadata ¶
func SaveMetadata(dir string, v *shared.PostMetadata) error
Types ¶
type ConfigMismatchError ¶
type ConfigMismatchError = shared.ConfigMismatchError
type DiskState ¶
type DiskState struct {
// contains filtered or unexported fields
}
func NewDiskState ¶
func (*DiskState) NumBytesWritten ¶
func (*DiskState) NumFilesWritten ¶ added in v0.3.0
func (*DiskState) NumLabelsWritten ¶
type Initializer ¶
type Initializer struct {
// contains filtered or unexported fields
}
Initializer is responsible for initializing a new PoST commitment.
func NewInitializer ¶
func NewInitializer(opts ...OptionFunc) (*Initializer, error)
func (*Initializer) Initialize ¶
func (init *Initializer) Initialize(ctx context.Context) error
Initialize is the process in which the prover commits to store some data, by having its storage filled with pseudo-random data with respect to a specific id. This data is the result of a computationally-expensive operation.
func (*Initializer) Nonce ¶ added in v0.2.2
func (init *Initializer) Nonce() *uint64
func (*Initializer) NumLabelsWritten ¶ added in v0.2.2
func (init *Initializer) NumLabelsWritten() uint64
func (*Initializer) Reset ¶
func (init *Initializer) Reset() error
func (*Initializer) Status ¶ added in v0.2.0
func (init *Initializer) Status() Status
type OptionFunc ¶ added in v0.2.2
type OptionFunc func(*option) error
func WithCommitmentAtxId ¶ added in v0.2.2
func WithCommitmentAtxId(id []byte) OptionFunc
WithCommitmentAtxId sets the ID of the CommitmentATX.
func WithConfig ¶ added in v0.2.0
func WithConfig(cfg Config) OptionFunc
WithConfig sets the config for the initializer.
func WithInitOpts ¶ added in v0.2.0
func WithInitOpts(initOpts config.InitOpts) OptionFunc
WithInitOpts sets the init options for the initializer.
func WithLogger ¶ added in v0.2.0
func WithLogger(logger *zap.Logger) OptionFunc
WithLogger sets the logger for the initializer.
func WithNodeId ¶ added in v0.2.2
func WithNodeId(nodeId []byte) OptionFunc
WithNodeId sets the ID of the Node.
type Provider ¶ added in v0.6.1
func OpenCLProviders ¶ added in v0.6.0
Providers returns a list of available compute providers.