Module forest_filecoin::utils::proofs_api::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 - Environment variable that allows skipping checksum verification of the parameter files.
- PARAM_DIR πDefault directory name for storing proofs parameters.
- 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. - param_dir π
- 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 theFIL_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, theFIL_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.