From 2d4ad595f7174ac00a38427ba4c0f8b71dd06f78 Mon Sep 17 00:00:00 2001 From: eigmax Date: Sat, 8 Jun 2024 20:49:07 +0800 Subject: [PATCH] update removte prover --- src/guides/prover.md | 99 +++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 65 deletions(-) diff --git a/src/guides/prover.md b/src/guides/prover.md index 09e915d..3a9a2c6 100644 --- a/src/guides/prover.md +++ b/src/guides/prover.md @@ -1,77 +1,46 @@ # Eigen Prover -Eigen zkVM Proving Service +Eigen zkVM Remote Proving Service + +## Remote Proving + +Remove Proving allows developers to submit their proof generation request to Eigen Proving Service. + +The API is defined as below: -## Workspace Layout -The work space is organized as below. ``` -basedir/ - _/executor/{task_id}/status - _/{task_name}.pil.json - _/{task_name}.cm - _/{task_name}.const - _/proof/{task_id}/status - _/status.finished - _/{task_name} - _/batch_proof_{chunk_id}/ - _/{task_name}.verifier.circom - _/{task_name}.verifier.zkin.json - _/{task_name}.verifier.r1cs - _/{task_name}.verifier_js/{task_name}.wasm - _/{task_name}.verifier.pil - _/{task_name}.verifier.pil.json - _/{task_name}.verifier.exec - _/{task_name}.verifier.cm - _/{task_name}.verifier.const - _/{task_name}.c12.circom - _/{task_name}.c12.zkin.json - _/{task_name}.c12.r1cs - _/{task_name}.c12_js/{task_name}.wasm - _/{task_name}.c12.pil - _/{task_name}.c12.pil.json - _/{task_name}.c12.exec - _/{task_name}.c12.cm - _/{task_name}.c12.const - _/{task_name}.recursive1.circom - _/{task_name}.recursive1.zkin.json - _/{task_name}.recursive1.r1cs - _/{task_name}.recursive1_js/{task_name}.recursive1.wasm - _/{task_name}.recursive1.cm - _/{task_name}.recursive1.const - _/{task_name}.recursive1.exec - _/{task_name}.recursive1.pil - _/{task_name}.recursive1.pil.json - _/{id}_agg/agg_zkin.json - _/{id}_agg/agg_proof/ - _/{task_name}.recursive2.circom - _/{task_name}.recursive2.zkin.json - _/{task_name}.recursive2.r1cs - _/{task_name}.recursive2_js/{task_name}.recursive2.wasm - _/{task_name}.recursive2.cm - _/{task_name}.recursive2.const - _/{task_name}.recursive2.exec - _/{task_name}.recursive2.pil - _/{task_name}.recursive2.pil.json - _/{id}/snark_proof/ - _/g16.zkey - _/verification_key.json - _/proof.json - _/public_input.json +service ProverService { + rpc ProverStream(stream ProverRequest) returns (stream ProverResponse) {} +} +``` + +For the ProverRequest, the request content is one of ``` +message ProverRequest +{ + string id = 1; + oneof request_type + { + GetStatusRequest get_status = 2; + GenBatchProofRequest gen_batch_proof = 3; + GenAggregatedProofRequest gen_aggregated_proof = 4; + GenFinalProofRequest gen_final_proof = 5; + } +} +``` + +The entired protobuf file can be found [here](https://github.com/0xEigenLabs/eigen-prover/blob/main/service/proto/src/proto/prover/v1/prover.proto). + +The prover client example can be found in [Eigen ZETH](https://github.com/0xEigenLabs/eigen-zeth/blob/main/src/prover/provider.rs#L181). + + +## Local Proving Examples + +The example `lr` is a very simple zkML sample, and can be proved locally fast on your desktop. -## Testing -TASK=evm ```bash -export STARKJS=/zkp/eigen-zkvm/starkjs -FORCE_BIT=18 RUST_MIN_STACK=2073741821 RUST_BACKTRACE=1 RUST_LOG=debug \ - CIRCOMLIB=$STARKJS/node_modules/circomlib/circuits \ - STARK_VERIFIER_GL=$STARKJS/node_modules/pil-stark/circuits.gl \ - STARK_VERIFIER_BN128=$STARKJS/node_modules/pil-stark/circuits.bn128 \ - cargo test --release integration_test -- --nocapture -``` TASK=lr -```bash export STARKJS=/zkp/eigen-zkvm/starkjs FORCE_BIT=18 RUST_MIN_STACK=2073741821 RUST_BACKTRACE=1 RUST_LOG=debug \ CIRCOMLIB=$STARKJS/node_modules/circomlib/circuits \