From c175033b48a8da4969d88b6850dd0247c4004794 Mon Sep 17 00:00:00 2001 From: Marcin M <128217157+mm-zk@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:48:13 +0200 Subject: [PATCH] feat(boojum): Adding README to prover directory (#189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What ❔ * Adding README to prover directory to describe the high level layout of the code ## Why ❔ * to improve the knowledge and understanding of prover components --- prover/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 prover/README.md diff --git a/prover/README.md b/prover/README.md new file mode 100644 index 00000000000..310913bf06b --- /dev/null +++ b/prover/README.md @@ -0,0 +1,50 @@ +# Prover directory + +This directory contains all the libraries and binaries related to proving of the blocks. + +Directories with 'fri' suffix, are mostly used with the new proof system (Boojum). + +## Components + +### vk_setup_data_generator_server_fri + +Set of tools to create setup keys, verification keys and verification key hashes for the circuits. + +Usually run once, and then we use their outputs in multiple places in the system. + +### prover_fri_gateway + +Communication module between the 'main' server running the state keeper, and the proving subsystem. + +### witness_generator + +Creating prover jobs and saving necessary artifacts. + +### prover_fri + +This directory contains the main 'prover'. It can be run in two modes: either as CPU or as GPU. (controlled via 'gpu' +feature flag). + +### witness_vector_generator + +Only used in GPU proving mode. Prepares all the witness data using CPU, and then streams it to the prover_fri. + +This is mosty used for resource efficiency (as machines with GPUs are more expensive, it allows us to run many +witness_vector_generators, that can 'share' as single gpu based prover_fri). + +### proof_fri_compressor + +Used as a 'last step' to compress/wrap the final FRI proof into a SNARK (to make L1 verification cheaper). + +## Old proof system + +Some of the components here belong to the old proof system: + +- circuit_synthesizer +- prover +- setup_key_generator_and_server + +Moreover old proof system is also using components from 'core' directory, like: + +- core/bin/verification_key_generator_and_server +- core/lib/zksycn_core/src/witness_generator.