Documentation
¶
Index ¶
Constants ¶
View Source
const ( NumWorkers = 1 // Number of workers creating a proof in parallel. Each one will max out one CPU core. BlocksPerWorker = 1 << 24 // How many AES blocks are contained per batch sent to a worker. Larger values will increase memory usage, but speed up the proof generation. )
TODO (mafa): these should be configurable by a node.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶ added in v0.4.0
func Generate(ctx context.Context, ch shared.Challenge, cfg config.Config, logger shared.Logger, opts ...OptionFunc) (*shared.Proof, *shared.ProofMetadata, error)
TODO (mafa): use functional options. TODO (mafa): replace Logger with zap. TODO (mafa): replace datadir with functional option for data provider. `verifyMetadata` and `initCompleted` should be part of the `WithDataDir` option.
Types ¶
type OptionFunc ¶ added in v0.4.0
type OptionFunc func(*option) error
func WithDataSource ¶ added in v0.4.0
func WithDataSource(cfg config.Config, nodeId, commitmentAtxId []byte, datadir string) OptionFunc
WithDataSource sets the data source to use for the proof.
Click to show internal directories.
Click to hide internal directories.