Expand description
This module contains the logic for storing and verifying the proofs parameters.
The parameters are fetched from the network and stored in the cache directory. The cache directory can be set
using the PROOFS_PARAMETER_CACHE_ENV environment variable. If not set, the default directory is used.
StructsΒ§
- Parameter
Data π - Data structure for retrieving the proof parameter data from provided JSON.
ConstantsΒ§
- DEFAULT_
PARAMETERS π - Default parameters, as outlined in Lotus
v1.26.2. https://github.com/filecoin-project/filecoin-ffi/blob/b715c9403faf919e95fdc702cd651e842f18d890/parameters.json - FOREST_
FORCE_ πTRUST_ PARAMS_ ENV - Environment variable that allows skipping checksum verification of the parameter files.
- PARAM_
DIR π - Default directory name for storing proofs parameters.
- PROOFS_
PARAMETER_ πCACHE_ ENV - Environment variable to set the directory where proofs parameters are stored. Defaults to
PARAM_DIRin the data directory. - PROOF_
DIGEST_ πLEN
FunctionsΒ§
- check_
parameter_ πfile - Ensures the parameter file is downloaded and has the correct checksum.
This behavior can be disabled by setting the
FOREST_FORCE_TRUST_PARAMS_ENVenvironment variable to 1. - maybe_
set_ proofs_ parameter_ cache_ dir_ env - Optionally set the proofs parameter cache directory environment variable if it is not already
set. See
set_proofs_parameter_cache_dir_envfor more details. - param_
dir π - set_
proofs_ πparameter_ cache_ dir_ env - Forest uses a set of external crates for verifying the proofs generated by
the miners. These external crates require a specific set of parameter files
to be located at in a specific folder. By default, it is
/var/tmp/filecoin-proof-parametersbut it can be overridden by theFIL_PROOFS_PARAMETER_CACHEenvironment variable. Forest will automatically download the parameter files from Cloudflare/IPFS and verify their validity. For consistency, Forest will prefer to download the files itβs local data directory. To this end, theFIL_PROOFS_PARAMETER_CACHEenvironment variable is updated before the parameters are downloaded.
Type AliasesΒ§
- Parameter
Map π - Map of parameter data, to be deserialized from the parameter file.