Module parameters

Module parameters 

Source
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Β§

ParameterData πŸ”’
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_DIR in 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_ENV environment 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_env for 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-parameters but it can be overridden by the FIL_PROOFS_PARAMETER_CACHE environment 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, the FIL_PROOFS_PARAMETER_CACHE environment variable is updated before the parameters are downloaded.

Type AliasesΒ§

ParameterMap πŸ”’
Map of parameter data, to be deserialized from the parameter file.