How filecoin-project/rust-fil-proofs works
Project type and purpose
• This is a Rust “monorepo” workspace implementing Filecoin proof‐of‐replication (PoRep), proof‐of‐spacetime (PoSt), proof updates, and associated tooling. It consists of reusable cryptographic kernels (hashing, field gadgets), proof circuits, high‐level APIs, parameter management utilities, and CI workflows for parameter generation and testing.
File structure
• Top‐level workspace: Cargo.toml, multiple subdirectories each with their own Cargo.toml (e.g. filecoin‐proofs, storage‐proofs‐core, storage‐proofs‐porep, storage‐proofs‐post, storage‐proofs‐update, filecoin‐hashers, fr32, sha2raw, fil‐proofs‐param, fil‐proofs‐tooling).
• Core cryptography & gadgets: storage‐proofs‐core (merkle trees, SLoth, AES, constraint gadgets).
• Circuit libraries: storage‐proofs‐porep (stacked circuits & vanilla proofs), storage‐proofs‐post (fallback & vanilla PoSt), storage‐proofs‐update (circuit and compound proof update logic).
• High‐level API: filecoin‐proofs exposes a unified API for sealing, window PoSt, winning PoSt, proof verification, etc.
• Parameter management: fil‐proofs‐param (download, verify, cache parameters from IPFS or manifests).
• Tooling: fil‐proofs‐tooling (benchmarks, parameter checks, graph cache generators, fdlimit, micro‐bench scripts).
• Low‐level libs: filecoin‐hashers (Blake2s, SHA‐256, Poseidon), sha2raw, fr32 (file‐to‐root conversion).
• CI/CD: .github/workflows/ci.yml for tests; proof‐params‐generate.yml to pre‐generate Groth16 parameters; custom action proof‐params‐download.
README for additional insights
• Emphasis on GitHub Actions generating and downloading Groth16 parameters as artifacts.
• Testing and benchmarking are automated via CI workflows and shell scripts.