diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index b7865365db..6b2de798b2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -45,8 +45,3 @@ runs: shell: bash run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly-2024-04-17 -y - source $HOME/.cargo/env - rustup set profile minimal - rustup component add rustfmt clippy - rustup show - echo "$HOME/.cargo/bin" >> $GITHUB_PATH diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..993078a27f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "weekly" + target-branch: "dev" + - package-ecosystem: "docker" + directory: "/cli/docker" + schedule: + interval: "weekly" + target-branch: "dev" \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..f0666ac04f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: Main + +on: + pull_request: + branches: + - main + paths: + - "cli/**" + - "core/**" + - "prover/**" + - "recursion/**" + - "derive/**" + - "sdk/**" + - ".github/workflows/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + groth16: + name: Groth16 + runs-on: runs-on,cpu=64,ram=256,family=m7i+m7a,hdd=80,image=ubuntu22-full-x64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + toolchain: nightly-2024-04-17 + args: --release -p sp1-sdk -- test_e2e_prove_groth16 --nocapture + env: + RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native + RUST_BACKTRACE: 1 \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 72857c6708..8fbe253852 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,19 +1,177 @@ -name: PR Lint +name: PR on: - pull_request_target: - types: - - opened - - edited - -permissions: - pull-requests: read + push: + branches: [main] + pull_request: + branches: + - "**" + paths: + - "cli/**" + - "core/**" + - "prover/**" + - "recursion/**" + - "derive/**" + - "sdk/**" + - ".github/workflows/**" + merge_group: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: - main: - name: Title - runs-on: warp-ubuntu-latest-arm64-4x + test-x86: + name: Test (x86-64) + runs-on: runs-on,runner=64cpu-linux-x64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + toolchain: nightly-2024-04-17 + args: --all-targets --all-features + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + toolchain: nightly-2024-04-17 + args: --release -- --nocapture + env: + RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native + RUST_BACKTRACE: 1 + FRI_QUERIES: 1 + SP1_DEV: 1 + + test-arm: + name: Test (ARM) + runs-on: runs-on,runner=64cpu-linux-arm64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" steps: - - uses: amannn/action-semantic-pull-request@v5 + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + toolchain: nightly-2024-04-17 + args: --all-targets --all-features + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + toolchain: nightly-2024-04-17 + args: --release + env: + RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native + RUST_BACKTRACE: 1 + FRI_QUERIES: 1 + SP1_DEV: 1 + + lint: + name: Formatting & Clippy + runs-on: runs-on,runner=8cpu-linux-x64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_INCREMENTAL: 1 + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features --all-targets -- -D warnings -A incomplete-features + env: + CARGO_INCREMENTAL: 1 + + examples: + name: Examples + runs-on: runs-on,runner=8cpu-linux-x64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Install SP1 toolchain + run: | + curl -L https://sp1.succinct.xyz | bash + ~/.sp1/bin/sp1up + ~/.sp1/bin/cargo-prove prove --version + + - name: Install SP1 CLI + run: | + cd cli + cargo install --locked --path . + cd ~ + + - name: Run cargo check + run: | + RUSTFLAGS="-Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native" \ + cargo check --manifest-path examples/Cargo.toml --all-targets --all-features + + cli: + name: CLI + runs-on: runs-on,runner=8cpu-linux-x64 + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup CI + uses: ./.github/actions/setup + + - name: Install SP1 toolchain + run: | + curl -L https://sp1.succinct.xyz | bash + ~/.sp1/bin/sp1up + ~/.sp1/bin/cargo-prove prove --version + + - name: Install SP1 CLI + run: | + cd cli + cargo install --locked --path . + cd ~ + + - name: Run cargo prove new + run: | + cargo prove new fibonacci + + - name: Build program and run script + run: | + cd fibonacci + cd program + cargo prove build + cd ../script + SP1_DEV=1 RUST_LOG=info cargo run --release diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml new file mode 100644 index 0000000000..72857c6708 --- /dev/null +++ b/.github/workflows/pr_lint.yml @@ -0,0 +1,19 @@ +name: PR Lint + +on: + pull_request_target: + types: + - opened + - edited + +permissions: + pull-requests: read + +jobs: + main: + name: Title + runs-on: warp-ubuntu-latest-arm64-4x + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9130f895a0..51700e94f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,18 +6,15 @@ on: push: tags: - "v*.*.*" - schedule: - - cron: "0 0 * * *" workflow_dispatch: env: CARGO_TERM_COLOR: always - IS_NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} jobs: prepare: name: Prepare release - runs-on: ubuntu-latest + runs-on: runner=64cpu-linux-arm64 timeout-minutes: 30 outputs: tag_name: ${{ steps.release_info.outputs.tag_name }} @@ -33,6 +30,16 @@ jobs: with: pull_token: ${{ secrets.PULL_TOKEN }} + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + toolchain: nightly-2024-04-17 + args: -p sp1-sdk --release -- --nocapture + env: + RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native + RUST_BACKTRACE: 1 + - name: Compute release name and tag id: release_info run: | @@ -68,9 +75,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - release: name: ${{ matrix.target }} (${{ matrix.runner }}) runs-on: ${{ matrix.runner }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index d47ac311dd..0000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Tests - -on: - push: - branches: [main] - pull_request: - branches: - - "**" - paths: - - "core/**" - - "recursion/**" - - "sdk/**" - - "examples/fibonacci/**" - - ".github/workflows/**" - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test: - name: SP1 Prover E2E - runs-on: warp-ubuntu-latest-arm64-32x - env: - CARGO_NET_GIT_FETCH_WITH_CLI: "true" - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.PULL_TOKEN }} - - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: -p sp1-prover --release - env: - RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native - RUST_LOG: info - RUST_BACKTRACE: 1 - CARGO_INCREMENTAL: 1 - FRI_QUERIES: 1 - SP1_DEV: 1 - - test-main: - name: SP1 Tests - runs-on: warp-ubuntu-latest-arm64-32x - if: github.ref == 'refs/heads/main' - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.PULL_TOKEN }} - - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: -p sp1-core -p sp1-recursion-compiler -p sp1-recursion-program -p sp1-recursion-circuit -p sp1-prover --release - env: - RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native - RUST_LOG: 1 - RUST_BACKTRACE: 1 - CARGO_INCREMENTAL: 1 - FRI_QUERIES: 1 - SP1_DEV: true - - lints: - name: Formatting & Clippy - runs-on: warp-ubuntu-latest-arm64-8x - if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" - env: - CARGO_NET_GIT_FETCH_WITH_CLI: "true" - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.PULL_TOKEN }} - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - env: - CARGO_INCREMENTAL: 1 - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets -- -D warnings -A incomplete-features - env: - CARGO_INCREMENTAL: 1 diff --git a/Cargo.lock b/Cargo.lock index fdbfea5a2f..de99543221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1c115a94254b998be1e0318f06af03b72f54c631669cbd7801056a1bbd5701" +checksum = "e30b83573b348305b9629a094b5331093a030514cd5713433799495cb283fea1" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ab339ca7b4ea9115f0578c941abc80a171edf8e5eadd01e6c4237b68db8083" +checksum = "545885d9b0b2c30fd344ae291439b4bfe59e48dd62fbc862f8503d98088967dc" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -130,7 +130,7 @@ dependencies = [ "itoa", "serde", "serde_json", - "winnow 0.6.7", + "winnow 0.6.8", ] [[package]] @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44294729c145cf7ae65feab544b5b81fb2bb7e2fd060214842eb3989a1e9d882" +checksum = "786689872ec4e7d354810ab0dffd48bb40b838c047522eb031cbd47d15634849" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -198,9 +198,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c715249705afa1e32be79dabfd35e2ef0f1cc02ad2cf48c9d1e20026ee637b" +checksum = "525448f6afc1b70dd0f9d0a8145631bf2f5e434678ab23ab18409ca264cae6b3" dependencies = [ "alloy-rlp", "bytes", @@ -263,7 +263,7 @@ checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -356,9 +356,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef9a94a27345fb31e3fcb5f5e9f592bb4847493b07fa1e47dd9fde2222f2e28" +checksum = "89c80a2cb97e7aa48611cbb63950336f9824a174cdf670527cc6465078a26ea1" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -368,16 +368,16 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31fe73cd259527e24dc2dbfe64bc95e5ddfcd2b2731f670a11ff72b2be2c25b" +checksum = "c58894b58ac50979eeac6249661991ac40b9d541830d9a725f7714cc9ef08c23" dependencies = [ "alloy-json-abi", "const-hex", @@ -386,24 +386,24 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.60", + "syn 2.0.61", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8d6e74e4feeaa2bcfdecfd3da247ab53c67bd654ba1907270c32e02b142331" +checksum = "7da8e71ea68e780cc203919e03f69f59e7afe92d2696fb1dcb6662f61e4031b6" dependencies = [ - "winnow 0.6.7", + "winnow 0.6.8", ] [[package]] name = "alloy-sol-types" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afaffed78bfb17526375754931e045f96018aa810844b29c7aef823266dd4b4b" +checksum = "399287f68d1081ed8b1f4903c49687658b95b142207d7cb4ae2f4813915343ef" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -475,47 +475,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -523,9 +524,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" dependencies = [ "backtrace", ] @@ -541,7 +542,7 @@ dependencies = [ "ark-serialize 0.3.0", "ark-std 0.3.0", "derivative", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "paste", "rustc_version 0.3.3", @@ -561,7 +562,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "paste", "rustc_version 0.4.0", @@ -594,7 +595,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "quote", "syn 1.0.109", @@ -606,7 +607,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "proc-macro2", "quote", @@ -631,7 +632,7 @@ checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-std 0.4.0", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.5", ] [[package]] @@ -691,7 +692,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -702,7 +703,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -713,14 +714,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" @@ -967,9 +968,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3130f3d8717cc02e668a896af24984d5d5d4e8bf12e278e982e0f1bd88a0f9af" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" dependencies = [ "blst", "cc", @@ -1005,7 +1006,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1019,9 +1020,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" dependencies = [ "jobserver", "libc", @@ -1105,7 +1106,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -1116,9 +1117,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "console" @@ -1363,7 +1364,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -1387,7 +1388,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -1398,7 +1399,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -1414,12 +1415,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - [[package]] name = "der" version = "0.7.9" @@ -1631,18 +1626,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enum-as-inner" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1651,9 +1634,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1848,7 +1831,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -1916,9 +1899,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -2093,51 +2076,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hickory-proto" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "hickory-resolver" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" -dependencies = [ - "cfg-if", - "futures-util", - "hickory-proto", - "ipconfig", - "lru-cache", - "once_cell", - "parking_lot", - "rand", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", -] - [[package]] name = "hmac" version = "0.12.1" @@ -2147,17 +2085,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.12" @@ -2280,22 +2207,26 @@ dependencies = [ "futures-util", "http 0.2.12", "hyper 0.14.28", - "rustls", + "rustls 0.21.12", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "hyper-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ - "bytes", - "hyper 0.14.28", - "native-tls", + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.22.4", + "rustls-pki-types", "tokio", - "tokio-native-tls", + "tokio-rustls 0.25.0", + "tower-service", ] [[package]] @@ -2363,16 +2294,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.5.0" @@ -2425,18 +2346,6 @@ dependencies = [ "serde", ] -[[package]] -name = "indicatif" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -dependencies = [ - "console", - "lazy_static", - "number_prefix 0.3.0", - "regex", -] - [[package]] name = "indicatif" version = "0.17.8" @@ -2445,7 +2354,7 @@ checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", "instant", - "number_prefix 0.4.0", + "number_prefix", "portable-atomic", "unicode-width", ] @@ -2459,18 +2368,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "ipconfig" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" -dependencies = [ - "socket2", - "widestring", - "windows-sys 0.48.0", - "winreg 0.50.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -2488,6 +2385,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.10.5" @@ -2632,12 +2535,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -2669,21 +2566,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matchers" version = "0.1.0" @@ -2717,16 +2599,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "miniz_oxide" version = "0.7.2" @@ -2783,11 +2655,11 @@ dependencies = [ [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-complex", "num-integer", "num-iter", @@ -2808,11 +2680,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", "rand", @@ -2820,9 +2691,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", "rand", @@ -2845,9 +2716,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2856,21 +2727,20 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -2916,12 +2786,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" - [[package]] name = "number_prefix" version = "0.4.0" @@ -2972,7 +2836,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -3019,7 +2883,7 @@ name = "p3-baby-bear" version = "0.1.0" source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.5", "p3-field", "p3-mds", "p3-poseidon2", @@ -3043,7 +2907,7 @@ version = "0.1.0" source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" dependencies = [ "ff 0.13.0", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "p3-field", "p3-poseidon2", "p3-symmetric", @@ -3094,7 +2958,7 @@ version = "0.1.0" source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" dependencies = [ "itertools 0.12.1", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "p3-util", "rand", @@ -3262,9 +3126,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -3276,11 +3140,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -3341,9 +3205,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -3353,9 +3217,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -3379,7 +3243,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -3485,12 +3349,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.21.1", ] [[package]] @@ -3519,9 +3382,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] @@ -3558,15 +3421,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +checksum = "9554e3ab233f0a932403704f1a1d08c30d5ccd931adfdfa1e8b5a19b52c1d55a" dependencies = [ "anyhow", "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -3752,22 +3615,18 @@ dependencies = [ "futures-core", "futures-util", "h2 0.3.26", - "hickory-resolver", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", - "hyper-rustls", - "hyper-tls 0.5.0", + "hyper-rustls 0.24.2", "ipnet", "js-sys", "log", "mime", - "mime_guess", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -3775,16 +3634,13 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-native-tls", - "tokio-rustls", - "tokio-util", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", - "webpki-roots", + "webpki-roots 0.25.4", "winreg 0.50.0", ] @@ -3796,13 +3652,17 @@ checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", + "futures-channel", "futures-core", "futures-util", + "h2 0.4.4", "http 1.1.0", "http-body 1.0.0", "http-body-util", "hyper 1.3.1", - "hyper-tls 0.6.0", + "hyper-rustls 0.26.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -3812,44 +3672,41 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.22.4", "rustls-pemfile 2.1.2", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls 0.25.0", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", + "webpki-roots 0.26.1", "winreg 0.52.0", ] [[package]] name = "reqwest-middleware" -version = "0.2.5" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +checksum = "a45d100244a467870f6cb763c4484d010a6bed6bd610b3676e3825d93fb4cfbd" dependencies = [ "anyhow", "async-trait", - "http 0.2.12", - "reqwest 0.11.27", + "http 1.1.0", + "reqwest 0.12.4", "serde", - "task-local-extensions", "thiserror", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", + "tower-service", ] [[package]] @@ -3908,7 +3765,7 @@ dependencies = [ "ark-ff 0.4.2", "bytes", "fastrlp", - "num-bigint 0.4.4", + "num-bigint 0.4.5", "num-traits", "parity-scale-codec", "primitive-types", @@ -3929,9 +3786,9 @@ checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hex" @@ -3954,7 +3811,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.22", + "semver 1.0.23", ] [[package]] @@ -3978,10 +3835,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4003,9 +3874,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" @@ -4017,11 +3888,22 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" [[package]] name = "rusty-fork" @@ -4037,9 +3919,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -4052,9 +3934,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if", "derive_more", @@ -4064,11 +3946,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -4076,9 +3958,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96560eea317a9cc4e0bb1f6a2c93c09a19b8c4fc5cb3fcc0ec1c094cd783e2" +checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" dependencies = [ "sdd", ] @@ -4130,11 +4012,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -4143,9 +4025,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -4162,9 +4044,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -4180,29 +4062,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -4258,7 +4140,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -4283,7 +4165,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -4406,9 +4288,9 @@ dependencies = [ "flate2", "futures-util", "hex", - "indicatif 0.15.0", + "indicatif", "rand", - "reqwest 0.11.27", + "reqwest 0.12.4", "serde", "serde_json", "sp1-core", @@ -4550,7 +4432,7 @@ dependencies = [ "dirs 5.0.1", "futures", "hex", - "indicatif 0.17.8", + "indicatif", "itertools 0.12.1", "p3-baby-bear", "p3-bn254-fr", @@ -4558,7 +4440,7 @@ dependencies = [ "p3-commit", "p3-field", "rayon", - "reqwest 0.11.27", + "reqwest 0.12.4", "serde", "serde_json", "serial_test", @@ -4689,7 +4571,7 @@ dependencies = [ "log", "p3-field", "rand", - "reqwest 0.11.27", + "reqwest 0.12.4", "serde", "serde_json", "sp1-recursion-compiler", @@ -4711,6 +4593,7 @@ dependencies = [ "p3-field", "p3-fri", "p3-matrix", + "p3-maybe-rayon", "p3-merkle-tree", "p3-poseidon2", "p3-symmetric", @@ -4736,14 +4619,14 @@ dependencies = [ "dotenv", "futures", "hex", - "indicatif 0.17.8", + "indicatif", "log", "p3-commit", "p3-field", "p3-matrix", "prost", "prost-types", - "reqwest 0.11.27", + "reqwest 0.12.4", "reqwest-middleware", "serde", "serde_json", @@ -4832,7 +4715,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -4863,9 +4746,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" dependencies = [ "proc-macro2", "quote", @@ -4874,14 +4757,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70aba06097b6eda3c15f6eebab8a6339e121475bcf08bbe6758807e716c372a1" +checksum = "5aa0cefd02f532035d83cfec82647c6eb53140b0485220760e669f4bad489e36" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -4934,15 +4817,6 @@ version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" -[[package]] -name = "task-local-extensions" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" -dependencies = [ - "pin-utils", -] - [[package]] name = "tempfile" version = "3.10.1" @@ -4957,22 +4831,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -5088,7 +4962,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -5107,7 +4981,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", "tokio", ] @@ -5125,23 +5010,22 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" @@ -5156,9 +5040,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", "toml_datetime", @@ -5225,7 +5109,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -5289,7 +5173,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twirp" version = "0.3.0" -source = "git+https://github.com/github/twirp-rs.git?rev=93d4e4b#93d4e4b4a48f9112c943d2925e8dbb1106bd6a18" +source = "git+https://github.com/github/twirp-rs.git?rev=c85f31f9c54957374e7dcb3534fc52cff0aa2dc5#c85f31f9c54957374e7dcb3534fc52cff0aa2dc5" dependencies = [ "async-trait", "axum", @@ -5299,7 +5183,7 @@ dependencies = [ "http-body-util", "hyper 1.3.1", "prost", - "reqwest 0.11.27", + "reqwest 0.12.4", "serde", "serde_json", "thiserror", @@ -5338,15 +5222,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -5387,7 +5262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", ] @@ -5483,7 +5358,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", "wasm-bindgen-shared", ] @@ -5517,7 +5392,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5568,10 +5443,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] -name = "widestring" -version = "1.1.0" +name = "webpki-roots" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "winapi" @@ -5763,9 +5641,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] @@ -5812,28 +5690,28 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] @@ -5853,7 +5731,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.61", ] [[package]] diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 269bae0da3..36a380f466 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -8,6 +8,8 @@ - [Quickstart](./getting-started/quickstart.md) +- [Project Template](./getting-started/project-template.md) + # Writing Programs - [Setup](./writing-programs/setup.md) @@ -28,4 +30,14 @@ - [Basics](./generating-proofs/basics.md) -- [Advanced](./generating-proofs/advanced.md) \ No newline at end of file +- [Advanced](./generating-proofs/advanced.md) + +# Verifying Proofs + +- [Solidity & EVM](./verifying-proofs/solidity-and-evm.md) + +# Developers + +- [Recommended Settings](./developers/recommended-settings.md) + +- [Building Groth16 Artifacts](./developers/building-groth16-artifacts.md) \ No newline at end of file diff --git a/book/developers/building-groth16-artifacts.md b/book/developers/building-groth16-artifacts.md new file mode 100644 index 0000000000..beeb20946e --- /dev/null +++ b/book/developers/building-groth16-artifacts.md @@ -0,0 +1,7 @@ +# Building Groth16 Artifacts + +To build the Groth16 artifacts from scratch, you can use the `Makefile` inside the `prover` directory. + +```shell,noplayground +RUST_LOG=info make groth16 +``` \ No newline at end of file diff --git a/book/developers/recommended-settings.md b/book/developers/recommended-settings.md new file mode 100644 index 0000000000..3bbc6c583b --- /dev/null +++ b/book/developers/recommended-settings.md @@ -0,0 +1,6 @@ +# Recommended Settings + +For developers contributing to the SP1 project, we recommend the following settings: + +- `FRI_QUERIES=1`: Makes the prover use less bits of security to generate proofs more quickly. +- `SP1_DEV=1`: This will rebuild the Groth16 artifacts everytime they are necessary. \ No newline at end of file diff --git a/book/generating-proofs/advanced.md b/book/generating-proofs/advanced.md index b8e5af3626..3b4caa25ee 100644 --- a/book/generating-proofs/advanced.md +++ b/book/generating-proofs/advanced.md @@ -61,6 +61,9 @@ SHARD_SIZE=4194304 RUST_LOG=info RUSTFLAGS='-C target-cpu=native' cargo run --re ## Memory Usage +To reduce memory usage, set the `SHARD_BATCH_SIZE` enviroment variable depending on how much RAM +your machine has. A higher number will use more memory, but will be faster. + ```rust,noplayground -SAVE_DISK_THRESHOLD=64 SHARD_SIZE=2097152 RUST_LOG=info RUSTFLAGS='-C target-cpu=native' cargo run --release +SHARD_BATCH_SIZE=1 SHARD_SIZE=2097152 RUST_LOG=info RUSTFLAGS='-C target-cpu=native' cargo run --release ``` diff --git a/book/generating-proofs/basics.md b/book/generating-proofs/basics.md index 876970fd00..3c24a2ee1c 100644 --- a/book/generating-proofs/basics.md +++ b/book/generating-proofs/basics.md @@ -17,18 +17,6 @@ To make this more concrete, let's walk through a simple example of generating a You can run the above script in the `script` directory with `RUST_LOG=info cargo run --release`. -## Generating a groth16 proof with onchain verification - -The proofs generated by SP1 are not verifiable onchain, as they are non-constant size and STARK verification on Ethereum is very expensive. To generate a proof that can be verified onchain, we use performant STARK recursion to combine SP1 shard proofs into a single STARK proof and then wrap this in a SNARK proof. Our `ProverClient` has a function for this called `prove_groth16`. Behind the scenes, this function will first generate a normal SP1 proof, then recursively combine all of them into a single proof using the STARK recursion protocol. Finally, the proof is wrapped in a SNARK proof using Groth16. - -### Run the script - -```rust,noplayground -{{#include ../../examples/fibonacci/script/bin/groth16.rs}} -``` - -You can run the above script with `RUST_LOG=info cargo run --bin groth16 --release` in `examples/fibonacci/script`. - ## Build Script If you want your program crate to be built automatically whenever you build/run your script crate, you can add a `build.rs` file inside of `script/` (at the same level as `Cargo.toml`): diff --git a/book/getting-started/install.md b/book/getting-started/install.md index 614c55c752..474ea8087e 100644 --- a/book/getting-started/install.md +++ b/book/getting-started/install.md @@ -3,7 +3,10 @@ SP1 currently runs on Linux and macOS. You can either use prebuilt binaries through sp1up or build the toolchain and CLI from source. -Make sure you have [Rust](https://www.rust-lang.org/tools/install) installed. +## Requirements + +- [Rust (Nightly)](https://www.rust-lang.org/tools/install) +- [Go 1.22](https://go.dev/doc/install) ## Option 1: Prebuilt Binaries (Recommended) diff --git a/book/getting-started/project-template.md b/book/getting-started/project-template.md new file mode 100644 index 0000000000..d9c04ed48d --- /dev/null +++ b/book/getting-started/project-template.md @@ -0,0 +1,3 @@ +# Project Template + +Another option for getting started with SP1 is to use the [SP1 Project Template](https://github.com/succinctlabs/sp1-project-template/tree/main). \ No newline at end of file diff --git a/book/verifying-proofs/solidity-and-evm.md b/book/verifying-proofs/solidity-and-evm.md new file mode 100644 index 0000000000..0d6375c591 --- /dev/null +++ b/book/verifying-proofs/solidity-and-evm.md @@ -0,0 +1,42 @@ +# Verifying Proofs: Solidity & EVM + +SP1 recently added support for verifying proofs for onchain usecases. To see an end-to-end example +of using SP1 for on-chain usecases, refer to the [SP1 Project Template](https://github.com/succinctlabs/sp1-project-template/tree/main). + +## Generating a Groth16 Proof + +By default, the proofs generated by SP1 are not verifiable onchain, as they are non-constant size and STARK verification on Ethereum is very expensive. To generate a proof that can be verified onchain, we use performant STARK recursion to combine SP1 shard proofs into a single STARK proof and then wrap that in a SNARK proof. Our `ProverClient` has a function for this called `prove_groth16`. Behind the scenes, this function will first generate a normal SP1 proof, then recursively combine all of them into a single proof using the STARK recursion protocol. Finally, the proof is wrapped in a SNARK proof using Groth16. + +**Due to the fact that Groth16 proofs require a trusted setup, the Groth16 prover is only guaranteed to work on official releases of SP1 (i.e., `v.1.0.0-testnet`).** + + +### Example + +```rust,noplayground +{{#include ../../examples/fibonacci/script/bin/groth16.rs}} +``` + +You can run the above script with `RUST_LOG=info cargo run --bin groth16 --release` in `examples/fibonacci/script`. + +## Exporting the Verifier Contract + +To export the verifier contract, you can use the export function in the `sp1_sdk` crate. + +### Example + +```rust,noplayground +//! Builds the proving artifacts and exports the solidity verifier. +//! +//! You can run this script using the following command: +//! ```shell +//! RUST_LOG=info cargo run --package fibonacci-script --bin artifacts --release +//! ``` + +use std::path::PathBuf; + +fn main() { + let contracts_src_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../contracts/src"); + sp1_sdk::artifacts::export_solidity_groth16_verifier(contracts_src_dir) + .expect("failed to export verifier"); +} +``` \ No newline at end of file diff --git a/book/writing-programs/cycle-tracking.md b/book/writing-programs/cycle-tracking.md index a9bdbcfd57..953feff808 100644 --- a/book/writing-programs/cycle-tracking.md +++ b/book/writing-programs/cycle-tracking.md @@ -17,25 +17,25 @@ Note that to use the macro, you must add the `sp1-derive` crate to your dependen sp1-derive = { git = "https://github.com/succinctlabs/sp1.git" } ``` -In the script for proof generation, setup the logger with `utils::setup_logger()` and run the script with `RUST_LOG=debug cargo run --release`. You should see the following output: +In the script for proof generation, setup the logger with `utils::setup_logger()` and run the script with `RUST_LOG=info cargo run --release`. You should see the following output: ``` -$ RUST_LOG=debug cargo run --release +$ RUST_LOG=info cargo run --release Finished release [optimized] target(s) in 0.21s Running `target/release/cycle-tracking-script` 2024-03-13T02:03:40.567500Z INFO execute: loading memory image 2024-03-13T02:03:40.567751Z INFO execute: starting execution 2024-03-13T02:03:40.567760Z INFO execute: clk = 0 pc = 0x2013b8 -2024-03-13T02:03:40.567822Z DEBUG execute: ┌╴setup -2024-03-13T02:03:40.568095Z DEBUG execute: └╴4,398 cycles -2024-03-13T02:03:40.568122Z DEBUG execute: ┌╴main-body -2024-03-13T02:03:40.568149Z DEBUG execute: │ ┌╴expensive_function -2024-03-13T02:03:40.568250Z DEBUG execute: │ └╴1,368 cycles +2024-03-13T02:03:40.567822Z INFO execute: ┌╴setup +2024-03-13T02:03:40.568095Z INFO execute: └╴4,398 cycles +2024-03-13T02:03:40.568122Z INFO execute: ┌╴main-body +2024-03-13T02:03:40.568149Z INFO execute: │ ┌╴expensive_function +2024-03-13T02:03:40.568250Z INFO execute: │ └╴1,368 cycles stdout: result: 5561 -2024-03-13T02:03:40.568373Z DEBUG execute: │ ┌╴expensive_function -2024-03-13T02:03:40.568470Z DEBUG execute: │ └╴1,368 cycles +2024-03-13T02:03:40.568373Z INFO execute: │ ┌╴expensive_function +2024-03-13T02:03:40.568470Z INFO execute: │ └╴1,368 cycles stdout: result: 2940 -2024-03-13T02:03:40.568556Z DEBUG execute: └╴5,766 cycles +2024-03-13T02:03:40.568556Z INFO execute: └╴5,766 cycles 2024-03-13T02:03:40.568566Z INFO execute: finished execution clk = 11127 pc = 0x0 2024-03-13T02:03:40.569251Z INFO execute: close time.busy=1.78ms time.idle=21.1µs ``` diff --git a/book/writing-programs/inputs-and-outputs.md b/book/writing-programs/inputs-and-outputs.md index d6fb234b74..4615ea64fd 100644 --- a/book/writing-programs/inputs-and-outputs.md +++ b/book/writing-programs/inputs-and-outputs.md @@ -10,7 +10,7 @@ In this section, we cover how you pass inputs and outputs to the zkVM and create ## Reading Data -For most use cases, use the `sp1_zkvm::io::read::` method: +Data that is read is not public to the verifier by default. Use the `sp1_zkvm::io::read::` method: ```rust,noplayground let a = sp1_zkvm::io::read::(); @@ -24,21 +24,21 @@ Note that `T` must implement the `serde::Serialize` and `serde::Deserialize` tra let my_vec = sp1_zkvm::io::read_vec(); ``` -## Writing Data +## Commiting Data -For most usecases, use the `sp1_zkvm::io::write::` method: +Committing to data makes the data public to the verifier. Use the `sp1_zkvm::io::commit::` method: ```rust,noplayground -sp1_zkvm::io::write::(&a); -sp1_zkvm::io::write::(&b); -sp1_zkvm::io::write::(&c); +sp1_zkvm::io::commit::(&a); +sp1_zkvm::io::commit::(&b); +sp1_zkvm::io::commit::(&c); ``` Note that `T` must implement the `Serialize` and `Deserialize` trait. If you want to write bytes directly, you can also use `sp1_zkvm::io::write_slice` method: ```rust,noplayground let mut my_slice = [0_u8; 32]; -sp1_zkvm::io::write_slice(&my_slice); +sp1_zkvm::io::commit_slice(&my_slice); ``` ## Creating Serializable Types diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e81d33b28f..9d70f760d4 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -13,19 +13,19 @@ vergen = { version = "8", default-features = false, features = [ ] } [dependencies] -anyhow = { version = "1.0.79", features = ["backtrace"] } +anyhow = { version = "1.0.83", features = ["backtrace"] } cargo_metadata = "0.18.1" -clap = { version = "4.4.15", features = ["derive", "env"] } +clap = { version = "4.5.4", features = ["derive", "env"] } sp1-prover = { path = "../prover" } sp1-sdk = { path = "../sdk" } sp1-core = { path = "../core" } -reqwest = { version = "0.11.3", features = [ +reqwest = { version = "0.12.4", features = [ "stream", "json", "rustls-tls", ], default-features = false } -futures-util = "0.3.14" -indicatif = "0.15.0" +futures-util = "0.3.30" +indicatif = "0.17.8" tokio = { version = "1", features = ["full"] } tar = "0.4" flate2 = "1.0" @@ -35,10 +35,10 @@ rand = "0.8" downloader = { version = "0.2", default-features = false, features = [ "rustls-tls", ] } -serde_json = "1.0.113" -yansi = "0.5.1" +serde_json = "1.0.117" +yansi = "1.0.1" hex = "0.4.3" -anstyle = "1.0.6" -target-lexicon = "0.12.13" +anstyle = "1.0.7" +target-lexicon = "0.12.14" dialoguer = "0.11.0" tempfile = "3.10.1" diff --git a/cli/docker/Dockerfile b/cli/docker/Dockerfile index c07493c83f..1f0258599f 100644 --- a/cli/docker/Dockerfile +++ b/cli/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb +FROM ubuntu:24.04@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15 RUN apt-get update RUN apt-get install -y --no-install-recommends ca-certificates clang curl libssl-dev pkg-config git dialog diff --git a/cli/src/assets/program/Cargo.toml b/cli/src/assets/program/Cargo.toml index 21dc35d49a..d2397eb0f4 100644 --- a/cli/src/assets/program/Cargo.toml +++ b/cli/src/assets/program/Cargo.toml @@ -5,4 +5,4 @@ name = "unnamed-program" edition = "2021" [dependencies] -sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v1.0.0-testnet" } \ No newline at end of file +sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v1.0.0-testnet" } \ No newline at end of file diff --git a/cli/src/assets/script/build.rs b/cli/src/assets/script/build.rs index 32b99273cd..03388acab7 100644 --- a/cli/src/assets/script/build.rs +++ b/cli/src/assets/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/core/Cargo.toml b/core/Cargo.toml index 371209a1b5..e477ec2639 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -7,10 +7,10 @@ version = "0.1.0" bincode = "1.3.3" serde = { version = "1.0", features = ["derive", "rc"] } elf = "0.7.4" -itertools = "0.12.0" -log = "0.4.20" +itertools = "0.12.1" +log = "0.4.21" nohash-hasher = "0.2.0" -num = { version = "0.4.1" } +num = { version = "0.4.3" } p3-air = { workspace = true } p3-baby-bear = { workspace = true } p3-blake3 = { workspace = true, features = ["parallel"] } @@ -32,11 +32,11 @@ rrs-lib = { git = "https://github.com/GregAC/rrs.git" } sp1-derive = { path = "../derive" } sp1-primitives = { path = "../primitives" } -anyhow = "1.0.79" +anyhow = "1.0.83" amcl = { package = "snowbridge-amcl", version = "1.0.2", default-features = false, features = [ "bls381", ] } -arrayref = "0.3.6" +arrayref = "0.3.7" blake3 = "1.5" blake3-zkvm = { git = "https://github.com/sp1-patches/BLAKE3.git", branch = "patch-blake3_zkvm/v.1.0.0" } cfg-if = "1.0.0" @@ -47,12 +47,12 @@ elliptic-curve = "0.13.8" hex = "0.4.3" k256 = { version = "0.13.3", features = ["expose-field"] } num_cpus = "1.16.0" -serde_with = "3.6.1" +serde_with = "3.8.1" size = "0.4.1" -tempfile = "3.9.0" +tempfile = "3.10.1" tracing = "0.1.40" tracing-forest = { version = "0.1.6", features = ["ansi", "smallvec"] } -tracing-subscriber = { version = "0.3.17", features = ["std", "env-filter"] } +tracing-subscriber = { version = "0.3.18", features = ["std", "env-filter"] } strum_macros = "0.26" strum = "0.26" web-time = "1.1.0" @@ -62,7 +62,7 @@ serial_test = "3.1.1" [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } criterion = "0.5.1" -num = { version = "0.4.1", features = ["rand"] } +num = { version = "0.4.3", features = ["rand"] } rand = "0.8.5" sp1-zkvm = { path = "../zkvm/entrypoint" } diff --git a/core/src/cpu/trace.rs b/core/src/cpu/trace.rs index beb2e3acd1..e5d5b8320d 100644 --- a/core/src/cpu/trace.rs +++ b/core/src/cpu/trace.rs @@ -595,8 +595,12 @@ impl CpuChip { fn pad_to_power_of_two(values: &mut Vec) { let n_real_rows = values.len() / NUM_CPU_COLS; - - values.resize(n_real_rows.next_power_of_two() * NUM_CPU_COLS, F::zero()); + let padded_nb_rows = if n_real_rows < 16 { + 16 + } else { + n_real_rows.next_power_of_two() + }; + values.resize(padded_nb_rows * NUM_CPU_COLS, F::zero()); // Interpret values as a slice of arrays of length `NUM_CPU_COLS` let rows = unsafe { diff --git a/core/src/runtime/state.rs b/core/src/runtime/state.rs index d80ddd0b6f..09f6236cc4 100644 --- a/core/src/runtime/state.rs +++ b/core/src/runtime/state.rs @@ -43,7 +43,6 @@ pub struct ExecutionState { pub input_stream_ptr: usize, /// A stream of proofs inputted to the program. - #[serde(skip)] // TODO: fix serialization for VerifyingKey pub proof_stream: Vec<( ShardProof, StarkVerifyingKey, diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 7646ae5641..89638765f3 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -511,8 +511,6 @@ impl std::error::Error for MachineVerificationError #[allow(non_snake_case)] pub mod tests { - use serial_test::serial; - use crate::io::SP1Stdin; use crate::runtime::tests::fibonacci_program; use crate::runtime::tests::simple_memory_program; @@ -662,7 +660,6 @@ pub mod tests { } #[test] - #[serial] fn test_fibonacci_prove() { setup_logger(); let program = fibonacci_program(); @@ -670,18 +667,11 @@ pub mod tests { } #[test] - #[serial] fn test_fibonacci_prove_batch() { - std::env::set_var("SHARD_BATCH_SIZE", "1"); - std::env::set_var("SHARD_SIZE", "16384"); - setup_logger(); let program = fibonacci_program(); let stdin = SP1Stdin::new(); run_and_prove(program, &stdin, BabyBearPoseidon2::new()); - - std::env::remove_var("SHARD_BATCH_SIZE"); - std::env::remove_var("SHARD_SIZE"); } #[test] diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index 2f4c244c0d..2ca5237e09 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -9,9 +9,9 @@ use p3_air::Air; use p3_challenger::{CanObserve, FieldChallenger}; use p3_commit::Pcs; use p3_commit::PolynomialSpace; -use p3_field::AbstractField; use p3_field::ExtensionField; use p3_field::PrimeField32; +use p3_field::{AbstractExtensionField, AbstractField}; use p3_matrix::dense::RowMajorMatrix; use p3_matrix::Matrix; use p3_maybe_rayon::prelude::*; @@ -302,12 +302,13 @@ where for i in 0..chips.len() { let trace_width = traces[i].width(); let permutation_width = permutation_traces[i].width(); - let total_width = trace_width + permutation_width; + let total_width = trace_width + + permutation_width * >::D; tracing::debug!( "{:<15} | Main Cols = {:<5} | Perm Cols = {:<5} | Rows = {:<5} | Cells = {:<10}", chips[i].name(), trace_width, - permutation_width, + permutation_width * >::D, traces[i].height(), total_width * traces[i].height(), ); diff --git a/core/src/stark/quotient.rs b/core/src/stark/quotient.rs index 4934df0b66..b42d386994 100644 --- a/core/src/stark/quotient.rs +++ b/core/src/stark/quotient.rs @@ -9,6 +9,8 @@ use p3_matrix::Matrix; use p3_maybe_rayon::prelude::*; use p3_util::log2_strict_usize; +use crate::air::MachineAir; + use super::folder::ProverConstraintFolder; use super::Chip; use super::Domain; @@ -31,7 +33,7 @@ pub fn quotient_values( public_values: &[Val], ) -> Vec where - A: for<'a> Air>, + A: for<'a> Air> + MachineAir>, SC: StarkGenericConfig, Mat: Matrix> + Sync, { @@ -46,7 +48,13 @@ where let ext_degree = SC::Challenge::D; - assert!(quotient_size >= PackedVal::::WIDTH); + assert!( + quotient_size >= PackedVal::::WIDTH, + "quotient size is too small: got {}, expected at least {} for chip {}", + quotient_size, + PackedVal::::WIDTH, + chip.name() + ); (0..quotient_size) .into_par_iter() diff --git a/core/src/stark/verifier.rs b/core/src/stark/verifier.rs index fbde0f4267..6f5bad846d 100644 --- a/core/src/stark/verifier.rs +++ b/core/src/stark/verifier.rs @@ -51,6 +51,8 @@ impl>> Verifier { let pcs = config.pcs(); + assert_eq!(chips.len(), opened_values.chips.len()); + let log_degrees = opened_values .chips .iter() diff --git a/core/src/syscall/write.rs b/core/src/syscall/write.rs index 2db198b081..3c68ea7fc6 100644 --- a/core/src/syscall/write.rs +++ b/core/src/syscall/write.rs @@ -48,7 +48,7 @@ impl Syscall for SyscallWrite { let (start, depth) = rt.cycle_tracker.remove(fn_name).unwrap_or((0, 0)); // Leftpad by 2 spaces for each depth. let padding = (0..depth).map(|_| "│ ").collect::(); - log::debug!( + log::info!( "{}└╴{} cycles", padding, num_to_comma_separated(rt.state.global_clk - start as u64) diff --git a/core/src/utils/env.rs b/core/src/utils/env.rs index f88d5bf427..371bdc561b 100644 --- a/core/src/utils/env.rs +++ b/core/src/utils/env.rs @@ -42,6 +42,6 @@ pub fn reconstruct_commitments() -> bool { pub fn shard_batch_size() -> u32 { match std::env::var("SHARD_BATCH_SIZE") { Ok(val) => val.parse().unwrap(), - Err(_) => 0, + Err(_) => 128, } } diff --git a/core/src/utils/mod.rs b/core/src/utils/mod.rs index c47003d79c..0ab8a5ceea 100644 --- a/core/src/utils/mod.rs +++ b/core/src/utils/mod.rs @@ -32,8 +32,8 @@ pub const fn indices_arr() -> [usize; N] { pub fn pad_to_power_of_two(values: &mut Vec) { debug_assert!(values.len() % N == 0); let mut n_real_rows = values.len() / N; - if n_real_rows < 8 { - n_real_rows = 8; + if n_real_rows < 16 { + n_real_rows = 16; } values.resize(n_real_rows.next_power_of_two() * N, T::default()); } @@ -67,8 +67,8 @@ pub fn limbs_from_access>(cols: &[M]) pub fn pad_rows(rows: &mut Vec<[T; N]>, row_fn: impl Fn() -> [T; N]) { let nb_rows = rows.len(); let mut padded_nb_rows = nb_rows.next_power_of_two(); - if padded_nb_rows == 2 || padded_nb_rows == 1 { - padded_nb_rows = 4; + if padded_nb_rows < 16 { + padded_nb_rows = 16; } if padded_nb_rows == nb_rows { return; @@ -104,8 +104,8 @@ pub fn pad_rows_fixed( } None => { let mut padded_nb_rows = nb_rows.next_power_of_two(); - if padded_nb_rows < 8 { - padded_nb_rows = 8; + if padded_nb_rows < 16 { + padded_nb_rows = 16; } rows.resize(padded_nb_rows, dummy_row); } diff --git a/eval/Cargo.toml b/eval/Cargo.toml index ad4ee7f480..b7f7cb19f3 100644 --- a/eval/Cargo.toml +++ b/eval/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" sp1-core = { path = "../core" } sp1-prover = { path = "../prover" } -clap = { version = "4.4.0", features = ["derive"] } +clap = { version = "4.5.4", features = ["derive"] } csv = "1.3.0" -serde = "1.0.196" +serde = "1.0.201" diff --git a/examples/Cargo.lock b/examples/Cargo.lock new file mode 100644 index 0000000000..09818bd07c --- /dev/null +++ b/examples/Cargo.lock @@ -0,0 +1,5701 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-provider", + "alloy-rpc-client", + "alloy-serde", + "alloy-signer", + "alloy-signer-wallet", + "alloy-transport-http", + "reqwest 0.12.4", +] + +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e30b83573b348305b9629a094b5331093a030514cd5713433799495cb283fea1" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545885d9b0b2c30fd344ae291439b4bfe59e48dd62fbc862f8503d98088967dc" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.8", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786689872ec4e7d354810ab0dffd48bb40b838c047522eb031cbd47d15634849" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-signer", + "async-trait", + "futures-utils-wasm", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-primitives" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525448f6afc1b70dd0f9d0a8145631bf2f5e434678ab23ab18409ca264cae6b3" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-network", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-rpc-types-trace", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "lru", + "reqwest 0.12.4", + "serde_json", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types", + "alloy-serde", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-wallet" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89c80a2cb97e7aa48611cbb63950336f9824a174cdf670527cc6465078a26ea1" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap 2.2.6", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.61", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58894b58ac50979eeac6249661991ac40b9d541830d9a725f7714cc9ef08c23" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.61", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8e71ea68e780cc203919e03f69f59e7afe92d2696fb1dcb6662f61e4031b6" +dependencies = [ + "winnow 0.6.8", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399287f68d1081ed8b1f4903c49687658b95b142207d7cb4ae2f4813915343ef" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.4", + "serde_json", + "tower", + "url", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.5", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.5", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.5", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.5", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.5", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "array-macro" +version = "2.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220a2c618ab466efe41d0eace94dfeff1c35e3aa47891bdb95e1c0fefffd3c99" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "axum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "rayon", +] + +[[package]] +name = "blake3-zkvm" +version = "0.1.0" +source = "git+https://github.com/sp1-patches/BLAKE3.git?branch=patch-blake3_zkvm/v.1.0.0#bac2d59f9122b07a4d91475560b4c3214ae62444" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "bls12_381" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +dependencies = [ + "ff 0.12.1", + "group 0.12.1", + "pairing", + "rand_core", + "subtle", +] + +[[package]] +name = "blst" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chess-script" +version = "0.1.0" +dependencies = [ + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.5", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "platforms", + "rustc_version 0.4.0", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "cycle-tracking-script" +version = "0.1.0" +dependencies = [ + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "darling" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.61", +] + +[[package]] +name = "darling_macro" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid 0.7.1", + "crypto-bigint 0.3.2", + "pem-rfc7468", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid 0.9.6", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.9", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki 0.7.3", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "byteorder", + "ff_derive", + "rand_core", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +dependencies = [ + "addchain", + "cfg-if", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" + +[[package]] +name = "fibonacci-script" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "sha2 0.10.8", + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-array" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe739944a5406424e080edccb6add95685130b9f160d5407c639c7df0c5836b0" +dependencies = [ + "serde", + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "memuse", + "rand_core", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "halo2" +version = "0.1.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a23c779b38253fe1538102da44ad5bd5378495a61d2c4ee18d64eaa61ae5995" +dependencies = [ + "halo2_proofs", +] + +[[package]] +name = "halo2_proofs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "pasta_curves 0.4.1", + "rand_core", + "rayon", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.28", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-script" +version = "0.1.0" +dependencies = [ + "serde", + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-prime-script" +version = "0.1.0" +dependencies = [ + "sp1-sdk", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "json-script" +version = "0.1.0" +dependencies = [ + "lib", + "serde", + "serde_json", + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "jubjub" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" +dependencies = [ + "bitvec", + "bls12_381", + "ff 0.12.1", + "group 0.12.1", + "rand_core", + "subtle", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "lib" +version = "0.1.0" +dependencies = [ + "serde", +] + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libz-sys" +version = "1.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memuse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.5", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.5", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p3-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", +] + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "num-bigint 0.4.5", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-blake3" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "blake3", + "p3-symmetric", +] + +[[package]] +name = "p3-bn254-fr" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "ff 0.13.0", + "num-bigint 0.4.5", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-challenger" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-commit" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-field", + "p3-matrix", + "p3-util", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits", + "p3-util", + "rand", + "serde", +] + +[[package]] +name = "p3-fri" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-interpolation" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-util", +] + +[[package]] +name = "p3-keccak" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-symmetric", + "tiny-keccak", +] + +[[package]] +name = "p3-keccak-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "rayon", +] + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand", +] + +[[package]] +name = "p3-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-commit", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-uni-stark" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-air", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "serde", +] + +[[package]] +name = "pairing" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +dependencies = [ + "group 0.12.1", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "pasta_curves" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc65faf8e7313b4b1fbaa9f7ca917a0eed499a9663be71477f87993604341d8" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff 0.13.0", + "group 0.13.0", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pem-rfc7468" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01de5d978f34aa4b2296576379fcc416034702fd94117c56ffd8a1a767cefb30" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78f66c04ccc83dd4486fd46c33896f4e17b24a7a3a6400dedc48ed0ddd72320" +dependencies = [ + "der 0.5.1", + "pkcs8 0.8.0", + "zeroize", +] + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der 0.5.1", + "spki 0.5.4", + "zeroize", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.9", + "spki 0.7.3", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9554e3ab233f0a932403704f1a1d08c30d5ccd931adfdfa1e8b5a19b52c1d55a" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "prost-types" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +dependencies = [ + "prost", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rayon-scan" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f87cc11a0140b4b0da0ffc889885760c61b13672d80a908920b2c0df078fa14" +dependencies = [ + "rayon", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-script" +version = "0.1.0" +dependencies = [ + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "winreg 0.52.0", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a45d100244a467870f6cb763c4484d010a6bed6bd610b3676e3825d93fb4cfbd" +dependencies = [ + "anyhow", + "async-trait", + "http 1.1.0", + "reqwest 0.12.4", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rrs-lib" +version = "0.1.0" +source = "git+https://github.com/GregAC/rrs.git#b23afc16b4e6a1fb5c4a73eb1e337e9400816507" +dependencies = [ + "downcast-rs", + "num_enum", + "paste", +] + +[[package]] +name = "rsa" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf22754c49613d2b3b119f0e5d46e34a2c628a937e3024b8762de4e7d8c710b" +dependencies = [ + "byteorder", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pkcs1", + "pkcs8 0.8.0", + "rand_core", + "smallvec", + "subtle", + "zeroize", +] + +[[package]] +name = "rsa-script" +version = "0.1.0" +dependencies = [ + "rsa", + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "ruint" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.5", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scc" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +dependencies = [ + "sdd", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sdd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der 0.7.9", + "generic-array 0.14.7", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serial_test" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +dependencies = [ + "futures", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-aggregation-example-script" +version = "0.1.0" +dependencies = [ + "hex", + "sp1-helper", + "sp1-sdk", + "tracing", +] + +[[package]] +name = "sp1-core" +version = "0.1.0" +dependencies = [ + "anyhow", + "arrayref", + "bincode", + "blake3", + "blake3-zkvm", + "cfg-if", + "curve25519-dalek", + "elf", + "elliptic-curve", + "generic-array 1.0.0", + "hex", + "itertools 0.12.1", + "k256", + "log", + "nohash-hasher", + "num", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-blake3", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-keccak", + "p3-keccak-air", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rayon-scan", + "rrs-lib", + "serde", + "serde_with", + "serial_test", + "size", + "snowbridge-amcl", + "sp1-derive", + "sp1-primitives", + "strum", + "strum_macros", + "tempfile", + "tracing", + "tracing-forest", + "tracing-subscriber", + "typenum", + "web-time", +] + +[[package]] +name = "sp1-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-helper" +version = "0.1.0" +dependencies = [ + "cargo_metadata", + "chrono", +] + +[[package]] +name = "sp1-primitives" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + +[[package]] +name = "sp1-prover" +version = "0.1.0" +dependencies = [ + "anyhow", + "backtrace", + "bincode", + "clap", + "dirs", + "futures", + "hex", + "indicatif", + "itertools 0.12.1", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-field", + "rayon", + "reqwest 0.12.4", + "serde", + "serde_json", + "serial_test", + "sha2 0.10.8", + "size", + "sp1-core", + "sp1-primitives", + "sp1-recursion-circuit", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-gnark-ffi", + "sp1-recursion-program", + "subtle-encoding", + "tempfile", + "tokio", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + +[[package]] +name = "sp1-recursion-circuit" +version = "0.1.0" +dependencies = [ + "bincode", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-util", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-derive", + "sp1-recursion-program", +] + +[[package]] +name = "sp1-recursion-compiler" +version = "0.1.0" +dependencies = [ + "backtrace", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "serde_json", + "serial_test", + "sp1-core", + "sp1-recursion-core", + "sp1-recursion-derive", + "tracing", +] + +[[package]] +name = "sp1-recursion-core" +version = "0.1.0" +dependencies = [ + "arrayref", + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "serde", + "serde_with", + "sp1-core", + "sp1-derive", + "sp1-primitives", + "static_assertions", + "tracing", + "zkhash", +] + +[[package]] +name = "sp1-recursion-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-recursion-gnark-ffi" +version = "0.1.0" +dependencies = [ + "crossbeam", + "log", + "p3-field", + "rand", + "reqwest 0.12.4", + "serde", + "serde_json", + "sp1-recursion-compiler", + "subtle-encoding", + "tempfile", +] + +[[package]] +name = "sp1-recursion-program" +version = "0.1.0" +dependencies = [ + "array-macro", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "rand", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "tracing", +] + +[[package]] +name = "sp1-sdk" +version = "0.1.0" +dependencies = [ + "alloy", + "anyhow", + "async-trait", + "axum", + "bincode", + "dirs", + "dotenv", + "futures", + "hex", + "indicatif", + "log", + "p3-commit", + "p3-field", + "p3-matrix", + "prost", + "prost-types", + "reqwest 0.12.4", + "reqwest-middleware", + "serde", + "serde_json", + "sha2 0.10.8", + "sp1-core", + "sp1-prover", + "tempfile", + "tokio", + "tracing", + "twirp", + "vergen", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der 0.5.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.9", +] + +[[package]] +name = "ssz-withdrawals-script" +version = "0.1.0" +dependencies = [ + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.61", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa0cefd02f532035d83cfec82647c6eb53140b0485220760e669f4bad489e36" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "tendermint" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15ab8f0a25d0d2ad49ac615da054d6a76aa6603ff95f7d18bafdd34450a1a04b" +dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "num-traits", + "once_cell", + "prost", + "prost-types", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-light-client-verifier" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b8090d0eef9ad57b1b913b5e358e26145c86017e87338136509b94383a4af25" +dependencies = [ + "derive_more", + "flex-error", + "serde", + "tendermint", + "time", +] + +[[package]] +name = "tendermint-proto" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b797dd3d2beaaee91d2f065e7bdf239dc8d80bba4a183a288bc1279dd5a69a1e" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-script" +version = "0.1.0" +dependencies = [ + "bincode", + "itertools 0.12.1", + "reqwest 0.11.27", + "serde", + "serde_cbor", + "serde_json", + "sha2 0.10.8", + "sp1-core", + "sp1-helper", + "sp1-sdk", + "tendermint", + "tendermint-light-client-verifier", + "tokio", +] + +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-forest" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee40835db14ddd1e3ba414292272eddde9dad04d3d4b65509656414d1c42592f" +dependencies = [ + "ansi_term", + "smallvec", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twirp" +version = "0.3.0" +source = "git+https://github.com/github/twirp-rs.git?rev=c85f31f9c54957374e7dcb3534fc52cff0aa2dc5#c85f31f9c54957374e7dcb3534fc52cff0aa2dc5" +dependencies = [ + "async-trait", + "axum", + "bytes", + "futures", + "http 1.1.0", + "http-body-util", + "hyper 1.3.1", + "prost", + "reqwest 0.12.4", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cfg-if", + "git2", + "rustversion", + "time", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.61", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "zkhash" +version = "0.2.0" +source = "git+https://github.com/HorizenLabs/poseidon2#bb476b9ca38198cf5092487283c8b8c5d4317c4e" +dependencies = [ + "ark-ff 0.4.2", + "ark-std 0.4.0", + "bitvec", + "blake2", + "bls12_381", + "byteorder", + "cfg-if", + "group 0.12.1", + "group 0.13.0", + "halo2", + "hex", + "jubjub", + "lazy_static", + "pasta_curves 0.5.1", + "rand", + "serde", + "sha2 0.10.8", + "sha3", + "subtle", +] diff --git a/examples/Cargo.toml b/examples/Cargo.toml new file mode 100644 index 0000000000..a6ea63df0d --- /dev/null +++ b/examples/Cargo.toml @@ -0,0 +1,15 @@ +[workspace] +members = [ + "aggregation/script", + "chess/script", + "cycle-tracking/script", + "fibonacci/script", + "io/script", + "is-prime/script", + "json/lib", + "json/script", + "regex/script", + "rsa/script", + "ssz-withdrawals/script", + "tendermint/script", +] diff --git a/examples/Makefile b/examples/Makefile index 5cf4b3343a..4fcf1b177e 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -3,9 +3,9 @@ SHELL := /bin/bash all: @for dir in */ ; do \ - if [ -d "$${dir}program" ]; then \ - echo "Building in $${dir}program..."; \ - cd $${dir}program && cargo prove build || { echo "Failed at command: cd $${dir}program && cargo prove build"; exit 1; }; \ + if [ -d "$${dir}script" ]; then \ + echo "Building in $${dir}script..."; \ + cd $${dir}script && cargo check || { echo "Failed at command: cd $${dir}script && cargo check"; exit 1; }; \ cd ../../; \ else \ echo "No program directory in $${dir}, skipping..."; \ diff --git a/examples/aggregation/programs/aggregation/Cargo.lock b/examples/aggregation/programs/aggregation/Cargo.lock new file mode 100644 index 0000000000..9b3f983126 --- /dev/null +++ b/examples/aggregation/programs/aggregation/Cargo.lock @@ -0,0 +1,947 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aggregation-program" +version = "0.1.0" +dependencies = [ + "hex", + "sha2", + "sp1-zkvm", +] + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "tap", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "num" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "num-bigint", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools", + "num-bigint", + "num-traits", + "p3-util", + "rand", + "serde", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools", + "p3-field", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "serde", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate 2.0.2", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro2" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "scale-info" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes.git?branch=patch-v0.10.8#3d692aa90b91513886d757d01f8fc2d51c0ec0d7" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp1-precompiles" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/sp1.git?rev=v1.0.0-testnet#e721b246243e40376f7b75d7330e53c7351b727f" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "getrandom", + "hex", + "k256", + "num", + "rand", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1-primitives" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/sp1.git?rev=v1.0.0-testnet#e721b246243e40376f7b75d7330e53c7351b727f" +dependencies = [ + "itertools", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + +[[package]] +name = "sp1-zkvm" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/sp1.git?rev=v1.0.0-testnet#e721b246243e40376f7b75d7330e53c7351b727f" +dependencies = [ + "bincode", + "cfg-if", + "getrandom", + "k256", + "libm", + "once_cell", + "p3-baby-bear", + "p3-field", + "rand", + "serde", + "sha2", + "sp1-precompiles", + "sp1-primitives", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/examples/aggregation/programs/aggregation/Cargo.toml b/examples/aggregation/programs/aggregation/Cargo.toml new file mode 100644 index 0000000000..0e25eec36d --- /dev/null +++ b/examples/aggregation/programs/aggregation/Cargo.toml @@ -0,0 +1,13 @@ +[workspace] +[package] +version = "0.1.0" +name = "aggregation-program" +edition = "2021" + +[dependencies] +hex = "0.4.3" +sha2 = "0.10.8" +sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", features = ["verify"], rev = "v1.0.0-testnet" } + +[patch.crates-io] +sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes.git", package = "sha2", branch = "patch-v0.10.8" } \ No newline at end of file diff --git a/examples/aggregation/programs/aggregation/elf/riscv32im-succinct-zkvm-elf b/examples/aggregation/programs/aggregation/elf/riscv32im-succinct-zkvm-elf new file mode 100755 index 0000000000..3bc26ea23d Binary files /dev/null and b/examples/aggregation/programs/aggregation/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/aggregation/programs/aggregation/src/main.rs b/examples/aggregation/programs/aggregation/src/main.rs new file mode 100644 index 0000000000..c09b97b470 --- /dev/null +++ b/examples/aggregation/programs/aggregation/src/main.rs @@ -0,0 +1,68 @@ +//! A simple program that aggregates the proofs of multiple programs proven with the zkVM. + +#![no_main] +sp1_zkvm::entrypoint!(main); + +use sha2::Digest; +use sha2::Sha256; + +pub fn words_to_bytes_le(words: &[u32; 8]) -> [u8; 32] { + let mut bytes = [0u8; 32]; + for i in 0..8 { + let word_bytes = words[i].to_le_bytes(); + bytes[i * 4..(i + 1) * 4].copy_from_slice(&word_bytes); + } + bytes +} + +/// Encode a list of vkeys and committed values into a single byte array. In the future this could +/// be a merkle tree or some other commitment scheme. +/// +/// ( vkeys.len() || vkeys || committed_values[0].len as u32 || committed_values[0] || ... ) +pub fn commit_proof_pairs(vkeys: &[[u32; 8]], committed_values: &[Vec]) -> Vec { + assert_eq!(vkeys.len(), committed_values.len()); + let mut res = Vec::with_capacity( + 4 + vkeys.len() * 32 + + committed_values.len() * 4 + + committed_values + .iter() + .map(|vals| vals.len()) + .sum::(), + ); + + // Note we use big endian because abi.encodePacked in solidity does also + res.extend_from_slice(&(vkeys.len() as u32).to_be_bytes()); + for vkey in vkeys.iter() { + res.extend_from_slice(&words_to_bytes_le(vkey)); + } + for vals in committed_values.iter() { + res.extend_from_slice(&(vals.len() as u32).to_be_bytes()); + res.extend_from_slice(vals); + } + + res +} + +pub fn main() { + // Read the verification keys. + let vkeys = sp1_zkvm::io::read::>(); + + // Read the public values. + let public_values = sp1_zkvm::io::read::>>(); + + // Verify the proofs. + assert_eq!(vkeys.len(), public_values.len()); + for i in 0..vkeys.len() { + let vkey = &vkeys[i]; + let public_values = &public_values[i]; + let public_values_digest = Sha256::digest(public_values); + sp1_zkvm::precompiles::verify::verify_sp1_proof(vkey, &public_values_digest.into()); + } + + // TODO: Do something interesting with the proofs here. + // + // For example, commit to the verified proofs in a merkle tree. For now, we'll just commit to + // all the (vkey, input) pairs. + let commitment = commit_proof_pairs(&vkeys, &public_values); + sp1_zkvm::io::commit_slice(&commitment); +} diff --git a/examples/aggregation/programs/fibonacci/Cargo.lock b/examples/aggregation/programs/fibonacci/Cargo.lock new file mode 100644 index 0000000000..50211a6b73 --- /dev/null +++ b/examples/aggregation/programs/fibonacci/Cargo.lock @@ -0,0 +1,764 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "tap", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "fibonacci-program" +version = "0.1.0" +dependencies = [ + "sp1-zkvm", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "num" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate 2.0.2", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro2" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "scale-info" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp1-precompiles" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/sp1.git?rev=v1.0.0-testnet#e721b246243e40376f7b75d7330e53c7351b727f" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "getrandom", + "hex", + "k256", + "num", + "rand", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1-zkvm" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/sp1.git?rev=v1.0.0-testnet#e721b246243e40376f7b75d7330e53c7351b727f" +dependencies = [ + "bincode", + "cfg-if", + "getrandom", + "k256", + "libm", + "once_cell", + "rand", + "serde", + "sha2", + "sp1-precompiles", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/examples/aggregation/programs/fibonacci/Cargo.toml b/examples/aggregation/programs/fibonacci/Cargo.toml new file mode 100644 index 0000000000..af7da6cac7 --- /dev/null +++ b/examples/aggregation/programs/fibonacci/Cargo.toml @@ -0,0 +1,8 @@ +[workspace] +[package] +version = "0.1.0" +name = "fibonacci-program" +edition = "2021" + +[dependencies] +sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git", rev = "v1.0.0-testnet" } \ No newline at end of file diff --git a/examples/aggregation/programs/fibonacci/elf/riscv32im-succinct-zkvm-elf b/examples/aggregation/programs/fibonacci/elf/riscv32im-succinct-zkvm-elf new file mode 100755 index 0000000000..dea6e45e07 Binary files /dev/null and b/examples/aggregation/programs/fibonacci/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/aggregation/programs/fibonacci/src/main.rs b/examples/aggregation/programs/fibonacci/src/main.rs new file mode 100644 index 0000000000..edad87d4c5 --- /dev/null +++ b/examples/aggregation/programs/fibonacci/src/main.rs @@ -0,0 +1,20 @@ +//! A simple fibonacci program to be proven inside the zkVM. + +#![no_main] +sp1_zkvm::entrypoint!(main); + +pub fn main() { + let n = sp1_zkvm::io::read::(); + let mut a: u128 = 0; + let mut b: u128 = 1; + let mut sum: u128; + + for _ in 1..n { + sum = a + b; + a = b; + b = sum; + } + + sp1_zkvm::io::commit(&n); + sp1_zkvm::io::commit(&b); +} diff --git a/examples/aggregation/script/Cargo.lock b/examples/aggregation/script/Cargo.lock new file mode 100644 index 0000000000..1c3f7fa511 --- /dev/null +++ b/examples/aggregation/script/Cargo.lock @@ -0,0 +1,5460 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-provider", + "alloy-rpc-client", + "alloy-serde", + "alloy-signer", + "alloy-signer-wallet", + "alloy-transport-http", + "reqwest 0.12.4", +] + +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", + "sha2", +] + +[[package]] +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-core" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1c115a94254b998be1e0318f06af03b72f54c631669cbd7801056a1bbd5701" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ab339ca7b4ea9115f0578c941abc80a171edf8e5eadd01e6c4237b68db8083" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.7", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44294729c145cf7ae65feab544b5b81fb2bb7e2fd060214842eb3989a1e9d882" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-signer", + "async-trait", + "futures-utils-wasm", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-primitives" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c715249705afa1e32be79dabfd35e2ef0f1cc02ad2cf48c9d1e20026ee637b" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-network", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-rpc-types-trace", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "lru", + "reqwest 0.12.4", + "serde_json", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types", + "alloy-serde", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-wallet" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef9a94a27345fb31e3fcb5f5e9f592bb4847493b07fa1e47dd9fde2222f2e28" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap 2.2.6", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.60", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31fe73cd259527e24dc2dbfe64bc95e5ddfcd2b2731f670a11ff72b2be2c25b" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.60", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c8d6e74e4feeaa2bcfdecfd3da247ab53c67bd654ba1907270c32e02b142331" +dependencies = [ + "winnow 0.6.7", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afaffed78bfb17526375754931e045f96018aa810844b29c7aef823266dd4b4b" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=bfd0fda#bfd0fda492e560c3463d521958793c81bbeadfc1" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.4", + "serde_json", + "tower", + "url", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.4", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.4", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.4", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "array-macro" +version = "2.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220a2c618ab466efe41d0eace94dfeff1c35e3aa47891bdb95e1c0fefffd3c99" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "axum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "rayon", +] + +[[package]] +name = "blake3-zkvm" +version = "0.1.0" +source = "git+https://github.com/sp1-patches/BLAKE3.git?branch=patch-blake3_zkvm/v.1.0.0#bac2d59f9122b07a4d91475560b4c3214ae62444" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "bls12_381" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +dependencies = [ + "ff 0.12.1", + "group 0.12.1", + "pairing", + "rand_core", + "subtle", +] + +[[package]] +name = "blst" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3130f3d8717cc02e668a896af24984d5d5d4e8bf12e278e982e0f1bd88a0f9af" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.22", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.5", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "platforms", + "rustc_version 0.4.0", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "darling" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.60", +] + +[[package]] +name = "darling_macro" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "byteorder", + "ff_derive", + "rand_core", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +dependencies = [ + "addchain", + "cfg-if", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-array" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe739944a5406424e080edccb6add95685130b9f160d5407c639c7df0c5836b0" +dependencies = [ + "serde", + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "memuse", + "rand_core", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "halo2" +version = "0.1.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a23c779b38253fe1538102da44ad5bd5378495a61d2c4ee18d64eaa61ae5995" +dependencies = [ + "halo2_proofs", +] + +[[package]] +name = "halo2_proofs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "pasta_curves 0.4.1", + "rand_core", + "rayon", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.28", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.28", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg 0.50.0", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jubjub" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" +dependencies = [ + "bitvec", + "bls12_381", + "ff 0.12.1", + "group 0.12.1", + "rand_core", + "subtle", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libz-sys" +version = "1.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memuse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +dependencies = [ + "num-bigint 0.4.4", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint 0.4.4", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p3-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", +] + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "num-bigint 0.4.4", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-blake3" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "blake3", + "p3-symmetric", +] + +[[package]] +name = "p3-bn254-fr" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "ff 0.13.0", + "num-bigint 0.4.4", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-challenger" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-commit" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-field", + "p3-matrix", + "p3-util", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "num-bigint 0.4.4", + "num-traits", + "p3-util", + "rand", + "serde", +] + +[[package]] +name = "p3-fri" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-interpolation" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-util", +] + +[[package]] +name = "p3-keccak" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-symmetric", + "tiny-keccak", +] + +[[package]] +name = "p3-keccak-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "rayon", +] + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand", +] + +[[package]] +name = "p3-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-commit", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-uni-stark" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "itertools 0.12.1", + "p3-air", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#04d4c6e15a0296798331db82e696d29c455bafe1" +dependencies = [ + "serde", +] + +[[package]] +name = "pairing" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +dependencies = [ + "group 0.12.1", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate 2.0.2", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "pasta_curves" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc65faf8e7313b4b1fbaa9f7ca917a0eed499a9663be71477f87993604341d8" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff 0.13.0", + "group 0.13.0", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "prost-types" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +dependencies = [ + "prost", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rayon-scan" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f87cc11a0140b4b0da0ffc889885760c61b13672d80a908920b2c0df078fa14" +dependencies = [ + "rayon", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "hickory-resolver", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-rustls", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "mime_guess", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.2", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.52.0", +] + +[[package]] +name = "reqwest-middleware" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +dependencies = [ + "anyhow", + "async-trait", + "http 0.2.12", + "reqwest 0.11.27", + "serde", + "task-local-extensions", + "thiserror", +] + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rrs-lib" +version = "0.1.0" +source = "git+https://github.com/GregAC/rrs.git#b23afc16b4e6a1fb5c4a73eb1e337e9400816507" +dependencies = [ + "downcast-rs", + "num_enum", + "paste", +] + +[[package]] +name = "ruint" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.4", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.22", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "scale-info" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96560eea317a9cc4e0bb1f6a2c93c09a19b8c4fc5cb3fcc0ec1c094cd783e2" +dependencies = [ + "sdd", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sdd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "serde_json" +version = "1.0.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "serial_test" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +dependencies = [ + "futures", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-aggregation-example-script" +version = "0.1.0" +dependencies = [ + "hex", + "sp1-helper", + "sp1-sdk", + "tracing", +] + +[[package]] +name = "sp1-core" +version = "0.1.0" +dependencies = [ + "anyhow", + "arrayref", + "bincode", + "blake3", + "blake3-zkvm", + "cfg-if", + "curve25519-dalek", + "elf", + "elliptic-curve", + "generic-array 1.0.0", + "hex", + "itertools 0.12.1", + "k256", + "log", + "nohash-hasher", + "num", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-blake3", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-keccak", + "p3-keccak-air", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rayon-scan", + "rrs-lib", + "serde", + "serde_with", + "serial_test", + "size", + "snowbridge-amcl", + "sp1-derive", + "sp1-primitives", + "strum", + "strum_macros", + "tempfile", + "tracing", + "tracing-forest", + "tracing-subscriber", + "typenum", + "web-time", +] + +[[package]] +name = "sp1-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-helper" +version = "0.1.0" +dependencies = [ + "cargo_metadata", + "chrono", +] + +[[package]] +name = "sp1-primitives" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + +[[package]] +name = "sp1-prover" +version = "0.1.0" +dependencies = [ + "anyhow", + "backtrace", + "bincode", + "clap", + "dirs", + "futures", + "hex", + "indicatif", + "itertools 0.12.1", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-field", + "rayon", + "reqwest 0.11.27", + "serde", + "serde_json", + "serial_test", + "sha2", + "size", + "sp1-core", + "sp1-primitives", + "sp1-recursion-circuit", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-gnark-ffi", + "sp1-recursion-program", + "subtle-encoding", + "tempfile", + "tokio", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + +[[package]] +name = "sp1-recursion-circuit" +version = "0.1.0" +dependencies = [ + "bincode", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-util", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-derive", + "sp1-recursion-program", +] + +[[package]] +name = "sp1-recursion-compiler" +version = "0.1.0" +dependencies = [ + "backtrace", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "serde_json", + "serial_test", + "sp1-core", + "sp1-recursion-core", + "sp1-recursion-derive", + "tracing", +] + +[[package]] +name = "sp1-recursion-core" +version = "0.1.0" +dependencies = [ + "arrayref", + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "serde", + "serde_with", + "sp1-core", + "sp1-derive", + "sp1-primitives", + "static_assertions", + "tracing", + "zkhash", +] + +[[package]] +name = "sp1-recursion-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-recursion-gnark-ffi" +version = "0.1.0" +dependencies = [ + "crossbeam", + "log", + "p3-field", + "rand", + "reqwest 0.11.27", + "serde", + "serde_json", + "sp1-recursion-compiler", + "subtle-encoding", + "tempfile", +] + +[[package]] +name = "sp1-recursion-program" +version = "0.1.0" +dependencies = [ + "array-macro", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "rand", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "tracing", +] + +[[package]] +name = "sp1-sdk" +version = "0.1.0" +dependencies = [ + "alloy", + "anyhow", + "async-trait", + "axum", + "bincode", + "dirs", + "dotenv", + "futures", + "hex", + "indicatif", + "log", + "p3-commit", + "p3-field", + "p3-matrix", + "prost", + "prost-types", + "reqwest 0.11.27", + "reqwest-middleware", + "serde", + "serde_json", + "sha2", + "sp1-core", + "sp1-prover", + "tempfile", + "tokio", + "tracing", + "twirp", + "vergen", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.60", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70aba06097b6eda3c15f6eebab8a6339e121475bcf08bbe6758807e716c372a1" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "task-local-extensions" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" +dependencies = [ + "pin-utils", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-forest" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee40835db14ddd1e3ba414292272eddde9dad04d3d4b65509656414d1c42592f" +dependencies = [ + "ansi_term", + "smallvec", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twirp" +version = "0.3.0" +source = "git+https://github.com/github/twirp-rs.git?rev=93d4e4b#93d4e4b4a48f9112c943d2925e8dbb1106bd6a18" +dependencies = [ + "async-trait", + "axum", + "bytes", + "futures", + "http 1.1.0", + "http-body-util", + "hyper 1.3.1", + "prost", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna 0.5.0", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cfg-if", + "git2", + "rustversion", + "time", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.60", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "zkhash" +version = "0.2.0" +source = "git+https://github.com/HorizenLabs/poseidon2#bb476b9ca38198cf5092487283c8b8c5d4317c4e" +dependencies = [ + "ark-ff 0.4.2", + "ark-std 0.4.0", + "bitvec", + "blake2", + "bls12_381", + "byteorder", + "cfg-if", + "group 0.12.1", + "group 0.13.0", + "halo2", + "hex", + "jubjub", + "lazy_static", + "pasta_curves 0.5.1", + "rand", + "serde", + "sha2", + "sha3", + "subtle", +] diff --git a/examples/aggregation/script/Cargo.toml b/examples/aggregation/script/Cargo.toml new file mode 100644 index 0000000000..edd7eddec0 --- /dev/null +++ b/examples/aggregation/script/Cargo.toml @@ -0,0 +1,13 @@ +[package] +version = "0.1.0" +name = "sp1-aggregation-example-script" +edition = "2021" +default-run = "sp1-aggregation-example-script" + +[dependencies] +hex = "0.4.3" +sp1-sdk = { path = "../../../sdk" } +tracing = "0.1.40" + +[build-dependencies] +sp1-helper = { path = "../../../helper" } \ No newline at end of file diff --git a/examples/aggregation/script/build.rs b/examples/aggregation/script/build.rs new file mode 100644 index 0000000000..4717ffebf9 --- /dev/null +++ b/examples/aggregation/script/build.rs @@ -0,0 +1,10 @@ +fn main() { + sp1_helper::build_program(&format!( + "{}/../programs/aggregation", + env!("CARGO_MANIFEST_DIR") + )); + sp1_helper::build_program(&format!( + "{}/../programs/fibonacci", + env!("CARGO_MANIFEST_DIR") + )); +} diff --git a/examples/aggregation/script/rust-toolchain b/examples/aggregation/script/rust-toolchain new file mode 100644 index 0000000000..3a306210c9 --- /dev/null +++ b/examples/aggregation/script/rust-toolchain @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2024-04-17" +components = ["llvm-tools", "rustc-dev"] \ No newline at end of file diff --git a/examples/aggregation/script/src/main.rs b/examples/aggregation/script/src/main.rs new file mode 100644 index 0000000000..7f48d90ed1 --- /dev/null +++ b/examples/aggregation/script/src/main.rs @@ -0,0 +1,101 @@ +//! A simple example showing how to aggregate proofs of multiple programs with SP1. + +use sp1_sdk::{HashableKey, ProverClient, SP1CompressedProof, SP1Stdin, SP1VerifyingKey}; + +/// A program that aggregates the proofs of the simple program. +const AGGREGATION_ELF: &[u8] = + include_bytes!("../../programs/aggregation/elf/riscv32im-succinct-zkvm-elf"); + +/// A program that just runs a simple computation. +const FIBONACCI_ELF: &[u8] = + include_bytes!("../../programs/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + +/// An input to the aggregation program. +/// +/// Consists of a proof and a verification key. +struct AggregationInput { + pub proof: SP1CompressedProof, + pub vk: SP1VerifyingKey, +} + +fn main() { + // Setup the logger. + sp1_sdk::utils::setup_logger(); + + // Initialize the proving client. + let client = ProverClient::new(); + + // Setup the proving and verifying keys. + let (aggregation_pk, _) = client.setup(AGGREGATION_ELF); + let (fibonacci_pk, fibonacci_vk) = client.setup(FIBONACCI_ELF); + + // Generate the fibonacci proofs. + let proof_1 = tracing::info_span!("generate fibonacci proof n=10").in_scope(|| { + let mut stdin = SP1Stdin::new(); + stdin.write(&10); + client + .prove_compressed(&fibonacci_pk, stdin) + .expect("proving failed") + }); + let proof_2 = tracing::info_span!("generate fibonacci proof n=20").in_scope(|| { + let mut stdin = SP1Stdin::new(); + stdin.write(&20); + client + .prove_compressed(&fibonacci_pk, stdin) + .expect("proving failed") + }); + let proof_3 = tracing::info_span!("generate fibonacci proof n=30").in_scope(|| { + let mut stdin = SP1Stdin::new(); + stdin.write(&30); + client + .prove_compressed(&fibonacci_pk, stdin) + .expect("proving failed") + }); + + // Setup the inputs to the aggregation program. + let input_1 = AggregationInput { + proof: proof_1, + vk: fibonacci_vk.clone(), + }; + let input_2 = AggregationInput { + proof: proof_2, + vk: fibonacci_vk.clone(), + }; + let input_3 = AggregationInput { + proof: proof_3, + vk: fibonacci_vk.clone(), + }; + let inputs = vec![input_1, input_2, input_3]; + + // Aggregate the proofs. + tracing::info_span!("aggregate the proofs").in_scope(|| { + let mut stdin = SP1Stdin::new(); + + // Write the verification keys. + let vkeys = inputs + .iter() + .map(|input| input.vk.hash_u32()) + .collect::>(); + stdin.write::>(&vkeys); + + // Write the public values. + let public_values = inputs + .iter() + .map(|input| input.proof.public_values.to_vec()) + .collect::>(); + stdin.write::>>(&public_values); + + // Write the proofs. + // + // Note: this data will not actually be read by the aggregation program, instead it will be + // witnessed by the prover during the recursive aggregation process inside SP1 itself. + for input in inputs { + stdin.write_proof(input.proof.proof, input.vk.vk); + } + + // Generate the groth16 proof. + client + .prove_groth16(&aggregation_pk, stdin) + .expect("proving failed"); + }); +} diff --git a/examples/chess/program/Cargo.lock b/examples/chess/program/Cargo.lock index d9e7b4f607..56d9149d8c 100644 --- a/examples/chess/program/Cargo.lock +++ b/examples/chess/program/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -298,9 +298,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -382,9 +382,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -415,9 +415,9 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -429,20 +429,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -458,9 +457,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -469,11 +468,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -481,9 +479,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -719,18 +717,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/chess/program/elf/riscv32im-succinct-zkvm-elf b/examples/chess/program/elf/riscv32im-succinct-zkvm-elf index 1a6eeeda16..9484a6e6ef 100755 Binary files a/examples/chess/program/elf/riscv32im-succinct-zkvm-elf and b/examples/chess/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/chess/script/Cargo.lock b/examples/chess/script/Cargo.lock index b4af71b104..77b4ebb333 100644 --- a/examples/chess/script/Cargo.lock +++ b/examples/chess/script/Cargo.lock @@ -726,7 +726,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "hyper-util", "itoa", "matchit", @@ -1007,6 +1007,10 @@ name = "cc" version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" +dependencies = [ + "jobserver", + "libc", +] [[package]] name = "cfg-if" @@ -1150,6 +1154,19 @@ dependencies = [ "libc", ] +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.12" @@ -1178,6 +1195,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1358,6 +1384,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dotenv" version = "0.15.0" @@ -1714,6 +1761,19 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "url", +] + [[package]] name = "glob" version = "0.3.1" @@ -2012,9 +2072,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", @@ -2066,7 +2126,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "hyper-util", "native-tls", "tokio", @@ -2085,7 +2145,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.2.0", + "hyper 1.3.1", "pin-project-lite", "socket2", "tokio", @@ -2249,6 +2309,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.69" @@ -2320,12 +2389,46 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + [[package]] name = "libm" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libz-sys" +version = "1.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2599,6 +2702,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -2664,6 +2776,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "overload" version = "0.1.1" @@ -3313,6 +3431,17 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + [[package]] name = "regex" version = "1.10.4" @@ -3394,10 +3523,12 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots", "winreg 0.50.0", @@ -3416,7 +3547,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -3680,6 +3811,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "scc" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" version = "0.1.23" @@ -3705,6 +3845,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sdd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" + [[package]] name = "sec1" version = "0.7.3" @@ -3854,23 +4000,23 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" dependencies = [ - "dashmap", "futures", - "lazy_static", "log", + "once_cell", "parking_lot", + "scc", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", @@ -4019,6 +4165,7 @@ dependencies = [ "rrs-lib", "serde", "serde_with", + "serial_test", "size", "snowbridge-amcl", "sp1-derive", @@ -4070,7 +4217,10 @@ dependencies = [ "backtrace", "bincode", "clap", + "dirs", + "futures", "hex", + "indicatif", "itertools 0.12.1", "p3-baby-bear", "p3-bn254-fr", @@ -4078,8 +4228,10 @@ dependencies = [ "p3-commit", "p3-field", "rayon", + "reqwest 0.11.27", "serde", "serde_json", + "serial_test", "sha2", "size", "sp1-core", @@ -4089,6 +4241,9 @@ dependencies = [ "sp1-recursion-core", "sp1-recursion-gnark-ffi", "sp1-recursion-program", + "subtle-encoding", + "tempfile", + "tokio", "tracing", "tracing-appender", "tracing-subscriber", @@ -4186,10 +4341,15 @@ dependencies = [ name = "sp1-recursion-gnark-ffi" version = "0.1.0" dependencies = [ + "crossbeam", + "log", "p3-field", + "rand", + "reqwest 0.11.27", "serde", "serde_json", "sp1-recursion-compiler", + "subtle-encoding", "tempfile", ] @@ -4228,6 +4388,7 @@ dependencies = [ "async-trait", "axum", "bincode", + "dirs", "dotenv", "futures", "hex", @@ -4245,9 +4406,11 @@ dependencies = [ "sha2", "sp1-core", "sp1-prover", + "tempfile", "tokio", "tracing", "twirp", + "vergen", ] [[package]] @@ -4315,6 +4478,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + [[package]] name = "syn" version = "1.0.109" @@ -4450,7 +4622,9 @@ checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde", "time-core", @@ -4725,7 +4899,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twirp" version = "0.3.0" -source = "git+https://github.com/github/twirp-rs.git#90244e417d27bf9233e96de37bbab8121e983020" +source = "git+https://github.com/github/twirp-rs.git?rev=93d4e4b#93d4e4b4a48f9112c943d2925e8dbb1106bd6a18" dependencies = [ "async-trait", "axum", @@ -4733,7 +4907,7 @@ dependencies = [ "futures", "http 1.1.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "prost", "reqwest 0.11.27", "serde", @@ -4845,6 +5019,19 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cfg-if", + "git2", + "rustversion", + "time", +] + [[package]] name = "version_check" version = "0.9.4" @@ -4941,6 +5128,19 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.69" diff --git a/examples/chess/script/Cargo.toml b/examples/chess/script/Cargo.toml index 81e499e730..55b05bcdcd 100644 --- a/examples/chess/script/Cargo.toml +++ b/examples/chess/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "chess-script" diff --git a/examples/chess/script/build.rs b/examples/chess/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/chess/script/build.rs +++ b/examples/chess/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/cycle-tracking/program/Cargo.lock b/examples/cycle-tracking/program/Cargo.lock index d8a0d8812f..b820d2bb26 100644 --- a/examples/cycle-tracking/program/Cargo.lock +++ b/examples/cycle-tracking/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -318,9 +318,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -332,20 +332,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -361,9 +360,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -372,11 +371,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -384,9 +382,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -561,18 +559,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/cycle-tracking/program/elf/riscv32im-succinct-zkvm-elf b/examples/cycle-tracking/program/elf/riscv32im-succinct-zkvm-elf index 9e132423e8..0b1f4f4972 100755 Binary files a/examples/cycle-tracking/program/elf/riscv32im-succinct-zkvm-elf and b/examples/cycle-tracking/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/cycle-tracking/script/Cargo.toml b/examples/cycle-tracking/script/Cargo.toml index 750884df2c..2aac9c1e6b 100644 --- a/examples/cycle-tracking/script/Cargo.toml +++ b/examples/cycle-tracking/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "cycle-tracking-script" diff --git a/examples/fibonacci/program/Cargo.lock b/examples/fibonacci/program/Cargo.lock index 235eb054a7..8d19871d4e 100644 --- a/examples/fibonacci/program/Cargo.lock +++ b/examples/fibonacci/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -221,9 +221,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -299,9 +299,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -317,9 +317,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -331,20 +331,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -360,9 +359,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -371,11 +370,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -383,9 +381,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -560,18 +558,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf b/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf index afa038f102..10b446cae3 100755 Binary files a/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf and b/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/fibonacci/script/Cargo.toml b/examples/fibonacci/script/Cargo.toml index 9155e117e6..1bfdda1fe4 100644 --- a/examples/fibonacci/script/Cargo.toml +++ b/examples/fibonacci/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "fibonacci-script" diff --git a/examples/fibonacci/script/bin/execute.rs b/examples/fibonacci/script/bin/execute.rs index 7c8fe451ce..e01d5667e6 100644 --- a/examples/fibonacci/script/bin/execute.rs +++ b/examples/fibonacci/script/bin/execute.rs @@ -14,7 +14,8 @@ fn main() { stdin.write(&n); // Only execute the program and get a `SP1PublicValues` object. - let mut public_values = ProverClient::execute(&ELF, stdin).unwrap(); + let client = ProverClient::new(); + let mut public_values = client.execute(&ELF, stdin).unwrap(); println!("generated proof"); diff --git a/examples/fibonacci/script/build.rs b/examples/fibonacci/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/fibonacci/script/build.rs +++ b/examples/fibonacci/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/io/program/Cargo.lock b/examples/io/program/Cargo.lock index 75baac3e8b..60d41a3561 100644 --- a/examples/io/program/Cargo.lock +++ b/examples/io/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -214,9 +214,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -318,9 +318,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -332,20 +332,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -361,9 +360,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -372,11 +371,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -384,9 +382,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -561,18 +559,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/io/program/elf/riscv32im-succinct-zkvm-elf b/examples/io/program/elf/riscv32im-succinct-zkvm-elf index a4c7e4b5aa..39ebb042cf 100755 Binary files a/examples/io/program/elf/riscv32im-succinct-zkvm-elf and b/examples/io/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/io/script/Cargo.toml b/examples/io/script/Cargo.toml index 241e3da49f..18f02b7af8 100644 --- a/examples/io/script/Cargo.toml +++ b/examples/io/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "io-script" diff --git a/examples/io/script/build.rs b/examples/io/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/io/script/build.rs +++ b/examples/io/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/io/script/src/main.rs b/examples/io/script/src/main.rs index 445b8f47ba..58389008f7 100644 --- a/examples/io/script/src/main.rs +++ b/examples/io/script/src/main.rs @@ -13,7 +13,7 @@ struct MyPointUnaligned { fn main() { // Setup a tracer for logging. - utils::setup_tracer(); + utils::setup_logger(); // Create an input stream. let mut stdin = SP1Stdin::new(); diff --git a/examples/is-prime/script/Cargo.toml b/examples/is-prime/script/Cargo.toml index 645722a150..b47b84cbb0 100644 --- a/examples/is-prime/script/Cargo.toml +++ b/examples/is-prime/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "is-prime-script" diff --git a/examples/is-prime/script/src/main.rs b/examples/is-prime/script/src/main.rs index 85ed0bc81b..6e63191450 100644 --- a/examples/is-prime/script/src/main.rs +++ b/examples/is-prime/script/src/main.rs @@ -5,7 +5,7 @@ const ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct-zkvm-elf fn main() { // Setup a tracer for logging. - utils::setup_tracer(); + utils::setup_logger(); let mut stdin = SP1Stdin::new(); diff --git a/examples/json/lib/Cargo.toml b/examples/json/lib/Cargo.toml index f08814b055..d85ca839f7 100644 --- a/examples/json/lib/Cargo.toml +++ b/examples/json/lib/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] name = "lib" version = "0.1.0" diff --git a/examples/json/program/Cargo.lock b/examples/json/program/Cargo.lock index 915372f777..ba66915b39 100644 --- a/examples/json/program/Cargo.lock +++ b/examples/json/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -214,9 +214,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -315,9 +315,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -333,9 +333,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -347,20 +347,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -376,9 +375,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -387,11 +386,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -399,9 +397,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -582,18 +580,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/json/program/elf/riscv32im-succinct-zkvm-elf b/examples/json/program/elf/riscv32im-succinct-zkvm-elf index c63265db17..218af530ad 100755 Binary files a/examples/json/program/elf/riscv32im-succinct-zkvm-elf and b/examples/json/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/json/script/Cargo.toml b/examples/json/script/Cargo.toml index 143e95fc4d..9679f5dedb 100644 --- a/examples/json/script/Cargo.toml +++ b/examples/json/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "json-script" diff --git a/examples/json/script/build.rs b/examples/json/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/json/script/build.rs +++ b/examples/json/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/json/script/src/main.rs b/examples/json/script/src/main.rs index a293c96e6b..ef0abdd71c 100644 --- a/examples/json/script/src/main.rs +++ b/examples/json/script/src/main.rs @@ -7,7 +7,7 @@ const JSON_ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct-zkv fn main() { // setup tracer for logging. - utils::setup_tracer(); + utils::setup_logger(); // Generate proof. let mut stdin = SP1Stdin::new(); diff --git a/examples/regex/program/Cargo.lock b/examples/regex/program/Cargo.lock index 062d59f301..ad1e86bd22 100644 --- a/examples/regex/program/Cargo.lock +++ b/examples/regex/program/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -223,9 +223,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -301,9 +301,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -319,9 +319,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -333,20 +333,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -362,9 +361,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -373,11 +372,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -385,9 +383,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -599,18 +597,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/regex/program/elf/riscv32im-succinct-zkvm-elf b/examples/regex/program/elf/riscv32im-succinct-zkvm-elf index d43b638ce4..6fb4469f38 100755 Binary files a/examples/regex/program/elf/riscv32im-succinct-zkvm-elf and b/examples/regex/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/regex/script/Cargo.toml b/examples/regex/script/Cargo.toml index 138e9bee39..f5c6aec68a 100644 --- a/examples/regex/script/Cargo.toml +++ b/examples/regex/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "regex-script" diff --git a/examples/regex/script/src/main.rs b/examples/regex/script/src/main.rs index 2717941e4c..846233db25 100644 --- a/examples/regex/script/src/main.rs +++ b/examples/regex/script/src/main.rs @@ -5,7 +5,7 @@ const REGEX_IO_ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct fn main() { // Setup a tracer for logging. - utils::setup_tracer(); + utils::setup_logger(); // Create a new stdin with d the input for the program. let mut stdin = SP1Stdin::new(); diff --git a/examples/rsa/program/Cargo.lock b/examples/rsa/program/Cargo.lock index dc1e61d0a5..7b149150da 100644 --- a/examples/rsa/program/Cargo.lock +++ b/examples/rsa/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -265,9 +265,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -352,9 +352,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -370,9 +370,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -384,11 +384,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -412,9 +411,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -430,9 +429,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -441,11 +440,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -453,9 +451,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -699,18 +697,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/rsa/program/elf/riscv32im-succinct-zkvm-elf b/examples/rsa/program/elf/riscv32im-succinct-zkvm-elf index a1e00840b9..4edef68abd 100755 Binary files a/examples/rsa/program/elf/riscv32im-succinct-zkvm-elf and b/examples/rsa/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/rsa/script/Cargo.toml b/examples/rsa/script/Cargo.toml index 2876fca24a..962749eaca 100644 --- a/examples/rsa/script/Cargo.toml +++ b/examples/rsa/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "rsa-script" diff --git a/examples/rsa/script/build.rs b/examples/rsa/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/rsa/script/build.rs +++ b/examples/rsa/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/rsa/script/src/main.rs b/examples/rsa/script/src/main.rs index f0a93442be..f6c1c31737 100644 --- a/examples/rsa/script/src/main.rs +++ b/examples/rsa/script/src/main.rs @@ -13,7 +13,7 @@ const RSA_2048_PUB_DER: &[u8] = include_bytes!("rsa2048-pub.der"); fn main() { // Setup a tracer for logging. - utils::setup_tracer(); + utils::setup_logger(); // Create a new stdin with the input for the program. let mut stdin = SP1Stdin::new(); diff --git a/examples/ssz-withdrawals/program/Cargo.lock b/examples/ssz-withdrawals/program/Cargo.lock index 30910a06e7..874f71e34b 100644 --- a/examples/ssz-withdrawals/program/Cargo.lock +++ b/examples/ssz-withdrawals/program/Cargo.lock @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "ark-ff" @@ -618,9 +618,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -798,9 +798,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -828,9 +828,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -842,20 +842,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -877,9 +876,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -888,11 +887,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -900,9 +898,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -1280,18 +1278,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/ssz-withdrawals/program/elf/riscv32im-succinct-zkvm-elf b/examples/ssz-withdrawals/program/elf/riscv32im-succinct-zkvm-elf index 735da428bf..a5cf532f94 100755 Binary files a/examples/ssz-withdrawals/program/elf/riscv32im-succinct-zkvm-elf and b/examples/ssz-withdrawals/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/ssz-withdrawals/script/Cargo.toml b/examples/ssz-withdrawals/script/Cargo.toml index 0c1e0889c6..899e711e7e 100644 --- a/examples/ssz-withdrawals/script/Cargo.toml +++ b/examples/ssz-withdrawals/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "ssz-withdrawals-script" diff --git a/examples/ssz-withdrawals/script/build.rs b/examples/ssz-withdrawals/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/ssz-withdrawals/script/build.rs +++ b/examples/ssz-withdrawals/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/examples/tendermint/program/Cargo.lock b/examples/tendermint/program/Cargo.lock index 073b8b6eff..780d188934 100644 --- a/examples/tendermint/program/Cargo.lock +++ b/examples/tendermint/program/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "arrayvec" @@ -366,9 +366,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -465,9 +465,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libm" @@ -483,9 +483,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -497,20 +497,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -543,9 +542,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -554,11 +553,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -566,9 +564,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -811,9 +809,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] @@ -839,9 +837,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/examples/tendermint/program/elf/riscv32im-succinct-zkvm-elf b/examples/tendermint/program/elf/riscv32im-succinct-zkvm-elf index fa06b8f184..5416e38524 100755 Binary files a/examples/tendermint/program/elf/riscv32im-succinct-zkvm-elf and b/examples/tendermint/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/tendermint/script/Cargo.toml b/examples/tendermint/script/Cargo.toml index a350183928..4c494a9562 100644 --- a/examples/tendermint/script/Cargo.toml +++ b/examples/tendermint/script/Cargo.toml @@ -1,4 +1,3 @@ -[workspace] [package] version = "0.1.0" name = "tendermint-script" diff --git a/examples/tendermint/script/build.rs b/examples/tendermint/script/build.rs index 32b99273cd..03388acab7 100644 --- a/examples/tendermint/script/build.rs +++ b/examples/tendermint/script/build.rs @@ -1,5 +1,3 @@ -use sp1_helper::build_program; - fn main() { - build_program("../program") + sp1_helper::build_program(&format!("{}/../program", env!("CARGO_MANIFEST_DIR"))); } diff --git a/helper/Cargo.toml b/helper/Cargo.toml index c76b03ea72..169cf9bf1b 100644 --- a/helper/Cargo.toml +++ b/helper/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] cargo_metadata = "0.18.1" -chrono = { version = "0.4.34", default-features = false, features = ["clock"] } +chrono = { version = "0.4.38", default-features = false, features = ["clock"] } diff --git a/helper/src/lib.rs b/helper/src/lib.rs index 9533bd10dd..bfc33a5ace 100644 --- a/helper/src/lib.rs +++ b/helper/src/lib.rs @@ -11,6 +11,7 @@ fn current_datetime() -> String { } pub fn build_program(path: &str) { + println!("path: {:?}", path); let program_dir = std::path::Path::new(path); // Tell cargo to rerun the script only if program/{src, Cargo.toml, Cargo.lock} changes @@ -64,7 +65,6 @@ fn execute_build_cmd( let mut cmd = Command::new("cargo"); cmd.current_dir(program_dir) .args(["prove", "build"]) - .env("CARGO_MANIFEST_DIR", program_dir.as_ref()) .env_remove("RUSTC") .stdout(Stdio::piped()) .stderr(Stdio::piped()); diff --git a/prover/Cargo.toml b/prover/Cargo.toml index bf5d802f34..4b3d0885fe 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -26,16 +26,16 @@ itertools = "0.12.1" tracing = "0.1.40" tracing-subscriber = "0.3.18" tracing-appender = "0.2.3" -serde_json = "1.0.116" -clap = { version = "4.4.15", features = ["derive", "env"] } +serde_json = "1.0.117" +clap = { version = "4.5.4", features = ["derive", "env"] } sha2 = "0.10.8" hex = "0.4.3" -anyhow = "1.0.82" +anyhow = "1.0.83" size = "0.4.1" dirs = "5.0.1" tempfile = "3.10.1" -tokio = { version = "1.36.0", features = ["full"] } -reqwest = { version = "0.11.25", features = ["rustls-tls", "trust-dns", "stream"] } +tokio = { version = "1.37.0", features = ["full"] } +reqwest = { version = "0.12.4", features = ["rustls-tls", "trust-dns", "stream"] } indicatif = "0.17.8" futures = "0.3.30" subtle-encoding = "0.5.1" diff --git a/prover/scripts/e2e.rs b/prover/scripts/e2e.rs new file mode 100644 index 0000000000..911bf4f113 --- /dev/null +++ b/prover/scripts/e2e.rs @@ -0,0 +1,107 @@ +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +use std::borrow::Borrow; + +use clap::Parser; +use p3_baby_bear::BabyBear; +use sp1_core::io::SP1Stdin; +use sp1_prover::utils::{babybear_bytes_to_bn254, babybears_to_bn254, words_to_bytes}; +use sp1_prover::SP1Prover; +use sp1_recursion_circuit::stark::build_wrap_circuit; +use sp1_recursion_circuit::witness::Witnessable; +use sp1_recursion_compiler::ir::Witness; +use sp1_recursion_core::air::RecursionPublicValues; +use sp1_recursion_gnark_ffi::{convert, verify, Groth16Prover}; +use subtle_encoding::hex; + +#[derive(Parser, Debug)] +#[clap(author, version, about, long_about = None)] +struct Args { + #[clap(short, long)] + build_dir: String, +} + +pub fn main() { + sp1_core::utils::setup_logger(); + std::env::set_var("RECONSTRUCT_COMMITMENTS", "false"); + + let args = Args::parse(); + + let elf = include_bytes!("../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + + tracing::info!("initializing prover"); + let prover = SP1Prover::new(); + + tracing::info!("setup elf"); + let (pk, vk) = prover.setup(elf); + + tracing::info!("prove core"); + let stdin = SP1Stdin::new(); + let core_proof = prover.prove_core(&pk, &stdin); + + tracing::info!("Compress"); + let reduced_proof = prover.compress(&vk, core_proof, vec![]); + + tracing::info!("Shrink"); + let compressed_proof = prover.shrink(reduced_proof); + + tracing::info!("wrap"); + let wrapped_proof = prover.wrap_bn254(compressed_proof); + + tracing::info!("building verifier constraints"); + let constraints = tracing::info_span!("wrap circuit") + .in_scope(|| build_wrap_circuit(&prover.wrap_vk, wrapped_proof.clone())); + + tracing::info!("building template witness"); + let pv: &RecursionPublicValues<_> = wrapped_proof.public_values.as_slice().borrow(); + let vkey_hash = babybears_to_bn254(&pv.sp1_vk_digest); + let committed_values_digest_bytes: [BabyBear; 32] = words_to_bytes(&pv.committed_value_digest) + .try_into() + .unwrap(); + let committed_values_digest = babybear_bytes_to_bn254(&committed_values_digest_bytes); + + let mut witness = Witness::default(); + wrapped_proof.write(&mut witness); + witness.write_commited_values_digest(committed_values_digest); + witness.write_vkey_hash(vkey_hash); + + tracing::info!("sanity check gnark test"); + Groth16Prover::test(constraints.clone(), witness.clone()); + + tracing::info!("sanity check gnark build"); + Groth16Prover::build( + constraints.clone(), + witness.clone(), + args.build_dir.clone().into(), + ); + + tracing::info!("sanity check gnark prove"); + let groth16_prover = Groth16Prover::new(args.build_dir.clone().into()); + + tracing::info!("gnark prove"); + let proof = groth16_prover.prove(witness.clone()); + + tracing::info!("verify gnark proof"); + let verified = verify(proof.clone(), &args.build_dir.clone().into()); + assert!(verified); + + tracing::info!("convert gnark proof"); + let solidity_proof = convert(proof.clone(), &args.build_dir.clone().into()); + + // tracing::info!("sanity check plonk bn254 build"); + // PlonkBn254Prover::build( + // constraints.clone(), + // witness.clone(), + // args.build_dir.clone().into(), + // ); + + // tracing::info!("sanity check plonk bn254 prove"); + // let proof = PlonkBn254Prover::prove(witness.clone(), args.build_dir.clone().into()); + + println!( + "{:?}", + String::from_utf8(hex::encode(proof.encoded_proof)).unwrap() + ); + println!("solidity proof: {:?}", solidity_proof); +} diff --git a/prover/src/build.rs b/prover/src/build.rs index df6c842506..0c3325e43c 100644 --- a/prover/src/build.rs +++ b/prover/src/build.rs @@ -1,3 +1,4 @@ +use std::borrow::Borrow; use std::path::PathBuf; use p3_baby_bear::BabyBear; @@ -44,7 +45,7 @@ pub fn build_constraints_and_witness( let constraints = tracing::info_span!("wrap circuit") .in_scope(|| build_wrap_circuit(template_vk, template_proof.clone())); - let pv = RecursionPublicValues::from_vec(template_proof.public_values.clone()); + let pv: &RecursionPublicValues = template_proof.public_values.as_slice().borrow(); let vkey_hash = babybears_to_bn254(&pv.sp1_vk_digest); let committed_values_digest_bytes: [BabyBear; 32] = words_to_bytes(&pv.committed_value_digest) .try_into() @@ -80,10 +81,10 @@ pub fn dummy_proof() -> (StarkVerifyingKey, ShardProof) { let compressed_proof = prover.compress(&vk, core_proof, vec![]); tracing::info!("shrink"); - let shrink_proof = prover.shrink(&vk, compressed_proof); + let shrink_proof = prover.shrink(compressed_proof); tracing::info!("wrap"); - let wrapped_proof = prover.wrap_bn254(&vk, shrink_proof); + let wrapped_proof = prover.wrap_bn254(shrink_proof); (prover.wrap_vk, wrapped_proof.proof) } diff --git a/prover/src/install.rs b/prover/src/install.rs index f37458ffc3..642c3f1848 100644 --- a/prover/src/install.rs +++ b/prover/src/install.rs @@ -8,7 +8,7 @@ use reqwest::Client; pub const GROTH16_ARTIFACTS_URL_BASE: &str = "https://sp1-circuits.s3-us-east-2.amazonaws.com"; /// The current version of the groth16 artifacts. -pub const GROTH16_ARTIFACTS_COMMIT: &str = "49fedbe4"; +pub const GROTH16_ARTIFACTS_COMMIT: &str = "1eee43b6"; /// Install the latest groth16 artifacts. /// diff --git a/prover/src/lib.rs b/prover/src/lib.rs index 44ad4b7602..5281728cb9 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -3,7 +3,7 @@ //! Seperates the proof generation process into multiple stages: //! //! 1. Generate shard proofs which split up and prove the valid execution of a RISC-V program. -//! 2. Reduce shard proofs into a single shard proof. +//! 2. Compress shard proofs into a single shard proof. //! 3. Wrap the shard proof into a SNARK-friendly field. //! 4. Wrap the last shard proof, proven over the SNARK-friendly field, into a Groth16/PLONK proof. @@ -18,57 +18,54 @@ mod types; pub mod utils; mod verify; +use std::borrow::Borrow; + +use crate::utils::RECONSTRUCT_COMMITMENTS_ENV_VAR; use p3_baby_bear::BabyBear; use p3_challenger::CanObserve; use p3_field::AbstractField; -use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator}; -use serde::de::DeserializeOwned; -use serde::Serialize; -use size::Size; +use rayon::iter::{IntoParallelIterator, ParallelIterator}; +use rayon::prelude::*; +use sp1_core::air::PublicValues; pub use sp1_core::io::{SP1PublicValues, SP1Stdin}; use sp1_core::runtime::Runtime; -use sp1_core::stark::{ - Challenge, Com, Domain, PcsProverData, Prover, ShardMainData, StarkProvingKey, -}; +use sp1_core::stark::MachineVerificationError; +use sp1_core::stark::{Challenge, StarkProvingKey}; +use sp1_core::utils::DIGEST_SIZE; use sp1_core::{ runtime::Program, stark::{ - Challenger, LocalProver, RiscvAir, ShardProof, StarkGenericConfig, StarkMachine, - StarkVerifyingKey, Val, + LocalProver, RiscvAir, ShardProof, StarkGenericConfig, StarkMachine, StarkVerifyingKey, Val, }, utils::{run_and_prove, BabyBearPoseidon2}, }; use sp1_primitives::hash_deferred_proof; use sp1_recursion_circuit::witness::Witnessable; +use sp1_recursion_compiler::config::InnerConfig; use sp1_recursion_compiler::config::OuterConfig; use sp1_recursion_compiler::ir::Witness; use sp1_recursion_core::runtime::RecursionProgram; -use sp1_recursion_core::stark::RecursionAirSkinnyDeg7; +use sp1_recursion_core::stark::RecursionAir; use sp1_recursion_core::{ - air::RecursionPublicValues, - runtime::Runtime as RecursionRuntime, - stark::{config::BabyBearPoseidon2Outer, RecursionAirWideDeg3}, + air::RecursionPublicValues, runtime::Runtime as RecursionRuntime, + stark::config::BabyBearPoseidon2Outer, }; pub use sp1_recursion_gnark_ffi::plonk_bn254::PlonkBn254Proof; use sp1_recursion_gnark_ffi::plonk_bn254::PlonkBn254Prover; pub use sp1_recursion_gnark_ffi::Groth16Proof; use sp1_recursion_gnark_ffi::Groth16Prover; use sp1_recursion_program::hints::Hintable; -use sp1_recursion_program::reduce::ReduceProgram; -use sp1_recursion_program::types::QuotientDataValues; +use sp1_recursion_program::machine::{ + ReduceProgramType, SP1CompressVerifier, SP1DeferredMemoryLayout, SP1DeferredVerifier, + SP1RecursionMemoryLayout, SP1RecursiveVerifier, SP1ReduceMemoryLayout, SP1RootMemoryLayout, + SP1RootVerifier, +}; use std::env; use std::path::PathBuf; -use std::time::Instant; use tracing::instrument; pub use types::*; use utils::words_to_bytes; -use crate::types::ReduceState; -use crate::utils::get_chip_quotient_data; -use crate::utils::get_preprocessed_data; -use crate::utils::get_sorted_indices; -use crate::utils::RECONSTRUCT_COMMITMENTS_ENV_VAR; - /// The configuration for the core prover. pub type CoreSC = BabyBearPoseidon2; @@ -78,13 +75,36 @@ pub type InnerSC = BabyBearPoseidon2; /// The configuration for the outer prover. pub type OuterSC = BabyBearPoseidon2Outer; +const REDUCE_DEGREE: usize = 3; +const COMPRESS_DEGREE: usize = 9; +const WRAP_DEGREE: usize = 5; + +pub type ReduceAir = RecursionAir; +pub type CompressAir = RecursionAir; +pub type WrapAir = RecursionAir; + /// A end-to-end prover implementation for SP1. pub struct SP1Prover { /// The program that can recursively verify a set of proofs into a single proof. pub recursion_program: RecursionProgram, - /// The program that sets up memory for the recursion program. - pub recursion_setup_program: RecursionProgram, + /// The proving key for the recursion step. + pub rec_pk: StarkProvingKey, + + /// The verification key for the recursion step. + pub rec_vk: StarkVerifyingKey, + + /// The program that recursively verifies deferred proofs and accumulates the digests. + pub deferred_program: RecursionProgram, + + /// The proving key for the reduce step. + pub deferred_pk: StarkProvingKey, + + /// The verification key for the reduce step. + pub deferred_vk: StarkVerifyingKey, + + /// The program that reduces a set of recursive proofs into a single proof. + pub compress_program: RecursionProgram, /// The proving key for the reduce step. pub compress_pk: StarkProvingKey, @@ -92,12 +112,18 @@ pub struct SP1Prover { /// The verification key for the reduce step. pub compress_vk: StarkVerifyingKey, - /// The proving key for the shrink step. + /// The shrink program that compresses a proof into a succinct proof. + pub shrink_program: RecursionProgram, + + /// The proving key for the compress step. pub shrink_pk: StarkProvingKey, - /// The verification key for the shrink step. + /// The verification key for the compress step. pub shrink_vk: StarkVerifyingKey, + /// The wrap program that wraps a proof into a SNARK-friendly field. + pub wrap_program: RecursionProgram, + /// The proving key for the wrap step. pub wrap_pk: StarkProvingKey, @@ -107,42 +133,65 @@ pub struct SP1Prover { /// The machine used for proving the core step. pub core_machine: StarkMachine::Val>>, - /// The machine used for proving the reduce step. - pub compress_machine: - StarkMachine::Val>>, + /// The machine used for proving the recursive and reduction steps. + pub compress_machine: StarkMachine::Val>>, - /// The machine used for proving the compress step. - pub shrink_machine: - StarkMachine::Val>>, + /// The machine used for proving the shrink step. + pub shrink_machine: StarkMachine::Val>>, /// The machine used for proving the wrapping step. - pub wrap_machine: - StarkMachine::Val>>, + pub wrap_machine: StarkMachine::Val>>, } impl SP1Prover { /// Initializes a new [SP1Prover]. #[instrument(name = "initialize prover", level = "info", skip_all)] pub fn new() -> Self { - let recursion_setup_program = ReduceProgram::setup(); - let recursion_program = ReduceProgram::build(); - let (compress_pk, compress_vk) = - RecursionAirWideDeg3::machine(InnerSC::default()).setup(&recursion_program); - let (shrink_pk, shrink_vk) = - RecursionAirSkinnyDeg7::machine(InnerSC::compressed()).setup(&recursion_program); - let (wrap_pk, wrap_vk) = - RecursionAirSkinnyDeg7::machine(OuterSC::default()).setup(&recursion_program); let core_machine = RiscvAir::machine(CoreSC::default()); - let compress_machine = RecursionAirWideDeg3::machine(InnerSC::default()); - let shrink_machine = RecursionAirSkinnyDeg7::machine(InnerSC::compressed()); - let wrap_machine = RecursionAirSkinnyDeg7::wrap_machine(OuterSC::default()); + + // Get the recursive verifier and setup the proving and verifying keys. + let recursion_program = SP1RecursiveVerifier::::build(&core_machine); + let compress_machine = ReduceAir::machine(InnerSC::default()); + let (rec_pk, rec_vk) = compress_machine.setup(&recursion_program); + + // Get the deferred program and keys. + let deferred_program = SP1DeferredVerifier::::build(&compress_machine); + let (deferred_pk, deferred_vk) = compress_machine.setup(&deferred_program); + + // Make the reduce program and keys. + let compress_program = SP1CompressVerifier::::build( + &compress_machine, + &rec_vk, + &deferred_vk, + ); + let (compress_pk, compress_vk) = compress_machine.setup(&compress_program); + + // Get the compress program, machine, and keys. + let shrink_program = + SP1RootVerifier::::build(&compress_machine, &compress_vk, true); + let shrink_machine = CompressAir::machine(InnerSC::compressed()); + let (shrink_pk, shrink_vk) = shrink_machine.setup(&shrink_program); + + // Get the wrap program, machine, and keys. + let wrap_program = + SP1RootVerifier::::build(&shrink_machine, &shrink_vk, false); + let wrap_machine = WrapAir::wrap_machine(OuterSC::default()); + let (wrap_pk, wrap_vk) = wrap_machine.setup(&wrap_program); + Self { - recursion_setup_program, recursion_program, + rec_pk, + rec_vk, + deferred_program, + deferred_pk, + deferred_vk, + compress_program, compress_pk, compress_vk, + shrink_program, shrink_pk, shrink_vk, + wrap_program, wrap_pk, wrap_vk, core_machine, @@ -166,24 +215,6 @@ impl SP1Prover { (pk, vk) } - /// Accumulate deferred proofs into a single digest. - pub fn hash_deferred_proofs( - prev_digest: [Val; 8], - deferred_proofs: &[ShardProof], - ) -> [Val; 8] { - let mut digest = prev_digest; - for proof in deferred_proofs.iter() { - let pv = RecursionPublicValues::from_vec(proof.public_values.clone()); - let committed_values_digest = words_to_bytes(&pv.committed_value_digest); - digest = hash_deferred_proof( - &digest, - &pv.sp1_vk_digest, - &committed_values_digest.try_into().unwrap(), - ); - } - digest - } - /// Generate a proof of an SP1 program with the specified inputs. #[instrument(name = "execute", level = "info", skip_all)] pub fn execute(elf: &[u8], stdin: &SP1Stdin) -> SP1PublicValues { @@ -200,481 +231,340 @@ impl SP1Prover { /// Generate shard proofs which split up and prove the valid execution of a RISC-V program with /// the core prover. #[instrument(name = "prove_core", level = "info", skip_all)] - pub fn prove_core( - &self, - pk: &SP1ProvingKey, - stdin: &SP1Stdin, - ) -> SP1ProofWithMetadata { + pub fn prove_core(&self, pk: &SP1ProvingKey, stdin: &SP1Stdin) -> SP1CoreProof { let config = CoreSC::default(); let program = Program::from(&pk.elf); let (proof, public_values_stream) = run_and_prove(program, stdin, config); let public_values = SP1PublicValues::from(&public_values_stream); - SP1ProofWithMetadata { + SP1CoreProof { proof: SP1CoreProofData(proof.shard_proofs), stdin: stdin.clone(), public_values, } } - /// Compress shards proofs to a single shard proof using the recursion prover. + /// Reduce shards proofs to a single shard proof using the recursion prover. #[instrument(name = "compress", level = "info", skip_all)] pub fn compress( &self, vk: &SP1VerifyingKey, - proof: SP1ProofWithMetadata, - mut deferred_proofs: Vec>, + proof: SP1CoreProof, + deferred_proofs: Vec>, ) -> SP1ReduceProof { - // Observe all commitments and public values. - // - // This challenger will be witnessed into reduce program and used to verify sp1 proofs. It - // will also be reconstructed over all the reduce steps to prove that the witnessed - // challenger was correct. - let mut core_challenger = self.core_machine.config().challenger(); - vk.vk.observe_into(&mut core_challenger); - for shard_proof in proof.proof.0.iter() { - core_challenger.observe(shard_proof.commitment.main_commit); - core_challenger.observe_slice( - &shard_proof.public_values.to_vec()[0..self.core_machine.num_pv_elts()], - ); + // Set the batch size for the reduction tree. + let batch_size = 2; + + let shard_proofs = &proof.proof.0; + + // Setup the reconstruct commitments flags to false and save its state. + let rc = env::var(RECONSTRUCT_COMMITMENTS_ENV_VAR).unwrap_or_default(); + env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, "false"); + + // Get the leaf challenger. + let mut leaf_challenger = self.core_machine.config().challenger(); + vk.vk.observe_into(&mut leaf_challenger); + shard_proofs.iter().for_each(|proof| { + leaf_challenger.observe(proof.commitment.main_commit); + leaf_challenger.observe_slice(&proof.public_values[0..self.core_machine.num_pv_elts()]); + }); + // Make sure leaf challenger is not mutable anymore. + let leaf_challenger = leaf_challenger; + + let mut core_inputs = Vec::new(); + + let mut reconstruct_challenger = self.core_machine.config().challenger(); + vk.vk.observe_into(&mut reconstruct_challenger); + + // Prepare the inputs for the recursion programs. + let is_complete = shard_proofs.len() == 1 && deferred_proofs.is_empty(); + for batch in shard_proofs.chunks(batch_size) { + let proofs = batch.to_vec(); + + core_inputs.push(SP1RecursionMemoryLayout { + vk: &vk.vk, + machine: &self.core_machine, + shard_proofs: proofs, + leaf_challenger: &leaf_challenger, + initial_reconstruct_challenger: reconstruct_challenger.clone(), + is_complete, + }); + + for proof in batch.iter() { + reconstruct_challenger.observe(proof.commitment.main_commit); + reconstruct_challenger + .observe_slice(&proof.public_values[0..self.core_machine.num_pv_elts()]); + } } - // Map the existing shards to a self-reducing type of proof (i.e. Reduce: T[] -> T). - let mut reduce_proofs = proof - .proof - .0 - .into_iter() - .map(|proof| SP1ReduceProofWrapper::Core(SP1ReduceProof { proof })) - .collect::>(); + let last_proof_input = + PublicValues::from_vec(shard_proofs.last().unwrap().public_values.clone()); - // Keep reducing until we have only one shard. - while reduce_proofs.len() > 1 { - let layer_deferred_proofs = std::mem::take(&mut deferred_proofs); - reduce_proofs = self.reduce_layer( - vk, - core_challenger.clone(), - reduce_proofs, - layer_deferred_proofs, - 2, - ); + // Check that the leaf challenger is the same as the reconstruct challenger. + assert_eq!( + reconstruct_challenger.sponge_state, + leaf_challenger.sponge_state + ); + assert_eq!( + reconstruct_challenger.input_buffer, + leaf_challenger.input_buffer + ); + assert_eq!( + reconstruct_challenger.output_buffer, + leaf_challenger.output_buffer + ); + + // Prepare the inputs for the deferred proofs recursive verification. + let mut deferred_digest = [Val::::zero(); DIGEST_SIZE]; + let mut deferred_inputs = Vec::new(); + + let is_deferred_complete = shard_proofs.is_empty() && deferred_proofs.len() == 1; + + for batch in deferred_proofs.chunks(batch_size) { + let proofs = batch.to_vec(); + + deferred_inputs.push(SP1DeferredMemoryLayout { + compress_vk: &self.compress_vk, + machine: &self.compress_machine, + proofs, + start_reconstruct_deferred_digest: deferred_digest.to_vec(), + is_complete: is_deferred_complete, + sp1_vk: &vk.vk, + sp1_machine: &self.core_machine, + end_pc: Val::::zero(), + end_shard: Val::::from_canonical_usize(shard_proofs.len()), + leaf_challenger: leaf_challenger.clone(), + committed_value_digest: last_proof_input.committed_value_digest.to_vec(), + deferred_proofs_digest: last_proof_input.deferred_proofs_digest.to_vec(), + }); + + deferred_digest = Self::hash_deferred_proofs(deferred_digest, batch); } - // Return the remaining single reduce proof. If we have only one shard, we still want to - // wrap it into a reduce shard. - assert_eq!(reduce_proofs.len(), 1); - let last_proof = reduce_proofs.into_iter().next().unwrap(); - match last_proof { - SP1ReduceProofWrapper::Recursive(proof) => proof, - SP1ReduceProofWrapper::Core(ref proof) => { - let state = ReduceState::from_core_start_state(&proof.proof); - let reconstruct_challenger = self.setup_initial_core_challenger(vk); - let config = InnerSC::default(); - self.verify_batch( - config, - &self.compress_pk, - vk, - core_challenger, - reconstruct_challenger, - state, - &[last_proof], - &deferred_proofs, - true, - false, - false, - ) - } + // Run the recursion and reduce programs. + + // Run the recursion programs. + let mut records = Vec::new(); + + for input in core_inputs { + let mut runtime = RecursionRuntime::, Challenge, _>::new( + &self.recursion_program, + self.compress_machine.config().perm.clone(), + ); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + + records.push((runtime.record, ReduceProgramType::Core)); } - } - /// Reduce a set of shard proofs in groups of `batch_size` into a smaller set of shard proofs - /// using the recursion prover. - #[instrument(name = "reduce_layer", level = "info", skip_all)] - fn reduce_layer( - &self, - vk: &SP1VerifyingKey, - sp1_challenger: Challenger, - proofs: Vec, - deferred_proofs: Vec>, - batch_size: usize, - ) -> Vec { - // OPT: If there's only one proof in the last batch, we could push it to the next layer. - // OPT: We could pack deferred proofs into the last chunk if it has less than batch_size proofs. - let chunks: Vec<_> = proofs.chunks(batch_size).collect(); - - let mut reconstruct_challenger = self.setup_initial_core_challenger(vk); - let reconstruct_challengers = chunks - .iter() - .map(|proofs| { - let start_challenger = reconstruct_challenger.clone(); - for proof in proofs.iter() { - match proof { - SP1ReduceProofWrapper::Core(reduce_proof) => { - reconstruct_challenger - .observe(reduce_proof.proof.commitment.main_commit); - reconstruct_challenger.observe_slice( - &reduce_proof.proof.public_values.to_vec() - [0..self.core_machine.num_pv_elts()], - ); - } - SP1ReduceProofWrapper::Recursive(reduce_proof) => { - let pv = RecursionPublicValues::from_vec( - reduce_proof.proof.public_values.clone(), - ); - pv.end_reconstruct_challenger - .set_challenger(&mut reconstruct_challenger); - } - } - } - start_challenger - }) - .collect::>(); - let start_states = chunks - .iter() - .map(|chunk| match chunk[0] { - SP1ReduceProofWrapper::Core(ref proof) => { - ReduceState::from_core_start_state(&proof.proof) - } - SP1ReduceProofWrapper::Recursive(ref proof) => { - ReduceState::from_reduce_start_state(proof) - } - }) - .collect::>(); + // Run the deferred proofs programs. + for input in deferred_inputs { + let mut runtime = RecursionRuntime::, Challenge, _>::new( + &self.deferred_program, + self.compress_machine.config().perm.clone(), + ); - // This is the last layer only if the outcome is a single proof. If there are deferred - // proofs, it's not the last layer. - let is_complete = chunks.len() == 1 && deferred_proofs.is_empty(); - let mut new_proofs: Vec = chunks - .into_par_iter() - .zip(reconstruct_challengers.into_par_iter()) - .zip(start_states.into_par_iter()) - .map(|((chunk, reconstruct_challenger), start_state)| { - let config = InnerSC::default(); - let proof = self.verify_batch( - config, - &self.compress_pk, - vk, - sp1_challenger.clone(), - reconstruct_challenger, - start_state, - chunk, - &[], - is_complete, - false, - false, - ); - SP1ReduceProofWrapper::Recursive(proof) - }) - .collect(); - - // If there are deferred proofs, we want to add them to the end. - // Here we get the end state of the last proof from above which will be the start state for - // the deferred proofs. When verifying only deferred proofs, only reconstruct_deferred_digests - // should change. - let last_new_proof = &new_proofs[new_proofs.len() - 1]; - let mut reduce_state: ReduceState = match last_new_proof { - SP1ReduceProofWrapper::Recursive(ref proof) => { - ReduceState::from_reduce_end_state(proof) - } - _ => unreachable!(), - }; - let deferred_chunks: Vec<_> = deferred_proofs.chunks(batch_size).collect(); + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); - // For each reduce, we need to pass in the start state from the previous proof. Here we - // need to compute updated reconstruct_deferred_digests since each proof is modifying it. - let start_states = deferred_chunks - .iter() - .map(|chunk| { - let start_state = reduce_state.clone(); - // Accumulate each deferred proof into the digest - reduce_state.reconstruct_deferred_digest = - Self::hash_deferred_proofs(reduce_state.reconstruct_deferred_digest, chunk); - start_state - }) - .collect::>(); + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); - let new_deferred_proofs = deferred_chunks + records.push((runtime.record, ReduceProgramType::Deferred)); + } + + // Prove all recursion programs and recursion deferred programs and verify the proofs. + + // Make the recursive proofs for core and deferred proofs. + let first_layer_proofs = records .into_par_iter() - .zip(start_states.into_par_iter()) - .map(|(proofs, state)| { - let config = InnerSC::default(); - self.verify_batch::( - config, - &self.compress_pk, - vk, - sp1_challenger.clone(), - reconstruct_challenger.clone(), - state, - &[], - proofs, - false, - false, - false, + .map(|(record, kind)| { + let pk = match kind { + ReduceProgramType::Core => &self.rec_pk, + ReduceProgramType::Deferred => &self.deferred_pk, + ReduceProgramType::Reduce => unreachable!(), + }; + let mut recursive_challenger = self.compress_machine.config().challenger(); + ( + self.compress_machine.prove::>( + pk, + record, + &mut recursive_challenger, + ), + kind, ) }) .collect::>(); - new_proofs.extend( - new_deferred_proofs - .into_iter() - .map(SP1ReduceProofWrapper::Recursive), - ); - new_proofs + // Chain all the individual shard proofs. + let mut reduce_proofs = first_layer_proofs + .into_iter() + .flat_map(|(proof, kind)| proof.shard_proofs.into_iter().map(move |p| (p, kind))) + .collect::>(); + + // Iterate over the recursive proof batches until there is one proof remaining. + let mut is_complete; + loop { + tracing::debug!("Recursive proof layer size: {}", reduce_proofs.len()); + is_complete = reduce_proofs.len() <= batch_size; + reduce_proofs = reduce_proofs + .par_chunks(batch_size) + .map(|batch| { + let (shard_proofs, kinds) = + batch.iter().cloned().unzip::<_, _, Vec<_>, Vec<_>>(); + + let input = SP1ReduceMemoryLayout { + compress_vk: &self.compress_vk, + recursive_machine: &self.compress_machine, + shard_proofs, + kinds, + is_complete, + }; + + let mut runtime = RecursionRuntime::, Challenge, _>::new( + &self.compress_program, + self.compress_machine.config().perm.clone(), + ); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + + let mut recursive_challenger = self.compress_machine.config().challenger(); + let mut proof = self.compress_machine.prove::>( + &self.compress_pk, + runtime.record, + &mut recursive_challenger, + ); + + debug_assert_eq!(proof.shard_proofs.len(), 1); + (proof.shard_proofs.pop().unwrap(), ReduceProgramType::Reduce) + }) + .collect(); + + if reduce_proofs.len() == 1 { + break; + } + } + debug_assert_eq!(reduce_proofs.len(), 1); + let reduce_proof = reduce_proofs.pop().unwrap(); + + // Restore the prover parameters. + env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, rc); + + SP1ReduceProof { + proof: reduce_proof.0, + } } - /// Verifies a batch of proofs using the recursion prover. - #[instrument(name = "verify_batch", level = "info", skip_all)] - fn verify_batch( - &self, - config: SC, - pk: &StarkProvingKey, - core_vk: &SP1VerifyingKey, - core_challenger: Challenger, - reconstruct_challenger: Challenger, - state: ReduceState, - reduce_proofs: &[SP1ReduceProofWrapper], - deferred_proofs: &[ShardProof], - is_complete: bool, - verifying_compressed_proof: bool, - proving_with_skinny: bool, - ) -> SP1ReduceProof - where - SC: StarkGenericConfig, - SC::Challenger: Clone, - Com: Send + Sync, - PcsProverData: Send + Sync, - ShardMainData: Serialize + DeserializeOwned, - LocalProver>: - Prover>, - LocalProver>: Prover>, - { + /// Wrap a reduce proof into a STARK proven over a SNARK-friendly field. + #[instrument(name = "shrink", level = "info", skip_all)] + pub fn shrink(&self, reduced_proof: SP1ReduceProof) -> SP1ReduceProof { // Setup the prover parameters. let rc = env::var(RECONSTRUCT_COMMITMENTS_ENV_VAR).unwrap_or_default(); env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, "false"); - // Compute inputs. - let is_recursive_flags: Vec = reduce_proofs - .iter() - .map(|p| match p { - SP1ReduceProofWrapper::Core(_) => 0, - SP1ReduceProofWrapper::Recursive(_) => 1, - }) - .collect(); - let chip_quotient_data: Vec> = reduce_proofs - .iter() - .map(|p| match p { - SP1ReduceProofWrapper::Core(reduce_proof) => { - get_chip_quotient_data(&self.core_machine, &reduce_proof.proof) - } - SP1ReduceProofWrapper::Recursive(reduce_proof) => { - if verifying_compressed_proof { - get_chip_quotient_data(&self.shrink_machine, &reduce_proof.proof) - } else { - get_chip_quotient_data(&self.compress_machine, &reduce_proof.proof) - } - } - }) - .collect(); - let sorted_indices: Vec> = reduce_proofs - .iter() - .map(|p| match p { - SP1ReduceProofWrapper::Core(reduce_proof) => { - get_sorted_indices(&self.core_machine, &reduce_proof.proof) - } - SP1ReduceProofWrapper::Recursive(reduce_proof) => { - if verifying_compressed_proof { - get_sorted_indices(&self.shrink_machine, &reduce_proof.proof) - } else { - get_sorted_indices(&self.compress_machine, &reduce_proof.proof) - } - } - }) - .collect(); - let (prep_sorted_indices, prep_domains): (Vec, Vec>) = - get_preprocessed_data(&self.core_machine, &core_vk.vk); - let (reduce_prep_sorted_indices, reduce_prep_domains): (Vec, Vec>) = - get_preprocessed_data(&self.compress_machine, &self.compress_vk); - let (compress_prep_sorted_indices, compress_prep_domains): ( - Vec, - Vec>, - ) = get_preprocessed_data(&self.shrink_machine, &self.shrink_vk); - let deferred_sorted_indices: Vec> = deferred_proofs - .iter() - .map(|proof| get_sorted_indices(&self.compress_machine, proof)) - .collect(); - let deferred_chip_quotient_data: Vec> = deferred_proofs - .iter() - .map(|p| get_chip_quotient_data(&self.compress_machine, p)) - .collect(); - - // Convert the inputs into a witness stream. - let mut witness_stream = Vec::new(); - witness_stream.extend(is_recursive_flags.write()); - witness_stream.extend(chip_quotient_data.write()); - witness_stream.extend(sorted_indices.write()); - witness_stream.extend(core_challenger.write()); - witness_stream.extend(reconstruct_challenger.write()); - witness_stream.extend(prep_sorted_indices.write()); - witness_stream.extend(Hintable::write(&prep_domains)); - witness_stream.extend(reduce_prep_sorted_indices.write()); - witness_stream.extend(Hintable::write(&reduce_prep_domains)); - witness_stream.extend(compress_prep_sorted_indices.write()); - witness_stream.extend(Hintable::write(&compress_prep_domains)); - witness_stream.extend(core_vk.vk.write()); - witness_stream.extend(self.compress_vk.write()); - witness_stream.extend(self.shrink_vk.write()); - witness_stream.extend(state.committed_values_digest.write()); - witness_stream.extend(state.deferred_proofs_digest.write()); - witness_stream.extend(Hintable::write(&state.start_pc)); - witness_stream.extend(Hintable::write(&state.exit_code)); - witness_stream.extend(Hintable::write(&state.start_shard)); - witness_stream.extend(Hintable::write(&state.reconstruct_deferred_digest)); - for proof in reduce_proofs.iter() { - match proof { - SP1ReduceProofWrapper::Core(reduce_proof) => { - witness_stream.extend(reduce_proof.proof.write()); - } - SP1ReduceProofWrapper::Recursive(reduce_proof) => { - witness_stream.extend(reduce_proof.proof.write()); - } - } - } - witness_stream.extend(deferred_chip_quotient_data.write()); - witness_stream.extend(deferred_sorted_indices.write()); - witness_stream.extend(deferred_proofs.to_vec().write()); - let is_complete = if is_complete { 1usize } else { 0 }; - witness_stream.extend(is_complete.write()); - let is_compressed = if verifying_compressed_proof { - 1usize - } else { - 0 + // Make the compress proof. + let input = SP1RootMemoryLayout { + machine: &self.compress_machine, + proof: reduced_proof.proof, + is_reduce: true, }; - witness_stream.extend(is_compressed.write()); - let machine = RecursionAirWideDeg3::machine(InnerSC::default()); + // Run the compress program. let mut runtime = RecursionRuntime::, Challenge, _>::new( - &self.recursion_setup_program, - machine.config().perm.clone(), + &self.shrink_program, + self.shrink_machine.config().perm.clone(), ); - runtime.witness_stream = witness_stream.into(); - runtime.run(); - let mut checkpoint = runtime.memory.clone(); - let checkpoint_uninit = runtime.uninitialized_memory.clone(); - // Execute runtime. - let machine = RecursionAirWideDeg3::machine(InnerSC::default()); - let mut runtime = RecursionRuntime::, Challenge, _>::new( - &self.recursion_program, - machine.config().perm.clone(), - ); - checkpoint.iter_mut().for_each(|e| { - e.1.timestamp = BabyBear::zero(); - }); - runtime.memory = checkpoint; - runtime.uninitialized_memory = checkpoint_uninit; + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); runtime.run(); runtime.print_stats(); - tracing::info!( - "runtime summary: cycles={}, nb_poseidons={}", - runtime.timestamp, - runtime.nb_poseidons - ); + tracing::debug!("Compress program executed successfully"); - // Generate proof. - let start = Instant::now(); - let proof = if proving_with_skinny && verifying_compressed_proof { - let machine = RecursionAirSkinnyDeg7::wrap_machine(config); - let mut challenger = machine.config().challenger(); - machine.prove::>(pk, runtime.record.clone(), &mut challenger) - } else if proving_with_skinny { - let machine = RecursionAirSkinnyDeg7::machine(config); - let mut challenger = machine.config().challenger(); - machine.prove::>(pk, runtime.record.clone(), &mut challenger) - } else { - let machine = RecursionAirWideDeg3::machine(config); - let mut challenger = machine.config().challenger(); - machine.prove::>(pk, runtime.record.clone(), &mut challenger) - }; - let elapsed = start.elapsed().as_secs_f64(); - - let proof_size = bincode::serialize(&proof).unwrap().len(); - tracing::info!( - "proving summary: cycles={}, e2e={}, khz={:.2}, proofSize={}", - runtime.timestamp, - elapsed, - (runtime.timestamp as f64 / elapsed) / 1000f64, - Size::from_bytes(proof_size), + // Prove the compress program. + let mut compress_challenger = self.shrink_machine.config().challenger(); + let mut compress_proof = self.shrink_machine.prove::>( + &self.shrink_pk, + runtime.record, + &mut compress_challenger, ); // Restore the prover parameters. env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, rc); - // Return the reduced proof. - assert!(proof.shard_proofs.len() == 1); - let proof = proof.shard_proofs.into_iter().next().unwrap(); - SP1ReduceProof { proof } - } - - /// Shrink a compressed proof into a STARK proven over a SNARK-friendly field. - #[instrument(name = "shrink", level = "info", skip_all)] - pub fn shrink( - &self, - vk: &SP1VerifyingKey, - reduced_proof: SP1ReduceProof, - ) -> SP1ReduceProof { - // Get verify_start_challenger from the reduce proof's public values. - let pv = RecursionPublicValues::from_vec(reduced_proof.proof.public_values.clone()); - let mut core_challenger = self.core_machine.config().challenger(); - pv.verify_start_challenger - .set_challenger(&mut core_challenger); - // Since the proof passed in should be complete already, the start reconstruct_challenger - // should be in initial state with only vk observed. - let reconstruct_challenger = self.setup_initial_core_challenger(vk); - let state = ReduceState::from_reduce_start_state(&reduced_proof); - let config = InnerSC::compressed(); - self.verify_batch::( - config, - &self.shrink_pk, - vk, - core_challenger, - reconstruct_challenger, - state, - &[SP1ReduceProofWrapper::Recursive(reduced_proof)], - &[], - true, - false, - true, - ) + SP1ReduceProof { + proof: compress_proof.shard_proofs.pop().unwrap(), + } } /// Wrap a reduce proof into a STARK proven over a SNARK-friendly field. #[instrument(name = "wrap_bn254", level = "info", skip_all)] - pub fn wrap_bn254( - &self, - vk: &SP1VerifyingKey, - reduced_proof: SP1ReduceProof, - ) -> SP1ReduceProof { - // Get verify_start_challenger from the reduce proof's public values. - let pv = RecursionPublicValues::from_vec(reduced_proof.proof.public_values.clone()); - let mut core_challenger = self.core_machine.config().challenger(); - pv.verify_start_challenger - .set_challenger(&mut core_challenger); - // Since the proof passed in should be complete already, the start reconstruct_challenger - // should be in initial state with only vk observed. - let reconstruct_challenger = self.setup_initial_core_challenger(vk); - let state = ReduceState::from_reduce_start_state(&reduced_proof); - let config = OuterSC::default(); - self.verify_batch::( - config, + pub fn wrap_bn254(&self, compressed_proof: SP1ReduceProof) -> SP1ReduceProof { + // Setup the prover parameters. + let rc = env::var(RECONSTRUCT_COMMITMENTS_ENV_VAR).unwrap_or_default(); + env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, "false"); + + let input = SP1RootMemoryLayout { + machine: &self.shrink_machine, + proof: compressed_proof.proof, + is_reduce: false, + }; + + // Run the compress program. + let mut runtime = RecursionRuntime::, Challenge, _>::new( + &self.wrap_program, + self.shrink_machine.config().perm.clone(), + ); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + tracing::debug!("Wrap program executed successfully"); + + // Prove the wrap program. + let mut wrap_challenger = self.wrap_machine.config().challenger(); + let time = std::time::Instant::now(); + let mut wrap_proof = self.wrap_machine.prove::>( &self.wrap_pk, - vk, - core_challenger, - reconstruct_challenger, - state, - &[SP1ReduceProofWrapper::Recursive(reduced_proof)], - &[], - true, - true, - true, - ) + runtime.record, + &mut wrap_challenger, + ); + let elapsed = time.elapsed(); + tracing::debug!("Wrap proving time: {:?}", elapsed); + let mut wrap_challenger = self.wrap_machine.config().challenger(); + let result = self + .wrap_machine + .verify(&self.wrap_vk, &wrap_proof, &mut wrap_challenger); + match result { + Ok(_) => tracing::info!("Proof verified successfully"), + Err(MachineVerificationError::NonZeroCumulativeSum) => { + tracing::info!("Proof verification failed: NonZeroCumulativeSum") + } + e => panic!("Proof verification failed: {:?}", e), + } + tracing::info!("Wrapping successful"); + + // Restore the prover parameters. + env::set_var(RECONSTRUCT_COMMITMENTS_ENV_VAR, rc); + + SP1ReduceProof { + proof: wrap_proof.shard_proofs.pop().unwrap(), + } } /// Wrap the STARK proven over a SNARK-friendly field into a Groth16 proof. @@ -709,25 +599,22 @@ impl SP1Prover { PlonkBn254Prover::prove(witness, build_dir) } - pub fn setup_initial_core_challenger(&self, vk: &SP1VerifyingKey) -> Challenger { - let mut core_challenger = self.core_machine.config().challenger(); - vk.vk.observe_into(&mut core_challenger); - core_challenger - } - - pub fn setup_core_challenger( - &self, - vk: &SP1VerifyingKey, - proof: &SP1CoreProofData, - ) -> Challenger { - let mut core_challenger = self.setup_initial_core_challenger(vk); - for shard_proof in proof.0.iter() { - core_challenger.observe(shard_proof.commitment.main_commit); - core_challenger.observe_slice( - &shard_proof.public_values.to_vec()[0..self.core_machine.num_pv_elts()], + /// Accumulate deferred proofs into a single digest. + fn hash_deferred_proofs( + prev_digest: [Val; DIGEST_SIZE], + deferred_proofs: &[ShardProof], + ) -> [Val; 8] { + let mut digest = prev_digest; + for proof in deferred_proofs.iter() { + let pv: &RecursionPublicValues> = proof.public_values.as_slice().borrow(); + let committed_values_digest = words_to_bytes(&pv.committed_value_digest); + digest = hash_deferred_proof( + &digest, + &pv.sp1_vk_digest, + &committed_values_digest.try_into().unwrap(), ); } - core_challenger + digest } } @@ -743,13 +630,10 @@ mod tests { use p3_field::PrimeField32; use serial_test::serial; use sp1_core::io::SP1Stdin; - use sp1_core::stark::MachineVerificationError; use sp1_core::utils::setup_logger; /// Tests an end-to-end workflow of proving a program across the entire proof generation /// pipeline. - /// - /// TODO: Remove the fact that we ignore [MachineVerificationError::NonZeroCumulativeSum]. #[test] #[serial] fn test_e2e() { @@ -773,26 +657,16 @@ mod tests { let compressed_proof = prover.compress(&vk, core_proof, vec![]); tracing::info!("verify compressed"); - let result = prover.verify_compressed(&compressed_proof, &vk); - if let Err(MachineVerificationError::NonZeroCumulativeSum) = result { - tracing::warn!("non-zero cumulative sum for compress"); - } else { - result.unwrap(); - } + prover.verify_compressed(&compressed_proof, &vk).unwrap(); tracing::info!("shrink"); - let shrink_proof = prover.shrink(&vk, compressed_proof); + let shrink_proof = prover.shrink(compressed_proof); tracing::info!("verify shrink"); - let result = prover.verify_shrink(&shrink_proof, &vk); - if let Err(MachineVerificationError::NonZeroCumulativeSum) = result { - tracing::warn!("non-zero cumulative sum for shrink"); - } else { - result.unwrap(); - } + prover.verify_shrink(&shrink_proof, &vk).unwrap(); tracing::info!("wrap bn254"); - let wrapped_bn254_proof = prover.wrap_bn254(&vk, shrink_proof); + let wrapped_bn254_proof = prover.wrap_bn254(shrink_proof); let bytes = bincode::serialize(&wrapped_bn254_proof).unwrap(); // Save the proof. @@ -807,12 +681,7 @@ mod tests { let wrapped_bn254_proof = bincode::deserialize(&bytes).unwrap(); tracing::info!("verify wrap bn254"); - let result = prover.verify_wrap_bn254(&wrapped_bn254_proof, &vk); - if let Err(MachineVerificationError::NonZeroCumulativeSum) = result { - tracing::warn!("non-zero cumulative sum for wrap bn254"); - } else { - result.unwrap(); - } + prover.verify_wrap_bn254(&wrapped_bn254_proof, &vk).unwrap(); tracing::info!("checking vkey hash babybear"); let vk_digest_babybear = wrapped_bn254_proof.sp1_vkey_digest_babybear(); @@ -831,8 +700,6 @@ mod tests { /// Tests an end-to-end workflow of proving a program across the entire proof generation /// pipeline in addition to verifying deferred proofs. - /// - /// TODO: Remove the fact that we ignore [MachineVerificationError::NonZeroCumulativeSum]. #[test] #[serial] fn test_e2e_with_deferred_proofs() { @@ -907,13 +774,14 @@ mod tests { deferred_reduce_2.proof, ], ); + let reduce_pv: &RecursionPublicValues<_> = + verify_reduce.proof.public_values.as_slice().borrow(); + println!("deferred_hash: {:?}", reduce_pv.deferred_proofs_digest); + println!("complete: {:?}", reduce_pv.is_complete); tracing::info!("verify verify program"); - let result = prover.verify_compressed(&verify_reduce, &verify_vk); - if let Err(MachineVerificationError::NonZeroCumulativeSum) = result { - tracing::warn!("non-zero cumulative sum for verify"); - } else { - result.unwrap(); - } + prover + .verify_compressed(&verify_reduce, &verify_vk) + .unwrap(); } } diff --git a/prover/src/types.rs b/prover/src/types.rs index 9f9dbc86d2..547eac7707 100644 --- a/prover/src/types.rs +++ b/prover/src/types.rs @@ -1,3 +1,4 @@ +use std::borrow::Borrow; use std::{fs::File, path::Path}; use anyhow::Result; @@ -8,9 +9,8 @@ use p3_field::PrimeField; use p3_field::{AbstractField, PrimeField32, TwoAdicField}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use sp1_core::{ - air::{PublicValues, Word, POSEIDON_NUM_WORDS, PV_DIGEST_NUM_WORDS}, io::{SP1PublicValues, SP1Stdin}, - stark::{ShardProof, StarkGenericConfig, StarkProvingKey, StarkVerifyingKey, Val}, + stark::{ShardProof, StarkGenericConfig, StarkProvingKey, StarkVerifyingKey}, utils::DIGEST_SIZE, }; use sp1_primitives::poseidon2_hash; @@ -37,7 +37,11 @@ pub struct SP1VerifyingKey { /// A trait for keys that can be hashed into a digest. pub trait HashableKey { - fn hash_babybear(&self) -> [BabyBear; 8]; + /// Hash the key into a digest of BabyBear elements. + fn hash_babybear(&self) -> [BabyBear; DIGEST_SIZE]; + + /// Hash the key into a digest of u32 elements. + fn hash_u32(&self) -> [u32; DIGEST_SIZE]; fn hash_bn254(&self) -> Bn254Fr { babybears_to_bn254(&self.hash_babybear()) @@ -51,20 +55,18 @@ pub trait HashableKey { ) } - fn hash_u32(&self) -> [u32; 8]; - - /// Hash the key into a digest of 8 u32 elements. - fn hash_bytes(&self) -> [u8; 32] { + /// Hash the key into a digest of bytes elements. + fn hash_bytes(&self) -> [u8; DIGEST_SIZE * 4] { words_to_bytes_be(&self.hash_u32()) } } impl HashableKey for SP1VerifyingKey { - fn hash_babybear(&self) -> [BabyBear; 8] { + fn hash_babybear(&self) -> [BabyBear; DIGEST_SIZE] { self.vk.hash_babybear() } - fn hash_u32(&self) -> [u32; 8] { + fn hash_u32(&self) -> [u32; DIGEST_SIZE] { self.vk.hash_u32() } } @@ -74,7 +76,7 @@ impl>::Commitment: AsRef<[BabyBear; DIGEST_SIZE]>, { - fn hash_babybear(&self) -> [BabyBear; 8] { + fn hash_babybear(&self) -> [BabyBear; DIGEST_SIZE] { let prep_domains = self.chip_information.iter().map(|(_, domain, _)| domain); let num_inputs = DIGEST_SIZE + 1 + (4 * prep_domains.len()); let mut inputs = Vec::with_capacity(num_inputs); @@ -164,29 +166,10 @@ pub struct SP1ReduceProof { pub proof: ShardProof, } -/// A proof that can be reduced along with other proofs into one proof. -#[derive(Serialize, Deserialize)] -pub enum SP1ReduceProofWrapper { - Core(SP1ReduceProof), - Recursive(SP1ReduceProof), -} - -/// Represents the state of reducing proofs together. This is used to track the current values since -/// some reduce batches may have only deferred proofs. -#[derive(Clone)] -pub(crate) struct ReduceState { - pub committed_values_digest: [Word>; PV_DIGEST_NUM_WORDS], - pub deferred_proofs_digest: [Val; POSEIDON_NUM_WORDS], - pub start_pc: Val, - pub exit_code: Val, - pub start_shard: Val, - pub reconstruct_deferred_digest: [Val; POSEIDON_NUM_WORDS], -} - impl SP1ReduceProof { pub fn sp1_vkey_digest_babybear(&self) -> [BabyBear; 8] { let proof = &self.proof; - let pv = RecursionPublicValues::from_vec(proof.public_values.clone()); + let pv: &RecursionPublicValues = proof.public_values.as_slice().borrow(); pv.sp1_vk_digest } @@ -196,7 +179,7 @@ impl SP1ReduceProof { pub fn sp1_commited_values_digest_bn254(&self) -> Bn254Fr { let proof = &self.proof; - let pv = RecursionPublicValues::from_vec(proof.public_values.clone()); + let pv: &RecursionPublicValues = proof.public_values.as_slice().borrow(); let committed_values_digest_bytes: [BabyBear; 32] = words_to_bytes(&pv.committed_value_digest) .try_into() @@ -205,46 +188,9 @@ impl SP1ReduceProof { } } -impl ReduceState { - pub fn from_reduce_end_state>( - state: &SP1ReduceProof, - ) -> Self { - let pv = RecursionPublicValues::from_vec(state.proof.public_values.clone()); - Self { - committed_values_digest: pv.committed_value_digest, - deferred_proofs_digest: pv.deferred_proofs_digest, - start_pc: pv.next_pc, - exit_code: pv.exit_code, - start_shard: pv.next_shard, - reconstruct_deferred_digest: pv.end_reconstruct_deferred_digest, - } - } - - pub fn from_reduce_start_state>( - state: &SP1ReduceProof, - ) -> Self { - let pv = RecursionPublicValues::from_vec(state.proof.public_values.clone()); - Self { - committed_values_digest: pv.committed_value_digest, - deferred_proofs_digest: pv.deferred_proofs_digest, - start_pc: pv.start_pc, - exit_code: pv.exit_code, - start_shard: pv.start_shard, - reconstruct_deferred_digest: pv.start_reconstruct_deferred_digest, - } - } - - pub fn from_core_start_state(state: &ShardProof) -> Self { - let pv = - PublicValues::>, Val>::from_vec(state.public_values.clone()); - Self { - committed_values_digest: pv.committed_value_digest, - deferred_proofs_digest: pv.deferred_proofs_digest, - start_pc: pv.start_pc, - exit_code: pv.exit_code, - start_shard: pv.shard, - // TODO: we assume that core proofs aren't in a later batch than one with a deferred proof - reconstruct_deferred_digest: [BabyBear::zero(); 8], - } - } +/// A proof that can be reduced along with other proofs into one proof. +#[derive(Serialize, Deserialize)] +pub enum SP1ReduceProofWrapper { + Core(SP1ReduceProof), + Recursive(SP1ReduceProof), } diff --git a/prover/src/utils.rs b/prover/src/utils.rs index 8daa6cb6c0..8983efdefe 100644 --- a/prover/src/utils.rs +++ b/prover/src/utils.rs @@ -8,12 +8,10 @@ use p3_bn254_fr::Bn254Fr; use p3_field::AbstractField; use p3_field::PrimeField32; use sp1_core::{ - air::{MachineAir, Word}, + air::Word, io::SP1Stdin, runtime::{Program, Runtime}, - stark::{Dom, ShardProof, StarkGenericConfig, StarkMachine, StarkVerifyingKey, Val}, }; -use sp1_recursion_program::{stark::EMPTY, types::QuotientDataValues}; use crate::SP1CoreProofData; @@ -27,22 +25,6 @@ impl SP1CoreProofData { } } -pub fn get_chip_quotient_data>>( - machine: &StarkMachine, - proof: &ShardProof, -) -> Vec { - machine - .shard_chips_ordered(&proof.chip_ordering) - .map(|chip| { - let log_quotient_degree = chip.log_quotient_degree(); - QuotientDataValues { - log_quotient_degree, - quotient_size: 1 << log_quotient_degree, - } - }) - .collect() -} - /// Get the number of cycles for a given program. pub fn get_cycles(elf: &[u8], stdin: &SP1Stdin) -> u64 { let program = Program::from(elf); @@ -59,37 +41,6 @@ pub fn load_elf(path: &str) -> Result, std::io::Error> { Ok(elf_code) } -pub fn get_sorted_indices>>( - machine: &StarkMachine, - proof: &ShardProof, -) -> Vec { - machine - .chips_sorted_indices(proof) - .into_iter() - .map(|x| match x { - Some(x) => x, - None => EMPTY, - }) - .collect() -} - -pub fn get_preprocessed_data>>( - machine: &StarkMachine, - vk: &StarkVerifyingKey, -) -> (Vec, Vec>) { - let chips = machine.chips(); - let (prep_sorted_indices, prep_domains) = machine - .preprocessed_chip_ids() - .into_iter() - .map(|chip_idx| { - let name = chips[chip_idx].name().clone(); - let prep_sorted_idx = vk.chip_ordering[&name]; - (prep_sorted_idx, vk.chip_information[prep_sorted_idx].1) - }) - .unzip(); - (prep_sorted_indices, prep_domains) -} - pub fn words_to_bytes(words: &[Word]) -> Vec { return words.iter().flat_map(|word| word.0).collect(); } diff --git a/prover/src/verify.rs b/prover/src/verify.rs index a48586651d..9d66971e2a 100644 --- a/prover/src/verify.rs +++ b/prover/src/verify.rs @@ -1,3 +1,5 @@ +use std::borrow::Borrow; + use anyhow::Result; use p3_baby_bear::BabyBear; use p3_field::AbstractField; @@ -99,7 +101,8 @@ impl SP1Prover { .verify(&self.compress_vk, &machine_proof, &mut challenger)?; // Validate public values - let public_values = RecursionPublicValues::from_vec(proof.proof.public_values.clone()); + let public_values: &RecursionPublicValues<_> = + proof.proof.public_values.as_slice().borrow(); // `is_complete` should be 1. In the reduce program, this ensures that the proof is fully reduced. if public_values.is_complete != BabyBear::one() { @@ -118,7 +121,7 @@ impl SP1Prover { // Verify that the reduce program is the one we are expecting. let recursion_vkey_hash = self.compress_vk.hash_babybear(); - if public_values.recursion_vk_digest != recursion_vkey_hash { + if public_values.compress_vk_digest != recursion_vkey_hash { return Err(MachineVerificationError::InvalidPublicValues( "recursion vk hash mismatch", )); @@ -141,7 +144,8 @@ impl SP1Prover { .verify(&self.shrink_vk, &machine_proof, &mut challenger)?; // Validate public values - let public_values = RecursionPublicValues::from_vec(proof.proof.public_values.clone()); + let public_values: &RecursionPublicValues<_> = + proof.proof.public_values.as_slice().borrow(); // `is_complete` should be 1. In the reduce program, this ensures that the proof is fully reduced. if public_values.is_complete != BabyBear::one() { @@ -158,14 +162,6 @@ impl SP1Prover { )); } - // Verify that the reduce program is the one we are expecting. - let recursion_vkey_hash = self.shrink_vk.hash_babybear(); - if public_values.recursion_vk_digest != recursion_vkey_hash { - return Err(MachineVerificationError::InvalidPublicValues( - "recursion vk hash mismatch", - )); - } - Ok(()) } @@ -183,7 +179,8 @@ impl SP1Prover { .verify(&self.wrap_vk, &machine_proof, &mut challenger)?; // Validate public values - let public_values = RecursionPublicValues::from_vec(proof.proof.public_values.clone()); + let public_values: &RecursionPublicValues<_> = + proof.proof.public_values.as_slice().borrow(); // `is_complete` should be 1. In the reduce program, this ensures that the proof is fully reduced. if public_values.is_complete != BabyBear::one() { @@ -200,14 +197,6 @@ impl SP1Prover { )); } - // Verify that the reduce program is the one we are expecting. - let recursion_vkey_hash = self.shrink_vk.hash_babybear(); - if public_values.recursion_vk_digest != recursion_vkey_hash { - return Err(MachineVerificationError::InvalidPublicValues( - "recursion vk hash mismatch", - )); - } - Ok(()) } } diff --git a/recursion/circuit/Cargo.toml b/recursion/circuit/Cargo.toml index 1edbdcb31a..faedfe5686 100644 --- a/recursion/circuit/Cargo.toml +++ b/recursion/circuit/Cargo.toml @@ -15,7 +15,7 @@ p3-util = { workspace = true } sp1-recursion-core = { path = "../core" } sp1-core = { path = "../../core" } itertools = "0.12.1" -serde = { version = "1.0.197", features = ["derive"] } +serde = { version = "1.0.201", features = ["derive"] } sp1-recursion-derive = { path = "../derive" } sp1-recursion-compiler = { path = "../compiler" } sp1-recursion-program = { path = "../program" } @@ -31,5 +31,5 @@ p3-dft = { workspace = true } p3-merkle-tree = { workspace = true } p3-poseidon2 = { workspace = true } zkhash = { git = "https://github.com/HorizenLabs/poseidon2" } -rand = "0.8.4" -sp1-recursion-gnark-ffi = { path = "../gnark-ffi" } \ No newline at end of file +rand = "0.8.5" +sp1-recursion-gnark-ffi = { path = "../gnark-ffi" } diff --git a/recursion/circuit/src/stark.rs b/recursion/circuit/src/stark.rs index 194b262f28..e7c5b530ba 100644 --- a/recursion/circuit/src/stark.rs +++ b/recursion/circuit/src/stark.rs @@ -1,3 +1,4 @@ +use std::borrow::Borrow; use std::marker::PhantomData; use crate::fri::verify_two_adic_pcs; @@ -269,7 +270,7 @@ pub fn build_wrap_circuit( let element = builder.get(&proof.public_values, i); pv_elements.push(element); } - let pv = RecursionPublicValues::from_vec(pv_elements); + let pv: &RecursionPublicValues<_> = pv_elements.as_slice().borrow(); let one_felt: Felt<_> = builder.constant(BabyBear::one()); // Proof must be complete. In the reduce program, this will ensure that the SP1 proof has been // fully accumulated. diff --git a/recursion/compiler/Cargo.toml b/recursion/compiler/Cargo.toml index e3a0cf6e7b..23a17e796e 100644 --- a/recursion/compiler/Cargo.toml +++ b/recursion/compiler/Cargo.toml @@ -16,12 +16,12 @@ p3-util = { workspace = true } sp1-recursion-core = { path = "../core" } sp1-core = { path = "../../core" } itertools = "0.12.1" -serde = { version = "1.0.197", features = ["derive"] } +serde = { version = "1.0.201", features = ["derive"] } sp1-recursion-derive = { path = "../derive" } -serde_json = "1.0.115" +serde_json = "1.0.117" p3-bn254-fr = { workspace = true } p3-baby-bear = { workspace = true } -serial_test = "3.0.0" +serial_test = "3.1.1" p3-poseidon2 = { workspace = true } backtrace = "0.3.71" tracing = "0.1.40" @@ -30,4 +30,4 @@ tracing = "0.1.40" p3-challenger = { workspace = true } p3-dft = { workspace = true } p3-merkle-tree = { workspace = true } -rand = "0.8.4" +rand = "0.8.5" diff --git a/recursion/compiler/src/asm/compiler.rs b/recursion/compiler/src/asm/compiler.rs index bb7a40503c..eb1ab9820d 100644 --- a/recursion/compiler/src/asm/compiler.rs +++ b/recursion/compiler/src/asm/compiler.rs @@ -538,6 +538,9 @@ impl + TwoAdicField> AsmCo DslIr::CycleTracker(name) => { self.push(AsmInstruction::CycleTracker(name.clone()), trace); } + DslIr::Halt => { + self.push(AsmInstruction::Halt, trace); + } _ => unimplemented!(), } } diff --git a/recursion/compiler/src/asm/instruction.rs b/recursion/compiler/src/asm/instruction.rs index 31c7e1a120..ab89fd4a78 100644 --- a/recursion/compiler/src/asm/instruction.rs +++ b/recursion/compiler/src/asm/instruction.rs @@ -134,6 +134,9 @@ pub enum AsmInstruction { /// Trap. Trap, + /// Halt. + Halt, + /// Break(label) Break(F), @@ -703,6 +706,17 @@ impl> AsmInstruction { false, "".to_string(), ), + AsmInstruction::Halt => Instruction::new( + Opcode::HALT, + F::zero(), + zero, + zero, + F::zero(), + F::zero(), + false, + false, + "".to_string(), + ), AsmInstruction::HintBits(dst, src) => Instruction::new( Opcode::HintBits, i32_f(dst), @@ -1071,6 +1085,7 @@ impl> AsmInstruction { ) } AsmInstruction::Trap => write!(f, "trap"), + AsmInstruction::Halt => write!(f, "halt"), AsmInstruction::HintBits(dst, src) => write!(f, "hint_bits ({})fp, ({})fp", dst, src), AsmInstruction::Poseidon2Permute(dst, src) => { write!(f, "poseidon2_permute ({})fp, ({})fp", dst, src) diff --git a/recursion/compiler/src/ir/builder.rs b/recursion/compiler/src/ir/builder.rs index e8d1fd45a7..4a06dca938 100644 --- a/recursion/compiler/src/ir/builder.rs +++ b/recursion/compiler/src/ir/builder.rs @@ -227,7 +227,11 @@ impl Builder { } /// Assert that two usizes are not equal. - pub fn assert_usize_ne(&mut self, lhs: SymbolicUsize, rhs: SymbolicUsize) { + pub fn assert_usize_ne( + &mut self, + lhs: impl Into>, + rhs: impl Into>, + ) { self.assert_ne::>(lhs, rhs); } @@ -452,6 +456,10 @@ impl Builder { pub fn cycle_tracker(&mut self, name: &str) { self.operations.push(DslIr::CycleTracker(name.to_string())); } + + pub fn halt(&mut self) { + self.operations.push(DslIr::Halt); + } } /// A builder for the DSL that handles if statements. diff --git a/recursion/compiler/src/ir/instructions.rs b/recursion/compiler/src/ir/instructions.rs index 190f510012..1e79528029 100644 --- a/recursion/compiler/src/ir/instructions.rs +++ b/recursion/compiler/src/ir/instructions.rs @@ -155,6 +155,7 @@ pub enum DslIr { WitnessFelt(Felt, u32), WitnessExt(Ext, u32), Commit(Felt, Var), + Halt, // Public inputs for circuits. CircuitCommitVkeyHash(Var), diff --git a/recursion/core/Cargo.toml b/recursion/core/Cargo.toml index 006db2a1c9..adc4cfb976 100644 --- a/recursion/core/Cargo.toml +++ b/recursion/core/Cargo.toml @@ -15,7 +15,7 @@ sp1-derive = { path = "../../derive" } sp1-primitives = { path = "../../primitives" } tracing = "0.1.40" sp1-core = { path = "../../core" } -hashbrown = "0.14.3" +hashbrown = "0.14.5" itertools = "0.12.1" p3-bn254-fr = { workspace = true } p3-merkle-tree = { workspace = true } @@ -26,9 +26,9 @@ p3-fri = { workspace = true } zkhash = { git = "https://github.com/HorizenLabs/poseidon2" } ff = { version = "0.13", features = ["derive", "derive_bits"] } serde = { version = "1.0", features = ["derive", "rc"] } -serde_with = "3.6.1" +serde_with = "3.8.1" backtrace = { version = "0.3.71", features = ["serde"] } -arrayref = "0.3.6" +arrayref = "0.3.7" static_assertions = "1.1.0" [dev-dependencies] diff --git a/recursion/core/src/air/public_values.rs b/recursion/core/src/air/public_values.rs index 07f2295b32..d84af5e905 100644 --- a/recursion/core/src/air/public_values.rs +++ b/recursion/core/src/air/public_values.rs @@ -9,6 +9,7 @@ use sp1_core::{ air::{Word, POSEIDON_NUM_WORDS}, stark::PROOF_MAX_NUM_PVS, }; +use sp1_derive::AlignedBorrow; use static_assertions::const_assert_eq; use std::mem::size_of; @@ -22,7 +23,8 @@ pub const RECURSIVE_PROOF_NUM_PV_ELTS: usize = size_of:: { pub sponge_state: [T; PERMUTATION_WIDTH], pub num_inputs: T, @@ -32,27 +34,6 @@ pub struct ChallengerPublicValues { } impl ChallengerPublicValues { - pub fn from_vec(data: Vec) -> Self { - if data.len() < CHALLENGER_STATE_NUM_ELTS { - panic!("Invalid number of items in the serialized vector."); - } - - let mut iter = data.iter().cloned(); - let sponge_state = iter.by_ref().take(PERMUTATION_WIDTH).collect::>(); - let num_inputs = iter.next().unwrap(); - let input_buffer = iter.by_ref().take(PERMUTATION_WIDTH).collect::>(); - let num_outputs = iter.next().unwrap(); - let output_buffer = iter.by_ref().take(PERMUTATION_WIDTH).collect::>(); - - Self { - sponge_state: unwrap_into_array(sponge_state), - num_inputs, - input_buffer: unwrap_into_array(input_buffer), - num_outputs, - output_buffer: unwrap_into_array(output_buffer), - } - } - pub fn set_challenger>( &self, challenger: &mut DuplexChallenger, @@ -68,7 +49,8 @@ impl ChallengerPublicValues { } /// The PublicValues struct is used to store all of a reduce proof's public values. -#[derive(Serialize, Deserialize, Clone, Copy, Default, Debug)] +#[derive(AlignedBorrow, Serialize, Deserialize, Clone, Copy, Default, Debug)] +#[repr(C)] pub struct RecursionPublicValues { /// The hash of all the bytes that the program has written to public values. pub committed_value_digest: [Word; PV_DIGEST_NUM_WORDS], @@ -106,11 +88,11 @@ pub struct RecursionPublicValues { /// The commitment to the sp1 program being proven. pub sp1_vk_digest: [T; DIGEST_SIZE], - /// The commitment to the recursion program being proven. - pub recursion_vk_digest: [T; DIGEST_SIZE], + /// The commitment to the compress key being used in recursive verification. + pub compress_vk_digest: [T; DIGEST_SIZE], - /// The commitment to the start program being proven. - pub verify_start_challenger: ChallengerPublicValues, + /// The leaf challenger containing the entropy from the main trace commitment. + pub leaf_challenger: ChallengerPublicValues, /// Current cumulative sum of lookup bus. pub cumulative_sum: [T; 4], @@ -118,68 +100,3 @@ pub struct RecursionPublicValues { /// Whether the proof completely proves the program execution. pub is_complete: T, } - -impl RecursionPublicValues { - /// Convert a vector of field elements into a PublicValues struct. - pub fn from_vec(data: Vec) -> Self { - if data.len() != RECURSIVE_PROOF_NUM_PV_ELTS { - panic!("Invalid number of items in the serialized vector."); - } - - let mut iter = data.iter().cloned(); - let committed_value_digest = (0..PV_DIGEST_NUM_WORDS) - .map(|_| Word::from_iter(iter.by_ref())) - .collect(); - let deferred_proofs_digest = iter.by_ref().take(POSEIDON_NUM_WORDS).collect::>(); - let start_pc = iter.next().unwrap(); - let next_pc = iter.next().unwrap(); - let exit_code = iter.next().unwrap(); - let start_shard = iter.next().unwrap(); - let next_shard = iter.next().unwrap(); - let start_reconstruct_challenger = ChallengerPublicValues::from_vec( - iter.by_ref() - .take(CHALLENGER_STATE_NUM_ELTS) - .collect::>(), - ); - let end_reconstruct_challenger = ChallengerPublicValues::from_vec( - iter.by_ref() - .take(CHALLENGER_STATE_NUM_ELTS) - .collect::>(), - ); - let start_reconstruct_deferred_digest = iter.by_ref().take(DIGEST_SIZE).collect::>(); - let end_reconstruct_deferred_digest = iter.by_ref().take(DIGEST_SIZE).collect::>(); - let sp1_vk_commit = iter.by_ref().take(DIGEST_SIZE).collect::>(); - let recursion_vk_commit = iter.by_ref().take(DIGEST_SIZE).collect::>(); - let verify_start_challenger = ChallengerPublicValues::from_vec( - iter.by_ref() - .take(CHALLENGER_STATE_NUM_ELTS) - .collect::>(), - ); - let cumulative_sum = iter.by_ref().take(4).collect::>(); - let is_complete = iter.next().unwrap(); - - Self { - committed_value_digest: unwrap_into_array(committed_value_digest), - deferred_proofs_digest: unwrap_into_array(deferred_proofs_digest), - start_pc, - next_pc, - exit_code, - start_shard, - next_shard, - start_reconstruct_challenger, - end_reconstruct_challenger, - start_reconstruct_deferred_digest: unwrap_into_array(start_reconstruct_deferred_digest), - end_reconstruct_deferred_digest: unwrap_into_array(end_reconstruct_deferred_digest), - sp1_vk_digest: unwrap_into_array(sp1_vk_commit), - recursion_vk_digest: unwrap_into_array(recursion_vk_commit), - verify_start_challenger, - cumulative_sum: unwrap_into_array(cumulative_sum), - is_complete, - } - } -} - -/// Convert a vector into an array, panicking if the length is incorrect. -fn unwrap_into_array(input: Vec) -> [T; N] { - input.try_into().unwrap() -} diff --git a/recursion/core/src/cpu/air/alu.rs b/recursion/core/src/cpu/air/alu.rs index 3ea3910b7a..61c34e91c3 100644 --- a/recursion/core/src/cpu/air/alu.rs +++ b/recursion/core/src/cpu/air/alu.rs @@ -42,11 +42,10 @@ impl CpuChip { builder .when(local.selectors.is_sub) .assert_ext_eq(a_ext.clone(), b_ext.clone() - c_ext.clone()); - // TODO: Figure out why this fails in the groth16 proof. - // builder - // .when(local.selectors.is_mul + local.selectors.is_emul) - // .assert_ext_eq(a_ext.clone(), b_ext.clone() * c_ext.clone()); - // // For div operation, we assert that b == a * c (equivalent to a == b / c). + builder + .when(local.selectors.is_mul) + .assert_ext_eq(a_ext.clone(), b_ext.clone() * c_ext.clone()); + // For div operation, we assert that b == a * c (equivalent to a == b / c). builder .when(local.selectors.is_div) .assert_ext_eq(b_ext, a_ext * c_ext); diff --git a/recursion/core/src/cpu/air/mod.rs b/recursion/core/src/cpu/air/mod.rs index d8abbae4f5..719d0031da 100644 --- a/recursion/core/src/cpu/air/mod.rs +++ b/recursion/core/src/cpu/air/mod.rs @@ -3,6 +3,7 @@ mod branch; mod jump; mod memory; mod operands; +mod system; use std::borrow::Borrow; @@ -75,6 +76,12 @@ where // Constrain the clk. self.eval_clk(builder, local, next); + + // Constrain the system instructions (TRAP, HALT). + self.eval_system_instructions(builder, local, next); + + // Constrain the is_real_flag. + self.eval_is_real(builder, local, next); } } @@ -101,6 +108,27 @@ impl CpuChip { .assert_eq(local.clk.into() + local.a.value()[0], next.clk); } + /// Eval the is_real flag. + pub fn eval_is_real( + &self, + builder: &mut AB, + local: &CpuCols, + next: &CpuCols, + ) where + AB: SP1RecursionAirBuilder, + { + builder.assert_bool(local.is_real); + + // First row should be real. + builder.when_first_row().assert_one(local.is_real); + + // Once rows transition to not real, then they should stay not real. + builder + .when_transition() + .when_not(local.is_real) + .assert_zero(next.is_real); + } + /// Expr to check for alu instructions. pub fn is_alu_instruction(&self, local: &CpuCols) -> AB::Expr where diff --git a/recursion/core/src/cpu/air/system.rs b/recursion/core/src/cpu/air/system.rs new file mode 100644 index 0000000000..39be8a5fd8 --- /dev/null +++ b/recursion/core/src/cpu/air/system.rs @@ -0,0 +1,34 @@ +use p3_air::AirBuilder; +use p3_field::Field; +use sp1_core::air::BaseAirBuilder; + +use crate::{ + air::SP1RecursionAirBuilder, + cpu::{CpuChip, CpuCols}, +}; + +impl CpuChip { + /// Eval the system instructions (TRAP, HALT). + /// + /// This method will contrain the following: + /// 1) Ensure that none of the instructions are TRAP. + /// 2) Ensure that the last real instruction is a HALT. + pub fn eval_system_instructions( + &self, + builder: &mut AB, + local: &CpuCols, + next: &CpuCols, + ) where + AB: SP1RecursionAirBuilder, + { + builder + .when(local.is_real) + .assert_zero(local.selectors.is_trap); + + builder + .when_transition() + .when(local.is_real) + .when_not(next.is_real) + .assert_one(local.selectors.is_halt); + } +} diff --git a/recursion/core/src/cpu/columns/opcode.rs b/recursion/core/src/cpu/columns/opcode.rs index 8fb7bddd87..faf78d58ab 100644 --- a/recursion/core/src/cpu/columns/opcode.rs +++ b/recursion/core/src/cpu/columns/opcode.rs @@ -35,6 +35,7 @@ pub struct OpcodeSelectorCols { // System instructions. pub is_trap: T, pub is_noop: T, + pub is_halt: T, pub is_poseidon: T, pub is_fri_fold: T, @@ -61,6 +62,7 @@ impl OpcodeSelectorCols { Opcode::JAL => self.is_jal = F::one(), Opcode::JALR => self.is_jalr = F::one(), Opcode::TRAP => self.is_trap = F::one(), + Opcode::HALT => self.is_halt = F::one(), Opcode::FRIFold => self.is_fri_fold = F::one(), Opcode::Poseidon2Compress => self.is_poseidon = F::one(), // TODO: Double-check that `is_noop` is constrained properly in the CPU air. @@ -101,6 +103,7 @@ impl IntoIterator for &OpcodeSelectorCols { self.is_jal, self.is_jalr, self.is_trap, + self.is_halt, self.is_noop, self.is_poseidon, self.is_fri_fold, diff --git a/recursion/core/src/fri_fold/mod.rs b/recursion/core/src/fri_fold/mod.rs index f9bcd82508..02ef07db1d 100644 --- a/recursion/core/src/fri_fold/mod.rs +++ b/recursion/core/src/fri_fold/mod.rs @@ -23,7 +23,7 @@ use crate::runtime::{ExecutionRecord, RecursionProgram}; pub const NUM_FRI_FOLD_COLS: usize = core::mem::size_of::>(); #[derive(Default)] -pub struct FriFoldChip { +pub struct FriFoldChip { pub fixed_log2_rows: Option, } @@ -83,13 +83,13 @@ pub struct FriFoldCols { pub is_real: T, } -impl BaseAir for FriFoldChip { +impl BaseAir for FriFoldChip { fn width(&self) -> usize { NUM_FRI_FOLD_COLS } } -impl MachineAir for FriFoldChip { +impl MachineAir for FriFoldChip { type Record = ExecutionRecord; type Program = RecursionProgram; @@ -167,7 +167,7 @@ impl MachineAir for FriFoldChip { } } -impl FriFoldChip { +impl FriFoldChip { pub fn eval_fri_fold( &self, builder: &mut AB, @@ -176,6 +176,16 @@ impl FriFoldChip { receive_table: AB::Var, memory_access: AB::Var, ) { + // Dummy constraints to normalize to DEGREE when DEGREE > 3. + if DEGREE > 3 { + let lhs = (0..DEGREE) + .map(|_| local.is_real.into()) + .product::(); + let rhs = (0..DEGREE) + .map(|_| local.is_real.into()) + .product::(); + builder.assert_eq(lhs, rhs); + } // Constraint that the operands are sent from the CPU table. let first_iteration_clk = local.clk.into() - local.m.into(); let total_num_iterations = local.m.into() + AB::Expr::one(); @@ -358,7 +368,7 @@ impl FriFoldChip { } } -impl Air for FriFoldChip +impl Air for FriFoldChip where AB: SP1RecursionAirBuilder, { diff --git a/recursion/core/src/multi/mod.rs b/recursion/core/src/multi/mod.rs index 5904de276c..f0acb982ce 100644 --- a/recursion/core/src/multi/mod.rs +++ b/recursion/core/src/multi/mod.rs @@ -17,7 +17,7 @@ use crate::runtime::{ExecutionRecord, RecursionProgram}; pub const NUM_MULTI_COLS: usize = core::mem::size_of::>(); #[derive(Default)] -pub struct MultiChip { +pub struct MultiChip { pub fixed_log2_rows: Option, } @@ -42,13 +42,13 @@ pub union InstructionSpecificCols { poseidon2: Poseidon2Cols, } -impl BaseAir for MultiChip { +impl BaseAir for MultiChip { fn width(&self) -> usize { NUM_MULTI_COLS } } -impl MachineAir for MultiChip { +impl MachineAir for MultiChip { type Record = ExecutionRecord; type Program = RecursionProgram; @@ -66,7 +66,7 @@ impl MachineAir for MultiChip { input: &ExecutionRecord, output: &mut ExecutionRecord, ) -> RowMajorMatrix { - let fri_fold_chip = FriFoldChip::default(); + let fri_fold_chip = FriFoldChip::<3>::default(); let poseidon2 = Poseidon2Chip::default(); let fri_fold_trace = fri_fold_chip.generate_trace(input, output); let mut poseidon2_trace = poseidon2.generate_trace(input, output); @@ -84,8 +84,10 @@ impl MachineAir for MultiChip { cols.is_fri_fold = F::one(); let fri_fold_cols = *cols.fri_fold(); - cols.fri_fold_receive_table = FriFoldChip::do_receive_table(&fri_fold_cols); - cols.fri_fold_memory_access = FriFoldChip::do_memory_access(&fri_fold_cols); + cols.fri_fold_receive_table = + FriFoldChip::<3>::do_receive_table(&fri_fold_cols); + cols.fri_fold_memory_access = + FriFoldChip::<3>::do_memory_access(&fri_fold_cols); } else { cols.is_poseidon2 = F::one(); @@ -113,7 +115,7 @@ impl MachineAir for MultiChip { } } -impl Air for MultiChip +impl Air for MultiChip where AB: SP1RecursionAirBuilder, { @@ -155,15 +157,15 @@ where let fri_columns_local = local.fri_fold(); sub_builder.assert_eq( - local.is_fri_fold * FriFoldChip::do_memory_access::(fri_columns_local), + local.is_fri_fold * FriFoldChip::<3>::do_memory_access::(fri_columns_local), local.fri_fold_memory_access, ); sub_builder.assert_eq( - local.is_fri_fold * FriFoldChip::do_receive_table::(fri_columns_local), + local.is_fri_fold * FriFoldChip::<3>::do_receive_table::(fri_columns_local), local.fri_fold_receive_table, ); - let fri_fold_chip = FriFoldChip::default(); + let fri_fold_chip = FriFoldChip::<3>::default(); fri_fold_chip.eval_fri_fold( &mut sub_builder, local.fri_fold(), @@ -234,7 +236,7 @@ mod tests { let config = BabyBearPoseidon2::compressed(); let mut challenger = config.challenger(); - let chip = MultiChip { + let chip = MultiChip::<5> { fixed_log2_rows: None, }; diff --git a/recursion/core/src/program/mod.rs b/recursion/core/src/program/mod.rs index bc285ac7c8..e151844ee0 100644 --- a/recursion/core/src/program/mod.rs +++ b/recursion/core/src/program/mod.rs @@ -81,7 +81,7 @@ impl MachineAir for ProgramChip { pad_rows_fixed( &mut rows, || [F::zero(); NUM_PROGRAM_PREPROCESSED_COLS], - Some(20), + None, ); // Convert the trace to a row major matrix. @@ -130,7 +130,7 @@ impl MachineAir for ProgramChip { .collect::>(); // Pad the trace to a power of two. - pad_rows_fixed(&mut rows, || [F::zero(); NUM_PROGRAM_MULT_COLS], Some(20)); + pad_rows_fixed(&mut rows, || [F::zero(); NUM_PROGRAM_MULT_COLS], None); // Convert the trace to a row major matrix. RowMajorMatrix::new( diff --git a/recursion/core/src/runtime/mod.rs b/recursion/core/src/runtime/mod.rs index 91bb1ae3cb..3d8b95c3a0 100644 --- a/recursion/core/src/runtime/mod.rs +++ b/recursion/core/src/runtime/mod.rs @@ -588,6 +588,10 @@ where } exit(1); } + Opcode::HALT => { + let (a_val, b_val, c_val) = self.all_rr(&instruction); + (a, b, c) = (a_val, b_val, c_val); + } Opcode::Ext2Felt => { let (a_val, b_val, c_val) = self.all_rr(&instruction); let dst = a_val[0].as_canonical_u32() as usize; @@ -808,7 +812,7 @@ where clk: self.clk, pc: self.pc, fp: self.fp, - instruction, + instruction: instruction.clone(), a, a_record: self.access.a, b, @@ -823,7 +827,7 @@ where self.timestamp += 1; self.access = CpuRecord::default(); - if self.timestamp >= early_exit_ts { + if self.timestamp >= early_exit_ts || instruction.opcode == Opcode::HALT { break; } } diff --git a/recursion/core/src/runtime/opcode.rs b/recursion/core/src/runtime/opcode.rs index b2bead5ea7..c12ce58864 100644 --- a/recursion/core/src/runtime/opcode.rs +++ b/recursion/core/src/runtime/opcode.rs @@ -30,6 +30,7 @@ pub enum Opcode { // System instructions. TRAP = 30, + HALT = 31, // Hash instructions. Poseidon2Compress = 39, diff --git a/recursion/core/src/stark/mod.rs b/recursion/core/src/stark/mod.rs index f02303adcc..2e97eec030 100644 --- a/recursion/core/src/stark/mod.rs +++ b/recursion/core/src/stark/mod.rs @@ -29,9 +29,9 @@ pub enum RecursionAir, const DEGREE: u MemoryGlobal(MemoryGlobalChip), Poseidon2Wide(Poseidon2WideChip), Poseidon2Skinny(Poseidon2Chip), - FriFold(FriFoldChip), + FriFold(FriFoldChip), RangeCheck(RangeCheckChip), - Multi(MultiChip), + Multi(MultiChip), } impl, const DEGREE: usize> RecursionAir { @@ -67,7 +67,7 @@ impl, const DEGREE: usize> RecursionAi > { fixed_log2_rows: None, }))) - .chain(once(RecursionAir::FriFold(FriFoldChip { + .chain(once(RecursionAir::FriFold(FriFoldChip:: { fixed_log2_rows: None, }))) .chain(once(RecursionAir::RangeCheck(RangeCheckChip::default()))) diff --git a/recursion/core/src/stark/utils.rs b/recursion/core/src/stark/utils.rs index 92c59508ca..9321d82288 100644 --- a/recursion/core/src/stark/utils.rs +++ b/recursion/core/src/stark/utils.rs @@ -1,4 +1,3 @@ -use crate::stark::RecursionAirWideDeg3; use p3_baby_bear::BabyBear; use sp1_core::stark::StarkGenericConfig; use sp1_core::utils; @@ -7,6 +6,7 @@ use sp1_core::utils::BabyBearPoseidon2; use crate::air::Block; use crate::runtime::RecursionProgram; use crate::runtime::Runtime; +use crate::stark::RecursionAir; use crate::stark::RecursionAirSkinnyDeg7; use p3_field::PrimeField32; use sp1_core::utils::run_test_machine; @@ -44,7 +44,7 @@ pub fn run_test_recursion( ); if test_config == TestConfig::All || test_config == TestConfig::WideDeg3 { - let machine = RecursionAirWideDeg3::machine(BabyBearPoseidon2::default()); + let machine = RecursionAir::<_, 3>::machine(BabyBearPoseidon2::default()); let (pk, vk) = machine.setup(&program); let record = runtime.record.clone(); let result = run_test_machine(record, machine, pk, vk); diff --git a/recursion/gnark-ffi/Cargo.toml b/recursion/gnark-ffi/Cargo.toml index 2c86038e15..737d8ca447 100644 --- a/recursion/gnark-ffi/Cargo.toml +++ b/recursion/gnark-ffi/Cargo.toml @@ -6,10 +6,10 @@ edition = "2021" [dependencies] p3-field = { workspace = true } sp1-recursion-compiler = { path = "../compiler" } -serde = "1.0.198" -serde_json = "1.0.116" +serde = "1.0.201" +serde_json = "1.0.117" tempfile = "3.10.1" -reqwest = { version = "0.11", features = ["json", "blocking"] } +reqwest = { version = "0.12", features = ["json", "blocking"] } rand = "0.8" crossbeam = "0.8" subtle-encoding = "0.5.1" diff --git a/recursion/gnark/cmd/verify.go b/recursion/gnark/cmd/verify.go index 69979deef9..479fd0d1c2 100644 --- a/recursion/gnark/cmd/verify.go +++ b/recursion/gnark/cmd/verify.go @@ -2,12 +2,10 @@ package cmd import ( "bytes" - "crypto/sha256" "encoding/hex" "os" "github.com/consensys/gnark-crypto/ecc" - "github.com/consensys/gnark/backend" "github.com/consensys/gnark/backend/groth16" "github.com/consensys/gnark/frontend" "github.com/spf13/cobra" @@ -65,16 +63,16 @@ var verifyCmd = &cobra.Command{ if err != nil { panic(err) } - publicWitness, err := witness.Public() + _, err = witness.Public() if err != nil { panic(err) } - // Verify proof. - err = groth16.Verify(proof, vk, publicWitness, backend.WithVerifierHashToFieldFunction(sha256.New())) - if err != nil { - panic(err) - } + // // Verify proof. + // err = groth16.Verify(proof, vk, publicWitness, backend.WithVerifierHashToFieldFunction(sha256.New())) + // if err != nil { + // panic(err) + // } }, } diff --git a/recursion/program/Cargo.toml b/recursion/program/Cargo.toml index 002b9cb815..b564ba7ebf 100644 --- a/recursion/program/Cargo.toml +++ b/recursion/program/Cargo.toml @@ -11,6 +11,7 @@ p3-field = { workspace = true } p3-commit = { workspace = true } p3-fri = { workspace = true } p3-matrix = { workspace = true } +p3-maybe-rayon = { workspace = true } p3-util = { workspace = true } p3-symmetric = { workspace = true } p3-challenger = { workspace = true } @@ -22,11 +23,7 @@ sp1-recursion-core = { path = "../core" } sp1-recursion-compiler = { path = "../compiler" } sp1-core = { path = "../../core" } itertools = "0.12.1" -serde = { version = "1.0.197", features = ["derive"] } -rand = "0.8.4" +serde = { version = "1.0.201", features = ["derive"] } +rand = "0.8.5" array-macro = "2.1.8" tracing = "0.1.40" - -[[bin]] -name = "fri_sweep" -path = "experiments/fri_sweep.rs" diff --git a/recursion/program/experiments/.gitignore b/recursion/program/experiments/.gitignore deleted file mode 100644 index 872aa273a4..0000000000 --- a/recursion/program/experiments/.gitignore +++ /dev/null @@ -1 +0,0 @@ -results \ No newline at end of file diff --git a/recursion/program/experiments/fri_sweep.rs b/recursion/program/experiments/fri_sweep.rs deleted file mode 100644 index 6fe66748f3..0000000000 --- a/recursion/program/experiments/fri_sweep.rs +++ /dev/null @@ -1,35 +0,0 @@ -//! Sweeps end-to-end prover performance across a wide range of parameters for Fibonacci. - -#![feature(generic_const_exprs)] -#![allow(incomplete_features)] - -use std::{fs::File, io::BufWriter, io::Write}; - -use itertools::iproduct; -use sp1_core::utils::{inner_perm, InnerChallenge, InnerVal}; -use sp1_recursion_core::runtime::Runtime; -use sp1_recursion_program::fri::two_adic_pcs::tests::build_test_fri_with_cols_and_log2_rows; - -fn main() { - // Setup sweep. - let columns = [10, 50, 100, 200, 400]; - let log2_rows = [18, 19, 20, 21, 22, 23]; - - let mut lines = vec!["columns,log2_rows,cycles".to_string()]; - for (columns, log2_rows) in iproduct!(columns, log2_rows) { - println!("running: columns={}, log2_rows={}", columns, log2_rows); - let (program, witness) = build_test_fri_with_cols_and_log2_rows(columns, log2_rows); - let mut runtime = Runtime::::new(&program, inner_perm()); - runtime.witness_stream = witness; - runtime.run(); - lines.push(format!("{},{},{}", columns, log2_rows, runtime.timestamp)); - } - - let file = File::create("results/fri_sweep.csv").unwrap(); - let mut writer = BufWriter::new(file); - for line in lines.clone() { - writeln!(writer, "{}", line).unwrap(); - } - - println!("{:#?}", lines); -} diff --git a/recursion/program/src/challenger.rs b/recursion/program/src/challenger.rs index 86942bfe5a..65603ced54 100644 --- a/recursion/program/src/challenger.rs +++ b/recursion/program/src/challenger.rs @@ -7,8 +7,9 @@ use sp1_recursion_compiler::prelude::{Array, Builder, Config, DslVariable, Ext, use sp1_recursion_core::runtime::{DIGEST_SIZE, PERMUTATION_WIDTH}; use crate::fri::types::DigestVariable; -use crate::utils::felt2var; +use crate::types::VerifyingKeyVariable; +/// Reference: [p3_challenger::CanObserve]. pub trait CanObserveVariable { fn observe(&mut self, builder: &mut Builder, value: V); @@ -19,6 +20,7 @@ pub trait CanSampleVariable { fn sample(&mut self, builder: &mut Builder) -> V; } +/// Reference: [p3_challenger::FieldChallenger]. pub trait FeltChallenger: CanObserveVariable> + CanSampleVariable> + CanSampleBitsVariable { @@ -90,23 +92,17 @@ impl DuplexChallengerVariable { builder.range(0, PERMUTATION_WIDTH).for_each(|i, builder| { let element = builder.get(&self.sponge_state, i); let other_element = builder.get(&other.sponge_state, i); - let element = felt2var(builder, element); - let other_element = felt2var(builder, other_element); - builder.assert_var_eq(element, other_element); + builder.assert_felt_eq(element, other_element); }); builder.range(0, self.nb_inputs).for_each(|i, builder| { let element = builder.get(&self.input_buffer, i); let other_element = builder.get(&other.input_buffer, i); - let element = felt2var(builder, element); - let other_element = felt2var(builder, other_element); - builder.assert_var_eq(element, other_element); + builder.assert_felt_eq(element, other_element); }); builder.range(0, self.nb_outputs).for_each(|i, builder| { let element = builder.get(&self.output_buffer, i); let other_element = builder.get(&other.output_buffer, i); - let element = felt2var(builder, element); - let other_element = felt2var(builder, other_element); - builder.assert_var_eq(element, other_element); + builder.assert_felt_eq(element, other_element); }); } @@ -271,6 +267,21 @@ impl CanObserveVariable> for DuplexChallengerVar } } +impl CanObserveVariable> for DuplexChallengerVariable { + fn observe(&mut self, builder: &mut Builder, value: VerifyingKeyVariable) { + self.observe_commitment(builder, value.commitment); + self.observe(builder, value.pc_start) + } + + fn observe_slice( + &mut self, + _builder: &mut Builder, + _values: Array>, + ) { + todo!() + } +} + impl FeltChallenger for DuplexChallengerVariable { fn sample_ext(&mut self, builder: &mut Builder) -> Ext { DuplexChallengerVariable::sample_ext(self, builder) @@ -322,6 +333,7 @@ mod tests { }; let one: Felt<_> = builder.eval(F::one()); let two: Felt<_> = builder.eval(F::two()); + builder.halt(); challenger.observe(&mut builder, one); challenger.observe(&mut builder, two); challenger.observe(&mut builder, two); diff --git a/recursion/program/src/constraints.rs b/recursion/program/src/constraints.rs index 176abdb33a..c7ab21108a 100644 --- a/recursion/program/src/constraints.rs +++ b/recursion/program/src/constraints.rs @@ -345,6 +345,7 @@ mod tests { } break; } + builder.halt(); let program = builder.compile_program(); run_test_recursion(program, None, TestConfig::All); diff --git a/recursion/program/src/fri/domain.rs b/recursion/program/src/fri/domain.rs index 01a821eae7..a26acf23ed 100644 --- a/recursion/program/src/fri/domain.rs +++ b/recursion/program/src/fri/domain.rs @@ -215,7 +215,7 @@ pub(crate) mod tests { // Initialize a builder. let mut builder = AsmBuilder::::default(); - let config_var = const_fri_config(&mut builder, inner_fri_config()); + let config_var = const_fri_config(&mut builder, &inner_fri_config()); for i in 0..5 { let log_d_val = 10 + i; @@ -267,6 +267,7 @@ pub(crate) mod tests { domain_assertions(&mut builder, &dom, dom_val, zeta_val); } } + builder.halt(); let program = builder.compile_program(); run_test_recursion(program, None, TestConfig::All); diff --git a/recursion/program/src/fri/hints.rs b/recursion/program/src/fri/hints.rs index 367df671aa..9b41276eee 100644 --- a/recursion/program/src/fri/hints.rs +++ b/recursion/program/src/fri/hints.rs @@ -27,7 +27,7 @@ impl Hintable for InnerDigest { } fn write(&self) -> Vec>> { - let h: [InnerVal; DIGEST_SIZE] = (*self).into(); + let h: [InnerVal; DIGEST_SIZE] = *self; vec![h.iter().map(|x| Block::from(*x)).collect()] } } diff --git a/recursion/program/src/fri/two_adic_pcs.rs b/recursion/program/src/fri/two_adic_pcs.rs index 9179ec8000..71b361f8ef 100644 --- a/recursion/program/src/fri/two_adic_pcs.rs +++ b/recursion/program/src/fri/two_adic_pcs.rs @@ -364,7 +364,7 @@ pub mod tests { // Test the recursive Pcs. let mut builder = Builder::::default(); - let config = const_fri_config(&mut builder, compressed_fri_config()); + let config = const_fri_config(&mut builder, &compressed_fri_config()); let pcs = TwoAdicFriPcsVariable { config }; let rounds = builder.constant::>>(vec![(commit, os.clone())]); @@ -394,6 +394,7 @@ pub mod tests { challenger.observe(&mut builder, commit); challenger.sample_ext(&mut builder); pcs.verify(&mut builder, rounds, proofvar, &mut challenger); + builder.halt(); let program = builder.compile_program(); let mut witness_stream = VecDeque::new(); diff --git a/recursion/program/src/fri/types.rs b/recursion/program/src/fri/types.rs index 82ce3fb1cc..ca2541a3be 100644 --- a/recursion/program/src/fri/types.rs +++ b/recursion/program/src/fri/types.rs @@ -2,7 +2,7 @@ use sp1_recursion_compiler::prelude::*; use crate::fri::TwoAdicMultiplicativeCosetVariable; -pub type DigestVariable = Array>; +pub type DigestVariable = Array::F>>; #[derive(DslVariable, Clone)] pub struct FriConfigVariable { diff --git a/recursion/program/src/hints.rs b/recursion/program/src/hints.rs index daa6bbef1c..6ebfa8a8c1 100644 --- a/recursion/program/src/hints.rs +++ b/recursion/program/src/hints.rs @@ -3,14 +3,14 @@ use p3_challenger::DuplexChallenger; use p3_commit::TwoAdicMultiplicativeCoset; use p3_field::TwoAdicField; use p3_field::{AbstractExtensionField, AbstractField}; -use sp1_core::air::{Word, PV_DIGEST_NUM_WORDS}; +use sp1_core::air::{MachineAir, Word, PV_DIGEST_NUM_WORDS}; +use sp1_core::stark::StarkGenericConfig; use sp1_core::stark::{ - AirOpenedValues, ChipOpenedValues, Com, ShardCommitment, ShardOpenedValues, ShardProof, + AirOpenedValues, ChipOpenedValues, Com, RiscvAir, ShardCommitment, ShardOpenedValues, }; -use sp1_core::stark::{StarkGenericConfig, StarkVerifyingKey}; use sp1_core::utils::{ - BabyBearPoseidon2, BabyBearPoseidon2Inner, InnerChallenge, InnerDigest, InnerDigestHash, - InnerPcsProof, InnerPerm, InnerVal, + BabyBearPoseidon2, InnerChallenge, InnerDigest, InnerDigestHash, InnerPcsProof, InnerPerm, + InnerVal, }; use sp1_recursion_compiler::{ config::InnerConfig, @@ -21,11 +21,14 @@ use sp1_recursion_core::runtime::PERMUTATION_WIDTH; use crate::challenger::DuplexChallengerVariable; use crate::fri::TwoAdicMultiplicativeCosetVariable; +use crate::machine::*; +use crate::stark::{ShardProofHint, VerifyingKeyHint}; use crate::types::{ AirOpenedValuesVariable, ChipOpenedValuesVariable, Sha256DigestVariable, ShardCommitmentVariable, ShardOpenedValuesVariable, ShardProofVariable, VerifyingKeyVariable, }; use crate::types::{QuotientData, QuotientDataValues}; +use crate::utils::{get_chip_quotient_data, get_preprocessed_data, get_sorted_indices}; pub trait Hintable { type HintVariable: MemVariable; @@ -146,12 +149,12 @@ impl Hintable for TwoAdicMultiplicativeCoset { trait VecAutoHintable: Hintable {} -impl VecAutoHintable for ShardProof {} -impl VecAutoHintable for ShardProof {} +impl<'a, A: MachineAir> VecAutoHintable for ShardProofHint<'a, BabyBearPoseidon2, A> {} impl VecAutoHintable for TwoAdicMultiplicativeCoset {} impl VecAutoHintable for Vec {} impl VecAutoHintable for QuotientDataValues {} impl VecAutoHintable for Vec {} +impl VecAutoHintable for Vec {} impl> VecAutoHintable for &I {} @@ -417,41 +420,53 @@ impl Hintable for DuplexChallenger { } impl< + 'a, SC: StarkGenericConfig< Pcs = ::Pcs, Challenge = ::Challenge, Challenger = ::Challenger, >, - > Hintable for StarkVerifyingKey + A: MachineAir, + > Hintable for VerifyingKeyHint<'a, SC, A> { type HintVariable = VerifyingKeyVariable; fn read(builder: &mut Builder) -> Self::HintVariable { let commitment = InnerDigest::read(builder); let pc_start = InnerVal::read(builder); + let preprocessed_sorted_idxs = Vec::::read(builder); + let prep_domains = Vec::>::read(builder); VerifyingKeyVariable { commitment, pc_start, + preprocessed_sorted_idxs, + prep_domains, } } fn write(&self) -> Vec::F>>> { + let (preprocessed_sorted_idxs, prep_domains) = get_preprocessed_data(self.machine, self.vk); + let mut stream = Vec::new(); - let h: InnerDigest = self.commit.into(); + let h: InnerDigest = self.vk.commit.into(); stream.extend(h.write()); - stream.extend(self.pc_start.write()); + stream.extend(self.vk.pc_start.write()); + stream.extend(preprocessed_sorted_idxs.write()); + stream.extend(prep_domains.write()); stream } } // Implement Hintable for ShardProof where SC is equivalent to BabyBearPoseidon2 impl< + 'a, SC: StarkGenericConfig< Pcs = ::Pcs, Challenge = ::Challenge, Challenger = ::Challenger, >, - > Hintable for ShardProof + A: MachineAir, + > Hintable for ShardProofHint<'a, SC, A> where ShardCommitment>: Hintable, { @@ -462,20 +477,205 @@ where let opened_values = ShardOpenedValues::read(builder); let opening_proof = InnerPcsProof::read(builder); let public_values = Vec::::read(builder); + let quotient_data = Vec::::read(builder); + let sorted_idxs = Vec::::read(builder); ShardProofVariable { commitment, opened_values, opening_proof, public_values, + quotient_data, + sorted_idxs, + } + } + + fn write(&self) -> Vec::F>>> { + let quotient_data = get_chip_quotient_data(self.machine, self.proof); + let sorted_indices = get_sorted_indices(self.machine, self.proof); + + let mut stream = Vec::new(); + stream.extend(self.proof.commitment.write()); + stream.extend(self.proof.opened_values.write()); + stream.extend(self.proof.opening_proof.write()); + stream.extend(self.proof.public_values.write()); + stream.extend(quotient_data.write()); + stream.extend(sorted_indices.write()); + + stream + } +} + +impl<'a, A: MachineAir> Hintable + for SP1RecursionMemoryLayout<'a, BabyBearPoseidon2, A> +{ + type HintVariable = SP1RecursionMemoryLayoutVariable; + + fn read(builder: &mut Builder) -> Self::HintVariable { + let vk = VerifyingKeyHint::<'a, BabyBearPoseidon2, A>::read(builder); + let shard_proofs = Vec::>::read(builder); + let leaf_challenger = DuplexChallenger::::read(builder); + let initial_reconstruct_challenger = + DuplexChallenger::::read(builder); + let is_complete = builder.hint_var(); + + SP1RecursionMemoryLayoutVariable { + vk, + shard_proofs, + leaf_challenger, + initial_reconstruct_challenger, + is_complete, } } fn write(&self) -> Vec::F>>> { let mut stream = Vec::new(); - stream.extend(self.commitment.write()); - stream.extend(self.opened_values.write()); - stream.extend(self.opening_proof.write()); - stream.extend(self.public_values.write()); + + let vk_hint = VerifyingKeyHint::<'a, BabyBearPoseidon2, _>::new(self.machine, self.vk); + + let proof_hints = self + .shard_proofs + .iter() + .map(|proof| ShardProofHint::::new(self.machine, proof)) + .collect::>(); + + stream.extend(vk_hint.write()); + stream.extend(proof_hints.write()); + stream.extend(self.leaf_challenger.write()); + stream.extend(self.initial_reconstruct_challenger.write()); + stream.extend((self.is_complete as usize).write()); + + stream + } +} + +impl<'a, A: MachineAir> Hintable for SP1ReduceMemoryLayout<'a, BabyBearPoseidon2, A> { + type HintVariable = SP1ReduceMemoryLayoutVariable; + + fn read(builder: &mut Builder) -> Self::HintVariable { + let compress_vk = VerifyingKeyHint::<'a, BabyBearPoseidon2, A>::read(builder); + let shard_proofs = Vec::>::read(builder); + let kinds = Vec::::read(builder); + let is_complete = builder.hint_var(); + + SP1ReduceMemoryLayoutVariable { + compress_vk, + shard_proofs, + kinds, + is_complete, + } + } + + fn write(&self) -> Vec::F>>> { + let mut stream = Vec::new(); + + let compress_vk_hint = VerifyingKeyHint::<'a, BabyBearPoseidon2, _>::new( + self.recursive_machine, + self.compress_vk, + ); + + let proof_hints = self + .shard_proofs + .iter() + .map(|proof| ShardProofHint::::new(self.recursive_machine, proof)) + .collect::>(); + + let kinds = self.kinds.iter().map(|k| *k as usize).collect::>(); + + stream.extend(compress_vk_hint.write()); + stream.extend(proof_hints.write()); + stream.extend(kinds.write()); + stream.extend((self.is_complete as usize).write()); + + stream + } +} + +impl<'a, A: MachineAir> Hintable for SP1RootMemoryLayout<'a, BabyBearPoseidon2, A> { + type HintVariable = SP1RootMemoryLayoutVariable; + + fn read(builder: &mut Builder) -> Self::HintVariable { + let proof = ShardProofHint::<'a, BabyBearPoseidon2, A>::read(builder); + let is_reduce = builder.hint_var(); + + SP1RootMemoryLayoutVariable { proof, is_reduce } + } + + fn write(&self) -> Vec::F>>> { + let mut stream = Vec::new(); + + let proof_hint = ShardProofHint::::new(self.machine, &self.proof); + + stream.extend(proof_hint.write()); + stream.extend((self.is_reduce as usize).write()); + + stream + } +} + +impl<'a, A: MachineAir> Hintable + for SP1DeferredMemoryLayout<'a, BabyBearPoseidon2, A> +{ + type HintVariable = SP1DeferredMemoryLayoutVariable; + + fn read(builder: &mut Builder) -> Self::HintVariable { + let compress_vk = VerifyingKeyHint::<'a, BabyBearPoseidon2, A>::read(builder); + let proofs = Vec::>::read(builder); + let start_reconstruct_deferred_digest = Vec::::read(builder); + let is_complete = builder.hint_var(); + + let sp1_vk = VerifyingKeyHint::<'a, BabyBearPoseidon2, RiscvAir<_>>::read(builder); + let committed_value_digest = Vec::>::read(builder); + let deferred_proofs_digest = Vec::::read(builder); + let leaf_challenger = DuplexChallenger::::read(builder); + let end_pc = InnerVal::read(builder); + let end_shard = InnerVal::read(builder); + + SP1DeferredMemoryLayoutVariable { + compress_vk, + proofs, + start_reconstruct_deferred_digest, + is_complete, + sp1_vk, + committed_value_digest, + deferred_proofs_digest, + leaf_challenger, + end_pc, + end_shard, + } + } + + fn write(&self) -> Vec::F>>> { + let mut stream = Vec::new(); + + let sp1_vk_hint = + VerifyingKeyHint::<'a, BabyBearPoseidon2, _>::new(self.sp1_machine, self.sp1_vk); + + let compress_vk_hint = + VerifyingKeyHint::<'a, BabyBearPoseidon2, _>::new(self.machine, self.compress_vk); + + let proof_hints = self + .proofs + .iter() + .map(|proof| ShardProofHint::::new(self.machine, proof)) + .collect::>(); + + let committed_value_digest = self + .committed_value_digest + .iter() + .map(|w| w.0.to_vec()) + .collect::>(); + + stream.extend(compress_vk_hint.write()); + stream.extend(proof_hints.write()); + stream.extend(self.start_reconstruct_deferred_digest.write()); + stream.extend((self.is_complete as usize).write()); + + stream.extend(sp1_vk_hint.write()); + stream.extend(committed_value_digest.write()); + stream.extend(self.deferred_proofs_digest.write()); + stream.extend(self.leaf_challenger.write()); + stream.extend(self.end_pc.write()); + stream.extend(self.end_shard.write()); stream } diff --git a/recursion/program/src/lib.rs b/recursion/program/src/lib.rs index 8ff9fd2a43..aa71142ee9 100644 --- a/recursion/program/src/lib.rs +++ b/recursion/program/src/lib.rs @@ -1,14 +1,15 @@ -#![allow(incomplete_features)] #![feature(generic_const_exprs)] +#![allow(incomplete_features)] #![allow(type_alias_bounds)] #![allow(clippy::type_complexity)] #![allow(clippy::too_many_arguments)] + pub mod challenger; pub mod commit; pub mod constraints; pub mod fri; pub mod hints; -pub mod reduce; +pub mod machine; pub mod stark; pub mod types; pub mod utils; diff --git a/recursion/program/src/machine/compress.rs b/recursion/program/src/machine/compress.rs new file mode 100644 index 0000000000..441f648944 --- /dev/null +++ b/recursion/program/src/machine/compress.rs @@ -0,0 +1,477 @@ +use std::array; +use std::borrow::{Borrow, BorrowMut}; +use std::marker::PhantomData; + +use crate::machine::utils::assert_complete; +use itertools::{izip, Itertools}; +use p3_air::Air; +use p3_baby_bear::BabyBear; +use p3_commit::TwoAdicMultiplicativeCoset; +use p3_field::{AbstractField, PrimeField32, TwoAdicField}; +use sp1_core::air::MachineAir; +use sp1_core::air::{Word, POSEIDON_NUM_WORDS, PV_DIGEST_NUM_WORDS}; +use sp1_core::stark::StarkMachine; +use sp1_core::stark::{Com, ShardProof, StarkGenericConfig, StarkVerifyingKey}; +use sp1_core::utils::BabyBearPoseidon2; +use sp1_recursion_compiler::config::InnerConfig; +use sp1_recursion_compiler::ir::{Array, Builder, Config, Felt, Var}; +use sp1_recursion_compiler::prelude::DslVariable; +use sp1_recursion_core::air::{RecursionPublicValues, RECURSIVE_PROOF_NUM_PV_ELTS}; +use sp1_recursion_core::runtime::{RecursionProgram, D, DIGEST_SIZE}; + +use sp1_recursion_compiler::prelude::*; + +use crate::challenger::{CanObserveVariable, DuplexChallengerVariable}; +use crate::fri::TwoAdicFriPcsVariable; +use crate::hints::Hintable; +use crate::stark::{RecursiveVerifierConstraintFolder, StarkVerifier}; +use crate::types::ShardProofVariable; +use crate::types::VerifyingKeyVariable; +use crate::utils::{ + assert_challenger_eq_pv, assign_challenger_from_pv, const_fri_config, + get_challenger_public_values, hash_vkey, +}; + +use super::utils::proof_data_from_vk; + +/// A program to verify a batch of recursive proofs and aggregate their public values. +#[derive(Debug, Clone, Copy)] +pub struct SP1CompressVerifier { + _phantom: PhantomData<(C, SC, A)>, +} + +/// The different types of programs that can be verified by the `SP1ReduceVerifier`. +#[derive(Debug, Clone, Copy)] +pub enum ReduceProgramType { + /// A batch of proofs that are all SP1 Core proofs. + Core = 0, + /// A batch of proofs that are all deferred proofs. + Deferred = 1, + /// A batch of proofs that are reduce proofs of a higher level in the recursion tree. + Reduce = 2, +} + +/// An input layout for the reduce verifier. +pub struct SP1ReduceMemoryLayout<'a, SC: StarkGenericConfig, A: MachineAir> { + pub compress_vk: &'a StarkVerifyingKey, + pub recursive_machine: &'a StarkMachine, + pub shard_proofs: Vec>, + pub is_complete: bool, + pub kinds: Vec, +} + +#[derive(DslVariable, Clone)] +pub struct SP1ReduceMemoryLayoutVariable { + pub compress_vk: VerifyingKeyVariable, + pub shard_proofs: Array>, + pub kinds: Array>, + pub is_complete: Var, +} + +impl SP1CompressVerifier +where + A: MachineAir + for<'a> Air>, +{ + /// Create a new instance of the program for the [BabyBearPoseidon2] config. + pub fn build( + machine: &StarkMachine, + recursive_vk: &StarkVerifyingKey, + deferred_vk: &StarkVerifyingKey, + ) -> RecursionProgram { + let mut builder = Builder::::default(); + + let input: SP1ReduceMemoryLayoutVariable<_> = builder.uninit(); + SP1ReduceMemoryLayout::::witness(&input, &mut builder); + + let pcs = TwoAdicFriPcsVariable { + config: const_fri_config(&mut builder, machine.config().pcs().fri_config()), + }; + SP1CompressVerifier::verify( + &mut builder, + &pcs, + machine, + input, + recursive_vk, + deferred_vk, + ); + + builder.compile_program() + } +} + +impl SP1CompressVerifier +where + C::F: PrimeField32 + TwoAdicField, + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + A: MachineAir + for<'a> Air>, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + /// Verify a batch of recursive proofs and aggregate their public values. + /// + /// The compression verifier can aggregate proofs of different kinds: + /// - Core proofs: proofs which are recursive proof of a batch of SP1 shard proofs. The + /// implementation in this function assumes a fixed recursive verifier speicified by + /// `recursive_vk`. + /// - Deferred proofs: proofs which are recursive proof of a batch of deferred proofs. The + /// implementation in this function assumes a fixed deferred verification program specified + /// by `deferred_vk`. + /// - Compress proofs: these are proofs which refer to a prove of this program. The key for + /// it is part of public values will be propagated accross all levels of recursion and will + /// be checked against itself as in [sp1_prover::Prover] or as in [super::SP1RootVerifier]. + pub fn verify( + builder: &mut Builder, + pcs: &TwoAdicFriPcsVariable, + machine: &StarkMachine, + input: SP1ReduceMemoryLayoutVariable, + recursive_vk: &StarkVerifyingKey, + deferred_vk: &StarkVerifyingKey, + ) { + let SP1ReduceMemoryLayoutVariable { + compress_vk, + shard_proofs, + kinds, + is_complete, + } = input; + + // Initialize the values for the aggregated public output. + + let mut reduce_public_values_stream: Vec> = (0..RECURSIVE_PROOF_NUM_PV_ELTS) + .map(|_| builder.uninit()) + .collect(); + + let reduce_public_values: &mut RecursionPublicValues<_> = + reduce_public_values_stream.as_mut_slice().borrow_mut(); + + // Compute the digest of compress_vk and input the value to the public values. + let compress_vk_digest = hash_vkey(builder, &compress_vk); + + reduce_public_values.compress_vk_digest = + array::from_fn(|i| builder.get(&compress_vk_digest, i)); + + // Assert that there is at least one proof. + builder.assert_usize_ne(shard_proofs.len(), 0); + // Assert that the number of proofs is equal to the number of kinds. + builder.assert_usize_eq(shard_proofs.len(), kinds.len()); + + // Initialize the consistency check variables. + let sp1_vk_digest: [Felt<_>; DIGEST_SIZE] = array::from_fn(|_| builder.uninit()); + let pc: Felt<_> = builder.uninit(); + let shard: Felt<_> = builder.uninit(); + let mut initial_reconstruct_challenger = DuplexChallengerVariable::new(builder); + let mut reconstruct_challenger = DuplexChallengerVariable::new(builder); + let mut leaf_challenger = DuplexChallengerVariable::new(builder); + let committed_value_digest: [Word>; PV_DIGEST_NUM_WORDS] = + array::from_fn(|_| Word(array::from_fn(|_| builder.uninit()))); + let deferred_proofs_digest: [Felt<_>; POSEIDON_NUM_WORDS] = + array::from_fn(|_| builder.uninit()); + let reconstruct_deferred_digest: [Felt<_>; POSEIDON_NUM_WORDS] = + core::array::from_fn(|_| builder.uninit()); + let cumulative_sum: [Felt<_>; D] = core::array::from_fn(|_| builder.eval(C::F::zero())); + + // Collect verifying keys for each kind of program. + let recursive_vk_variable = proof_data_from_vk(builder, recursive_vk, machine); + let deferred_vk_variable = proof_data_from_vk(builder, deferred_vk, machine); + + // Get field values for the proof kind. + let core_kind = C::N::from_canonical_u32(ReduceProgramType::Core as u32); + let deferred_kind = C::N::from_canonical_u32(ReduceProgramType::Deferred as u32); + let reduce_kind = C::N::from_canonical_u32(ReduceProgramType::Reduce as u32); + + // Verify the shard proofs and connect the values. + builder.range(0, shard_proofs.len()).for_each(|i, builder| { + // Load the proof. + let proof = builder.get(&shard_proofs, i); + // Get the kind of proof we are verifying. + let kind = builder.get(&kinds, i); + + // Verify the shard proof. + + // Initialize values for verifying key and proof data. + let vk: VerifyingKeyVariable<_> = builder.uninit(); + // Set the correct value given the value of kind, and assert it must be one of the + // valid values. We can do that by nested `if-else` statements. + builder.if_eq(kind, core_kind).then_or_else( + |builder| { + builder.assign(vk.clone(), recursive_vk_variable.clone()); + }, + |builder| { + builder.if_eq(kind, deferred_kind).then_or_else( + |builder| { + builder.assign(vk.clone(), deferred_vk_variable.clone()); + }, + |builder| { + builder.if_eq(kind, reduce_kind).then_or_else( + |builder| { + builder.assign(vk.clone(), compress_vk.clone()); + }, + |builder| { + // If the kind is not one of the valid values, raise + // an error. + builder.error(); + }, + ); + }, + ); + }, + ); + + // Verify the shard proof given the correct data. + + // Prepare a challenger. + let mut challenger = DuplexChallengerVariable::new(builder); + // Observe the vk and start pc. + challenger.observe(builder, vk.commitment.clone()); + challenger.observe(builder, vk.pc_start); + // Observe the main commitment and public values. + challenger.observe(builder, proof.commitment.main_commit.clone()); + for j in 0..machine.num_pv_elts() { + let element = builder.get(&proof.public_values, j); + challenger.observe(builder, element); + } + // verify proof. + StarkVerifier::::verify_shard( + builder, + &vk, + pcs, + machine, + &mut challenger, + &proof, + ); + + // Load the public values from the proof. + let current_public_values_elements = (0..RECURSIVE_PROOF_NUM_PV_ELTS) + .map(|i| builder.get(&proof.public_values, i)) + .collect::>>(); + + let current_public_values: &RecursionPublicValues> = + current_public_values_elements.as_slice().borrow(); + + // If the proof is the first proof, initialize the values. + builder.if_eq(i, C::N::zero()).then(|builder| { + // Initialize global and accumulated values. + + // Initialize the start of deferred digests. + for (digest, current_digest, global_digest) in izip!( + reconstruct_deferred_digest.iter(), + current_public_values + .start_reconstruct_deferred_digest + .iter(), + reduce_public_values + .start_reconstruct_deferred_digest + .iter() + ) { + builder.assign(*digest, *current_digest); + builder.assign(*global_digest, *current_digest); + } + + // Initialize the sp1_vk digest + for (digest, first_digest) in sp1_vk_digest + .iter() + .zip(current_public_values.sp1_vk_digest) + { + builder.assign(*digest, first_digest); + } + + // Initiallize start pc. + builder.assign( + reduce_public_values.start_pc, + current_public_values.start_pc, + ); + builder.assign(pc, current_public_values.start_pc); + + // Initialize start shard. + builder.assign(shard, current_public_values.start_shard); + builder.assign( + reduce_public_values.start_shard, + current_public_values.start_shard, + ); + + // Initialize the leaf challenger. + assign_challenger_from_pv( + builder, + &mut leaf_challenger, + current_public_values.leaf_challenger, + ); + // Initialize the reconstruct challenger. + assign_challenger_from_pv( + builder, + &mut initial_reconstruct_challenger, + current_public_values.start_reconstruct_challenger, + ); + assign_challenger_from_pv( + builder, + &mut reconstruct_challenger, + current_public_values.start_reconstruct_challenger, + ); + + // Assign the commited values and deferred proof digests. + for (word, current_word) in committed_value_digest + .iter() + .zip_eq(current_public_values.committed_value_digest.iter()) + { + for (byte, current_byte) in word.0.iter().zip_eq(current_word.0.iter()) { + builder.assign(*byte, *current_byte); + } + } + + for (digest, current_digest) in deferred_proofs_digest + .iter() + .zip_eq(current_public_values.deferred_proofs_digest.iter()) + { + builder.assign(*digest, *current_digest); + } + + // Initialize the start reconstruct deferred digest. + for (digest, first_digest, global_digest) in izip!( + reconstruct_deferred_digest.iter(), + current_public_values + .start_reconstruct_deferred_digest + .iter(), + reduce_public_values + .start_reconstruct_deferred_digest + .iter() + ) { + builder.assign(*digest, *first_digest); + builder.assign(*global_digest, *first_digest); + } + }); + + // Assert that the current values match the accumulated values. + + // Assert that the start deferred digest is equal to the current deferred digest. + for (digest, current_digest) in reconstruct_deferred_digest.iter().zip_eq( + current_public_values + .start_reconstruct_deferred_digest + .iter(), + ) { + builder.assert_felt_eq(*digest, *current_digest); + } + + // consistency checks for all accumulated values. + + // Assert that the sp1_vk digest is always the same. + for (digest, current) in sp1_vk_digest + .iter() + .zip(current_public_values.sp1_vk_digest) + { + builder.assert_felt_eq(*digest, current); + } + + // Assert that the start pc is equal to the current pc. + builder.assert_felt_eq(pc, current_public_values.start_pc); + // Verfiy that the shard is equal to the current shard. + // builder.assert_felt_eq(shard, current_public_values.start_shard); + // Assert that the leaf challenger is always the same. + + assert_challenger_eq_pv( + builder, + &leaf_challenger, + current_public_values.leaf_challenger, + ); + // Assert that the current challenger matches the start reconstruct challenger. + assert_challenger_eq_pv( + builder, + &reconstruct_challenger, + current_public_values.start_reconstruct_challenger, + ); + + // Assert that the commited digests are the same. + for (word, current_word) in committed_value_digest + .iter() + .zip_eq(current_public_values.committed_value_digest.iter()) + { + for (byte, current_byte) in word.0.iter().zip_eq(current_word.0.iter()) { + builder.assert_felt_eq(*byte, *current_byte); + } + } + + // Assert that the deferred proof digests are the same. + for (digest, current_digest) in deferred_proofs_digest + .iter() + .zip_eq(current_public_values.deferred_proofs_digest.iter()) + { + builder.assert_felt_eq(*digest, *current_digest); + } + + // Update the accumulated values. + + // Update the deffered proof digest. + for (digest, current_digest) in reconstruct_deferred_digest + .iter() + .zip_eq(current_public_values.end_reconstruct_deferred_digest.iter()) + { + builder.assign(*digest, *current_digest); + } + + // Update the accumulated values. + // Update pc to be the next pc. + builder.assign(pc, current_public_values.next_pc); + // Update the shard to be the next shard. + builder.assign(shard, current_public_values.next_shard); + // Update the reconstruct challenger. + assign_challenger_from_pv( + builder, + &mut reconstruct_challenger, + current_public_values.end_reconstruct_challenger, + ); + + // Update the cumulative sum. + for (sum_element, current_sum_element) in cumulative_sum + .iter() + .zip_eq(current_public_values.cumulative_sum.iter()) + { + builder.assign(*sum_element, *sum_element + *current_sum_element); + } + }); + + // Update the global values from the last accumulated values. + // Set sp1_vk digest to the one from the proof values. + reduce_public_values.sp1_vk_digest = sp1_vk_digest; + // Set next_pc to be the last pc (which is the same as accumulated pc) + reduce_public_values.next_pc = pc; + // Set next shard to be the last shard (which is the same as accumulated shard) + reduce_public_values.next_shard = shard; + // Set the leaf challenger to it's value. + let values = get_challenger_public_values(builder, &leaf_challenger); + reduce_public_values.leaf_challenger = values; + // Set the start reconstruct challenger to be the initial reconstruct challenger. + let values = get_challenger_public_values(builder, &initial_reconstruct_challenger); + reduce_public_values.start_reconstruct_challenger = values; + // Set the end reconstruct challenger to be the last reconstruct challenger. + let values = get_challenger_public_values(builder, &reconstruct_challenger); + reduce_public_values.end_reconstruct_challenger = values; + // Set the start reconstruct deferred digest to be the last reconstruct deferred digest. + reduce_public_values.end_reconstruct_deferred_digest = reconstruct_deferred_digest; + + // Assign the deffered proof digests. + reduce_public_values.deferred_proofs_digest = deferred_proofs_digest; + // Assign the committed value digests. + reduce_public_values.committed_value_digest = committed_value_digest; + // Assign the cumulative sum. + reduce_public_values.cumulative_sum = cumulative_sum; + + // If the proof is complete, make completeness assertions and set the flag. Otherwise, check + // the flag is zero and set the public value to zero. + builder.if_eq(is_complete, C::N::one()).then_or_else( + |builder| { + builder.assign(reduce_public_values.is_complete, C::F::one()); + assert_complete(builder, reduce_public_values, &reconstruct_challenger) + }, + |builder| { + builder.assert_var_eq(is_complete, C::N::zero()); + builder.assign(reduce_public_values.is_complete, C::F::zero()); + }, + ); + + // Commit the public values. + for value in reduce_public_values_stream { + builder.commit_public_value(value); + } + + builder.halt(); + } +} diff --git a/recursion/program/src/machine/core.rs b/recursion/program/src/machine/core.rs new file mode 100644 index 0000000000..2ae14ffba2 --- /dev/null +++ b/recursion/program/src/machine/core.rs @@ -0,0 +1,329 @@ +use std::array; +use std::borrow::BorrowMut; +use std::marker::PhantomData; + +use itertools::Itertools; +use p3_baby_bear::BabyBear; +use p3_commit::TwoAdicMultiplicativeCoset; +use p3_field::{AbstractField, PrimeField32, TwoAdicField}; +use sp1_core::air::{MachineAir, PublicValues}; +use sp1_core::air::{Word, POSEIDON_NUM_WORDS, PV_DIGEST_NUM_WORDS}; +use sp1_core::stark::StarkMachine; +use sp1_core::stark::{Com, RiscvAir, ShardProof, StarkGenericConfig, StarkVerifyingKey}; +use sp1_core::utils::BabyBearPoseidon2; +use sp1_recursion_compiler::config::InnerConfig; +use sp1_recursion_compiler::ir::{Array, Builder, Config, Ext, ExtConst, Felt, Var}; +use sp1_recursion_compiler::prelude::DslVariable; +use sp1_recursion_core::air::{RecursionPublicValues, RECURSIVE_PROOF_NUM_PV_ELTS}; +use sp1_recursion_core::runtime::{RecursionProgram, DIGEST_SIZE}; + +use sp1_recursion_compiler::prelude::*; + +use crate::challenger::{CanObserveVariable, DuplexChallengerVariable}; +use crate::fri::TwoAdicFriPcsVariable; +use crate::hints::Hintable; +use crate::stark::StarkVerifier; +use crate::types::ShardProofVariable; +use crate::types::VerifyingKeyVariable; +use crate::utils::{const_fri_config, felt2var, get_challenger_public_values, hash_vkey, var2felt}; + +use super::utils::assert_complete; + +/// A program for recursively verifying a batch of SP1 proofs. +#[derive(Debug, Clone, Copy)] +pub struct SP1RecursiveVerifier { + _phantom: PhantomData<(C, SC)>, +} + +pub struct SP1RecursionMemoryLayout<'a, SC: StarkGenericConfig, A: MachineAir> { + pub vk: &'a StarkVerifyingKey, + pub machine: &'a StarkMachine, + pub shard_proofs: Vec>, + pub leaf_challenger: &'a SC::Challenger, + pub initial_reconstruct_challenger: SC::Challenger, + pub is_complete: bool, +} + +#[derive(DslVariable, Clone)] +pub struct SP1RecursionMemoryLayoutVariable { + pub vk: VerifyingKeyVariable, + + pub shard_proofs: Array>, + + pub leaf_challenger: DuplexChallengerVariable, + pub initial_reconstruct_challenger: DuplexChallengerVariable, + + pub is_complete: Var, +} + +impl SP1RecursiveVerifier { + /// Create a new instance of the program for the [BabyBearPoseidon2] config. + pub fn build( + machine: &StarkMachine>, + ) -> RecursionProgram { + let mut builder = Builder::::default(); + + let input: SP1RecursionMemoryLayoutVariable<_> = builder.uninit(); + SP1RecursionMemoryLayout::>::witness(&input, &mut builder); + + let pcs = TwoAdicFriPcsVariable { + config: const_fri_config(&mut builder, machine.config().pcs().fri_config()), + }; + SP1RecursiveVerifier::verify(&mut builder, &pcs, machine, input); + + builder.compile_program() + } +} + +impl SP1RecursiveVerifier +where + C::F: PrimeField32 + TwoAdicField, + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + /// Verify a batch of SP1 shard proofs and aggregate their public values. + /// + /// This program represents a first recursive step in the verification of an SP1 proof + /// consisting of one or more shards. Each shard proof is verified and its public values are + /// aggregated into a single set representing the start and end state of the program execution + /// across all shards. + pub fn verify( + builder: &mut Builder, + pcs: &TwoAdicFriPcsVariable, + machine: &StarkMachine>, + input: SP1RecursionMemoryLayoutVariable, + ) { + let SP1RecursionMemoryLayoutVariable { + vk, + shard_proofs, + leaf_challenger, + initial_reconstruct_challenger, + is_complete, + } = input; + + // Initialize values we will commit to public outputs. + + // Start and end of program counters. + let start_pc: Felt<_> = builder.uninit(); + + // Start and end shard indices. + let initial_shard: Felt<_> = builder.uninit(); + + // The commited values digest and deferred proof digest. These will be checked to be the + // same for all proofs. + let committed_value_digest: [Word>; PV_DIGEST_NUM_WORDS] = + array::from_fn(|_| Word(array::from_fn(|_| builder.uninit()))); + let deferred_proofs_digest: [Felt<_>; POSEIDON_NUM_WORDS] = + array::from_fn(|_| builder.uninit()); + + // Assert that the number of proofs is not zero. + builder.assert_usize_ne(shard_proofs.len(), 0); + + let leaf_challenger_public_values = get_challenger_public_values(builder, &leaf_challenger); + + // Initialize loop variables. + let current_shard: Felt<_> = builder.uninit(); + let mut reconstruct_challenger: DuplexChallengerVariable<_> = + initial_reconstruct_challenger.copy(builder); + let cumulative_sum: Ext<_, _> = builder.eval(C::EF::zero().cons()); + let current_pc: Felt<_> = builder.uninit(); + let exit_code: Felt<_> = builder.uninit(); + // Verify proofs, validate transitions, and update accumulation variables. + builder.range(0, shard_proofs.len()).for_each(|i, builder| { + // Load the proof. + let proof = builder.get(&shard_proofs, i); + + // Verify the shard proof. + let mut challenger = leaf_challenger.copy(builder); + StarkVerifier::::verify_shard( + builder, + &vk, + pcs, + machine, + &mut challenger, + &proof, + ); + + // Extract public values. + let mut pv_elements = Vec::new(); + for i in 0..machine.num_pv_elts() { + let element = builder.get(&proof.public_values, i); + pv_elements.push(element); + } + let public_values = PublicValues::>, Felt<_>>::from_vec(pv_elements); + + // If this is the first proof in the batch, verify the initial conditions. + builder.if_eq(i, C::N::zero()).then(|builder| { + // Initialize the values of accumulated variables. + + // Shard. + builder.assign(initial_shard, public_values.shard); + builder.assign(current_shard, public_values.shard); + + // Program counter. + builder.assign(start_pc, public_values.start_pc); + builder.assign(current_pc, public_values.start_pc); + + // Commited public values digests. + for (word, first_word) in committed_value_digest + .iter() + .zip_eq(public_values.committed_value_digest.iter()) + { + for (byte, first_byte) in word.0.iter().zip_eq(first_word.0.iter()) { + builder.assign(*byte, *first_byte); + } + } + + // Deferred proofs digests. + for (digest, first_digest) in deferred_proofs_digest + .iter() + .zip_eq(public_values.deferred_proofs_digest.iter()) + { + builder.assign(*digest, *first_digest); + } + + // Exit code. + builder.assign(exit_code, public_values.exit_code); + }); + + // If the shard is zero, verify the global initial conditions hold on challenger and pc. + let shard = felt2var(builder, public_values.shard); + builder.if_eq(shard, C::N::one()).then(|builder| { + // This should be the first proof as well + builder.assert_var_eq(i, C::N::zero()); + + // Start pc should be vk.pc_start + builder.assert_felt_eq(public_values.start_pc, vk.pc_start); + + // Assert that the initial challenger is equal to a fresh challenger observing the + // verifier key and the initial pc. + let mut first_initial_challenger = DuplexChallengerVariable::new(builder); + + first_initial_challenger.observe(builder, vk.commitment.clone()); + first_initial_challenger.observe(builder, vk.pc_start); + + // Make sure the start reconstruct challenger is correct, since we will + // commit to it in public values. + initial_reconstruct_challenger.assert_eq(builder, &first_initial_challenger); + }); + + // Assert compatibility of the shard values. + for (word, current_word) in committed_value_digest + .iter() + .zip_eq(public_values.committed_value_digest.iter()) + { + for (byte, current_byte) in word.0.iter().zip_eq(current_word.0.iter()) { + builder.assert_felt_eq(*byte, *current_byte); + } + } + + // Assert that the start_pc of the proof is equal to the current pc. + builder.assert_felt_eq(current_pc, public_values.start_pc); + // Assert that the next_pc is different from the start_pc. + builder.assert_felt_ne(public_values.start_pc, public_values.next_pc); + // Assert that the start_pc is not zero (this means program has halted in a non-last + // shard). + builder.assert_felt_ne(public_values.start_pc, C::F::zero()); + + // Assert that the shard of the proof is equal to the current shard. + builder.assert_felt_eq(current_shard, public_values.shard); + + // Assert that exit code is the same for all proofs. + builder.assert_felt_eq(exit_code, public_values.exit_code); + + // Assert that the committed value digests are all the same. + + // Assert that the deferred proof digest is the same for all proofs. + for (digest, current_digest) in deferred_proofs_digest + .iter() + .zip_eq(public_values.deferred_proofs_digest.iter()) + { + builder.assert_felt_eq(*digest, *current_digest); + } + + // Update the reconstruct challenger, cumulative sum, shard number, and program counter. + reconstruct_challenger.observe(builder, proof.commitment.main_commit); + for j in 0..machine.num_pv_elts() { + let element = builder.get(&proof.public_values, j); + reconstruct_challenger.observe(builder, element); + } + + // Increment the shard count by one. + builder.assign(current_shard, current_shard + C::F::one()); + + // Update current_pc to be the end_pc of the current proof. + builder.assign(current_pc, public_values.next_pc); + + // Cumulative sum is updated by sums of all chips. + let opened_values = proof.opened_values.chips; + builder + .range(0, opened_values.len()) + .for_each(|k, builder| { + let values = builder.get(&opened_values, k); + let sum = values.cumulative_sum; + builder.assign(cumulative_sum, cumulative_sum + sum); + }); + }); + + // Compute vk digest. + let vk_digest = hash_vkey(builder, &vk); + let vk_digest: [Felt<_>; DIGEST_SIZE] = array::from_fn(|i| builder.get(&vk_digest, i)); + + // Collect values for challenges. + let initial_challenger_public_values = + get_challenger_public_values(builder, &initial_reconstruct_challenger); + let final_challenger_public_values = + get_challenger_public_values(builder, &reconstruct_challenger); + + let cumulative_sum_arrray = builder.ext2felt(cumulative_sum); + let cumulative_sum_arrray = array::from_fn(|i| builder.get(&cumulative_sum_arrray, i)); + + let zero: Felt<_> = builder.eval(C::F::zero()); + // Initialize the public values we will commit to. + let mut recursion_public_values_stream = [zero; RECURSIVE_PROOF_NUM_PV_ELTS]; + + let recursion_public_values: &mut RecursionPublicValues<_> = + recursion_public_values_stream.as_mut_slice().borrow_mut(); + + let start_deferred_digest = [zero; POSEIDON_NUM_WORDS]; + let end_deferred_digest = [zero; POSEIDON_NUM_WORDS]; + + let is_complete_felt = var2felt(builder, is_complete); + + recursion_public_values.committed_value_digest = committed_value_digest; + recursion_public_values.deferred_proofs_digest = deferred_proofs_digest; + recursion_public_values.start_pc = start_pc; + recursion_public_values.next_pc = current_pc; + recursion_public_values.start_shard = initial_shard; + recursion_public_values.next_shard = current_shard; + recursion_public_values.sp1_vk_digest = vk_digest; + recursion_public_values.leaf_challenger = leaf_challenger_public_values; + recursion_public_values.start_reconstruct_challenger = initial_challenger_public_values; + recursion_public_values.end_reconstruct_challenger = final_challenger_public_values; + recursion_public_values.cumulative_sum = cumulative_sum_arrray; + recursion_public_values.start_reconstruct_deferred_digest = start_deferred_digest; + recursion_public_values.end_reconstruct_deferred_digest = end_deferred_digest; + recursion_public_values.exit_code = zero; + recursion_public_values.is_complete = is_complete_felt; + + // If the proof represents a complete proof, make completeness assertions. + // + // *Remark*: In this program, this only happends if there is one shard and the program has + // no deferred proofs to verify. However, the completeness check is independent of these + // facts. + builder.if_eq(is_complete, C::N::one()).then(|builder| { + assert_complete(builder, recursion_public_values, &reconstruct_challenger) + }); + + // Commit to the public values. + for value in recursion_public_values_stream { + builder.commit_public_value(value); + } + + builder.halt(); + } +} diff --git a/recursion/program/src/machine/deferred.rs b/recursion/program/src/machine/deferred.rs new file mode 100644 index 0000000000..29708825df --- /dev/null +++ b/recursion/program/src/machine/deferred.rs @@ -0,0 +1,293 @@ +use std::array; +use std::borrow::{Borrow, BorrowMut}; +use std::marker::PhantomData; + +use p3_air::Air; +use p3_baby_bear::BabyBear; +use p3_commit::TwoAdicMultiplicativeCoset; +use p3_field::{AbstractField, PrimeField32, TwoAdicField}; +use sp1_core::air::{MachineAir, WORD_SIZE}; +use sp1_core::air::{Word, POSEIDON_NUM_WORDS, PV_DIGEST_NUM_WORDS}; +use sp1_core::stark::StarkMachine; +use sp1_core::stark::{Com, RiscvAir, ShardProof, StarkGenericConfig, StarkVerifyingKey}; +use sp1_core::utils::BabyBearPoseidon2; +use sp1_recursion_compiler::config::InnerConfig; +use sp1_recursion_compiler::ir::{Array, Builder, Config, Felt, Var}; +use sp1_recursion_compiler::prelude::DslVariable; +use sp1_recursion_core::air::{RecursionPublicValues, RECURSIVE_PROOF_NUM_PV_ELTS}; +use sp1_recursion_core::runtime::{RecursionProgram, DIGEST_SIZE}; + +use sp1_recursion_compiler::prelude::*; + +use crate::challenger::{CanObserveVariable, DuplexChallengerVariable}; +use crate::fri::TwoAdicFriPcsVariable; +use crate::hints::Hintable; +use crate::stark::{RecursiveVerifierConstraintFolder, StarkVerifier}; +use crate::types::ShardProofVariable; +use crate::types::VerifyingKeyVariable; +use crate::utils::{const_fri_config, get_challenger_public_values, hash_vkey, var2felt}; + +#[derive(Debug, Clone, Copy)] +pub struct SP1DeferredVerifier { + _phantom: PhantomData<(C, SC, A)>, +} + +/// Inputs that are hinted to the [SP1DeferredVerifier] program. +pub struct SP1DeferredMemoryLayout<'a, SC: StarkGenericConfig, A: MachineAir> +where + SC::Val: PrimeField32, +{ + pub compress_vk: &'a StarkVerifyingKey, + pub machine: &'a StarkMachine, + pub proofs: Vec>, + + pub start_reconstruct_deferred_digest: Vec, + + pub is_complete: bool, + + pub sp1_vk: &'a StarkVerifyingKey, + pub sp1_machine: &'a StarkMachine>, + pub committed_value_digest: Vec>, + pub deferred_proofs_digest: Vec, + pub leaf_challenger: SC::Challenger, + pub end_pc: SC::Val, + pub end_shard: SC::Val, +} + +/// A variable version of the [SP1DeferredMemoryLayout] struct. +#[derive(DslVariable, Clone)] +pub struct SP1DeferredMemoryLayoutVariable { + pub compress_vk: VerifyingKeyVariable, + + pub proofs: Array>, + + pub start_reconstruct_deferred_digest: Array>, + + pub is_complete: Var, + + pub sp1_vk: VerifyingKeyVariable, + pub committed_value_digest: Array>>, + pub deferred_proofs_digest: Array>, + pub leaf_challenger: DuplexChallengerVariable, + pub end_pc: Felt, + pub end_shard: Felt, +} + +impl SP1DeferredVerifier +where + A: MachineAir + for<'a> Air>, +{ + /// Create a new instance of the program for the [BabyBearPoseidon2] config. + pub fn build(machine: &StarkMachine) -> RecursionProgram { + let mut builder = Builder::::default(); + let input: SP1DeferredMemoryLayoutVariable<_> = builder.uninit(); + SP1DeferredMemoryLayout::::witness(&input, &mut builder); + + let pcs = TwoAdicFriPcsVariable { + config: const_fri_config(&mut builder, machine.config().pcs().fri_config()), + }; + + SP1DeferredVerifier::verify(&mut builder, &pcs, machine, input); + + builder.compile_program() + } +} + +impl SP1DeferredVerifier +where + C::F: PrimeField32 + TwoAdicField, + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + A: MachineAir + for<'a> Air>, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + /// Verify a batch of deferred proofs. + /// + /// Each deferred proof is a recursive proof representing some computation. Namely, every such + /// proof represents a recursively verified program. + /// verifier: + /// - Asserts that each of these proofs is valid as a `compress` proof. + /// - Asserts that each of these proofs is complete by checking the `is_complete` flag in the + /// proof's public values. + /// - Aggregates the proof information into an accumulated deferred digest. + pub fn verify( + builder: &mut Builder, + pcs: &TwoAdicFriPcsVariable, + machine: &StarkMachine, + input: SP1DeferredMemoryLayoutVariable, + ) { + // Read the inputs. + let SP1DeferredMemoryLayoutVariable { + compress_vk, + proofs, + start_reconstruct_deferred_digest, + is_complete, + + sp1_vk, + committed_value_digest, + deferred_proofs_digest, + leaf_challenger, + end_pc, + end_shard, + } = input; + + // Initialize the values for the aggregated public output as all zeros. + let mut deferred_public_values_stream: Vec> = (0..RECURSIVE_PROOF_NUM_PV_ELTS) + .map(|_| builder.eval(C::F::zero())) + .collect(); + + let deferred_public_values: &mut RecursionPublicValues<_> = + deferred_public_values_stream.as_mut_slice().borrow_mut(); + + // Compute the digest of compress_vk and input the value to the public values. + let compress_vk_digest = hash_vkey(builder, &compress_vk); + + deferred_public_values.compress_vk_digest = + array::from_fn(|i| builder.get(&compress_vk_digest, i)); + + // Initialize the start of deferred digests. + deferred_public_values.start_reconstruct_deferred_digest = + array::from_fn(|i| builder.get(&start_reconstruct_deferred_digest, i)); + + // Assert that there is at least one proof. + builder.assert_usize_ne(proofs.len(), 0); + + // Initialize the consistency check variable. + let mut reconstruct_deferred_digest = builder.array(POSEIDON_NUM_WORDS); + for (i, first_digest) in deferred_public_values + .start_reconstruct_deferred_digest + .iter() + .enumerate() + { + builder.set(&mut reconstruct_deferred_digest, i, *first_digest); + } + + // Verify the proofs and connect the values. + builder.range(0, proofs.len()).for_each(|i, builder| { + // Load the proof. + let proof = builder.get(&proofs, i); + + // Verify the shard proof. + + // Prepare a challenger. + let mut challenger = DuplexChallengerVariable::new(builder); + // Observe the vk and start pc. + challenger.observe(builder, compress_vk.commitment.clone()); + challenger.observe(builder, compress_vk.pc_start); + // Observe the main commitment and public values. + challenger.observe(builder, proof.commitment.main_commit.clone()); + for j in 0..machine.num_pv_elts() { + let element = builder.get(&proof.public_values, j); + challenger.observe(builder, element); + } + // verify the proof. + StarkVerifier::::verify_shard( + builder, + &compress_vk, + pcs, + machine, + &mut challenger, + &proof, + ); + + // Load the public values from the proof. + let current_public_values_elements = (0..RECURSIVE_PROOF_NUM_PV_ELTS) + .map(|i| builder.get(&proof.public_values, i)) + .collect::>>(); + + let current_public_values: &RecursionPublicValues> = + current_public_values_elements.as_slice().borrow(); + + // Assert that the proof is complete. + builder.assert_felt_eq(current_public_values.is_complete, C::F::one()); + + // Assert that the compress_vk digest is the same. + for (digest, current) in deferred_public_values + .compress_vk_digest + .iter() + .zip(current_public_values.compress_vk_digest.iter()) + { + builder.assert_felt_eq(*digest, *current); + } + + // Update deferred proof digest + // poseidon2( current_digest[..8] || pv.sp1_vk_digest[..8] || pv.committed_value_digest[..32] ) + let mut poseidon_inputs = builder.array(48); + for j in 0..DIGEST_SIZE { + let current_digest_element = builder.get(&reconstruct_deferred_digest, j); + builder.set(&mut poseidon_inputs, j, current_digest_element); + } + + for j in 0..DIGEST_SIZE { + // let input_index: Var<_> = builder.constant(F::from_canonical_usize(j + 8)); + builder.set( + &mut poseidon_inputs, + j + DIGEST_SIZE, + current_public_values.sp1_vk_digest[j], + ); + } + for j in 0..PV_DIGEST_NUM_WORDS { + for k in 0..WORD_SIZE { + // let input_index: Var<_> = + // builder.eval(F::from_canonical_usize(j * WORD_SIZE + k + 16)); + let element = current_public_values.committed_value_digest[j][k]; + builder.set(&mut poseidon_inputs, j * WORD_SIZE + k + 16, element); + } + } + let new_digest = builder.poseidon2_hash(&poseidon_inputs); + for j in 0..DIGEST_SIZE { + let new_value = builder.get(&new_digest, j); + builder.set(&mut reconstruct_deferred_digest, j, new_value); + } + }); + + // Set the public values. + + // Set initial_pc, end_pc, initial_shard, and end_shard to be the hitned values. + deferred_public_values.start_pc = end_pc; + deferred_public_values.next_pc = end_pc; + deferred_public_values.start_shard = end_shard; + deferred_public_values.next_shard = end_shard; + + // Set the sp1_vk_digest to be the hitned value. + let sp1_vk_digest = hash_vkey(builder, &sp1_vk); + deferred_public_values.sp1_vk_digest = array::from_fn(|i| builder.get(&sp1_vk_digest, i)); + + // Set the committed value digest to be the hitned value. + for (i, public_word) in deferred_public_values + .committed_value_digest + .iter_mut() + .enumerate() + { + let hinted_word = builder.get(&committed_value_digest, i); + public_word.0 = array::from_fn(|j| builder.get(&hinted_word, j)); + } + + // Set the deferred proof digest to be the hitned value. + deferred_public_values.deferred_proofs_digest = + core::array::from_fn(|i| builder.get(&deferred_proofs_digest, i)); + + // Set the initial, end, and leaf challenger to be the hitned values. + let values = get_challenger_public_values(builder, &leaf_challenger); + deferred_public_values.leaf_challenger = values; + deferred_public_values.start_reconstruct_challenger = values; + deferred_public_values.end_reconstruct_challenger = values; + + // Assign the deffered proof digests. + deferred_public_values.end_reconstruct_deferred_digest = + array::from_fn(|i| builder.get(&reconstruct_deferred_digest, i)); + + // Set the is_complete flag. + deferred_public_values.is_complete = var2felt(builder, is_complete); + + // Commit the public values. + for value in deferred_public_values_stream { + builder.commit_public_value(value); + } + + builder.halt(); + } +} diff --git a/recursion/program/src/machine/mod.rs b/recursion/program/src/machine/mod.rs new file mode 100644 index 0000000000..2d262332a0 --- /dev/null +++ b/recursion/program/src/machine/mod.rs @@ -0,0 +1,421 @@ +mod compress; +mod core; +mod deferred; +mod root; +mod utils; + +pub use compress::*; +pub use core::*; +pub use deferred::*; +pub use root::*; + +#[cfg(test)] +mod tests { + + use p3_baby_bear::BabyBear; + use p3_challenger::CanObserve; + use p3_maybe_rayon::prelude::*; + use sp1_core::stark::{MachineVerificationError, RiscvAir, StarkGenericConfig}; + use sp1_core::utils::BabyBearPoseidon2; + use sp1_core::{ + io::SP1Stdin, + runtime::Program, + stark::{Challenge, LocalProver}, + }; + use sp1_recursion_compiler::config::InnerConfig; + use sp1_recursion_core::{ + runtime::Runtime, + stark::{config::BabyBearPoseidon2Outer, RecursionAir}, + }; + + use crate::hints::Hintable; + + use super::*; + + enum Test { + Recursion, + Reduce, + Compress, + Wrap, + } + + fn test_sp1_recursive_machine_verify(program: Program, batch_size: usize, test: Test) { + type SC = BabyBearPoseidon2; + type F = BabyBear; + type EF = Challenge; + + sp1_core::utils::setup_logger(); + + let machine = RiscvAir::machine(SC::default()); + let (_, vk) = machine.setup(&program); + + // Make the recursion program. + let recursive_program = SP1RecursiveVerifier::::build(&machine); + let recursive_config = SC::default(); + type A = RecursionAir; + let recursive_machine = A::machine(recursive_config.clone()); + let (rec_pk, rec_vk) = recursive_machine.setup(&recursive_program); + + // Make the deferred program. + let deferred_program = SP1DeferredVerifier::::build(&recursive_machine); + let (_, deferred_vk) = recursive_machine.setup(&deferred_program); + + // Make the compress program. + let reduce_program = SP1CompressVerifier::::build( + &recursive_machine, + &rec_vk, + &deferred_vk, + ); + + let (reduce_pk, compress_vk) = recursive_machine.setup(&reduce_program); + + // Make the compress program. + let compress_machine = RecursionAir::<_, 9>::machine(SC::compressed()); + let compress_program = + SP1RootVerifier::::build(&recursive_machine, &compress_vk, true); + let (compress_pk, compress_vk) = compress_machine.setup(&compress_program); + + // Make the wrap program. + let wrap_machine = RecursionAir::<_, 5>::machine(BabyBearPoseidon2Outer::default()); + let wrap_program = + SP1RootVerifier::::build(&compress_machine, &compress_vk, false); + + let mut challenger = machine.config().challenger(); + let time = std::time::Instant::now(); + let (proof, _) = sp1_core::utils::run_and_prove(program, &SP1Stdin::new(), SC::default()); + machine.verify(&vk, &proof, &mut challenger).unwrap(); + tracing::info!("Proof generated successfully"); + let elapsed = time.elapsed(); + tracing::info!("Execution proof time: {:?}", elapsed); + + // Get the and leaf challenger. + let mut leaf_challenger = machine.config().challenger(); + vk.observe_into(&mut leaf_challenger); + proof.shard_proofs.iter().for_each(|proof| { + leaf_challenger.observe(proof.commitment.main_commit); + leaf_challenger.observe_slice(&proof.public_values[0..machine.num_pv_elts()]); + }); + // Make sure leaf challenger is not mutable anymore. + let leaf_challenger = leaf_challenger; + + let mut layouts = Vec::new(); + + let mut reconstruct_challenger = machine.config().challenger(); + vk.observe_into(&mut reconstruct_challenger); + + let is_complete = proof.shard_proofs.len() == 1; + for batch in proof.shard_proofs.chunks(batch_size) { + let proofs = batch.to_vec(); + + layouts.push(SP1RecursionMemoryLayout { + vk: &vk, + machine: &machine, + shard_proofs: proofs, + leaf_challenger: &leaf_challenger, + initial_reconstruct_challenger: reconstruct_challenger.clone(), + is_complete, + }); + + for proof in batch.iter() { + reconstruct_challenger.observe(proof.commitment.main_commit); + reconstruct_challenger + .observe_slice(&proof.public_values[0..machine.num_pv_elts()]); + } + } + + assert_eq!( + reconstruct_challenger.sponge_state, + leaf_challenger.sponge_state + ); + assert_eq!( + reconstruct_challenger.input_buffer, + leaf_challenger.input_buffer + ); + assert_eq!( + reconstruct_challenger.output_buffer, + leaf_challenger.output_buffer + ); + + // Run the recursion programs. + let mut records = Vec::new(); + + for layout in layouts { + let mut runtime = + Runtime::::new(&recursive_program, machine.config().perm.clone()); + + let mut witness_stream = Vec::new(); + witness_stream.extend(layout.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + + records.push(runtime.record); + } + + // Prove all recursion programs and verify the recursive proofs. + + // Make the recursive proofs. + let time = std::time::Instant::now(); + let recursive_proofs = records + .into_par_iter() + .map(|record| { + let mut recursive_challenger = recursive_machine.config().challenger(); + recursive_machine.prove::>( + &rec_pk, + record, + &mut recursive_challenger, + ) + }) + .collect::>(); + let elapsed = time.elapsed(); + tracing::info!("Recursive first layer proving time: {:?}", elapsed); + + // Verify the recursive proofs. + for rec_proof in recursive_proofs.iter() { + let mut recursive_challenger = recursive_machine.config().challenger(); + let result = recursive_machine.verify(&rec_vk, rec_proof, &mut recursive_challenger); + + match result { + Ok(_) => tracing::info!("Proof verified successfully"), + Err(MachineVerificationError::NonZeroCumulativeSum) => { + tracing::info!("Proof verification failed: NonZeroCumulativeSum") + } + e => panic!("Proof verification failed: {:?}", e), + } + } + if let Test::Recursion = test { + return; + } + + tracing::info!("Recursive proofs verified successfully"); + + // Chain all the individual shard proofs. + let mut recursive_proofs = recursive_proofs + .into_iter() + .flat_map(|proof| proof.shard_proofs) + .collect::>(); + + // Iterate over the recursive proof batches until there is one proof remaining. + let mut is_first_layer = true; + let mut is_complete; + let time = std::time::Instant::now(); + loop { + tracing::info!("Recursive proofs: {}", recursive_proofs.len()); + is_complete = recursive_proofs.len() <= batch_size; + recursive_proofs = recursive_proofs + .par_chunks(batch_size) + .map(|batch| { + let kind = if is_first_layer { + ReduceProgramType::Core + } else { + ReduceProgramType::Reduce + }; + let kinds = batch.iter().map(|_| kind).collect::>(); + let input = SP1ReduceMemoryLayout { + compress_vk: &compress_vk, + recursive_machine: &recursive_machine, + shard_proofs: batch.to_vec(), + kinds, + is_complete, + }; + + let mut runtime = Runtime::::new( + &reduce_program, + recursive_machine.config().perm.clone(), + ); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + + let mut recursive_challenger = recursive_machine.config().challenger(); + let mut proof = recursive_machine.prove::>( + &reduce_pk, + runtime.record, + &mut recursive_challenger, + ); + let mut recursive_challenger = recursive_machine.config().challenger(); + let result = + recursive_machine.verify(&compress_vk, &proof, &mut recursive_challenger); + + match result { + Ok(_) => tracing::info!("Proof verified successfully"), + Err(MachineVerificationError::NonZeroCumulativeSum) => { + tracing::info!("Proof verification failed: NonZeroCumulativeSum") + } + e => panic!("Proof verification failed: {:?}", e), + } + + assert_eq!(proof.shard_proofs.len(), 1); + proof.shard_proofs.pop().unwrap() + }) + .collect(); + is_first_layer = false; + + if recursive_proofs.len() == 1 { + break; + } + } + let elapsed = time.elapsed(); + tracing::info!("Reduction successful, time: {:?}", elapsed); + if let Test::Reduce = test { + return; + } + + assert_eq!(recursive_proofs.len(), 1); + let reduce_proof = recursive_proofs.pop().unwrap(); + + // Make the compress proof. + let input = SP1RootMemoryLayout { + machine: &recursive_machine, + proof: reduce_proof, + is_reduce: true, + }; + + // Run the compress program. + let mut runtime = + Runtime::::new(&compress_program, compress_machine.config().perm.clone()); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + tracing::info!("Compress program executed successfully"); + + // Prove the compress program. + let mut compress_challenger = compress_machine.config().challenger(); + + let time = std::time::Instant::now(); + let mut compress_proof = compress_machine.prove::>( + &compress_pk, + runtime.record, + &mut compress_challenger, + ); + let elapsed = time.elapsed(); + tracing::info!("Compress proving time: {:?}", elapsed); + let mut compress_challenger = compress_machine.config().challenger(); + let result = + compress_machine.verify(&compress_vk, &compress_proof, &mut compress_challenger); + match result { + Ok(_) => tracing::info!("Proof verified successfully"), + Err(MachineVerificationError::NonZeroCumulativeSum) => { + tracing::info!("Proof verification failed: NonZeroCumulativeSum") + } + e => panic!("Proof verification failed: {:?}", e), + } + + if let Test::Compress = test { + return; + } + + // Run and prove the wrap program. + + let (wrap_pk, wrap_vk) = wrap_machine.setup(&wrap_program); + + let compress_proof = compress_proof.shard_proofs.pop().unwrap(); + let input = SP1RootMemoryLayout { + machine: &compress_machine, + proof: compress_proof, + is_reduce: false, + }; + + // Run the compress program. + let mut runtime = + Runtime::::new(&wrap_program, compress_machine.config().perm.clone()); + + let mut witness_stream = Vec::new(); + witness_stream.extend(input.write()); + + runtime.witness_stream = witness_stream.into(); + runtime.run(); + runtime.print_stats(); + tracing::info!("Wrap program executed successfully"); + + // Prove the wrap program. + let mut wrap_challenger = wrap_machine.config().challenger(); + let time = std::time::Instant::now(); + let wrap_proof = + wrap_machine.prove::>(&wrap_pk, runtime.record, &mut wrap_challenger); + let elapsed = time.elapsed(); + tracing::info!("Wrap proving time: {:?}", elapsed); + let mut wrap_challenger = wrap_machine.config().challenger(); + let result = wrap_machine.verify(&wrap_vk, &wrap_proof, &mut wrap_challenger); + match result { + Ok(_) => tracing::info!("Proof verified successfully"), + Err(MachineVerificationError::NonZeroCumulativeSum) => { + tracing::info!("Proof verification failed: NonZeroCumulativeSum") + } + e => panic!("Proof verification failed: {:?}", e), + } + tracing::info!("Wrapping successful"); + } + + #[test] + fn test_sp1_recursive_machine_verify_fibonacci() { + let elf = include_bytes!("../../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + test_sp1_recursive_machine_verify(Program::from(elf), 1, Test::Recursion) + } + + #[test] + #[ignore] + fn test_sp1_reduce_machine_verify_fibonacci() { + let elf = include_bytes!("../../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + test_sp1_recursive_machine_verify(Program::from(elf), 1, Test::Reduce) + } + + #[test] + #[ignore] + fn test_sp1_compress_machine_verify_fibonacci() { + let elf = include_bytes!("../../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + test_sp1_recursive_machine_verify(Program::from(elf), 1, Test::Compress) + } + + #[test] + #[ignore] + fn test_sp1_wrap_machine_verify_fibonacci() { + let elf = include_bytes!("../../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); + test_sp1_recursive_machine_verify(Program::from(elf), 1, Test::Wrap) + } + + #[test] + #[ignore] + fn test_sp1_reduce_machine_verify_tendermint() { + let elf = include_bytes!( + "../../../../tests/tendermint-benchmark/elf/riscv32im-succinct-zkvm-elf" + ); + test_sp1_recursive_machine_verify(Program::from(elf), 2, Test::Reduce) + } + + #[test] + #[ignore] + fn test_sp1_recursive_machine_verify_tendermint() { + let elf = include_bytes!( + "../../../../tests/tendermint-benchmark/elf/riscv32im-succinct-zkvm-elf" + ); + test_sp1_recursive_machine_verify(Program::from(elf), 2, Test::Recursion) + } + + #[test] + #[ignore] + fn test_sp1_compress_machine_verify_tendermint() { + let elf = include_bytes!( + "../../../../tests/tendermint-benchmark/elf/riscv32im-succinct-zkvm-elf" + ); + test_sp1_recursive_machine_verify(Program::from(elf), 2, Test::Compress) + } + + #[test] + #[ignore] + fn test_sp1_wrap_machine_verify_tendermint() { + let elf = include_bytes!( + "../../../../tests/tendermint-benchmark/elf/riscv32im-succinct-zkvm-elf" + ); + test_sp1_recursive_machine_verify(Program::from(elf), 2, Test::Wrap) + } +} diff --git a/recursion/program/src/machine/root.rs b/recursion/program/src/machine/root.rs new file mode 100644 index 0000000000..57e6f646a5 --- /dev/null +++ b/recursion/program/src/machine/root.rs @@ -0,0 +1,141 @@ +use std::borrow::Borrow; + +use p3_air::Air; +use p3_baby_bear::BabyBear; +use p3_commit::TwoAdicMultiplicativeCoset; +use p3_field::{AbstractField, PrimeField32, TwoAdicField}; +use sp1_core::air::MachineAir; +use sp1_core::stark::StarkMachine; +use sp1_core::stark::{Com, ShardProof, StarkGenericConfig, StarkVerifyingKey}; +use sp1_core::utils::BabyBearPoseidon2; +use sp1_recursion_compiler::config::InnerConfig; +use sp1_recursion_compiler::ir::{Builder, Config, Felt, Var}; +use sp1_recursion_compiler::prelude::DslVariable; +use sp1_recursion_core::air::{RecursionPublicValues, RECURSIVE_PROOF_NUM_PV_ELTS}; +use sp1_recursion_core::runtime::{RecursionProgram, DIGEST_SIZE}; + +use sp1_recursion_compiler::prelude::*; + +use crate::challenger::{CanObserveVariable, DuplexChallengerVariable}; +use crate::fri::TwoAdicFriPcsVariable; +use crate::hints::Hintable; +use crate::machine::utils::proof_data_from_vk; +use crate::stark::{RecursiveVerifierConstraintFolder, ShardProofHint, StarkVerifier}; +use crate::types::ShardProofVariable; +use crate::utils::{const_fri_config, hash_vkey}; + +/// The program that gets a final verifier at the root of the tree. +#[derive(Debug, Clone, Copy)] +pub struct SP1RootVerifier { + _phantom: std::marker::PhantomData<(C, SC, A)>, +} + +pub struct SP1RootMemoryLayout<'a, SC: StarkGenericConfig, A: MachineAir> { + pub machine: &'a StarkMachine, + pub proof: ShardProof, + pub is_reduce: bool, +} + +#[derive(DslVariable, Clone)] +pub struct SP1RootMemoryLayoutVariable { + pub proof: ShardProofVariable, + pub is_reduce: Var, +} + +impl SP1RootVerifier +where + A: MachineAir + for<'a> Air>, +{ + /// Create a new instance of the program for the [BabyBearPoseidon2] config. + pub fn build( + machine: &StarkMachine, + vk: &StarkVerifyingKey, + is_compress: bool, + ) -> RecursionProgram { + let mut builder = Builder::::default(); + let proof: ShardProofVariable<_> = builder.uninit(); + ShardProofHint::::witness(&proof, &mut builder); + + let pcs = TwoAdicFriPcsVariable { + config: const_fri_config(&mut builder, machine.config().pcs().fri_config()), + }; + + SP1RootVerifier::verify(&mut builder, &pcs, machine, vk, &proof, is_compress); + + builder.compile_program() + } +} + +impl SP1RootVerifier +where + C::F: PrimeField32 + TwoAdicField, + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + A: MachineAir + for<'a> Air>, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + /// Verify a proof with given vk and aggregate their public values. + /// + /// is_reduce : if the proof is a reduce proof, we will assert that the given vk indentifies + /// with the reduce vk digest of public inputs. + pub fn verify( + builder: &mut Builder, + pcs: &TwoAdicFriPcsVariable, + machine: &StarkMachine, + vk: &StarkVerifyingKey, + proof: &ShardProofVariable, + is_compress: bool, + ) { + // Get the verifying key info from the vk. + let vk = proof_data_from_vk(builder, vk, machine); + + // Verify the proof. + + let mut challenger = DuplexChallengerVariable::new(builder); + // Observe the vk and start pc. + challenger.observe(builder, vk.commitment.clone()); + challenger.observe(builder, vk.pc_start); + // Observe the main commitment and public values. + challenger.observe(builder, proof.commitment.main_commit.clone()); + for j in 0..machine.num_pv_elts() { + let element = builder.get(&proof.public_values, j); + challenger.observe(builder, element); + } + // verify proof. + StarkVerifier::::verify_shard(builder, &vk, pcs, machine, &mut challenger, proof); + + // Get the public inputs from the proof. + let public_values_elements = (0..RECURSIVE_PROOF_NUM_PV_ELTS) + .map(|i| builder.get(&proof.public_values, i)) + .collect::>>(); + let public_values: &RecursionPublicValues> = + public_values_elements.as_slice().borrow(); + + // Assert that the proof is complete. + // + // *Remark*: here we are assuming on that the program we are verifying indludes the check + // of completeness conditions are satisfied if the flag is set to one, so we are only + // checking the `is_complete` flag in this program. + builder.assert_felt_eq(public_values.is_complete, C::F::one()); + + // If the proof is a compress proof, assert that the vk is the same as the compress vk from + // the public values. + if is_compress { + let vk_digest = hash_vkey(builder, &vk); + for (i, reduce_digest_elem) in public_values.compress_vk_digest.iter().enumerate() { + let vk_digest_elem = builder.get(&vk_digest, i); + builder.assert_felt_eq(vk_digest_elem, *reduce_digest_elem); + } + } + + // Commit to the public values, broadcasting the same ones. + for value in public_values_elements { + builder.commit_public_value(value); + } + + builder.halt(); + } +} diff --git a/recursion/program/src/machine/utils.rs b/recursion/program/src/machine/utils.rs new file mode 100644 index 0000000000..61500a8d3a --- /dev/null +++ b/recursion/program/src/machine/utils.rs @@ -0,0 +1,117 @@ +use itertools::Itertools; +use p3_commit::TwoAdicMultiplicativeCoset; +use p3_field::AbstractField; + +use sp1_core::{ + air::MachineAir, + stark::{Com, StarkGenericConfig, StarkMachine, StarkVerifyingKey}, +}; +use sp1_recursion_compiler::ir::{Builder, Config, Felt, Var}; +use sp1_recursion_core::{air::RecursionPublicValues, runtime::DIGEST_SIZE}; + +use crate::{ + challenger::DuplexChallengerVariable, + fri::TwoAdicMultiplicativeCosetVariable, + types::VerifyingKeyVariable, + utils::{assert_challenger_eq_pv, get_preprocessed_data}, +}; + +/// Assertions on the public values describing a complete recursive proof state. +pub(crate) fn assert_complete( + builder: &mut Builder, + public_values: &RecursionPublicValues>, + end_reconstruct_challenger: &DuplexChallengerVariable, +) { + let RecursionPublicValues { + deferred_proofs_digest, + next_pc, + start_shard, + cumulative_sum, + start_reconstruct_deferred_digest, + end_reconstruct_deferred_digest, + leaf_challenger, + .. + } = public_values; + + // Assert that `end_pc` is equal to zero (so program execution has completed) + builder.assert_felt_eq(*next_pc, C::F::zero()); + + // Assert that the start shard is equal to 1. + builder.assert_felt_eq(*start_shard, C::F::one()); + + // The challenger has been fully verified. + + // The start_reconstruct_challenger should be the same as an empty challenger observing the + // verifier key and the start pc. This was already verified when verifying the leaf proofs so + // there is no need to assert it here. + + // Assert that the end reconstruct challenger is equal to the leaf challenger. + assert_challenger_eq_pv(builder, end_reconstruct_challenger, *leaf_challenger); + + // The deferred digest has been fully reconstructed. + + // The start reconstruct digest should be zero. + for start_digest_word in start_reconstruct_deferred_digest { + builder.assert_felt_eq(*start_digest_word, C::F::zero()); + } + + // The end reconstruct digest should be equal to the deferred proofs digest. + for (end_digest_word, deferred_digest_word) in end_reconstruct_deferred_digest + .iter() + .zip_eq(deferred_proofs_digest.iter()) + { + builder.assert_felt_eq(*end_digest_word, *deferred_digest_word); + } + + // Assert that the cumulative sum is zero. + for b in cumulative_sum.iter() { + builder.assert_felt_eq(*b, C::F::zero()); + } +} + +pub(crate) fn proof_data_from_vk( + builder: &mut Builder, + vk: &StarkVerifyingKey, + machine: &StarkMachine, +) -> VerifyingKeyVariable +where + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + A: MachineAir, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + let mut commitment = builder.dyn_array(DIGEST_SIZE); + for (i, value) in vk.commit.clone().into().iter().enumerate() { + builder.set(&mut commitment, i, *value); + } + let pc_start: Felt<_> = builder.eval(vk.pc_start); + + let (prep_sorted_indices_val, prep_domains_val) = get_preprocessed_data(machine, vk); + + let mut prep_sorted_indices = builder.dyn_array::>(prep_sorted_indices_val.len()); + let mut prep_domains = + builder.dyn_array::>(prep_domains_val.len()); + + for (i, value) in prep_sorted_indices_val.iter().enumerate() { + builder.set( + &mut prep_sorted_indices, + i, + C::N::from_canonical_usize(*value), + ); + } + + for (i, value) in prep_domains_val.iter().enumerate() { + let domain: TwoAdicMultiplicativeCosetVariable<_> = builder.constant(*value); + builder.set(&mut prep_domains, i, domain); + } + + VerifyingKeyVariable { + commitment, + pc_start, + preprocessed_sorted_idxs: prep_sorted_indices, + prep_domains, + } +} diff --git a/recursion/program/src/reduce.rs b/recursion/program/src/reduce.rs deleted file mode 100644 index 474006197c..0000000000 --- a/recursion/program/src/reduce.rs +++ /dev/null @@ -1,700 +0,0 @@ -//! ReduceProgram defines a recursive program that can reduce a set of proofs into a single proof. -//! -//! Specifically, this program takes in an ordered list of proofs where each proof can be either an -//! SP1 Core proof or a recursive VM proof of itself. Each proof is verified and then checked to -//! ensure that each transition is valid. Finally, the overall start and end values are committed to. -//! -//! Because SP1 uses a global challenger system, `verify_start_challenger` is witnessed and used to -//! verify each core proof. As each core proof is verified, its commitment and public values are -//! observed into `reconstruct_challenger`. After recursively reducing down to one proof, -//! `reconstruct_challenger` must equal `verify_start_challenger`. -//! -//! "Deferred proofs" can also be passed in and verified. These are fully reduced proofs that were -//! committed to within the core VM. These proofs can then be verified here and then reconstructed -//! into a single digest which is checked against what was committed. Note that it is possible for -//! reduce to be called with only deferred proofs, and not any core/recursive proofs. In this case, -//! the start and end pc/shard values should be equal to each other. -//! -//! Because the program can verify ranges of a full SP1 proof, the program exposes `is_complete` -//! which is only 1 if the program has fully verified the execution of the program, including all -//! deferred proofs. - -#![allow(clippy::needless_range_loop)] - -use p3_baby_bear::BabyBear; -use p3_challenger::DuplexChallenger; -use p3_commit::TwoAdicMultiplicativeCoset; -use p3_field::AbstractField; -use sp1_core::air::{PublicValues, SP1_PROOF_NUM_PV_ELTS, WORD_SIZE}; -use sp1_core::air::{Word, POSEIDON_NUM_WORDS, PV_DIGEST_NUM_WORDS}; -use sp1_core::stark::PROOF_MAX_NUM_PVS; -use sp1_core::stark::{RiscvAir, ShardProof, StarkGenericConfig, StarkVerifyingKey}; -use sp1_core::utils::baby_bear_poseidon2::{compressed_fri_config, default_fri_config}; -use sp1_core::utils::sp1_fri_config; -use sp1_core::utils::{BabyBearPoseidon2, InnerDigest}; -use sp1_recursion_compiler::asm::{AsmBuilder, AsmConfig}; -use sp1_recursion_compiler::ir::{Array, Builder, Ext, ExtConst, Felt, Var}; -use sp1_recursion_core::air::RecursionPublicValues; -use sp1_recursion_core::cpu::Instruction; -use sp1_recursion_core::runtime::{RecursionProgram, DIGEST_SIZE}; -use sp1_recursion_core::stark::{RecursionAirSkinnyDeg7, RecursionAirWideDeg3}; - -use crate::challenger::{CanObserveVariable, DuplexChallengerVariable}; -use crate::fri::types::DigestVariable; -use crate::fri::TwoAdicFriPcsVariable; -use crate::fri::TwoAdicMultiplicativeCosetVariable; -use crate::hints::Hintable; -use crate::stark::StarkVerifier; -use crate::types::{QuotientData, QuotientDataValues, VerifyingKeyVariable}; -use crate::types::{Sha256DigestVariable, ShardProofVariable}; -use crate::utils::{ - assert_challenger_eq_pv, assign_challenger_from_pv, clone_array, commit_challenger, - const_fri_config, felt2var, hash_vkey, var2felt, -}; - -type SC = BabyBearPoseidon2; -type F = ::Val; -type EF = ::Challenge; -type C = AsmConfig; -type Val = BabyBear; - -#[derive(Debug, Clone, Copy)] -pub struct ReduceProgram; - -impl ReduceProgram { - /// The program that can reduce a set of proofs into a single proof. - pub fn build() -> RecursionProgram { - let mut reduce_program = Self::define(false); - reduce_program.instructions[0] = Instruction::dummy(); - reduce_program - } - - /// The program used for setting up the state of memory for the prover. - pub fn setup() -> RecursionProgram { - Self::define(true) - } - - /// A definition for the program. - pub fn define(setup: bool) -> RecursionProgram { - // Initialize the sp1 and recursion maachines. - let core_machine = RiscvAir::machine(BabyBearPoseidon2::default()); - let reduce_machine = RecursionAirWideDeg3::machine(BabyBearPoseidon2::default()); - let compress_machine = RecursionAirSkinnyDeg7::machine(BabyBearPoseidon2::compressed()); - - // Initialize the builder. - let mut builder = AsmBuilder::::default(); - - // Initialize the sp1 and recursion configs as constants.. - let sp1_config = const_fri_config(&mut builder, sp1_fri_config()); - let reduce_config = const_fri_config(&mut builder, default_fri_config()); - let compress_config = const_fri_config(&mut builder, compressed_fri_config()); - let sp1_pcs = TwoAdicFriPcsVariable { config: sp1_config }; - let reduce_pcs = TwoAdicFriPcsVariable { - config: reduce_config, - }; - let compress_pcs = TwoAdicFriPcsVariable { - config: compress_config, - }; - - // Allocate empty space on the stack for the inputs. - // - // In the case where setup is not true, the values on the stack will all be witnessed - // with the appropriate values using the hinting API. - let is_recursive_flags: Array<_, Var<_>> = builder.uninit(); - let chip_quotient_data: Array<_, Array<_, QuotientData<_>>> = builder.uninit(); - let sorted_indices: Array<_, Array<_, Var<_>>> = builder.uninit(); - let verify_start_challenger: DuplexChallengerVariable<_> = builder.uninit(); - let reconstruct_challenger: DuplexChallengerVariable<_> = builder.uninit(); - let prep_sorted_indices: Array<_, Var<_>> = builder.uninit(); - let prep_domains: Array<_, TwoAdicMultiplicativeCosetVariable<_>> = builder.uninit(); - let reduce_prep_sorted_indices: Array<_, Var<_>> = builder.uninit(); - let reduce_prep_domains: Array<_, TwoAdicMultiplicativeCosetVariable<_>> = builder.uninit(); - let compress_prep_sorted_indices: Array<_, Var<_>> = builder.uninit(); - let compress_prep_domains: Array<_, TwoAdicMultiplicativeCosetVariable<_>> = - builder.uninit(); - let sp1_vk: VerifyingKeyVariable<_> = builder.uninit(); - let reduce_vk: VerifyingKeyVariable<_> = builder.uninit(); - let compress_vk: VerifyingKeyVariable<_> = builder.uninit(); - let initial_committed_values_digest: Sha256DigestVariable<_> = builder.uninit(); - let initial_deferred_proofs_digest: DigestVariable<_> = builder.uninit(); - let initial_start_pc: Felt<_> = builder.uninit(); - let initial_exit_code: Felt<_> = builder.uninit(); - let initial_start_shard: Felt<_> = builder.uninit(); - let mut reconstruct_deferred_digest: DigestVariable<_> = builder.uninit(); - let proofs: Array<_, ShardProofVariable<_>> = builder.uninit(); - let deferred_chip_quotient_data: Array<_, Array<_, QuotientData<_>>> = builder.uninit(); - let deferred_sorted_indices: Array<_, Array<_, Var<_>>> = builder.uninit(); - let num_deferred_proofs: Var<_> = builder.uninit(); - let deferred_proofs: Array<_, ShardProofVariable<_>> = builder.uninit(); - let is_complete: Var<_> = builder.uninit(); - let is_compressed: Var<_> = builder.uninit(); - - // Setup the memory for the prover. - // - // If the program is being setup, we need to witness the inputs using the hinting API - // and setup the correct state of memory. - if setup { - Vec::::witness(&is_recursive_flags, &mut builder); - Vec::>::witness(&chip_quotient_data, &mut builder); - Vec::>::witness(&sorted_indices, &mut builder); - DuplexChallenger::witness(&verify_start_challenger, &mut builder); - DuplexChallenger::witness(&reconstruct_challenger, &mut builder); - Vec::::witness(&prep_sorted_indices, &mut builder); - Vec::>::witness(&prep_domains, &mut builder); - Vec::::witness(&reduce_prep_sorted_indices, &mut builder); - Vec::>::witness( - &reduce_prep_domains, - &mut builder, - ); - Vec::::witness(&compress_prep_sorted_indices, &mut builder); - Vec::>::witness( - &compress_prep_domains, - &mut builder, - ); - StarkVerifyingKey::::witness(&sp1_vk, &mut builder); - StarkVerifyingKey::::witness(&reduce_vk, &mut builder); - StarkVerifyingKey::::witness(&compress_vk, &mut builder); - <[Word; PV_DIGEST_NUM_WORDS] as Hintable>::witness( - &initial_committed_values_digest, - &mut builder, - ); - InnerDigest::witness(&initial_deferred_proofs_digest, &mut builder); - BabyBear::witness(&initial_start_pc, &mut builder); - BabyBear::witness(&initial_exit_code, &mut builder); - BabyBear::witness(&initial_start_shard, &mut builder); - InnerDigest::witness(&reconstruct_deferred_digest, &mut builder); - - let num_proofs = is_recursive_flags.len(); - let mut proofs_target = builder.dyn_array(num_proofs); - builder.range(0, num_proofs).for_each(|i, builder| { - let proof = ShardProof::::read(builder); - builder.set(&mut proofs_target, i, proof); - }); - builder.assign(proofs.clone(), proofs_target); - - Vec::>::witness(&deferred_chip_quotient_data, &mut builder); - Vec::>::witness(&deferred_sorted_indices, &mut builder); - Vec::>::witness(&deferred_proofs, &mut builder); - let num_deferred_proofs_var = deferred_proofs.len(); - builder.assign(num_deferred_proofs, num_deferred_proofs_var); - usize::witness(&is_complete, &mut builder); - usize::witness(&is_compressed, &mut builder); - - return builder.compile_program(); - } - - let num_proofs = is_recursive_flags.len(); - let zero: Var<_> = builder.constant(F::zero()); - let zero_felt: Felt<_> = builder.constant(F::zero()); - let one: Var<_> = builder.constant(F::one()); - let one_felt: Felt<_> = builder.constant(F::one()); - - // Setup the recursive challenger. - builder.cycle_tracker("stage-b-setup-recursion-challenger"); - let mut recursion_challenger = DuplexChallengerVariable::new(&mut builder); - for j in 0..DIGEST_SIZE { - let element = builder.get(&reduce_vk.commitment, j); - recursion_challenger.observe(&mut builder, element); - } - recursion_challenger.observe(&mut builder, reduce_vk.pc_start); - builder.cycle_tracker("stage-b-setup-recursion-challenger"); - - // Hash vkey + pc_start + prep_domains into a single digest. - let sp1_vk_digest = hash_vkey(&mut builder, &sp1_vk, &prep_domains, &prep_sorted_indices); - let recursion_vk_digest = hash_vkey( - &mut builder, - &reduce_vk, - &reduce_prep_domains, - &reduce_prep_sorted_indices, - ); - - // Global variables that will be commmitted to at the end. - let global_committed_values_digest: Sha256DigestVariable<_> = - initial_committed_values_digest; - let global_deferred_proofs_digest: DigestVariable<_> = initial_deferred_proofs_digest; - let global_start_pc: Felt<_> = initial_start_pc; - let global_next_pc: Felt<_> = builder.uninit(); - let global_exit_code: Felt<_> = initial_exit_code; - let global_start_shard: Felt<_> = initial_start_shard; - let global_next_shard: Felt<_> = builder.uninit(); - let global_cumulative_sum: Ext<_, _> = builder.eval(EF::zero().cons()); - let start_reconstruct_challenger = reconstruct_challenger.copy(&mut builder); - let start_reconstruct_deferred_digest = - clone_array(&mut builder, &reconstruct_deferred_digest); - - // Previous proof's values. - let prev_next_pc: Felt<_> = builder.uninit(); - let prev_next_shard: Felt<_> = builder.uninit(); - - // For each proof: - // 1) If it's the first proof of this batch, ensure that the start values are correct. - // 2) If it's not the first proof, ensure that the global values are the same and the - // transitions are valid. - // 3) If it's the last proof of this batch, set the global end variables. - // 4) If it's not the last proof, update the previous values. - let constrain_shard_transitions = - |proof_index: Var<_>, - builder: &mut Builder, - committed_value_digest_words: &[Word>; PV_DIGEST_NUM_WORDS], - start_pc: Felt<_>, - next_pc: Felt<_>, - start_shard: Felt<_>, - next_shard: Felt<_>, - exit_code: Felt<_>| { - let committed_value_digest = - Sha256DigestVariable::from_words(builder, committed_value_digest_words); - builder.if_eq(proof_index, zero).then_or_else( - // First proof: ensure that witnessed start values are correct. - |builder| { - for i in 0..(PV_DIGEST_NUM_WORDS * WORD_SIZE) { - let element = builder.get(&global_committed_values_digest.bytes, i); - let proof_element = builder.get(&committed_value_digest.bytes, i); - builder.assert_felt_eq(element, proof_element); - } - builder.assert_felt_eq(global_start_pc, start_pc); - builder.assert_felt_eq(global_start_shard, start_shard); - builder.assert_felt_eq(global_exit_code, exit_code); - }, - // Non-first proofs: verify global values are same and transitions are valid. - |builder| { - // Assert that committed_values_digest and exit_code are the same - for j in 0..(PV_DIGEST_NUM_WORDS * WORD_SIZE) { - let global_element = - builder.get(&global_committed_values_digest.bytes, j); - let element = builder.get(&committed_value_digest.bytes, j); - builder.assert_felt_eq(global_element, element); - } - builder.assert_felt_eq(global_exit_code, exit_code); - - // Shard should be previous next_shard. - builder.assert_felt_eq(start_shard, prev_next_shard); - // Start pc should be equal to next_pc declared in previous proof. - builder.assert_felt_eq(start_pc, prev_next_pc); - }, - ); - builder.if_eq(proof_index, num_proofs - one).then_or_else( - // If it's the last proof, set global end variables. - |builder| { - builder.assign(global_next_shard, next_shard); - builder.assign(global_next_pc, next_pc); - }, - // If it's not the last proof, update previous values. - |builder| { - builder.assign(prev_next_pc, next_pc); - builder.assign(prev_next_shard, next_shard); - }, - ); - }; - - // Verify sp1 and recursive proofs. - builder.range(0, num_proofs).for_each(|i, builder| { - let proof = builder.get(&proofs, i); - let sorted_indices = builder.get(&sorted_indices, i); - let chip_quotient_data = builder.get(&chip_quotient_data, i); - let is_recursive = builder.get(&is_recursive_flags, i); - - builder.if_eq(is_recursive, zero).then_or_else( - // Handle the case where the proof is a sp1 proof. - |builder| { - // Clone the variable pointer to reconstruct_challenger. - let reconstruct_challenger = reconstruct_challenger.clone(); - // Extract public values. - let mut pv_elements = Vec::new(); - for i in 0..PROOF_MAX_NUM_PVS { - let element = builder.get(&proof.public_values, i); - pv_elements.push(element); - } - let pv = PublicValues::>, Felt<_>>::from_vec(pv_elements); - - // Verify shard transitions. - let next_shard: Felt<_> = builder.uninit(); - let next_pc_var = felt2var(builder, pv.next_pc); - builder.if_eq(next_pc_var, zero).then_or_else( - // If next_pc is 0, then next_shard should be 0. - |builder| { - builder.assign(next_shard, zero_felt); - }, - // Otherwise, next_shard should be shard + 1. - |builder| { - let shard_plus_one: Felt<_> = builder.eval(pv.shard + one_felt); - builder.assign(next_shard, shard_plus_one); - }, - ); - constrain_shard_transitions( - i, - builder, - &pv.committed_value_digest, - pv.start_pc, - pv.next_pc, - pv.shard, - next_shard, - pv.exit_code, - ); - - // Need to convert the shard as a felt to a variable, since `if_eq` only handles - // variables. - let shard_f = pv.shard; - let shard = felt2var(builder, shard_f); - - // Handle the case where the shard is the first shard. - builder.if_eq(shard, one).then(|builder| { - // This should be the first proof as well - builder.assert_var_eq(i, zero); - - // Start pc should be sp1_vk.pc_start - builder.assert_felt_eq(pv.start_pc, sp1_vk.pc_start); - - // Clone the variable pointer to verify_start_challenger. - let mut reconstruct_challenger = reconstruct_challenger.clone(); - // Initialize the reconstruct challenger from empty challenger. - reconstruct_challenger.reset(builder); - reconstruct_challenger.observe(builder, sp1_vk.commitment.clone()); - reconstruct_challenger.observe(builder, sp1_vk.pc_start); - - // Make sure the start reconstruct challenger is correct, since we will - // commit to it in public values. - start_reconstruct_challenger.assert_eq(builder, &reconstruct_challenger); - - // Make sure start reconstruct deferred digest is fully zero. - for j in 0..POSEIDON_NUM_WORDS { - let element = builder.get(&start_reconstruct_deferred_digest, j); - builder.assert_felt_eq(element, zero_felt); - } - }); - - // Observe current proof commit and public values into reconstruct challenger. - for j in 0..DIGEST_SIZE { - let element = builder.get(&proof.commitment.main_commit, j); - reconstruct_challenger.clone().observe(builder, element); - } - for j in 0..SP1_PROOF_NUM_PV_ELTS { - let element = builder.get(&proof.public_values, j); - reconstruct_challenger.clone().observe(builder, element); - } - - // Accumulate lookup bus. - let num_chips = proof.opened_values.chips.len(); - builder.range(0, num_chips).for_each(|j, builder| { - let chip = builder.get(&proof.opened_values.chips, j); - let new_sum: Ext<_, _> = - builder.eval(global_cumulative_sum + chip.cumulative_sum); - builder.assign(global_cumulative_sum, new_sum); - }); - - // Verify proof with copy of witnessed challenger. - let mut current_challenger = verify_start_challenger.copy(builder); - - // Verify the shard. - StarkVerifier::::verify_shard( - builder, - &sp1_vk.clone(), - &sp1_pcs, - &core_machine, - &mut current_challenger, - &proof, - chip_quotient_data.clone(), - sorted_indices.clone(), - prep_sorted_indices.clone(), - prep_domains.clone(), - ); - }, - // Handle the case where the proof is a recursive proof. - |builder| { - let mut reconstruct_challenger = reconstruct_challenger.clone(); - let mut pv_elements = Vec::new(); - for i in 0..PROOF_MAX_NUM_PVS { - let element = builder.get(&proof.public_values, i); - pv_elements.push(element); - } - let pv = RecursionPublicValues::>::from_vec(pv_elements); - - // Verify shard transitions. - constrain_shard_transitions( - i, - builder, - &pv.committed_value_digest, - pv.start_pc, - pv.next_pc, - pv.start_shard, - pv.next_shard, - pv.exit_code, - ); - - // Assert that the current reconstruct_challenger is the same as the proof's - // start_reconstruct_challenger, then fast-forward to end_reconstruct_challenger. - assert_challenger_eq_pv( - builder, - &reconstruct_challenger, - pv.start_reconstruct_challenger, - ); - assign_challenger_from_pv( - builder, - &mut reconstruct_challenger, - pv.end_reconstruct_challenger, - ); - - // Assert that the current deferred_proof_digest is the same as the proof's - // start_reconstruct_deferred_digest, then fast-forward to end digest. - for j in 0..DIGEST_SIZE { - let element = builder.get(&reconstruct_deferred_digest, j); - builder.assert_felt_eq(element, pv.start_reconstruct_deferred_digest[j]); - } - for j in 0..DIGEST_SIZE { - builder.set( - &mut reconstruct_deferred_digest, - j, - pv.end_reconstruct_deferred_digest[j], - ); - } - - // Assert that sp1_vk, recursion_vk, and verify_start_challenger are the same. - for j in 0..DIGEST_SIZE { - let element = builder.get(&sp1_vk_digest, j); - builder.assert_felt_eq(element, pv.sp1_vk_digest[j]); - } - for j in 0..DIGEST_SIZE { - let element = builder.get(&recursion_vk_digest, j); - builder.assert_felt_eq(element, pv.recursion_vk_digest[j]); - } - assert_challenger_eq_pv( - builder, - &verify_start_challenger, - pv.verify_start_challenger, - ); - - // Accumulate lookup bus. - let pv_cumulative_sum = builder.ext_from_base_slice(&pv.cumulative_sum); - let new_sum: Ext<_, _> = - builder.eval(global_cumulative_sum + pv_cumulative_sum); - builder.assign(global_cumulative_sum, new_sum); - - // Setup the recursive challenger to use for verifying. - let mut current_challenger = recursion_challenger.copy(builder); - for j in 0..DIGEST_SIZE { - let element = builder.get(&proof.commitment.main_commit, j); - current_challenger.observe(builder, element); - } - builder.range(0, PROOF_MAX_NUM_PVS).for_each(|j, builder| { - let element = builder.get(&proof.public_values, j); - current_challenger.observe(builder, element); - }); - - builder.if_eq(is_compressed, BabyBear::one()).then_or_else( - |builder| { - StarkVerifier::::verify_shard( - builder, - &compress_vk, - &compress_pcs, - &compress_machine, - &mut current_challenger.clone(), - &proof, - chip_quotient_data.clone(), - sorted_indices.clone(), - reduce_prep_sorted_indices.clone(), - reduce_prep_domains.clone(), - ); - }, - |builder| { - StarkVerifier::::verify_shard( - builder, - &reduce_vk, - &reduce_pcs, - &reduce_machine, - &mut current_challenger.clone(), - &proof, - chip_quotient_data.clone(), - sorted_indices.clone(), - reduce_prep_sorted_indices.clone(), - reduce_prep_domains.clone(), - ); - }, - ) - }, - ); - }); - - // If num_proofs is 0, set end values to same as start values. - builder.if_eq(num_proofs, zero).then(|builder| { - builder.assign(global_next_shard, global_start_shard); - builder.assign(global_next_pc, global_start_pc); - }); - - // Verify deferred proofs and acculumate to deferred proofs digest. - builder - .range(0, num_deferred_proofs) - .for_each(|i, builder| { - let proof = builder.get(&deferred_proofs, i); - let sorted_indices = builder.get(&deferred_sorted_indices, i); - let chip_quotient_data = builder.get(&deferred_chip_quotient_data, i); - let mut challenger = recursion_challenger.copy(builder); - for j in 0..DIGEST_SIZE { - let element = builder.get(&proof.commitment.main_commit, j); - challenger.observe(builder, element); - } - builder.range(0, PROOF_MAX_NUM_PVS).for_each(|j, builder| { - let element = builder.get(&proof.public_values, j); - challenger.observe(builder, element); - }); - - // Validate proof public values. - // 1) Ensure that the proof is complete. - let mut pv_elements = Vec::new(); - for i in 0..PROOF_MAX_NUM_PVS { - let element = builder.get(&proof.public_values, i); - pv_elements.push(element); - } - let pv = RecursionPublicValues::>::from_vec(pv_elements); - builder.assert_felt_eq(pv.is_complete, one_felt); - // 2) Ensure recursion vkey is correct - for j in 0..DIGEST_SIZE { - let element = builder.get(&recursion_vk_digest, j); - builder.assert_felt_eq(element, pv.recursion_vk_digest[j]); - } - - // Verify the shard. - StarkVerifier::::verify_shard( - builder, - &reduce_vk.clone(), - &reduce_pcs, - &reduce_machine, - &mut challenger, - &proof, - chip_quotient_data.clone(), - sorted_indices.clone(), - reduce_prep_sorted_indices.clone(), - reduce_prep_domains.clone(), - ); - - // Update deferred proof digest - // poseidon2( current_digest[..8] || pv.sp1_vk_digest[..8] || pv.committed_value_digest[..32] ) - let mut poseidon_inputs = builder.array(48); - builder.range(0, 8).for_each(|j, builder| { - let element = builder.get(&reconstruct_deferred_digest, j); - builder.set(&mut poseidon_inputs, j, element); - }); - for j in 0..DIGEST_SIZE { - let input_index: Var<_> = builder.constant(F::from_canonical_usize(j + 8)); - builder.set(&mut poseidon_inputs, input_index, pv.sp1_vk_digest[j]); - } - for j in 0..PV_DIGEST_NUM_WORDS { - for k in 0..WORD_SIZE { - let input_index: Var<_> = - builder.eval(F::from_canonical_usize(j * WORD_SIZE + k + 16)); - let element = pv.committed_value_digest[j][k]; - builder.set(&mut poseidon_inputs, input_index, element); - } - } - let new_digest = builder.poseidon2_hash(&poseidon_inputs); - for j in 0..DIGEST_SIZE { - let element = builder.get(&new_digest, j); - builder.set(&mut reconstruct_deferred_digest, j, element); - } - }); - - // If witnessed as complete, then verify all of the final state is correct. - builder.if_eq(is_complete, one).then_or_else( - |builder| { - // 1) Proof begins at shard == 1. - let global_start_shard_var = felt2var(builder, global_start_shard); - builder.assert_var_eq(global_start_shard_var, one); - - // 2) Proof begins at pc == sp1_vk.pc_start. - builder.assert_felt_eq(global_start_pc, sp1_vk.pc_start); - - // 3) Execution has halted (next_pc == 0 && next_shard == 0). - let global_next_pc_var = felt2var(builder, global_next_pc); - builder.assert_var_eq(global_next_pc_var, zero); - let global_next_shard_var = felt2var(builder, global_next_shard); - builder.assert_var_eq(global_next_shard_var, zero); - - // 4) reconstruct_challenger has been fully reconstructed. - // a) start_reconstruct_challenger == challenger after observing vk and pc_start. - let mut expected_challenger = DuplexChallengerVariable::new(builder); - expected_challenger.observe(builder, sp1_vk.commitment.clone()); - expected_challenger.observe(builder, sp1_vk.pc_start); - start_reconstruct_challenger.assert_eq(builder, &expected_challenger); - // b) end_reconstruct_challenger == verify_start_challenger. - reconstruct_challenger.assert_eq(builder, &verify_start_challenger); - - // 5) reconstruct_deferred_digest has been fully reconstructed. - // a) start_reconstruct_deferred_digest == 0. - for j in 0..DIGEST_SIZE { - let element = builder.get(&start_reconstruct_deferred_digest, j); - builder.assert_felt_eq(element, zero_felt); - } - // b) end_reconstruct_deferred_digest == deferred_proofs_digest. - for j in 0..DIGEST_SIZE { - let element = builder.get(&reconstruct_deferred_digest, j); - let global_element = builder.get(&global_deferred_proofs_digest, j); - builder.assert_felt_eq(element, global_element); - } - - // 6) Verify that the cumulative sum is zero. - let zero_ext: Ext<_, _> = builder.eval(EF::zero().cons()); - builder.assert_ext_eq(global_cumulative_sum, zero_ext); - }, - // Ensure is_complete is boolean. - |builder| { - builder.assert_var_eq(is_complete, zero); - }, - ); - - // Public values: - // ( - // committed_values_digest, - // deferred_proofs_digest, - // start_pc, - // next_pc, - // exit_code, - // start_shard, - // end_shard, - // start_reconstruct_challenger, - // end_reconstruct_challenger, - // start_reconstruct_deferred_digest, - // end_reconstruct_deferred_digest, - // sp1_vk_digest, - // recursion_vk_digest, - // verify_start_challenger, - // cumulative_sum, - // is_complete, - // ) - for j in 0..(PV_DIGEST_NUM_WORDS * WORD_SIZE) { - let element = builder.get(&global_committed_values_digest.bytes, j); - builder.commit_public_value(element); - } - for j in 0..POSEIDON_NUM_WORDS { - let element = builder.get(&global_deferred_proofs_digest, j); - builder.commit_public_value(element); - } - builder.commit_public_value(global_start_pc); - builder.commit_public_value(global_next_pc); - builder.commit_public_value(global_exit_code); - builder.commit_public_value(global_start_shard); - builder.commit_public_value(global_next_shard); - commit_challenger(&mut builder, &start_reconstruct_challenger); - commit_challenger(&mut builder, &reconstruct_challenger); - builder.range(0, POSEIDON_NUM_WORDS).for_each(|j, builder| { - let element = builder.get(&start_reconstruct_deferred_digest, j); - builder.commit_public_value(element); - }); - builder.range(0, POSEIDON_NUM_WORDS).for_each(|j, builder| { - let element = builder.get(&reconstruct_deferred_digest, j); - builder.commit_public_value(element); - }); - builder.range(0, DIGEST_SIZE).for_each(|j, builder| { - let element = builder.get(&sp1_vk_digest, j); - builder.commit_public_value(element); - }); - builder.range(0, DIGEST_SIZE).for_each(|j, builder| { - let element = builder.get(&recursion_vk_digest, j); - builder.commit_public_value(element); - }); - commit_challenger(&mut builder, &verify_start_challenger); - let cumulative_sum_felts = builder.ext2felt(global_cumulative_sum); - builder.commit_public_values(&cumulative_sum_felts); - let is_complete_felt = var2felt(&mut builder, is_complete); - builder.commit_public_value(is_complete_felt); - - builder.compile_program() - } -} diff --git a/recursion/program/src/stark.rs b/recursion/program/src/stark.rs index f92ac770b2..cd59a8804d 100644 --- a/recursion/program/src/stark.rs +++ b/recursion/program/src/stark.rs @@ -5,12 +5,16 @@ use p3_field::TwoAdicField; use sp1_core::air::MachineAir; use sp1_core::stark::Com; use sp1_core::stark::GenericVerifierConstraintFolder; +use sp1_core::stark::ShardProof; use sp1_core::stark::StarkGenericConfig; use sp1_core::stark::StarkMachine; +use sp1_core::stark::StarkVerifyingKey; use sp1_recursion_compiler::ir::Array; use sp1_recursion_compiler::ir::Ext; +use sp1_recursion_compiler::ir::ExtConst; use sp1_recursion_compiler::ir::SymbolicExt; +use sp1_recursion_compiler::ir::SymbolicVar; use sp1_recursion_compiler::ir::Var; use sp1_recursion_compiler::ir::{Builder, Config, Usize}; use sp1_recursion_compiler::prelude::Felt; @@ -32,11 +36,106 @@ use crate::types::QuotientData; pub const EMPTY: usize = 0x_1111_1111; +pub trait StarkRecursiveVerifier { + fn verify_shard( + &self, + builder: &mut Builder, + vk: &VerifyingKeyVariable, + pcs: &TwoAdicFriPcsVariable, + challenger: &mut DuplexChallengerVariable, + proof: &ShardProofVariable, + is_complete: impl Into>, + ); + + fn verify_shards( + &self, + builder: &mut Builder, + vk: &VerifyingKeyVariable, + pcs: &TwoAdicFriPcsVariable, + challenger: &mut DuplexChallengerVariable, + proofs: &Array>, + is_complete: impl Into> + Clone, + ) { + // Assert that the number of shards is not zero. + builder.assert_usize_ne(proofs.len(), 0); + + // Verify each shard. + builder.range(0, proofs.len()).for_each(|i, builder| { + let proof = builder.get(proofs, i); + self.verify_shard(builder, vk, pcs, challenger, &proof, is_complete.clone()); + }); + } +} + #[derive(Debug, Clone, Copy)] pub struct StarkVerifier { _phantom: std::marker::PhantomData<(C, SC)>, } +pub struct ShardProofHint<'a, SC: StarkGenericConfig, A> { + pub machine: &'a StarkMachine, + pub proof: &'a ShardProof, +} + +impl<'a, SC: StarkGenericConfig, A: MachineAir> ShardProofHint<'a, SC, A> { + pub fn new(machine: &'a StarkMachine, proof: &'a ShardProof) -> Self { + Self { machine, proof } + } +} + +pub struct VerifyingKeyHint<'a, SC: StarkGenericConfig, A> { + pub machine: &'a StarkMachine, + pub vk: &'a StarkVerifyingKey, +} + +impl<'a, SC: StarkGenericConfig, A: MachineAir> VerifyingKeyHint<'a, SC, A> { + pub fn new(machine: &'a StarkMachine, vk: &'a StarkVerifyingKey) -> Self { + Self { machine, vk } + } +} + +impl StarkRecursiveVerifier for StarkMachine +where + C::F: TwoAdicField, + SC: StarkGenericConfig< + Val = C::F, + Challenge = C::EF, + Domain = TwoAdicMultiplicativeCoset, + >, + A: MachineAir + for<'a> Air>, + C::F: TwoAdicField, + C::EF: TwoAdicField, + Com: Into<[SC::Val; DIGEST_SIZE]>, +{ + fn verify_shard( + &self, + builder: &mut Builder, + vk: &VerifyingKeyVariable, + pcs: &TwoAdicFriPcsVariable, + challenger: &mut DuplexChallengerVariable, + proof: &ShardProofVariable, + is_complete: impl Into::N>>, + ) { + // Verify the shard proof. + StarkVerifier::::verify_shard(builder, vk, pcs, self, challenger, proof); + + // Verify that the cumulative sum of the chip is zero if the shard is complete. + let cumulative_sum: Ext<_, _> = builder.uninit(); + builder + .range(0, proof.opened_values.chips.len()) + .for_each(|i, builder| { + let values = builder.get(&proof.opened_values.chips, i); + builder.assign(cumulative_sum, cumulative_sum + values.cumulative_sum); + }); + + builder + .if_eq(is_complete.into(), C::N::one()) + .then(|builder| { + builder.assert_ext_eq(cumulative_sum, C::EF::zero().cons()); + }); + } +} + pub type RecursiveVerifierConstraintFolder<'a, C> = GenericVerifierConstraintFolder< 'a, ::F, @@ -62,10 +161,6 @@ where machine: &StarkMachine, challenger: &mut DuplexChallengerVariable, proof: &ShardProofVariable, - chip_quotient_data: Array>, - chip_sorted_idxs: Array>, - preprocessed_sorted_idxs: Array>, - prep_domains: Array>, ) where A: MachineAir + for<'a> Air>, C::F: TwoAdicField, @@ -114,7 +209,7 @@ where let num_quotient_mats: Var<_> = builder.eval(C::N::zero()); builder.range(0, num_shard_chips).for_each(|i, builder| { - let num_quotient_chunks = builder.get(&chip_quotient_data, i).quotient_size; + let num_quotient_chunks = builder.get(&proof.quotient_data, i).quotient_size; builder.assign(num_quotient_mats, num_quotient_mats + num_quotient_chunks); }); @@ -127,12 +222,12 @@ where // Iterate through machine.chips filtered for preprocessed chips. for (preprocessed_id, chip_id) in machine.preprocessed_chip_ids().into_iter().enumerate() { // Get index within sorted preprocessed chips. - let preprocessed_sorted_id = builder.get(&preprocessed_sorted_idxs, preprocessed_id); + let preprocessed_sorted_id = builder.get(&vk.preprocessed_sorted_idxs, preprocessed_id); // Get domain from witnessed domains. Array is ordered by machine.chips ordering. - let domain = builder.get(&prep_domains, preprocessed_id); + let domain = builder.get(&vk.prep_domains, preprocessed_id); // Get index within all sorted chips. - let chip_sorted_id = builder.get(&chip_sorted_idxs, chip_id); + let chip_sorted_id = builder.get(&proof.sorted_idxs, chip_id); // Get opening from proof. let opening = builder.get(&opened_values.chips, chip_sorted_id); @@ -159,7 +254,7 @@ where let QuotientData { log_quotient_degree, quotient_size, - } = builder.get(&chip_quotient_data, i); + } = builder.get(&proof.quotient_data, i); let domain = pcs.natural_domain_for_log_degree(builder, Usize::Var(opening.log_degree)); builder.set_value(&mut trace_domains, i, domain.clone()); @@ -253,7 +348,7 @@ where for (i, chip) in machine.chips().iter().enumerate() { let chip_name = chip.name(); tracing::debug!("verifying constraints for chip: {}", chip_name); - let index = builder.get(&chip_sorted_idxs, i); + let index = builder.get(&proof.sorted_idxs, i); if chip.preprocessed_width() > 0 { builder.assert_var_ne(index, C::N::from_canonical_usize(EMPTY)); @@ -271,7 +366,7 @@ where let log_quotient_degree = chip.log_quotient_degree(); let quotient_size = 1 << log_quotient_degree; - let chip_quotient_data = builder.get(&chip_quotient_data, index); + let chip_quotient_data = builder.get(&proof.quotient_data, index); builder.assert_usize_eq( chip_quotient_data.log_quotient_degree, log_quotient_degree, @@ -308,6 +403,7 @@ pub(crate) mod tests { use crate::hints::Hintable; use crate::stark::DuplexChallengerVariable; use crate::stark::Ext; + use crate::stark::ShardProofHint; use crate::types::ShardCommitmentVariable; use p3_challenger::{CanObserve, FieldChallenger}; use p3_field::AbstractField; @@ -318,7 +414,7 @@ pub(crate) mod tests { use sp1_core::utils::InnerChallenge; use sp1_core::utils::InnerVal; use sp1_core::{ - stark::{RiscvAir, ShardProof, StarkGenericConfig}, + stark::{RiscvAir, StarkGenericConfig}, utils::BabyBearPoseidon2, }; use sp1_recursion_compiler::config::InnerConfig; @@ -377,8 +473,9 @@ pub(crate) mod tests { let mut witness_stream = Vec::new(); for proof in proofs { - witness_stream.extend(proof.write()); - let proof = ShardProof::::read(&mut builder); + let proof_hint = ShardProofHint::new(&machine, &proof); + witness_stream.extend(proof_hint.write()); + let proof = ShardProofHint::::read(&mut builder); let ShardCommitmentVariable { main_commit, .. } = proof.commitment; challenger.observe(&mut builder, main_commit); let pv_slice = proof.public_values.slice( @@ -400,6 +497,7 @@ pub(crate) mod tests { permutation_challenges[i].cons(), ); } + builder.halt(); let program = builder.compile_program(); run_test_recursion(program, Some(witness_stream.into()), TestConfig::All); @@ -424,6 +522,7 @@ pub(crate) mod tests { let a_plus_b_ext = builder.eval(a_ext + b_ext); builder.print_f(a_plus_b); builder.print_e(a_plus_b_ext); + builder.halt(); let program = builder.compile_program(); let elapsed = time.elapsed(); diff --git a/recursion/program/src/types.rs b/recursion/program/src/types.rs index c53811a144..db49b10eb5 100644 --- a/recursion/program/src/types.rs +++ b/recursion/program/src/types.rs @@ -17,6 +17,8 @@ pub struct ShardProofVariable { pub opened_values: ShardOpenedValuesVariable, pub opening_proof: TwoAdicPcsProofVariable, pub public_values: Array>, + pub quotient_data: Array>, + pub sorted_idxs: Array>, } #[derive(DslVariable, Clone, Copy)] @@ -36,6 +38,8 @@ pub struct QuotientDataValues { pub struct VerifyingKeyVariable { pub commitment: DigestVariable, pub pc_start: Felt, + pub preprocessed_sorted_idxs: Array>, + pub prep_domains: Array>, } /// Reference: [sp1_core::stark::ShardCommitment] diff --git a/recursion/program/src/utils.rs b/recursion/program/src/utils.rs index 550b9e0e43..92b46c546e 100644 --- a/recursion/program/src/utils.rs +++ b/recursion/program/src/utils.rs @@ -6,7 +6,8 @@ use p3_fri::FriConfig; use p3_merkle_tree::FieldMerkleTreeMmcs; use p3_poseidon2::{Poseidon2, Poseidon2ExternalMatrixGeneral}; use p3_symmetric::{PaddingFreeSponge, TruncatedPermutation}; -use sp1_core::stark::StarkGenericConfig; +use sp1_core::air::MachineAir; +use sp1_core::stark::{Dom, ShardProof, StarkGenericConfig, StarkMachine, StarkVerifyingKey}; use sp1_core::utils::BabyBearPoseidon2; use sp1_recursion_compiler::asm::AsmConfig; use sp1_recursion_compiler::ir::{Array, Builder, Config, Felt, MemVariable, Var}; @@ -16,7 +17,8 @@ use sp1_recursion_core::runtime::{DIGEST_SIZE, PERMUTATION_WIDTH}; use crate::challenger::DuplexChallengerVariable; use crate::fri::types::FriConfigVariable; use crate::fri::TwoAdicMultiplicativeCosetVariable; -use crate::types::VerifyingKeyVariable; +use crate::stark::EMPTY; +use crate::types::{QuotientDataValues, VerifyingKeyVariable}; type SC = BabyBearPoseidon2; type F = ::Val; @@ -35,7 +37,7 @@ type RecursionBuilder = Builder; pub fn const_fri_config( builder: &mut RecursionBuilder, - config: FriConfig, + config: &FriConfig, ) -> FriConfigVariable { let two_addicity = Val::TWO_ADICITY; let mut generators = builder.dyn_array(two_addicity); @@ -165,15 +167,32 @@ pub fn commit_challenger(builder: &mut Builder, var: &DuplexChalle } } +pub fn get_challenger_public_values( + builder: &mut Builder, + var: &DuplexChallengerVariable, +) -> ChallengerPublicValues> { + let sponge_state = core::array::from_fn(|i| builder.get(&var.sponge_state, i)); + let num_inputs = var2felt(builder, var.nb_inputs); + let input_buffer = core::array::from_fn(|i| builder.get(&var.input_buffer, i)); + let num_outputs = var2felt(builder, var.nb_outputs); + let output_buffer = core::array::from_fn(|i| builder.get(&var.output_buffer, i)); + + ChallengerPublicValues { + sponge_state, + num_inputs, + input_buffer, + num_outputs, + output_buffer, + } +} + /// Hash the verifying key + prep domains into a single digest. /// poseidon2( commit[0..8] || pc_start || prep_domains[N].{log_n, .size, .shift, .g}) pub fn hash_vkey( builder: &mut Builder, vk: &VerifyingKeyVariable, - prep_domains: &Array>, - prep_sorted_indices: &Array>, ) -> Array> { - let domain_slots: Var<_> = builder.eval(prep_domains.len() * 4); + let domain_slots: Var<_> = builder.eval(vk.prep_domains.len() * 4); let vkey_slots: Var<_> = builder.constant(C::N::from_canonical_usize(DIGEST_SIZE + 1)); let total_slots: Var<_> = builder.eval(vkey_slots + domain_slots); let mut inputs = builder.dyn_array(total_slots); @@ -184,19 +203,68 @@ pub fn hash_vkey( builder.set(&mut inputs, DIGEST_SIZE, vk.pc_start); let four: Var<_> = builder.constant(C::N::from_canonical_usize(4)); let one: Var<_> = builder.constant(C::N::one()); - builder.range(0, prep_domains.len()).for_each(|i, builder| { - let sorted_index = builder.get(prep_sorted_indices, i); - let domain = builder.get(prep_domains, i); - let log_n_index: Var<_> = builder.eval(vkey_slots + sorted_index * four); - let size_index: Var<_> = builder.eval(log_n_index + one); - let shift_index: Var<_> = builder.eval(size_index + one); - let g_index: Var<_> = builder.eval(shift_index + one); - let log_n_felt = var2felt(builder, domain.log_n); - let size_felt = var2felt(builder, domain.size); - builder.set(&mut inputs, log_n_index, log_n_felt); - builder.set(&mut inputs, size_index, size_felt); - builder.set(&mut inputs, shift_index, domain.shift); - builder.set(&mut inputs, g_index, domain.g); - }); + builder + .range(0, vk.prep_domains.len()) + .for_each(|i, builder| { + let sorted_index = builder.get(&vk.preprocessed_sorted_idxs, i); + let domain = builder.get(&vk.prep_domains, i); + let log_n_index: Var<_> = builder.eval(vkey_slots + sorted_index * four); + let size_index: Var<_> = builder.eval(log_n_index + one); + let shift_index: Var<_> = builder.eval(size_index + one); + let g_index: Var<_> = builder.eval(shift_index + one); + let log_n_felt = var2felt(builder, domain.log_n); + let size_felt = var2felt(builder, domain.size); + builder.set(&mut inputs, log_n_index, log_n_felt); + builder.set(&mut inputs, size_index, size_felt); + builder.set(&mut inputs, shift_index, domain.shift); + builder.set(&mut inputs, g_index, domain.g); + }); builder.poseidon2_hash(&inputs) } + +pub(crate) fn get_sorted_indices>( + machine: &StarkMachine, + proof: &ShardProof, +) -> Vec { + machine + .chips_sorted_indices(proof) + .into_iter() + .map(|x| match x { + Some(x) => x, + None => EMPTY, + }) + .collect() +} + +pub(crate) fn get_preprocessed_data>( + machine: &StarkMachine, + vk: &StarkVerifyingKey, +) -> (Vec, Vec>) { + let chips = machine.chips(); + let (prep_sorted_indices, prep_domains) = machine + .preprocessed_chip_ids() + .into_iter() + .map(|chip_idx| { + let name = chips[chip_idx].name().clone(); + let prep_sorted_idx = vk.chip_ordering[&name]; + (prep_sorted_idx, vk.chip_information[prep_sorted_idx].1) + }) + .unzip(); + (prep_sorted_indices, prep_domains) +} + +pub(crate) fn get_chip_quotient_data>( + machine: &StarkMachine, + proof: &ShardProof, +) -> Vec { + machine + .shard_chips_ordered(&proof.chip_ordering) + .map(|chip| { + let log_quotient_degree = chip.log_quotient_degree(); + QuotientDataValues { + log_quotient_degree, + quotient_size: 1 << log_quotient_degree, + } + }) + .collect() +} diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index f2e5447b8f..21cccd3046 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -8,18 +8,18 @@ edition = "2021" [dependencies] prost = "0.12" prost-types = "0.12" -serde = { version = "1.0.197", features = ["derive"] } -serde_json = "1.0.114" -twirp = { git = "https://github.com/github/twirp-rs.git", rev = "93d4e4b" } -async-trait = "0.1.77" -reqwest-middleware = "0.2.4" -reqwest = { version = "0.11.25", features = ["rustls-tls", "trust-dns", "stream"] } -anyhow = "1.0.80" +serde = { version = "1.0.201", features = ["derive"] } +serde_json = "1.0.117" +twirp = { git = "https://github.com/github/twirp-rs.git", rev = "c85f31f9c54957374e7dcb3534fc52cff0aa2dc5" } +async-trait = "0.1.80" +reqwest-middleware = "0.3.1" +reqwest = { version = "0.12.4", features = ["rustls-tls", "trust-dns", "stream"] } +anyhow = "1.0.83" sp1-prover = { path = "../prover" } sp1-core = { path = "../core" } futures = "0.3.30" bincode = "1.3.3" -tokio = { version = "1.36.0", features = ["full"] } +tokio = { version = "1.37.0", features = ["full"] } p3-matrix = { workspace = true } p3-commit = { workspace = true } p3-field = { workspace = true } diff --git a/sdk/src/artifacts.rs b/sdk/src/artifacts.rs index 192bd30b44..0caee50843 100644 --- a/sdk/src/artifacts.rs +++ b/sdk/src/artifacts.rs @@ -13,7 +13,7 @@ pub use sp1_prover::build::{build_groth16_artifacts_with_dummy, get_groth16_arti pub fn export_solidity_groth16_verifier(output_dir: impl Into) -> Result<()> { let output_dir: PathBuf = output_dir.into(); let artifacts_dir = sp1_prover::build::get_groth16_artifacts_dir(); - let verifier_path = artifacts_dir.join("Groth16Verifier.sol"); + let verifier_path = artifacts_dir.join("SP1Verifier.sol"); if !verifier_path.exists() { return Err(anyhow::anyhow!( @@ -70,3 +70,12 @@ pub async fn download_file( pb.finish_with_message(msg); Ok(()) } + +#[cfg(test)] +mod tests { + #[test] + fn test_verifier_export() { + crate::artifacts::export_solidity_groth16_verifier(tempfile::tempdir().unwrap().path()) + .expect("failed to export verifier"); + } +} diff --git a/sdk/src/provers/local.rs b/sdk/src/provers/local.rs index cd4f72dc53..3c062bdeea 100644 --- a/sdk/src/provers/local.rs +++ b/sdk/src/provers/local.rs @@ -60,8 +60,8 @@ impl Prover for LocalProver { let deferred_proofs = stdin.proofs.iter().map(|p| p.0.clone()).collect(); let public_values = proof.public_values.clone(); let reduce_proof = self.prover.compress(&pk.vk, proof, deferred_proofs); - let compress_proof = self.prover.shrink(&pk.vk, reduce_proof); - let outer_proof = self.prover.wrap_bn254(&pk.vk, compress_proof); + let compress_proof = self.prover.shrink(reduce_proof); + let outer_proof = self.prover.wrap_bn254(compress_proof); let artifacts_dir = sp1_prover::build::get_groth16_artifacts_dir(); let proof = self.prover.wrap_groth16(outer_proof, artifacts_dir); Ok(SP1ProofWithPublicValues { diff --git a/tests/ed-decompress/elf/riscv32im-succinct-zkvm-elf b/tests/ed-decompress/elf/riscv32im-succinct-zkvm-elf index fdabf14e0c..985b46383d 100755 Binary files a/tests/ed-decompress/elf/riscv32im-succinct-zkvm-elf and b/tests/ed-decompress/elf/riscv32im-succinct-zkvm-elf differ diff --git a/zkvm/entrypoint/Cargo.toml b/zkvm/entrypoint/Cargo.toml index 43a3e87bca..e111a881ea 100644 --- a/zkvm/entrypoint/Cargo.toml +++ b/zkvm/entrypoint/Cargo.toml @@ -10,11 +10,11 @@ p3-baby-bear = { workspace = true, optional = true } p3-field = { workspace = true, optional = true } bincode = "1.3.3" cfg-if = "1.0.0" -getrandom = { version = "0.2.12", features = ["custom"] } +getrandom = { version = "0.2.15", features = ["custom"] } k256 = { version = "0.13.3", features = ["ecdsa", "std", "bits"] } -once_cell = "1.8.0" +once_cell = "1.19.0" rand = "0.8.5" -serde = { version = "1.0.196", features = ["derive"] } +serde = { version = "1.0.201", features = ["derive"] } libm = { version = "0.2.8", optional = true } sha2 = { version = "0.10.8" } diff --git a/zkvm/precompiles/Cargo.toml b/zkvm/precompiles/Cargo.toml index 91a9376f04..e38ba017a3 100644 --- a/zkvm/precompiles/Cargo.toml +++ b/zkvm/precompiles/Cargo.toml @@ -5,15 +5,15 @@ edition = "2021" [dependencies] amcl = { package = "snowbridge-amcl", version="1.0.2", default-features = false, features = ["bls381"]} -anyhow = "1.0.75" +anyhow = "1.0.83" bincode = "1.3.3" cfg-if = "1.0.0" -getrandom = { version = "0.2.12", features = ["custom"] } +getrandom = { version = "0.2.15", features = ["custom"] } hex = "0.4.3" k256 = { version = "0.13.3", features = ["ecdsa", "std", "bits"] } rand = "0.8.5" -serde = { version = "1.0.196", features = ["derive"] } -num = {version = "0.4.1"} +serde = { version = "1.0.201", features = ["derive"] } +num = {version = "0.4.3"} [features] -verify = [] \ No newline at end of file +verify = []