{"id":30117365,"url":"https://github.com/scroll-tech/zkvm-prover","last_synced_at":"2025-08-10T10:41:54.811Z","repository":{"id":275780676,"uuid":"919320759","full_name":"scroll-tech/zkvm-prover","owner":"scroll-tech","description":"Guest programs and prover SDK for Scroll's zero-knowledge rollup proof generation architecture","archived":false,"fork":false,"pushed_at":"2025-08-04T04:41:46.000Z","size":95607,"stargazers_count":18,"open_issues_count":9,"forks_count":4,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-08-04T05:09:52.682Z","etag":null,"topics":["ethereum","scroll","zkvm"],"latest_commit_sha":null,"homepage":"https://scroll.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scroll-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-20T07:15:52.000Z","updated_at":"2025-08-03T10:28:13.000Z","dependencies_parsed_at":"2025-08-04T04:31:29.721Z","dependency_job_id":"5405c33b-9bc1-4bfa-a31c-3c9af72caca0","html_url":"https://github.com/scroll-tech/zkvm-prover","commit_stats":null,"previous_names":["scroll-tech/zkvm-prover"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/scroll-tech/zkvm-prover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fzkvm-prover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fzkvm-prover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fzkvm-prover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fzkvm-prover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scroll-tech","download_url":"https://codeload.github.com/scroll-tech/zkvm-prover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fzkvm-prover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269712872,"owners_count":24463216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","scroll","zkvm"],"created_at":"2025-08-10T10:41:48.968Z","updated_at":"2025-08-10T10:41:54.770Z","avatar_url":"https://github.com/scroll-tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll zkVM\n\n**zkVM-based Circuits (Guest Programs) with a complete Scroll Prover implementation**\n\n## Repository\n\nThis repository contains the following member crates:\n\n- [scroll-zkvm-types](./crates/circuits/types): Primitive and Common types used in project and being exported. It is an aggregation of a series of crates:\n  + [scroll-zkvm-types-base](./crates/circuits/types/base): Common types which is used project-wide and expected to be recognized beyond project\n  + [scroll-zkvm-types-base](./crates/circuits/types/chunk): Like the base crate, but in the project, these types are only related to chunk circuit\n  + [scroll-zkvm-types-base](./crates/circuits/types/batch): Like the base crate, but in the project, these types are only related to batch circuit\n  + [scroll-zkvm-types-base](./crates/circuits/types/bundle): Like the base crate, but in the project, these types are only related to bundle circuit\n- [scroll-zkvm-chunk-circuit](./crates/circuits/chunk-circuit): Circuit for verification of a Scroll [chunk](TODO:doc)\n- [scroll-zkvm-batch-circuit](./crates/circuits/batch-circuit): Circuit for verification of a Scroll [batch](TODO:doc)\n- [scroll-zkvm-bundle-circuit](./crates/circuits/bundle-circuit): Circuit for verification of a Scroll [bundle](TODO:doc)\n- [scroll-zkvm-prover](./crates/prover): Implementation for a Scroll Prover\n- [scroll-zkvm-verifier](./crates/verifier): Implementation for a Verifier-only mode\n- [scroll-zkvm-integration](./crates/integration): Integration tests for the Scroll Prover\n\n## Overview\n\nThe Scroll zkVM Circuits are [openvm](https://book.openvm.dev/) based Guest Programs.\n\nThe [prover](./crates/prover) crate offers a minimalistic API for setting up, generating and verifying proofs for Scroll's zk-rollup.\n\nFor a deeper dive into our implementation, please refer the [interfaces](./docs/interfaces.md) doc.\n\n## Testing\n\nFor more commands please refer the [Makefile](./Makefile).\n\n### Build Guest Programs\n\nIn case you have made any changes to the guest programs, it is important to build them before running the tests.\n\n```shell\n$ make build-guest\n```\n\nUpon building the guest programs, the child commitments in [batch-circuit](./crates/circuits/batch-circuit/src/child_commitments.rs) and [bundle-circuit](./crates/circuits/bundle-circuit/src/child_commitments.rs) will be overwritten by `build-guest`.\n\n### End-to-end tests for chunk-prover\n\n```shell\n$ make test-single-chunk\n```\n\n### End-to-end tests for batch-prover\n\n```shell\n$ make test-e2e-batch\n```\n\n### End-to-end tests for bundle-prover\n\n```shell\n$ make test-e2e-bundle\n```\n\n*Note*: Configure `RUST_LOG=debug` for debug logs or `RUST_LOG=none,scroll_zkvm_prover=debug` for logs specifically from the `scroll-zkvm-prover` crate.\n\n## Usage of Prover API\n\n### Dependency\n\nAdd the following dependency in your `Cargo.toml`:\n\n```toml\n[dependencies]\nscroll-zkvm-prover = { git = \"https://github.com/scroll-tech/zkvm-prover\", branch = \"master\" }\n```\n\n### To prove a universal task with STARK proofs\n\nProver capable of generating STARK proofs for a Scroll [universal task](TODO:doc):\n\n```rust\nuse std::path::Path;\n\nuse scroll_zkvm_prover::{\n    Prover,\n    task::ProvingTask,\n};\nuse scroll_zkvm_types::{\n    public_inputs::ForkName,\n    chunk::ChunkWitness,\n    task::ProvingTask as UniversalProvingTask,\n};\n\n// Paths to the application exe and application config.\nlet path_exe = Path::new(\"./path/to/app.vmexe\");\nlet path_app_config = Path::new(\"./path/to/openvm.toml\");\n\n// Optional directory to cache generated proofs on disk.\nlet cache_dir = Path::new(\"./path/to/cache/proofs\");\n\nlet config = scroll_zkvm_prover::ProverConfig {\n    path_app_exe,\n    path_app_config,\n    dir_cache: Some(cache_dir),\n    ..Default::default()\n};\n// Setup prover.\nlet prover = Prover::setup(config, false, None)?;\n\nlet vk = prover.get_app_vk();\nlet task : UniversalProvingTask = /* a universal task, commonly generated and assigned by coordinator */\n\n// Generate a proof.\nlet proof = prover.gen_proof_universal(\u0026task, false)?;\n\n// Verify proof.\nlet verifier = prover.dump_universal_verifier(None::\u003cString\u003e);\nassert!(verifier.verify_proof(proof.as_root_proof().expect(\"should be root proof\"), \u0026vk)?);\n```\n\n### To prove a universal task with SNARK proofs\n\nProver capable of generating SNARK proofs aggregating the root proof for a Scroll [universal task](TODO:doc):\n\n```rust\nuse std::path::Path;\n\nuse scroll_zkvm_prover::{\n    Prover,\n    task::ProvingTask,\n};\nuse scroll_zkvm_types::{\n    public_inputs::ForkName,\n    chunk::ChunkWitness,\n    task::ProvingTask as UniversalProvingTask,\n};\n\n// Paths to the application exe and application config.\nlet path_exe = Path::new(\"./path/to/app.vmexe\");\nlet path_app_config = Path::new(\"./path/to/openvm.toml\");\n\n// Optional directory to cache generated proofs on disk.\nlet cache_dir = Path::new(\"./path/to/cache/proofs\");\n\nlet config = scroll_zkvm_prover::ProverConfig {\n    path_app_exe,\n    path_app_config,\n    dir_cache: Some(cache_dir),\n    ..Default::default()\n};\n// Setup prover capable to generate SNARK proof.\nlet prover = Prover::setup(config, true, None)?;\n\nlet vk = prover.get_app_vk();\nlet task : UniversalProvingTask = /* a universal task, commonly generated and assigned by coordinator */\n\n// Generate a SNARK proof.\nlet proof = prover.gen_proof_universal(\u0026task, true)?;\n\n// Verify proof.\nlet verifier = prover.dump_universal_verifier(None::\u003cString\u003e);\nassert!(verifier.verify_proof_evm(\u0026proof.clone().into_evm_proof().expect(\"should be evm proof\").into(), \u0026vk)?);\n```\n\n### Form a universal task for a chunk from block witnesses\n\nA universal task for proving a chunk can be easily generated from block witnesses:\n\n```rust\nuse std::path::Path;\n\nuse scroll_zkvm_prover::{\n    Prover,\n    task::ProvingTask,\n};\nuse scroll_zkvm_types::{\n    public_inputs::ForkName,\n    chunk::ChunkWitness,\n    task::ProvingTask as UniversalProvingTask,\n};\n\nlet prover = /* init a prover and load the chunk circuit */\nlet vk = prover.get_app_vk();\n\n// Proving task of a chunk with 3 blocks.\nlet block_witnesses = vec![\n    sbv::primitives::types::BlockWitness { /* */ },\n    sbv::primitives::types::BlockWitness { /* */ },\n    sbv::primitives::types::BlockWitness { /* */ },\n];\nlet wit = ChunkWitness::new(\n    \u0026block_witnesses,\n    template_wit.prev_msg_queue_hash,\n    template_wit.fork_name,\n);\n\nlet task = UniversalProvingTask{\n    serialized_witness: vec![wit.rkyv_serialize(None)],\n    aggregated_proofs: Vec::new(),\n    fork_name: \"feynman\".to_string(),\n    vk: vk.clone(),\n    identifier: Default::default(),\n};\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Fzkvm-prover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscroll-tech%2Fzkvm-prover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Fzkvm-prover/lists"}