diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f24b7659f..27ead7844 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -22,7 +22,8 @@ runs: echo "RUSTFLAGS=${{env.RUSTFLAGS}} -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -Ctarget-cpu=native" | tee -a $GITHUB_ENV echo "FRI_QUERIES=1" | tee -a $GITHUB_ENV fi - echo "RUST_LOG=1" | tee -a $GITHUB_ENV + echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" | tee -a $GITHUB_ENV + echo "RUST_LOG=info" | tee -a $GITHUB_ENV - uses: actions/setup-go@v5 with: go-version: '1.22' diff --git a/.github/scripts/create-tag.js b/.github/scripts/create-tag.js deleted file mode 100644 index 6ecd0bc9a..000000000 --- a/.github/scripts/create-tag.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = async ({ github, context }, tagName) => { - try { - await github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: `refs/tags/${tagName}`, - sha: context.sha, - force: true, - }); - } catch (err) { - console.error(`Failed to create tag: ${tagName}`); - console.error(err); - } -}; \ No newline at end of file diff --git a/.github/scripts/move-tag.js b/.github/scripts/move-tag.js deleted file mode 100644 index 580fa58e7..000000000 --- a/.github/scripts/move-tag.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = async ({ github, context }, tagName) => { - try { - await github.rest.git.updateRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: `tags/${tagName}`, - sha: context.sha, - force: true, - }); - } catch (err) { - console.error(`Failed to move nightly tag.`); - console.error(`This should only happen the first time.`); - console.error(err); - } -}; \ No newline at end of file diff --git a/.github/scripts/prune-prereleases.js b/.github/scripts/prune-prereleases.js deleted file mode 100644 index 8503eba23..000000000 --- a/.github/scripts/prune-prereleases.js +++ /dev/null @@ -1,68 +0,0 @@ -// In case node 21 is not used. -function groupBy(array, keyOrIterator) { - var iterator; - - // use the function passed in, or create one - if(typeof keyOrIterator !== 'function') { - const key = String(keyOrIterator); - iterator = function (item) { return item[key]; }; - } else { - iterator = keyOrIterator; - } - - return array.reduce(function (memo, item) { - const key = iterator(item); - memo[key] = memo[key] || []; - memo[key].push(item); - return memo; - }, {}); -} - -module.exports = async ({ github, context }) => { - console.log("Pruning old prereleases"); - - // doc: https://docs.github.com/en/rest/releases/releases - const { data: releases } = await github.rest.repos.listReleases({ - owner: context.repo.owner, - repo: context.repo.repo, - }); - - let nightlies = releases.filter( - release => - // Only consider releases tagged `nightly-${SHA}` for deletion - release.tag_name.includes("nightly") && - release.tag_name !== "nightly" - ); - - // Pruning rules: - // 1. only keep the earliest (by created_at) release of the month - // 2. to keep the newest 3 nightlies - // Notes: - // - This addresses https://github.com/foundry-rs/foundry/issues/6732 - // - Name of the release may deviate from created_at due to the usage of different timezones. - - // Group releases by months. - // Per doc: - // > The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. - const groups = groupBy(nightlies, i => i.created_at.slice(0, 7)); - const nightliesToPrune = Object.values(groups) - .reduce((acc, cur) => acc.concat(cur.slice(0, -1)), []) // rule 1 - .slice(3); // rule 2 - - for (const nightly of nightliesToPrune) { - console.log(`Deleting nightly: ${nightly.tag_name}`); - await github.rest.repos.deleteRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: nightly.id, - }); - console.log(`Deleting nightly tag: ${nightly.tag_name}`); - await github.rest.git.deleteRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: `tags/${nightly.tag_name}`, - }); - } - - console.log("Done."); -}; \ No newline at end of file diff --git a/.github/templates/M1_MAC.md b/.github/templates/M1_MAC.md index 4c648ccae..ffd10e3df 100644 --- a/.github/templates/M1_MAC.md +++ b/.github/templates/M1_MAC.md @@ -1,7 +1,7 @@ --- -title: "ci: Tests are broken on M1 Mac" +title: "ci: M1 Mac tests failed" labels: debt, automated issue --- -Tests have failed on `macos-latest-xlarge` after {{ env.GIT_COMMIT }} was merged to `dev` +Compilation tests failed on `macos-latest-xlarge` as of {{ env.GIT_COMMIT }} Triggered by: {{ env.WORKFLOW_URL }} diff --git a/.github/templates/UNUSED_DEPS.md b/.github/templates/UNUSED_DEPS.md new file mode 100644 index 000000000..4b6d26a11 --- /dev/null +++ b/.github/templates/UNUSED_DEPS.md @@ -0,0 +1,13 @@ +--- +title: "chore: some installed deps are not needed" +labels: automated-issue +--- + +Some dependencies specified in `Cargo.toml` are not needed. + +Check the [unused dependencies sanity check]({{env.WORKFLOW_URL}}) workflow for details. + +> **Note** +> If this is a false positive, please refer to the [`cargo-udeps` docs][cargo-udeps-docs] on how to ignore the dependencies. + +[cargo-udeps-docs]: https://github.com/est31/cargo-udeps#ignoring-some-of-the-dependencies diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml deleted file mode 100644 index bc0c468bc..000000000 --- a/.github/workflows/eval.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Evaluate Performance - -on: - schedule: - - cron: "0 0 * * *" # Runs at 00:00 UTC every day - -jobs: - benchmark: - name: Benchmark - runs-on: ${{ matrix.runner_label }} - strategy: - matrix: - include: - - runner_label: self-hosted-x86 - arch: x86 - - runner_label: self-hosted-arm64 - arch: arm64 - if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" - env: - CARGO_NET_GIT_FETCH_WITH_CLI: "true" - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.REPO_TOKEN }} - - - name: Install SP1 toolchain - run: | - curl -L https://sp1.succinct.xyz | bash - sp1up - - - name: Build and Run Evaluation - run: | - ./eval.sh - - - name: Upload Benchmark as Artifact - uses: actions/upload-artifact@v4 - with: - name: benchmark-results-${{ matrix.arch }} - path: benchmark.csv diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 93cacd0ee..d56bd74d2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,16 +7,48 @@ on: schedule: - cron: "0 0 * * *" -env: - CARGO_TERM_COLOR: always - jobs: unused-dependencies: - uses: lurk-lab/ci-workflows/.github/workflows/unused-deps.yml@main + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: lurk-lab/ci-workflows + - uses: ./.github/actions/ci-env + - uses: actions/checkout@v4 + - name: Setup CI + uses: ./.github/actions/setup + with: + pull_token: ${{ secrets.REPO_TOKEN }} + perf: false + - uses: taiki-e/install-action@cargo-udeps + # Normally running cargo-udeps requires use of a nightly compiler + # In order to have a more stable and less noisy experience, lets instead + # opt to use the stable toolchain specified via the 'rust-toolchain' file + # and instead enable nightly features via 'RUSTC_BOOTSTRAP' + - name: run cargo-udeps + run: RUSTC_BOOTSTRAP=1 cargo udeps --workspace --all-targets + - uses: JasonEtco/create-an-issue@v2 + if: ${{ failure() }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WORKFLOW_URL: + ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + with: + update_existing: true + filename: .github/templates/UNUSED_DEPS.md linux-exhaustive: - name: Run all tests including ignored - runs-on: warp-ubuntu-latest-x64-32x + name: Exhaustive tests on ${{ matrix.arch }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - runner: warp-ubuntu-latest-arm64-32x + arch: ARM + - runner: warp-ubuntu-latest-x64-32x + arch: x86 steps: - uses: actions/checkout@v4 with: @@ -53,6 +85,8 @@ jobs: uses: ./.github/actions/setup with: pull_token: ${{ secrets.REPO_TOKEN }} + - name: Install deps + run: sudo apt update && sudo apt install cmake -y - name: Install `cargo-prove` toolchain run: | cargo install --locked --path ./cli @@ -78,4 +112,4 @@ jobs: GIT_COMMIT: ${{ github.sha }} WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} with: - filename: .github/NIGHTLY_FAILURE.md + filename: .github/templates/NIGHTLY_TESTS.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index dc113d161..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,239 +0,0 @@ -# Reference: https://github.com/foundry-rs/foundry/blob/master/.github/workflows/release.yml - -name: release - -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 - timeout-minutes: 30 - outputs: - tag_name: ${{ steps.release_info.outputs.tag_name }} - release_name: ${{ steps.release_info.outputs.release_name }} - changelog: ${{ steps.build_changelog.outputs.changelog }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.PULL_TOKEN }} - - name: Compute release name and tag - id: release_info - run: | - if [[ $IS_NIGHTLY ]]; then - echo "tag_name=nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT - echo "release_name=Nightly ($(date '+%Y-%m-%d'))" >> $GITHUB_OUTPUT - else - echo "tag_name=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT - echo "release_name=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT - fi - - # Creates a `nightly-SHA` tag for this specific nightly - # This tag is used for this specific nightly version's release - # which allows users to roll back. It is also used to build - # the changelog. - - name: Create build-specific nightly tag - if: ${{ env.IS_NIGHTLY }} - uses: actions/github-script@v7 - env: - TAG_NAME: ${{ steps.release_info.outputs.tag_name }} - with: - script: | - const createTag = require('./.github/scripts/create-tag.js') - await createTag({ github, context }, process.env.TAG_NAME) - - - name: Build changelog - id: build_changelog - uses: mikepenz/release-changelog-builder-action@v4 - with: - configuration: "./.github/changelog.json" - fromTag: ${{ env.IS_NIGHTLY && 'nightly' || '' }} - toTag: ${{ steps.release_info.outputs.tag_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release: - name: ${{ matrix.target }} (${{ matrix.runner }}) - runs-on: ${{ matrix.runner }} - timeout-minutes: 240 - needs: prepare - strategy: - fail-fast: false - matrix: - include: - # `runner`: GHA runner label - # `target`: Rust build target triple - # `platform` and `arch`: Used in tarball names - # `svm`: target platform to use for the Solc binary: https://github.com/roynalnaruto/svm-rs/blob/84cbe0ac705becabdc13168bae28a45ad2299749/svm-builds/build.rs#L4-L24 - - runner: ubuntu-latest - target: x86_64-unknown-linux-gnu - svm_target_platform: linux-amd64 - platform: linux - arch: amd64 - - runner: warp-ubuntu-latest-arm64-4x - target: aarch64-unknown-linux-gnu - svm_target_platform: linux-aarch64 - platform: linux - arch: arm64 - - runner: macos-latest-large - target: x86_64-apple-darwin - svm_target_platform: macosx-amd64 - platform: darwin - arch: amd64 - - runner: macos-latest-xlarge - target: aarch64-apple-darwin - svm_target_platform: macosx-aarch64 - platform: darwin - arch: arm64 - # - runner: windows-latest - # target: x86_64-pc-windows-msvc - # svm_target_platform: windows-amd64 - # platform: win32 - # arch: amd64 - steps: - - name: Setup CI - uses: ./.github/actions/setup - with: - pull_token: ${{ secrets.REPO_TOKEN }} - - - uses: actions/checkout@v4 - - name: Apple M1 setup - if: matrix.target == 'aarch64-apple-darwin' - run: | - echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV - echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV - - - name: Linux ARM setup - if: matrix.target == 'aarch64-unknown-linux-gnu' - run: | - sudo apt-get update -y - sudo apt-get install -y gcc-aarch64-linux-gnu - echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - - - name: Build binaries - env: - SVM_TARGET_PLATFORM: ${{ matrix.svm_target_platform }} - shell: bash - run: | - set -eo pipefail - target="${{ matrix.target }}" - flags=() - - [[ "$target" == *windows* ]] && exe=".exe" - - RUSTFLAGS='-C target-feature=+crt-static' cargo build --release -p sphinx-cli --target "$target" "${flags[@]}" - - bins=(cargo-prove) - for name in "${bins[@]}"; do - bin=./target/$target/release/$name$exe - file "$bin" || true - ldd "$bin" || true - $bin --version || true - done - - - name: Archive binaries - id: artifacts - env: - PLATFORM_NAME: ${{ matrix.platform }} - TARGET: ${{ matrix.target }} - ARCH: ${{ matrix.arch }} - VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }} - shell: bash - run: | - if [ "$PLATFORM_NAME" == "linux" ]; then - tar -czvf "cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release cargo-prove - echo "file_name=cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT - elif [ "$PLATFORM_NAME" == "darwin" ]; then - # We need to use gtar here otherwise the archive is corrupt. - # See: https://github.com/actions/virtual-environments/issues/2619 - gtar -czvf "cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release cargo-prove - echo "file_name=cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT - else - cd ./target/${TARGET}/release - 7z a -tzip "cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" cargo-prove.exe - mv "cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" ../../../ - echo "file_name=cargo_prove_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" >> $GITHUB_OUTPUT - fi - - # Creates the release for this specific version - - name: Create release - uses: softprops/action-gh-release@v2 - with: - name: ${{ needs.prepare.outputs.release_name }} - tag_name: ${{ needs.prepare.outputs.tag_name }} - prerelease: ${{ env.IS_NIGHTLY }} - body: ${{ needs.prepare.outputs.changelog }} - files: | - ${{ steps.artifacts.outputs.file_name }} - ${{ steps.man.outputs.cargo_prove_man }} - - # If this is a nightly release, it also updates the release - # tagged `nightly` for compatibility with `foundryup` - - name: Update nightly release - if: ${{ env.IS_NIGHTLY }} - uses: softprops/action-gh-release@v2 - with: - name: "Nightly" - tag_name: "nightly" - prerelease: true - body: ${{ needs.prepare.outputs.changelog }} - files: | - ${{ steps.artifacts.outputs.file_name }} - ${{ steps.man.outputs.cargo_prove_man }} - - cleanup: - name: Release cleanup - runs-on: ubuntu-latest - timeout-minutes: 30 - needs: release - if: always() - steps: - - uses: actions/checkout@v4 - - # Moves the `nightly` tag to `HEAD` - - name: Move nightly tag - if: ${{ env.IS_NIGHTLY }} - uses: actions/github-script@v7 - with: - script: | - const moveTag = require('./.github/scripts/move-tag.js') - await moveTag({ github, context }, 'nightly') - - - name: Delete old nightlies - uses: actions/github-script@v7 - with: - script: | - const prunePrereleases = require('./.github/scripts/prune-prereleases.js') - await prunePrereleases({github, context}) - - # If any of the jobs fail, this will create a high-priority issue to signal so. - issue: - name: Open an issue - runs-on: ubuntu-latest - needs: [prepare, release, cleanup] - if: failure() - steps: - - uses: actions/checkout@v4 - - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - WORKFLOW_URL: | - ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - with: - update_existing: true - filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 134dbe086..dbb20da83 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,11 +30,6 @@ jobs: run: | cargo nextest run -p sphinx-core --cargo-profile dev-ci --profile ci --no-default-features --features debug -- cpu::trace::tests::generate_trace working-directory: ${{ github.workspace }}/examples - - name: Install `cargo prove` CLI - run: | - cargo install --locked --force --path ./cli - cargo prove install-toolchain - working-directory: ${{ github.workspace }} test-recursion-circuit: name: Test recursion circuit @@ -91,26 +86,18 @@ jobs: with: pull_token: ${{ secrets.REPO_TOKEN }} perf: false + - name: Install deps + run: sudo apt update && sudo apt install cmake -y - name: Install `cargo prove` CLI run: | cargo install --locked --force --path ./cli cargo prove install-toolchain working-directory: ${{ github.workspace }} - name: Check examples - run: | - for i in $(find ./ -maxdepth 1 -mindepth 1 -type d); do - cd "$i/script" - cargo check - cd ../../ - done + run: make working-directory: ${{ github.workspace }}/examples - name: Check integration tests - run: | - for i in $(find ./ -maxdepth 1 -mindepth 1 -type d); do - cd "$i" - cargo check - cd ../ - done + run: make working-directory: ${{ github.workspace }}/tests - name: Run cargo prove new run: | @@ -133,7 +120,7 @@ jobs: cargo run --release mac-m1: - name: CI Tests on OSX ARM + name: Check OSX ARM compiles runs-on: warp-macos-latest-arm64-6x if: github.event_name != 'pull_request' steps: @@ -151,20 +138,14 @@ jobs: cargo install --locked --force --path ./cli cargo prove install-toolchain working-directory: ${{ github.workspace }} - - name: Run cargo test on sphinx except the prove_sp1 recursion test - run: | - cargo nextest run --cargo-profile dev-ci --profile ci -E 'all() - test(test_e2e_prove_groth16)' - - name: Run cargo test with no default features - run: | - cargo nextest run -p sphinx-core --cargo-profile dev-ci --profile ci --no-default-features --features debug -- cpu::trace::tests::generate_trace - - name: check examples compile - run: | - for i in $(find ./ -maxdepth 1 -mindepth 1 -type d); do - cd "$i/script" - cargo check - cd ../../ - done + - name: Check workspace + run: cargo check --all-targets --all-features --workspace + - name: Check examples + run: make working-directory: ${{ github.workspace }}/examples + - name: Check integration tests + run: make + working-directory: ${{ github.workspace }}/tests - name: Set env if: failure() run: | @@ -187,9 +168,6 @@ jobs: repository: lurk-lab/ci-workflows path: ci-workflows - uses: ./ci-workflows/.github/actions/ci-env - - uses: ./ci-workflows/.github/actions/install-deps - with: - packages: "pkg-config libudev-dev" - name: Set env run: | echo "DOWNSTREAM_REPO=$(echo "wormhole-foundation/example-zk-light-clients-internal" | awk -F'/' '{ print $2 }')" | tee -a $GITHUB_ENV @@ -197,23 +175,26 @@ jobs: - uses: actions/checkout@v4 with: path: ${{ github.workspace }}/${{ env.UPSTREAM_REPO }} - submodules: recursive - name: Setup CI uses: ./sphinx/.github/actions/setup with: pull_token: ${{ secrets.REPO_TOKEN }} perf: false - - name: Install cargo prove + - name: Install deps run: | - cargo install --locked --path ./cli - cargo prove install-toolchain - working-directory: ${{ github.workspace }}/${{ env.UPSTREAM_REPO }} + sudo apt-get update && sudo apt-get install -y build-essential pkg-config libssl-dev libudev-dev cmake + cd sphinx/cli + cargo install --locked --force --path . + cargo prove install-toolchain - uses: actions/checkout@v4 with: repository: "wormhole-foundation/${{ env.DOWNSTREAM_REPO }}" path: ${{ github.workspace }}/${{ env.DOWNSTREAM_REPO }} token: ${{ secrets.REPO_TOKEN }} - submodules: recursive + - name: Setup aptos CI + uses: ./example-zk-light-clients-internal/.github/actions/setup + with: + pull_token: ${{ secrets.REPO_TOKEN }} - uses: ./ci-workflows/.github/actions/check-downstream-compiles with: upstream-path: "${{ env.UPSTREAM_REPO }}" diff --git a/core/Cargo.toml b/core/Cargo.toml index 2533cd8fc..991257739 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -38,7 +38,6 @@ sphinx-primitives = { path = "../primitives" } anyhow = { workspace = true } arrayref = { workspace = true } blake3 = { workspace = true } -blake3-zkvm = { workspace = true } bls12_381 = { workspace = true } cfg-if = { workspace = true } hybrid-array = { workspace = true } diff --git a/eval.sh b/eval.sh deleted file mode 100755 index d84b163cd..000000000 --- a/eval.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -e - -declare -a programs=("fibonacci" "ssz-withdrawals" "tendermint") -declare -a hash_functions=("poseidon" "blake3" "keccak256") -declare -a shard_sizes=("262144" "524288" "1048576" "2097152" "4194304") -declare -i runs=5 - -root_directory=$(pwd) - -benchmark_path="${root_directory}/benchmark.csv" - -for program in "${programs[@]}"; do - echo "Processing program: $program" - - program_directory="${root_directory}/examples/$program/program" - if [ ! -d "$program_directory" ]; then - echo "Program directory $program_directory not found!" - continue - fi - - cd "$program_directory" - - if ! RUSTFLAGS="-C passes=loweratomic -C link-arg=-Ttext=0x00200800 -C panic=abort" \ - CARGO_NET_GIT_FETCH_WITH_CLI=true \ - cargo prove build; then - echo "Failed to build $program, skipping..." - continue - fi - - echo "Building $program done" - elf_path="${program_directory}/elf/riscv32im-succinct-zkvm-elf" - - cd "${root_directory}/eval" - for hash_fn in "${hash_functions[@]}"; do - for shard_size in "${shard_sizes[@]}"; do - echo "Running $program with hash function $hash_fn and shard size $shard_size, $runs times" - if ! CARGO_NET_GIT_FETCH_WITH_CLI=true RUSTFLAGS='-C target-cpu=native' cargo run -p sphinx-eval --release -- \ - --program $program --hashfn $hash_fn --shard-size $shard_size --benchmark-path "$benchmark_path" --elf-path "$elf_path" --runs $runs; then - echo "Error running evaluation for $program with hash function $hash_fn and shard size $shard_size" - fi - done - done - - cd "$root_directory" -done diff --git a/examples/Makefile b/examples/Makefile index 3da95cb62..600f4ed40 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,5 +1,4 @@ SHELL := /bin/bash -.SHELLFLAGS = -e all: @set -e; \ @@ -11,6 +10,13 @@ all: else \ echo "No program directory in $${dir}, skipping..."; \ fi; \ + 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 script directory in $${dir}, skipping..."; \ + fi; \ done .PHONY: all diff --git a/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf b/examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf index 1f2713803..41c2d67cb 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/prover/Cargo.toml b/prover/Cargo.toml index bc8e0bfcf..1312a954d 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -27,7 +27,6 @@ rayon = { workspace = true } itertools = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -tracing-appender = { workspace = true } serde_json = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } sha2 = { workspace = true } diff --git a/recursion/gnark-ffi/Cargo.toml b/recursion/gnark-ffi/Cargo.toml index fc36087b8..9704dbdfb 100644 --- a/recursion/gnark-ffi/Cargo.toml +++ b/recursion/gnark-ffi/Cargo.toml @@ -12,13 +12,9 @@ sphinx-recursion-compiler = { path = "../compiler" } serde = { workspace = true } serde_json = { workspace = true } tempfile = { workspace = true } -reqwest = { workspace = true, features = ["json", "blocking"] } rand = { workspace = true } -crossbeam = { workspace = true } -subtle-encoding = { workspace = true } log = { workspace = true } num-bigint = { workspace = true } [build-dependencies] bindgen = { workspace = true } -cc = { workspace = true } diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index d359d75ab..f9ac3260b 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -30,7 +30,6 @@ hex = { workspace = true } log = { workspace = true } axum = { workspace = true } alloy = { workspace = true, features = ["contract", "signer-wallet"] } -dotenv = { workspace = true } sha2 = { workspace = true } tempfile = { workspace = true } num-bigint = { workspace = true } diff --git a/tests/Makefile b/tests/Makefile index 5c8125433..4f96c6b81 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,8 +1,8 @@ SHELL := /bin/bash -.SHELLFLAGS = -e all: - @for dir in */ ; do \ + @set -e; \ + for dir in */ ; do \ echo "Building in $${dir}..."; \ cd $${dir} && cargo prove build || { echo "Failed at command: cd $${dir} && cargo prove build"; exit 1; }; \ cd ..; \ diff --git a/tests/blake3-compress/elf/riscv32im-succinct-zkvm-elf b/tests/blake3-compress/elf/riscv32im-succinct-zkvm-elf index 1b1169189..7a1bf1e88 100755 Binary files a/tests/blake3-compress/elf/riscv32im-succinct-zkvm-elf and b/tests/blake3-compress/elf/riscv32im-succinct-zkvm-elf differ