diff --git a/.cargo/config.local.toml b/.cargo/config.local.toml index 6220db5fc..2785ca448 100644 --- a/.cargo/config.local.toml +++ b/.cargo/config.local.toml @@ -58,10 +58,10 @@ openvm-keccak256-transpiler = { path = "../openvm-org/openvm/extensions/keccak25 openvm-pairing-circuit = { path = "../openvm-org/openvm/extensions/pairing/circuit" } openvm-pairing-guest = { path = "../openvm-org/openvm/extensions/pairing/guest" } openvm-pairing-transpiler = { path = "../openvm-org/openvm/extensions/pairing/transpiler" } -openvm-rv32-adapters = { path = "../openvm-org/openvm/extensions/rv32-adapters" } -openvm-rv32im-circuit = { path = "../openvm-org/openvm/extensions/rv32im/circuit" } -openvm-rv32im-guest = { path = "../openvm-org/openvm/extensions/rv32im/guest" } -openvm-rv32im-transpiler = { path = "../openvm-org/openvm/extensions/rv32im/transpiler" } +openvm-riscv-adapters = { path = "../openvm-org/openvm/extensions/riscv-adapters" } +openvm-riscv-circuit = { path = "../openvm-org/openvm/extensions/riscv/circuit" } +openvm-riscv-guest = { path = "../openvm-org/openvm/extensions/riscv/guest" } +openvm-riscv-transpiler = { path = "../openvm-org/openvm/extensions/riscv/transpiler" } openvm-sha2-air = { path = "../openvm-org/openvm/crates/circuits/sha2-air" } openvm-sha2-circuit = { path = "../openvm-org/openvm/extensions/sha2/circuit" } openvm-sha2-guest = { path = "../openvm-org/openvm/extensions/sha2/guest" } diff --git a/.cargo/config.template.toml b/.cargo/config.template.toml index 5cb93b50d..01a4d489c 100644 --- a/.cargo/config.template.toml +++ b/.cargo/config.template.toml @@ -57,10 +57,10 @@ openvm-keccak256-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.gi openvm-pairing-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } openvm-pairing-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } openvm-pairing-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } -openvm-rv32-adapters = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } -openvm-rv32im-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } -openvm-rv32im-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } -openvm-rv32im-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } +openvm-riscv-adapters = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } +openvm-riscv-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } +openvm-riscv-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } +openvm-riscv-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } openvm-sha2-air = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } openvm-sha2-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } openvm-sha2-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", rev = "$OPENVM_REV" } diff --git a/.cargo/config.toml b/.cargo/config.toml index 7a348ff0d..b8b8cb9ac 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -60,10 +60,10 @@ # openvm-pairing-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } # openvm-pairing-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } # openvm-pairing-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } -# openvm-rv32-adapters = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } -# openvm-rv32im-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } -# openvm-rv32im-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } -# openvm-rv32im-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } +# openvm-riscv-adapters = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } +# openvm-riscv-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } +# openvm-riscv-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } +# openvm-riscv-transpiler = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } # openvm-sha2-air = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } # openvm-sha2-circuit = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } # openvm-sha2-guest = { git = "ssh://git@github.com/openvm-org/openvm.git", branch = "main" } diff --git a/.env.example b/.env.example index b2be7e35b..77bde451f 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ RPC_1= +RPC_2= diff --git a/.github/workflows/label-overrides.yml b/.github/workflows/label-overrides.yml new file mode 100644 index 000000000..f6ffb8869 --- /dev/null +++ b/.github/workflows/label-overrides.yml @@ -0,0 +1,14 @@ +name: Label overrides + +on: + pull_request: + types: [labeled] + +permissions: + contents: read + +jobs: + kzg-proving: + if: ${{ github.event.label.name == 'run-kzg-proving' }} + uses: ./.github/workflows/tests-kzg.yml + secrets: inherit diff --git a/.github/workflows/reth-benchmark.yml b/.github/workflows/reth-benchmark.yml index ab5410ab3..d1a1ed9c6 100644 --- a/.github/workflows/reth-benchmark.yml +++ b/.github/workflows/reth-benchmark.yml @@ -4,6 +4,19 @@ run-name: "Reth Benchmark (block ${{ inputs.block_number || github.event.inputs. on: workflow_dispatch: inputs: + instance_family: + type: string + required: false + description: The family of the instance, can be multiple ones concat with "+" e.g. g6+g5 + default: g7e.2xlarge + memory_allocator: + type: choice + required: false + description: Memory allocator to use + options: + - jemalloc + - mimalloc + default: jemalloc block_number: type: number required: false @@ -12,7 +25,7 @@ on: mode: type: choice required: false - description: Benchmark mode + description: Running mode options: - execute - execute-metered @@ -21,28 +34,6 @@ on: - prove-root - prove-evm default: prove-stark - rpc_input_cache: - type: choice - required: false - description: RPC input cache mode - options: - - use - - refresh - - disabled - default: use - instance_family: - type: string - required: false - description: Runner instance family, or multiple families joined with "+" (e.g. g6+g5) - default: g7e.2xlarge - memory_allocator: - type: choice - required: false - description: Host memory allocator - options: - - jemalloc - - mimalloc - default: jemalloc profiling: type: choice required: false @@ -53,120 +44,133 @@ on: - guest # guest profiling (circuit flamegraphs) - nsys # nsys profiling (cuda) default: none - use_tco: - type: boolean - required: false - description: Use TCO instead of AOT - default: false app_log_blowup: type: number required: false - description: App log blowup - app_l_skip: - type: number - required: false - description: App univariate skip-domain log2 + description: Application level log blowup leaf_log_blowup: type: number required: false - description: Leaf aggregation log blowup + description: Aggregation (leaf) level log blowup internal_log_blowup: type: number required: false - description: Internal aggregation log blowup + description: Internal level log blowup root_log_blowup: type: number required: false - description: Root aggregation log blowup + description: Root level log blowup + segment_max_memory: + type: string + required: false + description: GPU memory soft limit override for segmentation + app_l_skip: + type: number + required: false + description: Log of univariate skip domain size override + exec_mode: + type: choice + required: false + description: OpenVM execution backend + options: + - interpreter + - rvr + - tco + default: rvr + rpc_input_cache: + type: choice + required: false + description: RPC input cache mode + options: + - use + - refresh + - disabled + default: use num_children_leaf: type: number required: false - description: Leaf aggregation fan-in (app proofs) + description: Number of app proofs that leaf verifier aggregates num_children_internal: type: number required: false - description: Internal aggregation fan-in (proofs) - segment_max_memory: - type: string - required: false - description: Estimated VM segment proving-memory cap (bytes) + description: Number of proofs that internal verifier aggregates workflow_call: inputs: ref: type: string required: false description: Git ref to checkout - tag: - type: string - required: false - description: Tag for cache keys (default is commit hash) - block_number: - type: number - required: false - description: Ethereum block number - default: 24001988 - mode: - type: string - required: false - description: "Benchmark mode: execute, execute-metered, prove-app, prove-stark, prove-root, or prove-evm" - default: prove-stark - rpc_input_cache: - type: string - required: false - description: RPC input cache mode (use, refresh, disabled) - default: use instance_family: type: string required: false - description: Runner instance family, or multiple families joined with "+" (e.g. g6+g5) + description: The family of the instance, can be multiple ones concat with "+" e.g. g6+g5 default: g7e.2xlarge memory_allocator: type: string required: false - description: Host memory allocator (jemalloc or mimalloc) + description: Memory allocator to use (mimalloc or jemalloc) default: jemalloc - profiling: - type: string - required: false - description: Profiling mode (none, host, guest, nsys) - default: none - use_tco: - type: boolean - required: false - description: Use TCO instead of AOT - default: false - app_log_blowup: + block_number: type: number required: false - description: App log blowup - app_l_skip: + description: Block number to run the benchmark on + default: 23992138 + app_log_blowup: type: number required: false - description: App univariate skip-domain log2 + description: Application level log blowup leaf_log_blowup: type: number required: false - description: Leaf aggregation log blowup + description: Aggregation (leaf) level log blowup internal_log_blowup: type: number required: false - description: Internal aggregation log blowup + description: Internal level log blowup (only for e2e) root_log_blowup: type: number required: false - description: Root aggregation log blowup + description: Root level log blowup + mode: + type: string + required: false + description: Running mode, one of {execute, execute-metered, prove-app, prove-stark, prove-root, prove-evm} + default: prove-stark + profiling: + type: string + required: false + description: Profiling mode (none, host, guest, nsys) + default: none + segment_max_memory: + type: string + required: false + description: GPU memory soft limit override for segmentation + app_l_skip: + type: number + required: false + description: Log of univariate skip domain size override + exec_mode: + type: string + required: false + description: OpenVM execution backend, one of {interpreter, rvr, tco} + default: rvr num_children_leaf: type: number required: false - description: Leaf aggregation fan-in (app proofs) + description: Number of app proofs that leaf verifier aggregates num_children_internal: type: number required: false - description: Internal aggregation fan-in (proofs) - segment_max_memory: + description: Number of proofs that internal verifier aggregates + tag: type: string required: false - description: Estimated VM segment proving-memory cap (bytes) + description: Tag for cache keys (default is commit hash) + rpc_input_cache: + type: string + required: false + description: RPC input cache mode (use, refresh, disabled) + default: use secrets: GH_ACTIONS_DEPLOY_PRIVATE_KEY: required: true @@ -184,6 +188,10 @@ on: value: ${{ jobs.run-reth.outputs.num_segments }} env: + OPENVM_BRANCH: develop-v2.1.0 + S3_FIXTURE_READ_ENABLED: ${{ vars.S3_PUBLIC_DATA_BUCKET != '' }} + S3_PUBLIC_UPLOAD_ENABLED: ${{ vars.S3_PUBLIC_DATA_BUCKET != '' && vars.S3_REGION != '' }} + S3_WORKFLOW_UPLOAD_ENABLED: ${{ vars.S3_WORKFLOW_DATA_BUCKET != '' }} S3_MD_PATH: s3://${{ vars.S3_WORKFLOW_DATA_BUCKET }}/benchmark/github/results S3_FIXTURE_PATH: s3://${{ vars.S3_PUBLIC_DATA_BUCKET }}/benchmark/github/fixtures S3_METRICS_PATH: s3://${{ vars.S3_WORKFLOW_DATA_BUCKET }}/benchmark/github/metrics @@ -198,6 +206,8 @@ env: jobs: run-reth: name: Run Reth benchmark + permissions: + contents: write runs-on: - runs-on=${{ github.run_id }}/family=${{ inputs.instance_family || github.event.inputs.instance_family }}/volume=80gb/tag=bench-reth-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}/extras=s3-cache/spot=false/image=${{ startsWith(github.event.inputs.instance_family || inputs.instance_family, 'g') && 'ubuntu24-gpu-x64' || contains(github.event.inputs.instance_family || inputs.instance_family, 'g.') && 'ubuntu24-full-arm64' || 'ubuntu24-full-x64' }} outputs: @@ -233,6 +243,12 @@ jobs: run: | echo '${{ toJSON(inputs || github.event.inputs) }}' + - name: Report S3-disabled mode + if: ${{ env.S3_PUBLIC_UPLOAD_ENABLED != 'true' && env.S3_WORKFLOW_UPLOAD_ENABLED != 'true' }} + run: | + echo "S3 uploads disabled; using GitHub artifacts and gh-pages." + echo "S3 uploads disabled; using GitHub artifacts and gh-pages." >> "$GITHUB_STEP_SUMMARY" + - name: Get current commit hash run: | echo "current_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV @@ -250,7 +266,10 @@ jobs: echo "METRIC_PATH=${METRIC_PATH}" >> $GITHUB_ENV echo "name=${METRIC_NAME}" >> $GITHUB_OUTPUT # depends on add_metadata util function and openvm-prof file naming - GPU_MEMORY_SVG_URL="${S3_PUBLIC_URL_BASE}/charts/${CURRENT_SHA}/${METRIC_NAME}.memory.svg" + GPU_MEMORY_SVG_URL="" + if [[ "${S3_PUBLIC_UPLOAD_ENABLED}" == "true" ]]; then + GPU_MEMORY_SVG_URL="${S3_PUBLIC_URL_BASE}/charts/${CURRENT_SHA}/${METRIC_NAME}.memory.svg" + fi echo "memory_svg_url=${GPU_MEMORY_SVG_URL}" >> $GITHUB_OUTPUT - name: Load SSH key uses: webfactory/ssh-agent@v0.9.0 @@ -264,7 +283,7 @@ jobs: ssh-keyscan github.com >> ~/.ssh/known_hosts - name: Checkout openvm (for scripts) - run: git clone --depth=1 https://github.com/openvm-org/openvm.git + run: git clone --depth=1 --branch="$OPENVM_BRANCH" https://github.com/openvm-org/openvm.git - name: Build openvm-prof working-directory: openvm run: | @@ -273,7 +292,9 @@ jobs: - name: Install architecture specific tools run: | source openvm/ci/scripts/utils.sh - install_s5cmd + if [[ "${S3_FIXTURE_READ_ENABLED}" == "true" || "${S3_PUBLIC_UPLOAD_ENABLED}" == "true" || "${S3_WORKFLOW_UPLOAD_ENABLED}" == "true" ]]; then + install_s5cmd + fi sudo apt update && sudo apt install -y gnuplot sudo apt install -y linux-tools-common linux-tools-generic linux-tools-$(uname -r) || \ sudo apt install -y linux-tools-aws linux-cloud-tools-aws || true @@ -298,6 +319,16 @@ jobs: if: ${{ startsWith(inputs.instance_family || github.event.inputs.instance_family, 'g') }} run: bash ./scripts/gpu_driver_setup.sh + - name: Install clang-22 and lld + if: ${{ (inputs.exec_mode || github.event.inputs.exec_mode || 'rvr') == 'rvr' }} + run: | + sudo apt-get update + sudo apt-get install -y lsb-release wget software-properties-common gnupg + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 22 + sudo apt-get install -y lld + - name: Setup halo2 KZG params if: ${{ (github.event.inputs.mode == 'prove-evm') || (inputs.mode == 'prove-evm') }} run: bash ./ci/trusted_setup_s3.sh @@ -348,9 +379,13 @@ jobs: MODE="${{ inputs.mode || github.event.inputs.mode }}" if [[ "$MODE" == "prove-evm" || "$MODE" == "prove-root" ]]; then FEATURES="${FEATURES},evm-verify" + arch=$(uname -m) + if [[ "$arch" == "x86_64" || "$arch" == "amd64" ]]; then + FEATURES="${FEATURES},halo2-asm" + fi fi - USE_TCO="${{ inputs.use_tco || github.event.inputs.use_tco }}" + EXEC_MODE="${{ inputs.exec_mode || github.event.inputs.exec_mode || 'rvr' }}" # Resolve "native" to the host CPU name (e.g. znver3) so sccache keys and # cargo fingerprints differ across instance families (else SIGILL from reuse) @@ -359,25 +394,12 @@ jobs: echo "Resolved target CPU: ${TARGET_CPU}" RUSTFLAGS="-Ctarget-cpu=${TARGET_CPU}" - arch=$(uname -m) - case $arch in - arm64|aarch64) - USE_TCO="true" - ;; - x86_64|amd64) - if [[ "$USE_TCO" != "true" ]]; then - # aot enables halo2curves-axiom/asm which is x86_64-only - FEATURES="${FEATURES},aot" - fi - ;; - *) - echo "Unsupported architecture: $arch" - exit 1 - ;; + case "$EXEC_MODE" in + interpreter) ;; # default interpreted execution; no extra backend feature + tco) FEATURES="${FEATURES},tco" ;; + rvr) FEATURES="${FEATURES},rvr" ;; + *) echo "Unsupported exec_mode: $EXEC_MODE"; exit 1 ;; esac - if [[ "$USE_TCO" == "true" ]]; then - FEATURES="${FEATURES},tco" - fi if [[ "${{ inputs.profiling || github.event.inputs.profiling }}" == "host" || "${{ inputs.profiling || github.event.inputs.profiling }}" == "nsys" ]]; then RUSTFLAGS="${RUSTFLAGS} -C force-frame-pointers=yes" @@ -419,14 +441,24 @@ jobs: run: | cargo build --locked -p cargo-openvm echo "${{ github.workspace }}/openvm/target/debug" >> $GITHUB_PATH + - name: Restore openvm toolchain from cache + if: steps.cache-guest-elf-restore.outputs.cache-hit != 'true' + uses: runs-on/cache@v4 + with: + path: ~/.openvm/toolchains + key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }} + - name: Install openvm rust toolchain + if: steps.cache-guest-elf-restore.outputs.cache-hit != 'true' + # skips download if restored from cache, just re-links into rustup + run: cargo openvm toolchain install - name: Build Guest ELF if: steps.cache-guest-elf-restore.outputs.cache-hit != 'true' working-directory: bin/stateless-guest run: | GUEST_PROFILE=${{ steps.set-build-profiles.outputs.guest_profile }} - RUSTFLAGS="" OPENVM_RUST_TOOLCHAIN=${RUST_TOOLCHAIN} cargo openvm build --no-transpile --profile=$GUEST_PROFILE + RUSTFLAGS="" cargo openvm build --no-transpile --profile=$GUEST_PROFILE mkdir -p ../reth-benchmark/elf - cp target/riscv32im-risc0-zkvm-elf/$GUEST_PROFILE/openvm-stateless-guest ../reth-benchmark/elf/ + cp target/riscv64im-unknown-openvm-elf/$GUEST_PROFILE/openvm-stateless-guest ../reth-benchmark/elf/ - name: Save Guest ELF to cache if: steps.cache-guest-elf-restore.outputs.cache-hit != 'true' @@ -480,8 +512,20 @@ jobs: echo "" } >> "$GITHUB_STEP_SUMMARY" - # Publish the raw report + soundcalc config to the public bucket (the workflow metrics - # bucket isn't web-accessible) and link them in the summary so they're viewable. + - name: Upload soundness artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.set-metric-name.outputs.name }}-soundness + path: | + soundness.json + openvm2.toml + retention-days: 1 + + - name: Publish soundness report + if: ${{ env.S3_PUBLIC_UPLOAD_ENABLED == 'true' }} + run: | + # The workflow metrics bucket isn't web-accessible, so publish this report to the + # public bucket when external publication is available. S3_BASE="${{ env.S3_PUBLIC_PATH_BASE }}/soundness/${METRIC_NAME}" URL_BASE="${{ env.S3_PUBLIC_URL_BASE }}/soundness/${METRIC_NAME}" s5cmd cp soundness.json "${S3_BASE}.soundness.json" @@ -492,6 +536,7 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" - name: Path to soundness result + if: ${{ env.S3_PUBLIC_UPLOAD_ENABLED == 'true' }} run: echo "${{ env.S3_PUBLIC_URL_BASE }}/soundness/${METRIC_NAME}.soundness.json" - name: Restore RPC input cache from S3 @@ -511,6 +556,7 @@ jobs: echo "mode=${RPC_INPUT_CACHE_MODE}" >> "$GITHUB_OUTPUT" echo "cache_file=${CACHE_FILE}" >> "$GITHUB_OUTPUT" echo "s3_cache_file=${S3_CACHE_FILE}" >> "$GITHUB_OUTPUT" + echo "s3-available=${S3_FIXTURE_READ_ENABLED}" >> "$GITHUB_OUTPUT" if [[ "${RPC_INPUT_CACHE_MODE}" == "disabled" ]]; then echo "RPC input cache disabled" @@ -519,6 +565,13 @@ jobs: exit 0 fi + if [[ "${S3_FIXTURE_READ_ENABLED}" != "true" ]]; then + echo "S3 fixture cache unavailable; continuing with RPC" + echo "cache-hit=false" >> "$GITHUB_OUTPUT" + echo "RPC input cache: unavailable; using RPC" >> "$GITHUB_STEP_SUMMARY" + exit 0 + fi + mkdir -p "$(dirname "$CACHE_FILE")" if [[ "${RPC_INPUT_CACHE_MODE}" == "refresh" ]]; then @@ -651,7 +704,7 @@ jobs: elif [[ "${{ inputs.profiling || github.event.inputs.profiling }}" == "nsys" ]]; then nsys profile --trace=cuda,osrt,nvtx \ --sample=cpu \ - --cpuctxsw=true \ + --cpuctxsw=process-tree \ --cuda-memory-usage=true \ --force-overwrite=true \ -o reth.nsys-rep \ @@ -699,7 +752,7 @@ jobs: fi - name: Save RPC input cache to S3 - if: ${{ success() && steps.restore-rpc-input-cache.outputs.mode != 'disabled' && steps.restore-rpc-input-cache.outputs.cache-hit != 'true' }} + if: ${{ success() && env.S3_PUBLIC_UPLOAD_ENABLED == 'true' && steps.restore-rpc-input-cache.outputs.s3-available == 'true' && steps.restore-rpc-input-cache.outputs.mode != 'disabled' && steps.restore-rpc-input-cache.outputs.cache-hit != 'true' }} run: | CACHE_FILE="${{ steps.restore-rpc-input-cache.outputs.cache_file }}" S3_CACHE_FILE="${{ steps.restore-rpc-input-cache.outputs.s3_cache_file }}" @@ -752,13 +805,18 @@ jobs: retention-days: 1 - name: Upload Benchmark Metrics + if: ${{ env.S3_WORKFLOW_UPLOAD_ENABLED == 'true' }} run: s5cmd cp ${METRIC_PATH} ${{ env.S3_METRICS_PATH }}/${METRIC_NAME}.json - name: Generate markdown run: | openvm-prof --json-paths $METRIC_PATH --num-devices 16 --proofs-per-device 1 MD_PATH=${METRIC_PATH%.json}.md + DETAILED_MD_PATH=${MD_PATH%.md}.detailed.md + GPU_MEMORY_SVG_PATH=${MD_PATH%.md}.memory.svg echo "MD_PATH=${MD_PATH}" >> $GITHUB_ENV + echo "DETAILED_MD_PATH=${DETAILED_MD_PATH}" >> $GITHUB_ENV + echo "GPU_MEMORY_SVG_PATH=${GPU_MEMORY_SVG_PATH}" >> $GITHUB_ENV - name: Add benchmark metadata to markdown run: | @@ -767,11 +825,24 @@ jobs: source openvm/ci/scripts/utils.sh - add_metadata $MD_PATH \ - ${{ inputs.instance_family || github.event.inputs.instance_family }} \ - ${{ inputs.memory_allocator || github.event.inputs.memory_allocator || 'jemalloc' }} \ - $COMMIT_URL \ - $BENCHMARK_WORKFLOW_URL + if [[ "${S3_PUBLIC_UPLOAD_ENABLED}" == "true" ]]; then + add_metadata $MD_PATH \ + ${{ inputs.instance_family || github.event.inputs.instance_family }} \ + ${{ inputs.memory_allocator || github.event.inputs.memory_allocator || 'jemalloc' }} \ + $COMMIT_URL \ + $BENCHMARK_WORKFLOW_URL + else + { + echo "" + echo "Commit: ${COMMIT_URL}" + echo "" + echo "Instance Type: ${{ inputs.instance_family || github.event.inputs.instance_family }}" + echo "" + echo "Memory Allocator: ${{ inputs.memory_allocator || github.event.inputs.memory_allocator || 'jemalloc' }}" + echo "" + echo "[Benchmark Workflow](${BENCHMARK_WORKFLOW_URL})" + } >> "$MD_PATH" + fi # Add GPU peak memory to the markdown if available if [[ -n "${GPU_PEAK_MEMORY_MIB}" && "${GPU_PEAK_MEMORY_MIB}" != "0" ]]; then @@ -810,6 +881,9 @@ jobs: echo "Saved profile: $SAMPLY_PROFILE_PATH/profile.json.gz" echo "SAMPLY_PROFILE_PATH=${SAMPLY_PROFILE_PATH}" >> $GITHUB_ENV + - name: Publish samply profile + if: ${{ (inputs.profiling == 'host' || github.event.inputs.profiling == 'host') && env.S3_PUBLIC_UPLOAD_ENABLED == 'true' }} + run: | s5cmd cp $SAMPLY_PROFILE_PATH/profile.json.gz ${{ env.S3_SAMPLY_PROFILE_PATH }}/${METRIC_NAME}/profile.json.gz FIREFOX_PROFILER_URL=$(python3 "$GITHUB_WORKSPACE/scripts/upload_firefox_profile.py" "$SAMPLY_PROFILE_PATH/profile.json.gz") || true @@ -832,26 +906,24 @@ jobs: retention-days: 1 - name: Upload markdown + if: ${{ env.S3_WORKFLOW_UPLOAD_ENABLED == 'true' }} run: | S3_MD_PATH="${{ env.S3_MD_PATH }}/${METRIC_NAME}.md" s5cmd cp $MD_PATH $S3_MD_PATH - DETAILED_MD_PATH=${MD_PATH%.md}.detailed.md s5cmd cp $DETAILED_MD_PATH "${{ env.S3_MD_PATH }}/${METRIC_NAME}.detailed.md" - GPU_MEMORY_SVG_PATH=${MD_PATH%.md}.memory.svg - echo "S3_MD_PATH=${S3_MD_PATH}" >> $GITHUB_ENV - echo "DETAILED_MD_PATH=${DETAILED_MD_PATH}" >> $GITHUB_ENV - echo "GPU_MEMORY_SVG_PATH=${GPU_MEMORY_SVG_PATH}" >> $GITHUB_ENV - name: Upload metric artifacts id: upload-metric-artifact + if: ${{ always() }} uses: actions/upload-artifact@v4 with: name: ${{ steps.set-metric-name.outputs.name }} path: | ${{ env.METRIC_PATH }} + ${{ env.MD_PATH }} ${{ env.DETAILED_MD_PATH }} ${{ env.GPU_MEMORY_SVG_PATH }} if-no-files-found: warn @@ -862,11 +934,30 @@ jobs: run: sccache --show-stats || true ### Update gh-pages - - uses: actions/checkout@v4 + - name: Check for gh-pages branch + id: check-gh-pages + run: | + if git ls-remote --exit-code --heads origin gh-pages > /dev/null; then + echo "exists=true" >> "$GITHUB_OUTPUT" + echo "ref=gh-pages" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "ref=${GITHUB_SHA}" >> "$GITHUB_OUTPUT" + fi + + - name: Checkout gh-pages + uses: actions/checkout@v4 with: - ref: gh-pages + ref: ${{ steps.check-gh-pages.outputs.ref }} path: gh-pages + - name: Initialize gh-pages branch + if: ${{ steps.check-gh-pages.outputs.exists != 'true' }} + working-directory: gh-pages + run: | + git checkout --orphan gh-pages + git rm -rf . + - name: Set up git working-directory: gh-pages run: | @@ -874,6 +965,8 @@ jobs: git config user.name "github-actions[bot]" - name: Commit to gh-pages branch + id: publish-gh-pages + continue-on-error: true working-directory: gh-pages env: REF_NAME: ${{ github.head_ref || github.ref }} @@ -881,7 +974,7 @@ jobs: GH_PAGES_PATH="benchmarks-dispatch/${REF_NAME}" echo "GH_PAGES_PATH=${GH_PAGES_PATH}" >> $GITHUB_ENV mkdir -p ${GH_PAGES_PATH} - s5cmd cp $S3_MD_PATH "${GH_PAGES_PATH}/${METRIC_NAME}.md" + cp "$GITHUB_WORKSPACE/$MD_PATH" "${GH_PAGES_PATH}/${METRIC_NAME}.md" git add ${GH_PAGES_PATH}/${METRIC_NAME}.md git commit --allow-empty -m "Update benchmark result at ${GH_PAGES_PATH}/${METRIC_NAME}.md" @@ -891,9 +984,10 @@ jobs: SUCCESS=false while [ $ATTEMPT -lt $MAX_RETRIES ]; do echo "Attempt $((ATTEMPT + 1)) to push of $MAX_RETRIES..." - git fetch origin gh-pages - git merge origin/gh-pages --no-edit - if git push origin gh-pages; then + if git fetch origin gh-pages; then + git merge origin/gh-pages --no-edit + fi + if git push origin HEAD:gh-pages; then SUCCESS=true break else @@ -908,6 +1002,7 @@ jobs: fi - name: Update summary with results + if: ${{ steps.publish-gh-pages.outcome == 'success' }} working-directory: gh-pages run: | RESULT_URL="https://github.com/${{ github.repository }}/blob/gh-pages/${GH_PAGES_PATH}/${METRIC_NAME}.md" @@ -917,6 +1012,7 @@ jobs: cat "${GH_PAGES_PATH}/${METRIC_NAME}.md" >> $GITHUB_STEP_SUMMARY - name: Path to result + if: ${{ steps.publish-gh-pages.outcome == 'success' }} working-directory: gh-pages run: | echo "https://github.com/${{ github.repository }}/blob/gh-pages/${GH_PAGES_PATH}/${METRIC_NAME}.md" diff --git a/.github/workflows/run-benchmark-v2.yml b/.github/workflows/run-benchmark-v2.yml index 5de5643d8..c1abce08d 100644 --- a/.github/workflows/run-benchmark-v2.yml +++ b/.github/workflows/run-benchmark-v2.yml @@ -42,6 +42,11 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache: false + - name: Cache openvm toolchain + uses: actions/cache@v4 + with: + path: ~/.openvm/toolchains + key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }} - name: Prepare input data run: | block_number="${{ inputs.block_number }}" @@ -56,7 +61,10 @@ jobs: # Install OpenVM CLI echo "Installing OpenVM CLI..." - cargo +1.91.1 install --git https://github.com/openvm-org/openvm.git --locked --force cargo-openvm + cargo +1.91.1 install --git https://github.com/openvm-org/openvm.git --branch develop-v2.1.0 --locked --force cargo-openvm + + # Install the openvm rust toolchain + cargo openvm toolchain install RPC_1=${{ secrets.RPC_URL_1 }} @@ -64,7 +72,7 @@ jobs: cd bin/stateless-guest cargo openvm build mkdir -p ../reth-benchmark/elf - SRC="target/riscv32im-risc0-zkvm-elf/release/openvm-stateless-guest" + SRC="target/riscv64im-unknown-openvm-elf/release/openvm-stateless-guest" DEST="../reth-benchmark/elf/openvm-stateless-guest" if [ ! -f "$DEST" ] || ! cmp -s "$SRC" "$DEST"; then @@ -78,7 +86,7 @@ jobs: # Build the benchmark binary export JEMALLOC_SYS_WITH_MALLOC_CONF="retain:true,background_thread:true,metadata_thp:always,thp:always,dirty_decay_ms:10000,muzzy_decay_ms:10000,abort_conf:true" - cargo build --bin openvm-reth-benchmark --profile=release --no-default-features --features="bench-metrics,jemalloc,evm-verify" + cargo build --bin openvm-reth-benchmark --profile=release --no-default-features --features="metrics,jemalloc,evm-verify" # Generate input data echo "Generating input for block $block_number..." diff --git a/.github/workflows/tests-accelerators.yml b/.github/workflows/tests-accelerators.yml new file mode 100644 index 000000000..e4907dafa --- /dev/null +++ b/.github/workflows/tests-accelerators.yml @@ -0,0 +1,67 @@ +name: OpenVM Accelerators Tests + +on: + pull_request: + paths: + - "crates/accelerators/**" + - "Cargo.toml" + - "Cargo.lock" + - ".github/workflows/tests-accelerators.yml" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + +jobs: + test: + runs-on: + - runs-on=${{ github.run_id }} + - runner=64cpu-linux-arm64 + - extras=s3-cache + + steps: + - uses: runs-on/action@v2 + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - uses: taiki-e/install-action@nextest + + - name: Run tests + run: cargo nextest run -p openvm-accelerators + + guest-build: + runs-on: + - runs-on=${{ github.run_id }} + - runner=64cpu-linux-arm64 + - extras=s3-cache + + steps: + - uses: runs-on/action@v2 + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.91.1" + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: Cache openvm toolchain + uses: actions/cache@v4 + with: + path: ~/.openvm/toolchains + key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }} + + - name: Install OpenVM CLI + run: | + cargo install --git https://github.com/openvm-org/openvm.git --branch develop-v2.1.0 --locked --force cargo-openvm + cargo openvm toolchain install + + - name: Build for the guest target + run: | + cd crates/accelerators + cargo openvm build --no-transpile diff --git a/.github/workflows/tests-kzg.yml b/.github/workflows/tests-kzg.yml index 7d01a7605..e4a1dcb36 100644 --- a/.github/workflows/tests-kzg.yml +++ b/.github/workflows/tests-kzg.yml @@ -1,6 +1,7 @@ name: OpenVM KZG Tests on: + workflow_call: push: branches: ["main"] paths: @@ -25,9 +26,11 @@ env: CARGO_TERM_COLOR: always CARGO_NET_GIT_FETCH_WITH_CLI: "true" OPENVM_FAST_TEST: "1" + OPENVM_BRANCH: develop-v2.1.0 jobs: test: + if: ${{ github.event.action != 'labeled' }} runs-on: - runs-on=${{ github.run_id }} - runner=64cpu-linux-arm64 @@ -41,15 +44,53 @@ jobs: with: cache-on-failure: true - uses: taiki-e/install-action@nextest + - name: Restore openvm toolchain from cache + uses: runs-on/cache@v4 + with: + path: ~/.openvm/toolchains + key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }} # The KZG integration tests build a zkVM guest via the OpenVM SDK, which - # compiles with `-Z build-std` using OpenVM's pinned nightly + rust-src. - # This must match `DEFAULT_RUSTUP_TOOLCHAIN_NAME` in OpenVM's - # crates/toolchain/build (overridable via the OPENVM_RUST_TOOLCHAIN env var). + # compiles with OpenVM's named rustup toolchain. - name: Install OpenVM guest toolchain run: | rustup install nightly-2026-01-18 rustup component add rust-src --toolchain nightly-2026-01-18 + cargo install --git https://github.com/openvm-org/openvm.git --branch "$OPENVM_BRANCH" --locked --force cargo-openvm + cargo openvm toolchain install - name: Run tests run: cargo nextest run -p openvm-kzg --release + + # Proves every valid test vector. Runs on pushes to main and on PRs with + # the run-kzg-proving label (see label-overrides.yml). + prove-all: + if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-kzg-proving') }} + runs-on: + - runs-on=${{ github.run_id }} + - runner=64cpu-linux-arm64 + - extras=s3-cache + + steps: + - uses: runs-on/action@v2 + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - uses: taiki-e/install-action@nextest + - name: Restore openvm toolchain from cache + uses: runs-on/cache@v4 + with: + path: ~/.openvm/toolchains + key: openvm-toolchain-openvm-1.94.0-${{ runner.os }}-${{ runner.arch }} + + - name: Install OpenVM guest toolchain + run: | + rustup install nightly-2026-01-18 + rustup component add rust-src --toolchain nightly-2026-01-18 + cargo install --git https://github.com/openvm-org/openvm.git --branch "$OPENVM_BRANCH" --locked --force cargo-openvm + cargo openvm toolchain install + + - name: Prove all test vectors + run: cargo nextest run -p openvm-kzg --release --run-ignored only test_prove_multiple_valid_verify_kzg diff --git a/.github/workflows/tests-revm-crypto.yml b/.github/workflows/tests-revm-crypto.yml index 0333bd062..bdc30d44d 100644 --- a/.github/workflows/tests-revm-crypto.yml +++ b/.github/workflows/tests-revm-crypto.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - "crates/revm-crypto/**" + - "crates/accelerators/**" - "crates/kzg/**" - "crates/curve-utils/**" - "Cargo.toml" diff --git a/.github/workflows/update-openvm.yml b/.github/workflows/update-openvm.yml index 2d0da0e67..9c8d0245b 100644 --- a/.github/workflows/update-openvm.yml +++ b/.github/workflows/update-openvm.yml @@ -2,11 +2,14 @@ name: "Update openvm rev in dependencies" # Warning: this workflow will only work if openvm has also been updated in revm # Otherwise, use the update-patches.yml workflow instead +env: + OPENVM_BRANCH: develop-v2.1.0 + on: workflow_dispatch: inputs: OPENVM_REV: - description: "New openvm rev (defaults to main head)" + description: "New openvm rev" required: false jobs: @@ -18,20 +21,20 @@ jobs: - name: Check out the repository uses: actions/checkout@v4 - - name: Get default OPENVM_REV from main (if none provided) + - name: Get default OPENVM_REV (if none provided) id: get-openvm-rev uses: actions/github-script@v6 + env: + OPENVM_REV_INPUT: ${{ github.event.inputs.OPENVM_REV }} with: script: | - if ("${{ github.event.inputs.OPENVM_REV }}" !== "") { - // If provided by user, simply return it - return "${{ github.event.inputs.OPENVM_REV }}"; + if (process.env.OPENVM_REV_INPUT !== "") { + return process.env.OPENVM_REV_INPUT; } else { - // Otherwise fetch latest commit of main const { data } = await github.rest.repos.getCommit({ owner: 'openvm-org', repo: 'openvm', - ref: 'main' + ref: process.env.OPENVM_BRANCH }); return data.sha; } diff --git a/.github/workflows/update-patches.yml b/.github/workflows/update-patches.yml index 84c33ef3c..225d99bef 100644 --- a/.github/workflows/update-patches.yml +++ b/.github/workflows/update-patches.yml @@ -1,5 +1,8 @@ name: "Update openvm patches" +env: + OPENVM_BRANCH: develop-v2.1.0 + on: workflow_dispatch: inputs: @@ -7,7 +10,7 @@ on: description: "Optional ref for openvm-stark-backend (defaults to what openvm uses)" required: false OPENVM_REV: - description: "Optional ref for openvm (defaults to main head)" + description: "Optional ref for openvm" required: false run_benchmark: description: "Run reth benchmark after patching" @@ -50,7 +53,7 @@ on: OPENVM_REV: type: string required: false - description: "Optional ref for openvm (defaults to main head)" + description: "Optional ref for openvm" run_benchmark: type: boolean required: false @@ -113,12 +116,12 @@ jobs: pr_number: ${{ steps.create-pr.outputs.pr_number }} tag: ${{ steps.set-tag.outputs.tag }} steps: - - name: Get default OPENVM_REV from main (if none provided) + - name: Get default OPENVM_REV (if none provided) id: get-openvm-rev env: OPENVM_REV: "${{ inputs.OPENVM_REV || github.event.inputs.OPENVM_REV }}" run: | - echo "result=${OPENVM_REV:-$(git ls-remote https://github.com/openvm-org/openvm.git HEAD | cut -f1)}" >> "$GITHUB_OUTPUT" + echo "result=${OPENVM_REV:-$(git ls-remote https://github.com/openvm-org/openvm.git "refs/heads/$OPENVM_BRANCH" | cut -f1)}" >> "$GITHUB_OUTPUT" - name: Check out openvm repository uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index 120a592ae..abc5d637a 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ bin/stateless-guest/openvm/ *.ncu-rep *.nsys-rep *.sqlite + +# ethproofs analyzer local page cache +scripts/.cache/ diff --git a/Cargo.lock b/Cargo.lock index 457146686..a0d351c96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,61 +2,13 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "abi_stable" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d6512d3eb05ffe5004c59c206de7f99c34951504056ce23fc953842f12c445" -dependencies = [ - "abi_stable_derive", - "abi_stable_shared", - "const_panic", - "core_extensions", - "crossbeam-channel", - "generational-arena", - "libloading 0.7.4", - "lock_api", - "parking_lot", - "paste", - "repr_offset", - "rustc_version 0.4.1", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "abi_stable_derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7178468b407a4ee10e881bc7a328a65e739f0863615cca4429d43916b05e898" -dependencies = [ - "abi_stable_shared", - "as_derive_utils", - "core_extensions", - "proc-macro2", - "quote", - "rustc_version 0.4.1", - "syn 1.0.109", - "typed-arena", -] - -[[package]] -name = "abi_stable_shared" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b5df7688c123e63f4d4d649cba63f2967ba7f7861b1664fca3f77d3dad2b63" -dependencies = [ - "core_extensions", -] - [[package]] name = "actix-codec" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "bytes", "futures-core", "futures-sink", @@ -69,23 +21,23 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.11.2" +version = "3.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7926860314cbe2fb5d1f13731e387ab43bd32bca224e82e6e2db85de0a3dba49" +checksum = "48e2faa3e7418ed780cca54829d32782a4008a077230f67457caa063415e99c2" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", "base64 0.22.1", - "bitflags 2.10.0", + "bitflags 2.13.0", "brotli", "bytes", "bytestring", - "derive_more 2.0.1", + "derive_more 2.1.1", "encoding_rs", "flate2", - "foldhash 0.1.5", + "foldhash 0.2.0", "futures-core", "h2 0.3.27", "http 0.2.12", @@ -97,8 +49,8 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.9.2", - "sha1", + "rand 0.10.2", + "sha1 0.11.0", "smallvec", "tokio", "tokio-util", @@ -113,14 +65,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "actix-router" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" +checksum = "14f8c75c51892f18d9c46150c5ac7beb81c95f78c8b83a634d49f4ca32551fe7" dependencies = [ "bytestring", "cfg-if 1.0.4", @@ -180,9 +132,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.12.1" +version = "4.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1654a77ba142e37f049637a3e5685f864514af11fcbc51cb51eb6596afe5b8d6" +checksum = "df09e2d9239703dd64056359c920c7f3fba6535ec61a0059e0f44e095ffe02b4" dependencies = [ "actix-codec", "actix-http", @@ -197,9 +149,9 @@ dependencies = [ "bytestring", "cfg-if 1.0.4", "cookie", - "derive_more 2.0.1", + "derive_more 2.1.1", "encoding_rs", - "foldhash 0.1.5", + "foldhash 0.2.0", "futures-core", "futures-util", "impl-more", @@ -215,7 +167,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.6.3", + "socket2 0.6.5", "time", "tracing", "url", @@ -230,14 +182,14 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "addr2line" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] @@ -254,7 +206,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common 0.1.6", + "crypto-common 0.1.7", "generic-array", ] @@ -290,7 +242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if 1.0.4", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -298,9 +250,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -313,9 +265,9 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" dependencies = [ "alloc-no-stdlib", ] @@ -350,7 +302,7 @@ dependencies = [ "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-signer", "alloy-signer-local", "alloy-transport", @@ -370,7 +322,7 @@ dependencies = [ "alloy-rlp", "num_enum", "serde", - "strum 0.27.1", + "strum 0.27.2", ] [[package]] @@ -382,22 +334,22 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-trie 0.9.4", "alloy-tx-macros", "auto_impl", "borsh", "c-kzg", - "derive_more 2.0.1", + "derive_more 2.1.1", "either", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", - "rand 0.8.5", + "rand 0.8.7", "secp256k1 0.30.0", "serde", "serde_json", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -410,7 +362,7 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", ] @@ -434,7 +386,7 @@ dependencies = [ "futures", "futures-util", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -461,11 +413,11 @@ dependencies = [ "alloy-primitives", "alloy-sol-type-parser", "alloy-sol-types", - "derive_more 2.0.1", + "derive_more 2.1.1", "itoa", "serde", "serde_json", - "winnow 1.0.3", + "winnow 1.0.4", ] [[package]] @@ -478,7 +430,7 @@ dependencies = [ "alloy-rlp", "crc", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -505,7 +457,7 @@ dependencies = [ "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -519,7 +471,7 @@ dependencies = [ "borsh", "once_cell", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -533,14 +485,14 @@ dependencies = [ "borsh", "once_cell", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] name = "alloy-eips" -version = "1.5.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "813a67f87e56b38554d18b182616ee5006e8e2bf9df96a0df8bf29dff1d52e3f" +checksum = "e6ef28c9fdad22d4eec52d894f5f2673a0895f1e5ef196734568e68c0f6caca8" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -548,16 +500,15 @@ dependencies = [ "alloy-eip7928 0.3.7", "alloy-primitives", "alloy-rlp", - "alloy-serde 1.5.2", + "alloy-serde 1.8.3", "auto_impl", "borsh", "c-kzg", - "derive_more 2.0.1", + "derive_more 2.1.1", "either", "serde", "serde_with", "sha2 0.10.9", - "thiserror 2.0.12", ] [[package]] @@ -572,11 +523,11 @@ dependencies = [ "alloy-eip7928 0.3.7", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "auto_impl", "borsh", "c-kzg", - "derive_more 2.0.1", + "derive_more 2.1.1", "either", "ethereum_ssz", "ethereum_ssz_derive", @@ -599,9 +550,9 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-sol-types", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "revm 40.0.3", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -613,7 +564,7 @@ checksum = "ab0e0fe9e6d1120ad7bb9254c3fc2b9bc80a8df42a033fb626be6559c13d5153" dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-trie 0.9.4", "borsh", "serde", @@ -654,10 +605,10 @@ checksum = "ec0a82e56b1843bce483942d54fcadea92e676f1bde162e93c7d3b621fabc4e1" dependencies = [ "alloy-primitives", "alloy-sol-types", - "http 1.3.1", + "http 1.4.2", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -675,16 +626,16 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types-any", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-signer", "alloy-sol-types", "async-trait", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -696,7 +647,7 @@ dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", "alloy-primitives", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", ] @@ -710,21 +661,20 @@ dependencies = [ "bytes", "cfg-if 1.0.4", "const-hex", - "derive_more 2.0.1", + "derive_more 2.1.1", "foldhash 0.2.0", - "getrandom 0.4.2", + "getrandom 0.4.3", "hashbrown 0.17.1", - "indexmap 2.12.1", + "indexmap 2.14.0", "itoa", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-asm", "paste", "proptest", - "rand 0.9.2", + "rand 0.9.5", "rapidhash", - "rayon", "ruint", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "secp256k1 0.31.1", "serde", "sha3 0.11.0", @@ -763,13 +713,13 @@ dependencies = [ "either", "futures", "futures-utils-wasm", - "lru 0.16.3", + "lru 0.16.4", "parking_lot", "pin-project", - "reqwest 0.13.3", + "reqwest 0.13.4", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", "url", @@ -811,13 +761,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36834a5c0a2fa56e171bf256c34d70fca07d0c0031583edea1c4946b7889c9e" +checksum = "9d4311c03125e8a18296504560b9de3d75ecbd0dcda7f71e6cf2a196d57e6fba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -835,7 +785,7 @@ dependencies = [ "alloy-transport-ws", "futures", "pin-project", - "reqwest 0.13.3", + "reqwest 0.13.4", "serde", "serde_json", "tokio", @@ -859,7 +809,7 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", ] @@ -883,7 +833,7 @@ checksum = "2ff111a54268dc0bbd3b17f98571a7e27cc661dc081ad2999d91888647eb2e11" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", ] @@ -897,7 +847,7 @@ dependencies = [ "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", "serde_json", ] @@ -911,13 +861,13 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rpc-types-engine", - "derive_more 2.0.1", + "derive_more 2.1.1", "ethereum_ssz", "ethereum_ssz_derive", "serde", "serde_json", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", "tree_hash", "tree_hash_derive", ] @@ -930,7 +880,7 @@ checksum = "48b9ad6eee93dd35a9ec0a6c1c6b180892a900ee17a6ed6500921552dd71e846" dependencies = [ "alloy-primitives", "alloy-rlp", - "derive_more 2.0.1", + "derive_more 2.1.1", "serde", "serde_with", ] @@ -945,14 +895,14 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.1.0", - "derive_more 2.0.1", + "alloy-serde 2.1.1", + "derive_more 2.1.1", "ethereum_ssz", "ethereum_ssz_derive", "jsonwebtoken", - "rand 0.8.5", + "rand 0.8.7", "serde", - "strum 0.27.1", + "strum 0.27.2", ] [[package]] @@ -967,13 +917,13 @@ dependencies = [ "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-sol-types", - "itertools 0.14.0", + "itertools 0.13.0", "serde", "serde_json", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -986,7 +936,7 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", "serde_json", ] @@ -999,10 +949,10 @@ checksum = "514b4b1ce3354f65067b4fc7eb75358e0f2ec8be3340c96dea65d6894f9ca435" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -1013,15 +963,15 @@ checksum = "76e34a42ebb4a71ab0bfdebc6d2f3c7bf809f01edf154d08fed159d10d1ef1d4" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "serde", ] [[package]] name = "alloy-serde" -version = "1.5.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "946a0d413dbb5cd9adba0de5f8a1a34d5b77deda9b69c1d7feed8fc875a1aa26" +checksum = "11ece63b89294b8614ab3f483560c08d016930f842bf36da56bf0b764a15c11e" dependencies = [ "alloy-primitives", "serde", @@ -1030,9 +980,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf028ac8bcb161ad7c104243e710cece8e1a794f65ee6c35c4c4d693c8e80ee" +checksum = "c1e97b3e0b9f816b25083045dcfa69431bd059a078e828e4d82d296d1949b96c" dependencies = [ "alloy-primitives", "serde", @@ -1041,9 +991,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5f392f2f56b2417ea6b74e1e116c6f35df5ab5fce4dc422e277d72ee18ff7b" +checksum = "6913d06ccc0d9c6ab67e2f82e2fbe292706da1f91442f30cded2d04b56bf0d58" dependencies = [ "alloy-primitives", "async-trait", @@ -1051,7 +1001,7 @@ dependencies = [ "either", "elliptic-curve", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -1068,8 +1018,8 @@ dependencies = [ "coins-bip32", "coins-bip39", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.8.5", - "thiserror 2.0.12", + "rand 0.8.7", + "thiserror 2.0.18", "zeroize", ] @@ -1084,7 +1034,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -1097,12 +1047,12 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.12.1", + "indexmap 2.14.0", "proc-macro-error2", "proc-macro2", "quote", "sha3 0.11.0", - "syn 2.0.102", + "syn 2.0.118", "syn-solidity", ] @@ -1120,7 +1070,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.102", + "syn 2.0.118", "syn-solidity", ] @@ -1131,7 +1081,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "857b470ecdd2ed38beaf82ad1a38c516a8ff75266750f38b9eeed001d575241b" dependencies = [ "serde", - "winnow 1.0.3", + "winnow 1.0.4", ] [[package]] @@ -1155,13 +1105,13 @@ dependencies = [ "alloy-json-rpc", "auto_impl", "base64 0.22.1", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", "futures-utils-wasm", "parking_lot", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tower", "tracing", @@ -1177,8 +1127,8 @@ checksum = "b273587487921274f4f5d0ef2c7ef36944dcbb75a4e2318e69eae822bd263f91" dependencies = [ "alloy-json-rpc", "alloy-transport", - "itertools 0.14.0", - "reqwest 0.13.3", + "itertools 0.13.0", + "reqwest 0.13.4", "serde_json", "tower", "tracing", @@ -1214,7 +1164,7 @@ dependencies = [ "alloy-pubsub", "alloy-transport", "futures", - "http 1.3.1", + "http 1.4.2", "rustls", "serde_json", "tokio", @@ -1233,7 +1183,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 2.0.1", + "derive_more 2.1.1", "nybbles 0.3.4", "serde", "smallvec", @@ -1249,32 +1199,26 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 2.0.1", + "derive_more 2.1.1", "nybbles 0.4.8", "serde", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] [[package]] name = "alloy-tx-macros" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2cd27809c88c413e5542dbd5a8eff8c12f0086af920e881ae586d3a787d5e5" +checksum = "406bc1183f6843e0aba09f7b3365e828b597213d60793ba5cb41befc863e3a78" dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] -[[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" @@ -1301,9 +1245,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.19" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -1316,44 +1260,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" [[package]] name = "aquamarine" @@ -1366,7 +1310,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -1412,7 +1356,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -1478,6 +1422,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7a806ac6c8307b929df4645776290a50ee2aac754ad09d8bdf73391309e43af" +dependencies = [ + "ark-ff-asm 0.6.0", + "ark-ff-macros 0.6.0", + "ark-serialize 0.6.0", + "ark-std 0.6.0", + "digest 0.10.7", + "educe", + "num-bigint", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.3.0" @@ -1505,7 +1466,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.102", + "syn 2.0.118", +] + +[[package]] +name = "ark-ff-asm" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1479009684adc073dff49a1025d3a7065b317a9ead25aaaca38cdc70058ba8a2" +dependencies = [ + "quote", + "syn 2.0.118", ] [[package]] @@ -1543,7 +1514,20 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", +] + +[[package]] +name = "ark-ff-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0691ed21ef00ef89c1e9bda832eba493dda3ec2f8d892fb25b705f73f06bb8" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] @@ -1558,7 +1542,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -1617,13 +1601,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive", + "ark-serialize-derive 0.5.0", "ark-std 0.5.0", "arrayvec", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74dd304fd536fb95d0a328e72be759209cc496a9da094c5bc56e5fea4f9e86b" +dependencies = [ + "ark-serialize-derive 0.6.0", + "ark-std 0.6.0", + "digest 0.10.7", + "num-bigint", + "serde_with", +] + [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -1632,7 +1629,18 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f153690697a2b91e5e1251ff98411ee5371500a111a0fd317a70e588eb300f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] @@ -1642,7 +1650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -1652,7 +1660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -1662,7 +1670,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", +] + +[[package]] +name = "ark-std" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "367c9c827ed431bff6868b7aa926e05b16eb46603cc8b6e768e4a5553fa1d155" +dependencies = [ + "num-traits", + "rand 0.8.7", ] [[package]] @@ -1673,40 +1691,27 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" dependencies = [ "serde", ] -[[package]] -name = "as_derive_utils" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff3c96645900a44cf11941c111bd08a6573b0e2f9f69bc9264b179d8fae753c4" -dependencies = [ - "core_extensions", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "asn1_der" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" +checksum = "4858a9d740c5007a9069007c3b4e91152d0506f13c1b31dd49051fd537656156" [[package]] name = "async-compression" -version = "0.4.33" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c1f86859c1af3d514fa19e8323147ff10ea98684e6c7b307912509f50e67b2" +checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" dependencies = [ "compression-codecs", "compression-core", - "futures-core", "pin-project-lite", "tokio", ] @@ -1730,7 +1735,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -1741,7 +1746,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -1790,20 +1795,20 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.16.3" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f" +checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -1812,14 +1817,15 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7" +checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444" dependencies = [ "cc", "cmake", "dunce", "fs_extra", + "pkg-config", ] [[package]] @@ -1830,9 +1836,9 @@ checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7" [[package]] name = "backtrace" -version = "0.3.75" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", "cfg-if 1.0.4", @@ -1841,7 +1847,7 @@ dependencies = [ "object", "rustc-demangle", "serde", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -1866,6 +1872,12 @@ dependencies = [ "match-lookup", ] +[[package]] +name = "base45" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240e56f4d3c453c36faacb695c535a4d5f8c7d23dac175014f32eb0a71012a03" + [[package]] name = "base64" version = "0.21.7" @@ -1880,9 +1892,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.8.0" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bech32" @@ -1925,40 +1937,22 @@ dependencies = [ "virtue", ] -[[package]] -name = "bindgen" -version = "0.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" -dependencies = [ - "bitflags 2.10.0", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex 1.3.0", - "syn 2.0.102", -] - [[package]] name = "bindgen" version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "cexpr", "clang-sys", "itertools 0.13.0", "proc-macro2", "quote", "regex", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "shlex 1.3.0", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -1978,28 +1972,49 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitcode" -version = "0.6.6" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf300f4aa6e66f3bdff11f1236a88c622fe47ea814524792240b4d554d9858ee" +checksum = "0a6ed1b54d8dc333e7be604d00fa9262f4635485ffea923647b6521a5fff045d" dependencies = [ "bytemuck", "serde", ] +[[package]] +name = "bitcoin-consensus-encoding" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d6094e2a1ba3c93b5a596fe5a10d1a10c3c6e06785cde89f693a044c01aa40" +dependencies = [ + "bitcoin-internals", +] + +[[package]] +name = "bitcoin-internals" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30a22d1f112dde8e16be7b45c63645dc165cef254f835b3e1e9553e485cfa64" +dependencies = [ + "hex-conservative 0.3.2", +] + [[package]] name = "bitcoin-io" -version = "0.1.3" +version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" +checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78" +dependencies = [ + "bitcoin-consensus-encoding", +] [[package]] name = "bitcoin_hashes" -version = "0.14.0" +version = "0.14.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2" dependencies = [ "bitcoin-io", - "hex-conservative", + "hex-conservative 0.2.2", ] [[package]] @@ -2010,9 +2025,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" dependencies = [ "serde_core", ] @@ -2025,9 +2040,9 @@ checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" [[package]] name = "bitvec" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" dependencies = [ "funty", "radium", @@ -2047,9 +2062,9 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +checksum = "b79834656f71332577234b50bfc009996f7449e0c056884e6a02492ded0ca2f3" dependencies = [ "arrayref", "arrayvec", @@ -2148,9 +2163,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.6.4" +version = "3.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61138465baf186c63e8d9b6b613b508cd832cba4ce93cf37ce5f096f91ac1a6" +checksum = "a602c73c7b0148ec6d12af6fd5cc7a46e2eacc8878271a999abac56eed12f561" dependencies = [ "bon-macros", "rustversion", @@ -2158,9 +2173,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.6.4" +version = "3.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d1dad34aa19bf02295382f08d9bc40651585bd497266831d40ee6296fb49ca" +checksum = "6dee98b0db6a962de883bf5d20362dee4d7ca0d12fe39a7c6c73c844e1cd7c1f" dependencies = [ "darling 0.20.11", "ident_case", @@ -2168,46 +2183,47 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "borsh" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" dependencies = [ "borsh-derive", + "bytes", "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "3ae8fb4fb5740e4b2c4884ff95f5f32f5e8479db1e8fd8eb49ddbe09eb09bb7c" dependencies = [ "once_cell", - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "boyer-moore-magiclen" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7441b4796eb8a7107d4cd99d829810be75f5573e1081c37faa0e8094169ea0d6" +checksum = "43f0fdabfbc8017645223fd529c6077df2c491277e44e88ed8afd5afe54e715a" dependencies = [ "debug-helper", ] [[package]] name = "brotli" -version = "8.0.2" +version = "8.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -2216,9 +2232,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.0" +version = "5.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -2236,9 +2252,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byte-slice-cast" @@ -2248,9 +2264,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "d6aedf8ae72766347502cf3cb4f41cf5e9cc37d28bee90f1fdaaae15f9cf9424" [[package]] name = "byteorder" @@ -2260,24 +2276,24 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" dependencies = [ "serde", ] [[package]] name = "bytesize" -version = "2.0.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" +checksum = "3d7c8918969267b2932ffd5655509bbbea0833823058c378876953217f5fc50e" [[package]] name = "bytestring" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "113b4343b5f6617e7ad401ced8de3cc8b012e73a594347c307b90db3e9271289" +checksum = "86566c496f2f47d9b8147a4c8b02ffdb69c919fe0c2b2e7195d22cbba0e635c9" dependencies = [ "bytes", ] @@ -2294,9 +2310,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "2.1.7" +version = "2.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6648ed1e4ea8e8a1a4a2c78e1cda29a3fd500bc622899c340d8525ea9a76b24a" +checksum = "38d04308254695569fdb9bfe3bacc1c91837a670d0806605eb82d63748fbd3a6" dependencies = [ "blst", "cc", @@ -2309,11 +2325,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.10" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +checksum = "5f2d30e4173c4026932d51d31d6b0613b1fd3014bf3f9f8943d4ba139c437ba0" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -2327,9 +2343,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" +checksum = "dd0061da739915fae12ea00e16397555ed4371a6bb285431aab930f61b0aa4ba" dependencies = [ "serde", "serde_core", @@ -2343,7 +2359,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform 0.1.9", - "semver 1.0.26", + "semver 1.0.28", "serde", "serde_json", "thiserror 1.0.69", @@ -2356,11 +2372,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", - "cargo-platform 0.3.2", - "semver 1.0.26", + "cargo-platform 0.3.3", + "semver 1.0.28", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -2371,9 +2387,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.65" +version = "1.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" +checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38" dependencies = [ "find-msvc-tools", "jobserver", @@ -2427,17 +2443,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -2473,7 +2488,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.6", + "crypto-common 0.1.7", "inout", ] @@ -2485,14 +2500,14 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading 0.8.9", + "libloading", ] [[package]] name = "clap" -version = "4.5.56" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -2500,9 +2515,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.56" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -2512,21 +2527,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "clap_lex" -version = "0.7.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cmake" @@ -2543,7 +2558,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" dependencies = [ - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -2573,7 +2588,7 @@ dependencies = [ "hmac", "once_cell", "pbkdf2", - "rand 0.8.5", + "rand 0.8.7", "sha2 0.10.9", "thiserror 1.0.69", ] @@ -2593,15 +2608,15 @@ dependencies = [ "ripemd", "serde", "sha2 0.10.9", - "sha3 0.10.8", + "sha3 0.10.9", "thiserror 1.0.69", ] [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "colored" @@ -2610,7 +2625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2625,9 +2640,9 @@ dependencies = [ [[package]] name = "compression-codecs" -version = "0.4.32" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680dc087785c5230f8e8843e2e57ac7c1c90488b6a91b88caa265410568f441b" +checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" dependencies = [ "brotli", "compression-core", @@ -2639,9 +2654,9 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" +checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" [[package]] name = "concat-kdf" @@ -2654,15 +2669,14 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.14.1" +version = "1.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +checksum = "33e2a781ebdf4467d1428dc4593067825fb646f6871475098d8577421af73558" dependencies = [ "cfg-if 1.0.4", "cpufeatures 0.2.17", - "hex", "proptest", - "serde", + "serde_core", ] [[package]] @@ -2671,6 +2685,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "const-str" version = "0.4.3" @@ -2679,11 +2699,12 @@ checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3" [[package]] name = "const_format" -version = "0.2.34" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -2697,26 +2718,17 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "const_panic" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" -dependencies = [ - "typewit", -] - [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "convert_case" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -2758,30 +2770,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "core_extensions" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42bb5e5d0269fd4f739ea6cedaf29c16d81c27a7ce7582008e90eb50dcd57003" -dependencies = [ - "core_extensions_proc_macros", -] - -[[package]] -name = "core_extensions_proc_macros" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533d38ecd2709b7608fb8e18e4504deb99e9a72879e6aa66373a76d8dc4259ea" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -2802,33 +2790,33 @@ dependencies = [ [[package]] name = "crc" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if 1.0.4", ] [[package]] name = "criterion" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d883447757bb0ee46f233e9dc22eb84d93a9508c9b868687b274fc431d886bf" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" dependencies = [ "alloca", "anes", @@ -2851,9 +2839,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed943f81ea2faa8dcecbbfa50164acf95d555afec96a27871663b300e387b2e4" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" dependencies = [ "cast", "itertools 0.13.0", @@ -2880,18 +2868,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -2899,33 +2887,33 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" @@ -2941,9 +2929,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -3026,7 +3014,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3060,7 +3048,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3074,7 +3062,7 @@ dependencies = [ "quote", "serde", "strsim", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3085,7 +3073,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3096,7 +3084,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3117,15 +3105,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "data-encoding-macro" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47ce6c96ea0102f01122a185683611bd5ac8d99e62bc59dd12e6bda344ee673d" +checksum = "3259c913752a86488b501ed8680446a5ed2d5aeac6e596cb23ba3800768ea32c" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -3133,19 +3121,19 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" +checksum = "ccc2776f0c61eca1ca32528f85548abd1a4be8fb53d1b21c013e4f18da1e7090" dependencies = [ "data-encoding", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "debug-helper" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f578e8e2c440e7297e008bb5486a3a8a194775224bbc23729b0dbdfaeebf162e" +checksum = "80a4af69c60438a1a82af89d362f4729fd38db7b73f305a237636fad31ceb2bf" [[package]] name = "delay_map" @@ -3164,17 +3152,16 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid", + "const-oid 0.9.6", "zeroize", ] [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ - "powerfmt", "serde_core", ] @@ -3197,7 +3184,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3208,18 +3195,18 @@ checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "derive-where" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" +checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3240,7 +3227,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3250,7 +3237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3264,11 +3251,11 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ - "derive_more-impl 2.0.1", + "derive_more-impl 2.1.1", ] [[package]] @@ -3279,20 +3266,21 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", "unicode-xid", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.102", + "rustc_version 0.4.1", + "syn 2.0.118", "unicode-xid", ] @@ -3334,8 +3322,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", - "crypto-common 0.1.6", + "const-oid 0.9.6", + "crypto-common 0.1.7", "subtle", ] @@ -3346,6 +3334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.1", + "const-oid 0.10.2", "crypto-common 0.2.2", ] @@ -3392,9 +3381,9 @@ dependencies = [ "more-asserts", "multiaddr", "parking_lot", - "rand 0.8.5", + "rand 0.8.7", "smallvec", - "socket2 0.6.3", + "socket2 0.6.5", "tokio", "tracing", "uint 0.10.0", @@ -3403,20 +3392,20 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "doctest-file" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" +checksum = "c2db04e74f0a9a93103b50e90b96024c9b2bdca8bce6a632ec71b88736d3d359" [[package]] name = "dotenv" @@ -3432,9 +3421,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dtor" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58a0764cddb55ab28955347b45be00ade43d4d6f3ba4bf3dc354e4ec9432934" +checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" dependencies = [ "dtor-proc-macro", ] @@ -3453,9 +3442,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -3506,7 +3495,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3584,31 +3573,31 @@ dependencies = [ "hex", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "log", - "rand 0.8.5", + "rand 0.8.7", "secp256k1 0.30.0", "serde", - "sha3 0.10.8", + "sha3 0.10.9", "zeroize", ] [[package]] name = "enum-ordinalize" -version = "4.3.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +checksum = "07f808d588c10e464ea6f7d3eaed500049eff30aaac103460f61828c2d65b3eb" dependencies = [ "enum-ordinalize-derive", ] [[package]] name = "enum-ordinalize-derive" -version = "4.3.1" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +checksum = "42e528e2d34ba8a67a1a650b86beae8ef69fc5fdb638016f386b973226590432" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3632,12 +3621,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3676,9 +3665,9 @@ dependencies = [ [[package]] name = "ethereum_serde_utils" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc1355dbb41fbbd34ec28d4fb2a57d9a70c67ac3c19f6a5ca4d4a176b9e997a" +checksum = "38df44a7a271ab43835678f9215b53cc2523e4714a215da6643d83dc110245da" dependencies = [ "alloy-primitives", "hex", @@ -3711,7 +3700,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -3737,9 +3726,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fastrlp" @@ -3825,7 +3814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand 0.8.7", "rustc-hex", "static_assertions", ] @@ -3848,14 +3837,14 @@ checksum = "6dc7a9cb3326bafb80642c5ce99b39a2c0702d4bfa8ee8a3e773791a6cbe2407" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -3867,7 +3856,7 @@ version = "0.10.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" dependencies = [ - "spin 0.9.8", + "spin 0.9.9", ] [[package]] @@ -3905,9 +3894,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -3935,9 +3924,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -3950,9 +3939,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -3960,15 +3949,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -3977,48 +3966,48 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" dependencies = [ "gloo-timers", - "send_wrapper 0.4.0", + "send_wrapper", ] [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -4028,7 +4017,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -4038,15 +4026,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" -[[package]] -name = "generational-arena" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" -dependencies = [ - "cfg-if 1.0.4", -] - [[package]] name = "generator" version = "0.8.9" @@ -4058,8 +4037,8 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.2.0", - "windows-result 0.4.0", + "windows-link", + "windows-result", ] [[package]] @@ -4075,55 +4054,52 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if 1.0.4", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if 1.0.4", - "js-sys", "libc", - "r-efi 5.2.0", - "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", + "r-efi 5.3.0", + "wasip2", ] [[package]] name = "getrandom" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if 1.0.4", + "js-sys", "libc", "r-efi 6.0.0", "rand_core 0.10.1", - "wasip2", - "wasip3", + "wasm-bindgen", ] [[package]] name = "getset" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3586f256131df87204eb733da72e3d3eb4f343c639f4b7be279ac7c48baeafe" +checksum = "6cf442baaabe4213ce7d1239afc26c039180b6456da2cededa316ae2c8a77a77" dependencies = [ - "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -4138,9 +4114,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "git-version" @@ -4159,7 +4135,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -4168,7 +4144,7 @@ version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "libc", "libgit2-sys", "log", @@ -4177,9 +4153,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "gloo-net" @@ -4191,7 +4167,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 1.3.1", + "http 1.4.2", "js-sys", "pin-project", "serde", @@ -4204,9 +4180,9 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "482ce8a491a501da4cd806bd190275363d674f2845005c6ddbd5d3e1dd54495d" dependencies = [ "futures-channel", "futures-core", @@ -4229,12 +4205,12 @@ dependencies = [ [[package]] name = "gmp-mpfr-sys" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfc928d8ff4ab3767a3674cf55f81186436fb6070866bb1443ffe65a640d2d6" +checksum = "7db155b537cb791b133341f99f68371d86ee7fa4c79aacfbc376d72d23c70531" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -4256,7 +4232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.1", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rand_xorshift 0.3.0", "subtle", @@ -4274,7 +4250,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.12.1", + "indexmap 2.14.0", "slab", "tokio", "tokio-util", @@ -4283,17 +4259,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.3.1", - "indexmap 2.12.1", + "http 1.4.2", + "indexmap 2.14.0", "slab", "tokio", "tokio-util", @@ -4302,12 +4278,13 @@ dependencies = [ [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if 1.0.4", "crunchy", + "zerocopy", ] [[package]] @@ -4328,22 +4305,22 @@ dependencies = [ "crossbeam", "ff 0.13.1", "group 0.13.0", - "halo2curves-axiom 0.7.0", + "halo2curves-axiom 0.7.2", "itertools 0.11.0", "maybe-rayon", "pairing 0.23.0", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rayon", "rustc-hash 1.1.0", - "sha3 0.10.8", + "sha3 0.10.9", "tracing", ] [[package]] name = "halo2-axiom-gpu" version = "1.0.0" -source = "git+https://github.com/axiom-crypto/halo2-gpu.git?tag=v1.0.0#97ef2d02aa3348fc04b520c3c2562a9c13b57126" +source = "git+https://github.com/axiom-crypto/halo2-gpu.git?branch=develop-v2.1.0#85ad4c2a623ae520fc1454fcb5adf15ec1bb4410" dependencies = [ "ahash", "anyhow", @@ -4358,7 +4335,7 @@ dependencies = [ "git-version", "group 0.13.0", "halo2-axiom", - "halo2curves-axiom 0.7.0", + "halo2curves-axiom 0.7.2", "itertools 0.11.0", "lazy_static", "libc", @@ -4369,12 +4346,12 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "pairing 0.23.0", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rayon", "rustacuda", "rustc-hash 1.1.0", - "sha3 0.10.8", + "sha3 0.10.9", "subtle", "tracing", "yastl", @@ -4383,7 +4360,7 @@ dependencies = [ [[package]] name = "halo2-base" version = "0.5.4" -source = "git+https://github.com/axiom-crypto/halo2-lib.git?tag=v0.5.4#a69fdee77f41bdd48ad658b69673dea5a0815db4" +source = "git+https://github.com/axiom-crypto/halo2-lib.git?branch=develop-v2.1.0#d59f41ac884d18a985025090a227fa6733398ae8" dependencies = [ "getset", "halo2-axiom", @@ -4404,14 +4381,14 @@ dependencies = [ [[package]] name = "halo2-ecc" version = "0.5.4" -source = "git+https://github.com/axiom-crypto/halo2-lib.git?tag=v0.5.4#a69fdee77f41bdd48ad658b69673dea5a0815db4" +source = "git+https://github.com/axiom-crypto/halo2-lib.git?branch=develop-v2.1.0#d59f41ac884d18a985025090a227fa6733398ae8" dependencies = [ "halo2-base", "itertools 0.11.0", "num-bigint", "num-integer", "num-traits", - "rand 0.8.5", + "rand 0.8.7", "rand_chacha 0.3.1", "rand_core 0.6.4", "rayon", @@ -4436,9 +4413,9 @@ dependencies = [ [[package]] name = "halo2curves-axiom" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8309e4638b4f1bcf6613d72265a84074d26034c35edc5d605b5688e580b8b8" +checksum = "b0cd39c0df23c8b72cb7158ccb106341b078d5019b5478b3bfdaf14e898177d3" dependencies = [ "blake2b_simd", "digest 0.10.7", @@ -4451,7 +4428,7 @@ dependencies = [ "pairing 0.23.0", "pasta_curves 0.5.1", "paste", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rayon", "serde", @@ -4464,8 +4441,8 @@ dependencies = [ [[package]] name = "halo2curves-axiom" -version = "0.7.2" -source = "git+https://github.com/axiom-crypto/halo2curves.git?tag=v0.7.2#3a65a710e27fe03711f6fb4fc0c4469ae351974a" +version = "0.7.3" +source = "git+https://github.com/axiom-crypto/halo2curves.git?tag=v0.7.3#d744f712fbeaf62576b2b10842822919551c5ef8" dependencies = [ "blake2b_simd", "digest 0.10.7", @@ -4478,7 +4455,7 @@ dependencies = [ "pairing 0.23.0", "pasta_curves 0.5.1", "paste", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rayon", "serde", @@ -4518,9 +4495,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -4545,7 +4522,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ "foldhash 0.2.0", - "rayon", "serde", "serde_core", ] @@ -4601,18 +4577,27 @@ dependencies = [ [[package]] name = "hex-conservative" -version = "0.2.1" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-conservative" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +checksum = "830e599c2904b08f0834ee6337d8fe8f0ed4a63b5d9e7a7f49c0ffa06d08d360" dependencies = [ "arrayvec", ] [[package]] name = "hex-literal" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" [[package]] name = "hickory-net" @@ -4630,8 +4615,8 @@ dependencies = [ "idna", "ipnet", "jni 0.22.4", - "rand 0.10.1", - "thiserror 2.0.12", + "rand 0.10.2", + "thiserror 2.0.18", "tinyvec", "tokio", "tracing", @@ -4650,10 +4635,10 @@ dependencies = [ "jni 0.22.4", "once_cell", "prefix-trie", - "rand 0.10.1", + "rand 0.10.2", "ring", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tinyvec", "tracing", "url", @@ -4676,12 +4661,12 @@ dependencies = [ "ndk-context", "once_cell", "parking_lot", - "rand 0.10.1", + "rand 0.10.2", "resolv-conf", "serde", "smallvec", - "system-configuration 0.7.0", - "thiserror 2.0.12", + "system-configuration", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -4717,34 +4702,33 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", - "fnv", "itoa", ] [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http 1.3.1", + "http 1.4.2", ] [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.2", "http-body", "pin-project-lite", ] @@ -4778,9 +4762,9 @@ dependencies = [ [[package]] name = "humantime" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" [[package]] name = "humantime-serde" @@ -4788,7 +4772,7 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" dependencies = [ - "humantime 2.3.0", + "humantime 2.4.0", "serde", ] @@ -4803,15 +4787,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.12", - "http 1.3.1", + "futures-core", + "h2 0.4.15", + "http 1.4.2", "http-body", "httparse", "httpdate", @@ -4824,17 +4809,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http 1.3.1", + "http 1.4.2", "hyper", "hyper-util", "log", "rustls", "rustls-native-certs", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -4871,24 +4855,23 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.14" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", - "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.2", "http-body", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", - "system-configuration 0.6.1", + "socket2 0.6.5", + "system-configuration", "tokio", "tower-service", "tracing", @@ -4897,9 +4880,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -4907,7 +4890,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core", ] [[package]] @@ -4921,12 +4904,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -4934,9 +4918,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -4947,11 +4931,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -4962,42 +4945,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -5005,12 +4984,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "ident_case" version = "1.0.1" @@ -5019,9 +4992,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -5030,9 +5003,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -5057,7 +5030,7 @@ dependencies = [ "archery", "bitmaps", "imbl-sized-chunks", - "rand_core 0.9.3", + "rand_core 0.9.5", "rand_xoshiro", "serde_core", "version_check", @@ -5084,9 +5057,9 @@ dependencies = [ [[package]] name = "impl-more" -version = "0.1.9" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" +checksum = "35a84fd5aa25fae5c0f4a33d9cac2ca017fc622cbd089be2229993514990f870" [[package]] name = "impl-trait-for-tuples" @@ -5096,7 +5069,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -5120,9 +5093,9 @@ dependencies = [ [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" @@ -5137,33 +5110,32 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", - "rayon", + "hashbrown 0.17.1", "serde", "serde_core", ] [[package]] name = "inotify" -version = "0.11.0" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" +checksum = "153be1941a183ec9ccd095ddbe17a8b8d435ef6c76e9e02451b933c3999af2c8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "inotify-sys", "libc", ] [[package]] name = "inotify-sys" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d" dependencies = [ "libc", ] @@ -5190,45 +5162,36 @@ dependencies = [ "recvmsg", "tokio", "widestring", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] name = "ipconfig" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" dependencies = [ - "socket2 0.5.10", + "socket2 0.6.5", "widestring", - "windows-sys 0.48.0", - "winreg", + "windows-registry", + "windows-result", + "windows-sys 0.61.2", ] [[package]] name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -dependencies = [ - "serde", -] - -[[package]] -name = "iri-string" -version = "0.7.8" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" dependencies = [ - "memchr", "serde", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" @@ -5268,9 +5231,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jni" @@ -5281,7 +5244,7 @@ dependencies = [ "cesu8", "cfg-if 1.0.4", "combine", - "jni-sys 0.3.0", + "jni-sys 0.3.1", "log", "thiserror 1.0.69", "walkdir", @@ -5300,9 +5263,9 @@ dependencies = [ "jni-sys 0.4.1", "log", "simd_cesu8", - "thiserror 2.0.12", + "thiserror 2.0.18", "walkdir", - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -5315,14 +5278,17 @@ dependencies = [ "quote", "rustc_version 0.4.1", "simd_cesu8", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] [[package]] name = "jni-sys" @@ -5340,28 +5306,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.4.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.97" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ "cfg-if 1.0.4", "futures-util", - "once_cell", "wasm-bindgen", ] @@ -5393,14 +5358,14 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http 1.3.1", + "http 1.4.2", "jsonrpsee-core", "pin-project", "rustls", "rustls-pki-types", "rustls-platform-verifier 0.5.3", "soketto", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-rustls", "tokio-util", @@ -5418,17 +5383,17 @@ dependencies = [ "bytes", "futures-timer", "futures-util", - "http 1.3.1", + "http 1.4.2", "http-body", "http-body-util", "jsonrpsee-types", "parking_lot", "pin-project", - "rand 0.9.2", - "rustc-hash 2.1.1", + "rand 0.9.5", + "rustc-hash 2.1.3", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tower", @@ -5453,7 +5418,7 @@ dependencies = [ "rustls-platform-verifier 0.5.3", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tower", "url", @@ -5466,10 +5431,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da3f8ab5ce1bb124b6d082e62dffe997578ceaf0aeb9f3174a214589dc00f07" dependencies = [ "heck", - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -5479,7 +5444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c51b7c290bb68ce3af2d029648148403863b982f138484a73f02a9dd52dbd7f" dependencies = [ "futures-util", - "http 1.3.1", + "http 1.4.2", "http-body", "http-body-util", "hyper", @@ -5491,7 +5456,7 @@ dependencies = [ "serde", "serde_json", "soketto", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -5505,10 +5470,10 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc88ff4688e43cc3fa9883a8a95c6fa27aa2e76c96e610b737b6554d650d7fd5" dependencies = [ - "http 1.3.1", + "http 1.4.2", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -5529,7 +5494,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6fceceeb05301cc4c065ab3bd2fa990d41ff4eb44e4ca1b30fa99c057c3e79" dependencies = [ - "http 1.3.1", + "http 1.4.2", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -5539,19 +5504,20 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "10.3.0" +version = "10.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0529410abe238729a60b108898784df8984c87f6054c9c4fcacc47e4803c1ce1" +checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc" dependencies = [ "aws-lc-rs", "base64 0.22.1", - "getrandom 0.2.16", + "getrandom 0.2.17", "js-sys", "pem", "serde", "serde_json", "signature", "simple_asn1", + "zeroize", ] [[package]] @@ -5586,7 +5552,7 @@ dependencies = [ [[package]] name = "k256" version = "0.13.4" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", @@ -5603,9 +5569,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" dependencies = [ "cpufeatures 0.2.17", ] @@ -5622,19 +5588,34 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa468878266ad91431012b3e5ef1bf9b170eab22883503a318d46857afa4579a" +checksum = "dd5dc2c0d691cbf7595cde551ced329cca99c2387c2cbc97754c5d0cd045d3ee" dependencies = [ "digest 0.10.7", "sha3-asm", ] +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "kqueue" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" +checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" dependencies = [ "kqueue-sys", "libc", @@ -5642,11 +5623,11 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.13.0", "libc", ] @@ -5662,15 +5643,9 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.9.8", + "spin 0.9.9", ] -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "left-right" version = "0.11.7" @@ -5690,9 +5665,9 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libgit2-sys" -version = "0.18.3+1.9.2" +version = "0.18.5+1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" +checksum = "005d6ae6eac1912906073e069f7db60b1fa98e052a68227824afe3e3a1c59ca2" dependencies = [ "cc", "libc", @@ -5700,16 +5675,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.4", - "winapi", -] - [[package]] name = "libloading" version = "0.8.9" @@ -5717,30 +5682,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if 1.0.4", - "windows-link 0.2.0", + "windows-link", ] [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libmimalloc-sys" -version = "0.1.42" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9d6fac27761dabcd4ee73571cdb06b7022dc99089acbe5435691edffaac0f4" +checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9" dependencies = [ "cc", - "libc", ] [[package]] name = "libp2p-identity" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c7892c221730ba55f7196e98b0b8ba5e04b4155651736036628e9f73ed6fc3" +checksum = "9525f3831544f7ae497bde79adf114ef127b0fbbb97edbbf692a80408636421c" dependencies = [ "asn1_der", "bs58", @@ -5748,31 +5712,30 @@ dependencies = [ "hkdf", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "multihash", - "quick-protobuf", + "prost", "sha2 0.10.9", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", "zeroize", ] [[package]] name = "libproc" -version = "0.14.10" +version = "0.14.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" +checksum = "a54ad7278b8bc5301d5ffd2a94251c004feb971feba96c971ea4063645990757" dependencies = [ - "bindgen 0.70.1", + "bindgen", "errno", "libc", ] [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" dependencies = [ - "bitflags 2.10.0", "libc", ] @@ -5782,7 +5745,7 @@ version = "0.17.3+10.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef2a00ee60fe526157c9023edab23943fae1ce2ab6f4abb2a807c1746835de9" dependencies = [ - "bindgen 0.72.1", + "bindgen", "bzip2-sys", "cc", "libc", @@ -5803,7 +5766,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand 0.8.7", "serde", "sha2 0.9.9", ] @@ -5839,9 +5802,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.23" +version = "1.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" +checksum = "85bc9657773828b90eeb625adff10eeac83cc21bbfd8e23a03eaa8a33c9e28d9" dependencies = [ "cc", "libc", @@ -5867,15 +5830,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "local-channel" @@ -5896,11 +5859,10 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", "serde", ] @@ -5913,9 +5875,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.27" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "loom" @@ -5927,7 +5889,7 @@ dependencies = [ "generator", "scoped-tls", "tracing", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -5936,14 +5898,14 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] name = "lru" -version = "0.16.3" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" dependencies = [ "hashbrown 0.16.1", ] @@ -5966,9 +5928,9 @@ dependencies = [ [[package]] name = "lz4_flex" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c23545df7ecf1b16c303910a69b079e8e251d60f7dd2cc9b4177f2afaf1746" +checksum = "90071f8077f8e40adfc4b7fe9cd495ce316263f19e75c2211eeff3fdf475a3d9" [[package]] name = "mach2" @@ -5979,6 +5941,12 @@ dependencies = [ "libc", ] +[[package]] +name = "mach2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b" + [[package]] name = "macro-string" version = "0.2.0" @@ -5987,7 +5955,7 @@ checksum = "59a9dbbfc75d2688ed057456ce8a3ee3f48d12eec09229f560f3643b9f275653" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -5998,7 +5966,7 @@ checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -6032,15 +6000,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.5" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" dependencies = [ "libc", ] @@ -6073,13 +6041,13 @@ dependencies = [ [[package]] name = "metrics-derive" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a87f4b19620e4c561f7b48f5e6ca085b1780def671696a6a3d9d0c137360ec" +checksum = "161ab904c2c62e7bda0f7562bf22f96440ca35ff79e66c800cbac298f2f4f5ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -6090,27 +6058,27 @@ checksum = "1db0d8f1fc9e62caebd0319e11eaec5822b0186c171568f0480b46a0137f9108" dependencies = [ "base64 0.22.1", "evmap", - "indexmap 2.12.1", + "indexmap 2.14.0", "metrics 0.24.6", "metrics-util 0.20.4", "quanta", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] name = "metrics-process" -version = "2.4.2" +version = "2.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f615e08e049bd14a44c4425415782efb9bcd479fc1e19ddeb971509074c060d0" +checksum = "4268d87f64a752f5a651314fc683f04da10be65701ea3e721ba4d74f79163cac" dependencies = [ "libc", "libproc", - "mach2", + "mach2 0.6.0", "metrics 0.24.6", "once_cell", "procfs", "rlimit", - "windows 0.62.1", + "windows", ] [[package]] @@ -6119,7 +6087,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62a6a1f7141f1d9bc7a886b87536bbfc97752e08b369e1e0453a9acfab5f5da4" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.14.0", "itoa", "lockfree-object-pool", "metrics 0.23.1", @@ -6127,7 +6095,7 @@ dependencies = [ "once_cell", "tracing", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -6140,7 +6108,7 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "indexmap 2.12.1", + "indexmap 2.14.0", "metrics 0.23.1", "num_cpus", "ordered-float", @@ -6160,17 +6128,17 @@ dependencies = [ "hashbrown 0.16.1", "metrics 0.24.6", "quanta", - "rand 0.9.2", + "rand 0.9.5", "rand_xoshiro", "rapidhash", - "sketches-ddsketch 0.3.0", + "sketches-ddsketch 0.3.1", ] [[package]] name = "mimalloc" -version = "0.1.46" +version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995942f432bbb4822a7e9c3faa87a695185b0d09273ba85f097b54f4e458f2af" +checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862" dependencies = [ "libmimalloc-sys", ] @@ -6204,6 +6172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -6214,14 +6183,14 @@ checksum = "c505b3e17ed6b70a7ed2e67fbb2c560ee327353556120d6e72f5232b6880d536" [[package]] name = "mio" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", "log", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.61.1", + "wasi", + "windows-sys 0.61.2", ] [[package]] @@ -6242,14 +6211,14 @@ checksum = "59b43b4fd69e3437618106f7754f34021b831a514f9e1a98ae863cabcd8d8dad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "moka" -version = "0.12.13" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac832c50ced444ef6be0767a008b02c106a909ba79d1d830501e94b96f6b7e" +checksum = "957228ad12042ee839f93c8f257b62b4c0ab5eaae1d4fa60de53b27c9d7c5046" dependencies = [ "crossbeam-channel", "crossbeam-epoch", @@ -6289,23 +6258,23 @@ dependencies = [ [[package]] name = "multibase" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8694bb4835f452b0e3bb06dbebb1d6fc5385b6ca1caf2e55fd165c042390ec77" +checksum = "7e0e4a371cbf1dfd666b658ba137763edb23c45beb43cfe369b5593cd6b437b6" dependencies = [ "base-x", "base256emoji", + "base45", "data-encoding", "data-encoding-macro", ] [[package]] name = "multihash" -version = "0.19.3" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" +checksum = "577c63b00ad74d57e8c9aa870b5fccebf2fd64a308a5aee9f1bb88e4aea19447" dependencies = [ - "core2", "unsigned-varint", ] @@ -6317,9 +6286,9 @@ checksum = "e94e1e6445d314f972ff7395df2de295fe51b71821694f0b0e1e79c4f12c8577" [[package]] name = "native-tls" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" dependencies = [ "libc", "log", @@ -6327,7 +6296,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework 2.11.1", + "security-framework", "security-framework-sys", "tempfile", ] @@ -6362,6 +6331,18 @@ dependencies = [ "smallvec", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.0", + "cfg-if 1.0.4", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -6387,7 +6368,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "fsevent-sys", "inotify", "kqueue", @@ -6405,25 +6386,25 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", ] [[package]] name = "ntapi" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] [[package]] name = "nu-ansi-term" -version = "0.50.1" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6442,13 +6423,13 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" dependencies = [ "num-integer", "num-traits", - "rand 0.8.5", + "rand 0.8.7", "serde", ] @@ -6463,9 +6444,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-integer" @@ -6478,11 +6459,10 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -6511,7 +6491,7 @@ dependencies = [ "num-integer", "num-modular", "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -6561,10 +6541,10 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -6618,7 +6598,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", ] [[package]] @@ -6633,9 +6613,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.7" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] @@ -6652,9 +6632,9 @@ dependencies = [ [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "oorandom" @@ -6670,15 +6650,14 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "cfg-if 1.0.4", "foreign-types", "libc", - "once_cell", "openssl-macros", "openssl-sys", ] @@ -6691,20 +6670,20 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" dependencies = [ "cc", "libc", @@ -6722,7 +6701,7 @@ dependencies = [ "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -6734,25 +6713,25 @@ checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" dependencies = [ "async-trait", "bytes", - "http 1.3.1", + "http 1.4.2", "opentelemetry", - "reqwest 0.12.20", + "reqwest 0.12.28", ] [[package]] name = "opentelemetry-otlp" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" +checksum = "1f69cd6acbb9af919df949cd1ec9e5e7fdc2ef15d234b6b795aaa525cc02f71f" dependencies = [ - "http 1.3.1", + "http 1.4.2", "opentelemetry", "opentelemetry-http", "opentelemetry-proto", "opentelemetry_sdk", "prost", - "reqwest 0.12.20", - "thiserror 2.0.12", + "reqwest 0.12.28", + "thiserror 2.0.18", "tokio", "tonic", "tracing", @@ -6788,52 +6767,80 @@ dependencies = [ "futures-util", "opentelemetry", "percent-encoding", - "rand 0.9.2", - "thiserror 2.0.12", + "rand 0.9.5", + "thiserror 2.0.18", ] [[package]] name = "openvm" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "bytemuck", "num-bigint", "openvm-custom-insn", + "openvm-mem", "openvm-platform", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", ] [[package]] -name = "openvm-algebra-circuit" -version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +name = "openvm-accelerators" +version = "0.4.0" dependencies = [ - "blstrs", - "cfg-if 1.0.4", - "derive-new 0.6.0", - "derive_more 1.0.0", - "eyre", - "halo2curves-axiom 0.7.2", - "num-bigint", - "num-traits", - "once_cell", - "openvm-algebra-transpiler", - "openvm-circuit", + "ark-bls12-381", + "ark-ec", + "ark-serialize 0.5.0", + "aurora-engine-modexp", + "hex-literal", + "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", + "k256 0.13.4 (git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0)", + "openvm-curve-utils", + "openvm-ecc-guest", + "openvm-keccak256", + "openvm-kzg", + "openvm-pairing", + "openvm-pairing-guest", + "openvm-sha2", + "p256 0.13.2 (git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0)", + "ripemd", +] + +[[package]] +name = "openvm-algebra-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "blstrs", + "cfg-if 1.0.4", + "derive-new 0.6.0", + "derive_more 1.0.0", + "eyre", + "halo2curves-axiom 0.7.3", + "num-bigint", + "num-traits", + "once_cell", + "openvm-algebra-transpiler", + "openvm-algebra-utils", + "openvm-circuit", "openvm-circuit-derive", "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-cpu-backend", "openvm-cuda-backend", + "openvm-cuda-builder", "openvm-cuda-common", "openvm-instructions", "openvm-mod-circuit-builder", - "openvm-rv32-adapters", - "openvm-rv32im-circuit", + "openvm-platform", + "openvm-riscv-adapters", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-algebra", + "rvr-openvm-lift", "serde", "serde_with", "strum 0.26.3", @@ -6842,25 +6849,25 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-macros-common", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-algebra-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "halo2curves-axiom 0.7.2", + "halo2curves-axiom 0.7.3", "num-bigint", "once_cell", "openvm-algebra-complex-macros", "openvm-algebra-moduli-macros", "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde-big-array", "strum_macros 0.26.4", ] @@ -6868,33 +6875,43 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "num-bigint", "num-prime", "openvm-macros-common", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-algebra-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-algebra-guest", + "openvm-decoder", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] +[[package]] +name = "openvm-algebra-utils" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "num-bigint", + "num-traits", + "rand 0.9.5", +] + [[package]] name = "openvm-bigint-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "derive-new 0.6.0", @@ -6909,19 +6926,21 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "openvm-instructions", - "openvm-rv32-adapters", - "openvm-rv32im-circuit", - "openvm-rv32im-transpiler", + "openvm-riscv-adapters", + "openvm-riscv-circuit", + "openvm-riscv-transpiler", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-bigint", + "rvr-openvm-lift", "serde", ] [[package]] name = "openvm-bigint-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-platform", "strum_macros 0.26.4", @@ -6930,22 +6949,22 @@ dependencies = [ [[package]] name = "openvm-bigint-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-bigint-guest", + "openvm-decoder", "openvm-instructions", "openvm-instructions-derive", - "openvm-rv32im-transpiler", + "openvm-riscv-transpiler", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] [[package]] name = "openvm-build" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cargo_metadata 0.18.1", "eyre", @@ -6967,10 +6986,10 @@ dependencies = [ [[package]] name = "openvm-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "abi_stable", "backtrace", + "bytemuck", "bytesize", "cfg-if 1.0.4", "dashmap", @@ -6980,9 +6999,10 @@ dependencies = [ "getset", "itertools 0.14.0", "libc", - "libloading 0.8.9", + "libloading", "memmap2", "metrics 0.23.1", + "nix", "openvm-circuit-derive", "openvm-circuit-primitives", "openvm-circuit-primitives-derive", @@ -6991,15 +7011,21 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "openvm-instructions", + "openvm-platform", "openvm-poseidon2-air", "openvm-stark-backend", "openvm-stark-sdk", "p3-baby-bear", "p3-field", - "rand 0.9.2", - "rustc-hash 2.1.1", + "rand 0.9.5", + "rustc-hash 2.1.3", + "rvr-openvm", + "rvr-openvm-ir", + "rvr-openvm-lift", + "rvr-state", "serde", "serde-big-array", + "sha2 0.10.9", "static_assertions", "tempfile", "thiserror 1.0.69", @@ -7009,18 +7035,18 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-circuit-primitives" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -7032,7 +7058,7 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "openvm-stark-backend", - "rand 0.9.2", + "rand 0.9.5", "struct-reflection", "tracing", ] @@ -7040,29 +7066,29 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-codec-derive" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-continuations" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "derivative", @@ -7076,6 +7102,7 @@ dependencies = [ "openvm-cpu-backend", "openvm-cuda-backend", "openvm-cuda-common", + "openvm-instructions", "openvm-poseidon2-air", "openvm-recursion-circuit", "openvm-recursion-circuit-derive", @@ -7093,7 +7120,7 @@ dependencies = [ [[package]] name = "openvm-cpu-backend" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "cfg-if 1.0.4", "derive-new 0.7.0", @@ -7109,7 +7136,7 @@ dependencies = [ "p3-maybe-rayon", "p3-util", "rayon", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "serde", "thiserror 1.0.69", "tracing", @@ -7118,7 +7145,7 @@ dependencies = [ [[package]] name = "openvm-cuda-backend" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "derive-new 0.7.0", "getset", @@ -7134,8 +7161,8 @@ dependencies = [ "p3-field", "p3-symmetric", "p3-util", - "rand 0.9.2", - "rustc-hash 2.1.1", + "rand 0.9.5", + "rustc-hash 2.1.3", "serde", "thiserror 1.0.69", "tracing", @@ -7145,7 +7172,7 @@ dependencies = [ [[package]] name = "openvm-cuda-builder" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "cc", "glob", @@ -7154,7 +7181,7 @@ dependencies = [ [[package]] name = "openvm-cuda-common" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "bytesize", "ctor", @@ -7181,17 +7208,22 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] +[[package]] +name = "openvm-decoder" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" + [[package]] name = "openvm-deferral-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "dashmap", @@ -7209,19 +7241,21 @@ dependencies = [ "openvm-deferral-transpiler", "openvm-instructions", "openvm-poseidon2-air", - "openvm-rv32im-circuit", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", "p3-field", - "rand 0.9.2", - "rustc-hash 2.1.1", + "rand 0.9.5", + "rustc-hash 2.1.3", + "rvr-openvm-ext-deferral", + "rvr-openvm-lift", "serde", ] [[package]] name = "openvm-deferral-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-custom-insn", "strum_macros 0.26.4", @@ -7230,7 +7264,7 @@ dependencies = [ [[package]] name = "openvm-deferral-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "eyre", "openvm-deferral-guest", @@ -7246,13 +7280,13 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "blstrs", "cfg-if 1.0.4", "derive-new 0.6.0", "derive_more 1.0.0", - "halo2curves-axiom 0.7.2", + "halo2curves-axiom 0.7.3", "hex-literal", "lazy_static", "num-bigint", @@ -7268,10 +7302,14 @@ dependencies = [ "openvm-ecc-transpiler", "openvm-instructions", "openvm-mod-circuit-builder", - "openvm-rv32-adapters", + "openvm-platform", + "openvm-riscv-adapters", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-ecc", + "rvr-openvm-lift", "serde", "serde_with", "strum 0.26.3", @@ -7280,18 +7318,18 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", "group 0.13.0", - "halo2curves-axiom 0.7.2", + "halo2curves-axiom 0.7.3", "once_cell", "openvm", "openvm-algebra-guest", "openvm-custom-insn", "openvm-ecc-sw-macros", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", "strum_macros 0.26.4", ] @@ -7299,35 +7337,31 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-macros-common", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-ecc-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "openvm-decoder", "openvm-ecc-guest", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] -[[package]] -name = "openvm-guest-mem" -version = "0.4.0" - [[package]] name = "openvm-instructions" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -7344,26 +7378,26 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-keccak256" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-keccak256-guest", - "spin 0.10.0", + "spin 0.10.1", "tiny-keccak", ] [[package]] name = "openvm-keccak256-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -7378,11 +7412,13 @@ dependencies = [ "openvm-cuda-common", "openvm-instructions", "openvm-keccak256-transpiler", - "openvm-rv32im-circuit", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", "p3-keccak-air", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-keccak", + "rvr-openvm-lift", "serde", "strum 0.26.3", "tiny-keccak", @@ -7391,7 +7427,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-platform", ] @@ -7399,14 +7435,14 @@ dependencies = [ [[package]] name = "openvm-keccak256-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "openvm-decoder", "openvm-instructions", "openvm-instructions-derive", "openvm-keccak256-guest", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] @@ -7431,33 +7467,37 @@ dependencies = [ "serde", "serde-big-array", "serde_yaml", - "spin 0.10.0", - "toml 0.9.5", + "spin 0.10.1", + "toml 0.9.12+spec-1.1.0", ] [[package]] name = "openvm-macros-common" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "syn 2.0.102", + "syn 2.0.118", ] +[[package]] +name = "openvm-mem" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" + [[package]] name = "openvm-mod-circuit-builder" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "itertools 0.14.0", "num-bigint", "num-traits", "openvm-circuit", "openvm-circuit-primitives", - "openvm-instructions", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.8.5", - "rand 0.9.2", + "rand 0.8.7", + "rand 0.9.5", "tracing", ] @@ -7469,12 +7509,11 @@ dependencies = [ "alloy-trie 0.9.4", "bumpalo", "bytes", - "hex-literal", "revm 40.0.3", "revm-primitives 24.0.1", "serde", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -7498,17 +7537,17 @@ dependencies = [ "reth-primitives-traits", "reth-revm", "tokio", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "url", ] [[package]] name = "openvm-pairing" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "group 0.13.0", - "halo2curves-axiom 0.7.2", + "halo2curves-axiom 0.7.3", "hex-literal", "itertools 0.14.0", "num-bigint", @@ -7522,20 +7561,20 @@ dependencies = [ "openvm-ecc-sw-macros", "openvm-pairing-guest", "openvm-platform", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", ] [[package]] name = "openvm-pairing-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "derive-new 0.6.0", "derive_more 1.0.0", "eyre", - "halo2curves-axiom 0.7.2", + "halo2curves-axiom 0.7.3", "num-bigint", "num-traits", "openvm-algebra-circuit", @@ -7550,10 +7589,12 @@ dependencies = [ "openvm-mod-circuit-builder", "openvm-pairing-guest", "openvm-pairing-transpiler", - "openvm-rv32im-circuit", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-pairing", + "rvr-openvm-lift", "serde", "strum 0.26.3", ] @@ -7561,10 +7602,10 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "blstrs", - "halo2curves-axiom 0.7.2", + "blst", + "halo2curves-axiom 0.7.3", "hex-literal", "itertools 0.14.0", "lazy_static", @@ -7582,30 +7623,31 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "openvm-decoder", "openvm-instructions", "openvm-pairing-guest", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] [[package]] name = "openvm-platform" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "critical-section", "libm", "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-riscv-guest", ] [[package]] name = "openvm-poseidon2-air" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "derivative", "lazy_static", @@ -7616,14 +7658,14 @@ dependencies = [ "p3-poseidon2", "p3-poseidon2-air", "p3-symmetric", - "rand 0.9.2", + "rand 0.9.5", "zkhash-axiom", ] [[package]] name = "openvm-recursion-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -7651,23 +7693,21 @@ dependencies = [ [[package]] name = "openvm-recursion-circuit-derive" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "openvm-reth-benchmark" version = "0.4.0" dependencies = [ - "alloy-primitives", "alloy-provider", "alloy-rpc-client", "alloy-transport", "alloy-transport-http", "bincode 2.0.1", - "bitcode", "clap", "clap_builder", "dotenv", @@ -7688,9 +7728,9 @@ dependencies = [ "serde", "serde_json", "tokio", - "toml 0.9.5", + "toml 0.9.12+spec-1.1.0", "tracing", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "url", "zstd", ] @@ -7712,64 +7752,15 @@ version = "0.4.0" dependencies = [ "alloy-consensus", "alloy-primitives", - "ark-bls12-381", - "ark-bn254", - "ark-ec", - "ark-ff 0.5.0", - "aurora-engine-modexp", - "k256 0.13.4 (git+https://github.com/openvm-org/openvm.git?branch=main)", - "openvm-curve-utils", - "openvm-ecc-guest", - "openvm-keccak256", - "openvm-kzg", - "openvm-pairing", - "openvm-sha2", - "p256 0.13.2 (git+https://github.com/openvm-org/openvm.git?branch=main)", + "openvm-accelerators", "revm 40.0.3", "revm-primitives 24.0.1", ] [[package]] -name = "openvm-rpc-proxy" -version = "0.4.0" -dependencies = [ - "actix-web", - "alloy", - "alloy-chains", - "alloy-consensus", - "alloy-json-rpc", - "alloy-primitives", - "alloy-provider", - "alloy-rpc-types", - "alloy-rpc-types-debug", - "alloy-trie 0.9.4", - "clap", - "eyre", - "itertools 0.14.0", - "openvm-stateless-executor", - "openvm-stateless-witness", - "rayon", - "reqwest 0.12.20", - "reth-chainspec", - "reth-ethereum-primitives", - "reth-evm", - "reth-evm-ethereum", - "reth-primitives-traits", - "revm 40.0.3", - "risc0-ethereum-trie", - "serde_json", - "thiserror 2.0.12", - "tokio", - "tower", - "tracing", - "tracing-actix-web", - "tracing-subscriber 0.3.22", -] - -[[package]] -name = "openvm-rv32-adapters" +name = "openvm-riscv-adapters" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -7777,16 +7768,16 @@ dependencies = [ "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-instructions", - "openvm-rv32im-circuit", + "openvm-riscv-circuit", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] -name = "openvm-rv32im-circuit" +name = "openvm-riscv-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "derive-new 0.6.0", @@ -7803,44 +7794,85 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "openvm-instructions", - "openvm-rv32im-transpiler", + "openvm-platform", + "openvm-riscv-transpiler", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-riscv", + "rvr-openvm-lift", + "rvr-state", "serde", "strum 0.26.3", "tracing", ] [[package]] -name = "openvm-rv32im-guest" +name = "openvm-riscv-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-custom-insn", "strum_macros 0.26.4", ] [[package]] -name = "openvm-rv32im-transpiler" +name = "openvm-riscv-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "openvm-decoder", "openvm-instructions", "openvm-instructions-derive", - "openvm-rv32im-guest", + "openvm-riscv-guest", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "serde", "strum 0.26.3", "tracing", ] +[[package]] +name = "openvm-rpc-proxy" +version = "0.4.0" +dependencies = [ + "actix-web", + "alloy", + "alloy-chains", + "alloy-consensus", + "alloy-json-rpc", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types", + "alloy-rpc-types-debug", + "alloy-trie 0.9.4", + "clap", + "eyre", + "itertools 0.14.0", + "openvm-stateless-executor", + "openvm-stateless-witness", + "rayon", + "reqwest 0.12.28", + "reth-chainspec", + "reth-ethereum-primitives", + "reth-evm", + "reth-evm-ethereum", + "reth-primitives-traits", + "revm 40.0.3", + "risc0-ethereum-trie", + "serde_json", + "thiserror 2.0.18", + "tokio", + "tower", + "tracing", + "tracing-actix-web", + "tracing-subscriber 0.3.23", +] + [[package]] name = "openvm-sdk" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "alloy-sol-types", "bitcode", @@ -7880,7 +7912,7 @@ dependencies = [ [[package]] name = "openvm-sdk-config" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "bon", "cfg-if 1.0.4", @@ -7901,22 +7933,24 @@ dependencies = [ "openvm-keccak256-transpiler", "openvm-pairing-circuit", "openvm-pairing-transpiler", - "openvm-rv32im-circuit", - "openvm-rv32im-transpiler", + "openvm-riscv-circuit", + "openvm-riscv-transpiler", "openvm-sha2-circuit", "openvm-sha2-transpiler", "openvm-stark-backend", "openvm-stark-sdk", "openvm-transpiler", "openvm-verify-stark-circuit", + "rvr-openvm-lift", "serde", "toml 0.8.23", + "tracing", ] [[package]] name = "openvm-sha2" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-sha2-guest", "sha2 0.10.9", @@ -7925,21 +7959,21 @@ dependencies = [ [[package]] name = "openvm-sha2-air" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ndarray", "num_enum", "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-stark-backend", - "rand 0.9.2", + "rand 0.9.5", "sha2 0.10.9", ] [[package]] name = "openvm-sha2-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "cfg-if 1.0.4", "derive-new 0.6.0", @@ -7955,12 +7989,14 @@ dependencies = [ "openvm-cuda-builder", "openvm-cuda-common", "openvm-instructions", - "openvm-rv32im-circuit", + "openvm-riscv-circuit", "openvm-sha2-air", "openvm-sha2-transpiler", "openvm-stark-backend", "openvm-stark-sdk", - "rand 0.9.2", + "rand 0.9.5", + "rvr-openvm-ext-sha2", + "rvr-openvm-lift", "serde", "sha2 0.10.9", ] @@ -7968,7 +8004,7 @@ dependencies = [ [[package]] name = "openvm-sha2-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-platform", ] @@ -7976,21 +8012,21 @@ dependencies = [ [[package]] name = "openvm-sha2-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "openvm-decoder", "openvm-instructions", "openvm-instructions-derive", "openvm-sha2-guest", "openvm-stark-backend", "openvm-transpiler", - "rrs-lib", "strum 0.26.3", ] [[package]] name = "openvm-stark-backend" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "cfg-if 1.0.4", "derivative", @@ -8014,7 +8050,7 @@ dependencies = [ "p3-util", "postcard", "rayon", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "serde", "serde_json", "thiserror 1.0.69", @@ -8025,7 +8061,7 @@ dependencies = [ [[package]] name = "openvm-stark-sdk" version = "2.0.0" -source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +source = "git+https://github.com/openvm-org/stark-backend.git?branch=develop-v2.1.0#be2b6983cbd70976b37acbb72ceb1b3593dc67ae" dependencies = [ "dashmap", "derive-new 0.7.0", @@ -8043,13 +8079,13 @@ dependencies = [ "p3-bn254", "p3-field", "p3-poseidon2", - "rand 0.9.2", + "rand 0.9.5", "serde", "serde_json", "static_assertions", "tracing", "tracing-forest", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "zkhash-axiom", ] @@ -8065,7 +8101,6 @@ dependencies = [ "bumpalo", "itertools 0.14.0", "openvm-chainspec", - "openvm-guest-mem", "openvm-mpt", "openvm-revm-crypto", "reth-consensus", @@ -8080,7 +8115,7 @@ dependencies = [ "revm-primitives 24.0.1", "serde", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -8106,14 +8141,14 @@ dependencies = [ "reth-trie", "serde", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] [[package]] name = "openvm-static-verifier" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "halo2-base", "itertools 0.14.0", @@ -8137,14 +8172,14 @@ dependencies = [ [[package]] name = "openvm-transpiler" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "elf", "eyre", + "openvm-decoder", "openvm-instructions", "openvm-platform", "openvm-stark-backend", - "rrs-lib", "rustc-demangle", "thiserror 1.0.69", ] @@ -8152,7 +8187,7 @@ dependencies = [ [[package]] name = "openvm-verify-stark-circuit" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "bitcode", "cfg-if 1.0.4", @@ -8182,7 +8217,7 @@ dependencies = [ [[package]] name = "openvm-verify-stark-host" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "bitcode", "eyre", @@ -8221,7 +8256,7 @@ dependencies = [ [[package]] name = "p256" version = "0.13.2" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", @@ -8258,7 +8293,7 @@ dependencies = [ "p3-monty-31", "p3-poseidon2", "p3-symmetric", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] @@ -8273,7 +8308,7 @@ dependencies = [ "p3-symmetric", "p3-util", "paste", - "rand 0.9.2", + "rand 0.9.5", "serde", ] @@ -8302,7 +8337,7 @@ dependencies = [ "p3-matrix", "p3-maybe-rayon", "p3-util", - "spin 0.10.0", + "spin 0.10.1", "tracing", ] @@ -8317,7 +8352,7 @@ dependencies = [ "p3-maybe-rayon", "p3-util", "paste", - "rand 0.9.2", + "rand 0.9.5", "serde", "tracing", ] @@ -8345,7 +8380,7 @@ dependencies = [ "p3-matrix", "p3-maybe-rayon", "p3-util", - "rand 0.9.2", + "rand 0.9.5", "tracing", ] @@ -8359,7 +8394,7 @@ dependencies = [ "p3-field", "p3-maybe-rayon", "p3-util", - "rand 0.9.2", + "rand 0.9.5", "serde", "tracing", ] @@ -8383,7 +8418,7 @@ dependencies = [ "p3-field", "p3-symmetric", "p3-util", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] @@ -8403,9 +8438,9 @@ dependencies = [ "p3-symmetric", "p3-util", "paste", - "rand 0.9.2", + "rand 0.9.5", "serde", - "spin 0.10.0", + "spin 0.10.1", "tracing", ] @@ -8419,7 +8454,7 @@ dependencies = [ "p3-mds", "p3-symmetric", "p3-util", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] @@ -8433,7 +8468,7 @@ dependencies = [ "p3-matrix", "p3-maybe-rayon", "p3-poseidon2", - "rand 0.9.2", + "rand 0.9.5", "tracing", ] @@ -8509,17 +8544,17 @@ version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -8527,15 +8562,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if 1.0.4", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -8548,7 +8583,7 @@ dependencies = [ "ff 0.12.1", "group 0.12.1", "lazy_static", - "rand 0.8.5", + "rand 0.8.7", "static_assertions", "subtle", ] @@ -8563,7 +8598,7 @@ dependencies = [ "ff 0.13.1", "group 0.13.0", "lazy_static", - "rand 0.8.5", + "rand 0.8.7", "static_assertions", "subtle", ] @@ -8596,18 +8631,17 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "47627dd7305c6a2d6c8c6bcd24c5a4c17dbbf425f4f9c5313e724b38fc9782e9" dependencies = [ "memchr", - "thiserror 2.0.12", "ucd-trie", ] @@ -8650,7 +8684,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -8673,7 +8707,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -8686,7 +8720,7 @@ dependencies = [ "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -8724,14 +8758,14 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -8751,9 +8785,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "plotters" @@ -8797,15 +8831,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" dependencies = [ "portable-atomic", ] @@ -8820,7 +8854,7 @@ dependencies = [ "ff 0.13.1", "lazy_static", "log", - "rand 0.8.5", + "rand 0.8.7", "rand_xorshift 0.3.0", "thiserror 1.0.69", ] @@ -8839,9 +8873,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -8884,12 +8918,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.33" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dee91521343f4c5c6a63edd65e54f31f5c92fe8978c40a4282f8372194c6a7d" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -8924,11 +8958,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.22.27", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] @@ -8950,14 +8984,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -8968,7 +9002,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "chrono", "flate2", "procfs-core", @@ -8981,23 +9015,22 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "chrono", "hex", ] [[package]] name = "proptest" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.10.0", - "lazy_static", + "bitflags 2.13.0", "num-traits", - "rand 0.9.2", + "rand 0.9.5", "rand_chacha 0.9.0", "rand_xorshift 0.4.0", "regex-syntax", @@ -9008,9 +9041,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", @@ -9018,15 +9051,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -9039,7 +9072,7 @@ dependencies = [ "libc", "once_cell", "raw-cpuid", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "web-sys", "winapi", ] @@ -9050,30 +9083,21 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-protobuf" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" -dependencies = [ - "byteorder", -] - [[package]] name = "quinn" -version = "0.11.8" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" dependencies = [ "bytes", "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "rustls", - "socket2 0.5.10", - "thiserror 2.0.12", + "socket2 0.6.5", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -9081,21 +9105,22 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.12" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" dependencies = [ "aws-lc-rs", "bytes", - "getrandom 0.3.3", + "getrandom 0.4.3", "lru-slab", - "rand 0.9.2", + "rand 0.10.2", + "rand_pcg", "ring", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.12", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -9103,32 +9128,32 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.12" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2 0.6.5", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "r-efi" @@ -9154,9 +9179,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -9166,23 +9191,23 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", "serde", ] [[package]] name = "rand" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ "chacha20", - "getrandom 0.4.2", + "getrandom 0.4.3", "rand_core 0.10.1", ] @@ -9203,7 +9228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -9212,16 +9237,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "serde", ] @@ -9231,6 +9256,15 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "rand_xorshift" version = "0.3.0" @@ -9246,7 +9280,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -9255,26 +9289,26 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41" dependencies = [ - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] name = "rapidhash" -version = "4.4.2" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b266a82f4aa99bb5c25e28d11cc44ace63d91adbcbcee4d323e2ae3d49ef37" +checksum = "5da7e78a036ce858e8d55b7e7dc8ba3a88b78350fd2155d3591bbd966b58589e" dependencies = [ - "rand 0.9.2", + "getrandom 0.3.4", "rustversion", ] [[package]] name = "raw-cpuid" -version = "11.5.0" +version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", ] [[package]] @@ -9285,9 +9319,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -9311,11 +9345,11 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", ] [[package]] @@ -9324,36 +9358,36 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", "thiserror 1.0.69", ] [[package]] name = "ref-cast" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "regex" -version = "1.12.2" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2" dependencies = [ "aho-corasick", "memchr", @@ -9363,9 +9397,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db" dependencies = [ "aho-corasick", "memchr", @@ -9374,30 +9408,21 @@ dependencies = [ [[package]] name = "regex-lite" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" [[package]] name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "repr_offset" -version = "0.2.2" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1070755bd29dffc19d0971cab794e607839ba2ef4b69a9e6fbc8733c1b72ea" -dependencies = [ - "tstr", -] +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" -version = "0.12.20" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", @@ -9405,8 +9430,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.12", - "http 1.3.1", + "h2 0.4.15", + "http 1.4.2", "http-body", "http-body-util", "hyper", @@ -9441,15 +9466,15 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.2", "http-body", "http-body-util", "hyper", @@ -9521,11 +9546,11 @@ dependencies = [ "alloy-consensus", "alloy-eips 2.0.5", "alloy-primitives", - "derive_more 2.0.1", + "derive_more 2.1.1", "metrics 0.24.6", "parking_lot", "pin-project", - "rand 0.9.2", + "rand 0.9.5", "rayon", "reth-chainspec", "reth-errors", @@ -9557,7 +9582,7 @@ dependencies = [ "alloy-primitives", "alloy-trie 0.9.4", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "reth-ethereum-forks", "reth-network-peers", "reth-primitives-traits", @@ -9574,11 +9599,11 @@ dependencies = [ "cfg-if 1.0.4", "eyre", "libc", - "rand 0.8.5", + "rand 0.8.7", "reth-fs-util", "secp256k1 0.30.0", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -9608,7 +9633,7 @@ checksum = "ceeb8dab90194305d3f7e3f043a22d2db1fb54b6dcf5d8e75c5a4fa8540e1f57" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -9623,7 +9648,7 @@ dependencies = [ "reth-stages-types", "reth-static-file-types", "serde", - "toml 0.9.5", + "toml 0.9.12+spec-1.1.0", "url", ] @@ -9638,7 +9663,7 @@ dependencies = [ "auto_impl", "reth-execution-types", "reth-primitives-traits", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -9667,10 +9692,10 @@ dependencies = [ "alloy-rpc-types-engine", "alloy-transport", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "eyre", "futures", - "reqwest 0.13.3", + "reqwest 0.13.4", "reth-node-api", "reth-tracing", "ringbuffer", @@ -9685,7 +9710,7 @@ version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ "alloy-primitives", - "derive_more 2.0.1", + "derive_more 2.1.1", "eyre", "libc", "metrics 0.24.6", @@ -9699,10 +9724,10 @@ dependencies = [ "reth-static-file-types", "reth-storage-errors", "reth-tracing", - "rustc-hash 2.1.1", - "strum 0.27.1", + "rustc-hash 2.1.3", + "strum 0.27.2", "sysinfo", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -9715,7 +9740,7 @@ dependencies = [ "alloy-primitives", "arrayvec", "bytes", - "derive_more 2.0.1", + "derive_more 2.1.1", "metrics 0.24.6", "modular-bitfield", "reth-codecs", @@ -9756,7 +9781,7 @@ dependencies = [ "reth-trie-db", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -9785,7 +9810,7 @@ dependencies = [ "enr", "itertools 0.14.0", "parking_lot", - "rand 0.8.5", + "rand 0.8.7", "reth-ethereum-forks", "reth-net-banlist", "reth-net-nat", @@ -9793,7 +9818,7 @@ dependencies = [ "schnellru", "secp256k1 0.30.0", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -9806,19 +9831,19 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59c dependencies = [ "alloy-primitives", "alloy-rlp", - "derive_more 2.0.1", + "derive_more 2.1.1", "discv5", "enr", "futures", "itertools 0.14.0", "metrics 0.24.6", - "rand 0.9.2", + "rand 0.9.5", "reth-chainspec", "reth-ethereum-forks", "reth-metrics", "reth-network-peers", "secp256k1 0.30.0", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -9841,7 +9866,7 @@ dependencies = [ "secp256k1 0.30.0", "serde", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -9868,7 +9893,7 @@ dependencies = [ "reth-primitives-traits", "reth-storage-api", "reth-tasks", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -9892,11 +9917,11 @@ dependencies = [ "futures", "hmac", "pin-project", - "rand 0.8.5", + "rand 0.8.7", "reth-network-peers", "secp256k1 0.30.0", "sha2 0.10.9", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -9947,7 +9972,7 @@ dependencies = [ "reth-primitives-traits", "reth-trie-common", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", ] @@ -9964,9 +9989,9 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-engine", "crossbeam-channel", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", - "indexmap 2.12.1", + "indexmap 2.14.0", "metrics 0.24.6", "moka", "parking_lot", @@ -9999,7 +10024,7 @@ dependencies = [ "revm-primitives 24.0.1", "revm-state 12.0.1", "schnellru", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -10047,7 +10072,7 @@ dependencies = [ "ethereum_ssz_derive", "sha2 0.10.9", "snap", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10059,7 +10084,7 @@ dependencies = [ "bytes", "eyre", "futures-util", - "reqwest 0.13.3", + "reqwest 0.13.4", "reth-era", "reth-fs-util", "sha2 0.10.9", @@ -10096,7 +10121,7 @@ dependencies = [ "reth-consensus", "reth-execution-errors", "reth-storage-errors", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10108,7 +10133,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "bytes", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", "pin-project", "reth-codecs", @@ -10120,7 +10145,7 @@ dependencies = [ "reth-primitives-traits", "serde", "snap", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -10140,13 +10165,13 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "bytes", - "derive_more 2.0.1", + "derive_more 2.1.1", "reth-chainspec", "reth-codecs-derive", "reth-ethereum-primitives", "reth-primitives-traits", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10217,7 +10242,7 @@ dependencies = [ "reth-payload-primitives", "reth-primitives-traits", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10230,7 +10255,7 @@ dependencies = [ "alloy-primitives", "auto_impl", "once_cell", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", ] [[package]] @@ -10298,7 +10323,7 @@ dependencies = [ "alloy-evm", "alloy-primitives", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures-util", "metrics 0.24.6", "rayon", @@ -10360,7 +10385,7 @@ dependencies = [ "alloy-rlp", "nybbles 0.4.8", "reth-storage-errors", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10373,7 +10398,7 @@ dependencies = [ "alloy-evm", "alloy-primitives", "alloy-rlp", - "derive_more 2.0.1", + "derive_more 2.1.1", "reth-ethereum-primitives", "reth-primitives-traits", "reth-trie-common", @@ -10414,7 +10439,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "rmp-serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-util", "tracing", @@ -10441,7 +10466,7 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59c dependencies = [ "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -10484,7 +10509,7 @@ dependencies = [ "jsonrpsee", "pin-project", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -10497,15 +10522,15 @@ name = "reth-libmdbx" version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "byteorder", "crossbeam-queue", "dashmap", - "derive_more 2.0.1", + "derive_more 2.1.1", "parking_lot", "reth-mdbx-sys", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -10514,7 +10539,7 @@ name = "reth-mdbx-sys" version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ - "bindgen 0.72.1", + "bindgen", "cc", ] @@ -10547,9 +10572,9 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59c dependencies = [ "futures-util", "if-addrs", - "reqwest 0.13.3", + "reqwest 0.13.4", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -10565,7 +10590,7 @@ dependencies = [ "alloy-rlp", "aquamarine", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "discv5", "enr", "futures", @@ -10573,8 +10598,8 @@ dependencies = [ "metrics 0.24.6", "parking_lot", "pin-project", - "rand 0.8.5", - "rand 0.9.2", + "rand 0.8.7", + "rand 0.9.5", "rayon", "reth-chainspec", "reth-consensus", @@ -10598,13 +10623,13 @@ dependencies = [ "reth-tasks", "reth-tokio-util", "reth-transaction-pool", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "schnellru", "secp256k1 0.30.0", "serde", "smallvec", - "socket2 0.6.3", - "thiserror 2.0.12", + "socket2 0.6.5", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-util", @@ -10621,7 +10646,7 @@ dependencies = [ "alloy-rpc-types-admin", "alloy-rpc-types-eth", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "enr", "futures", "reth-eth-wire-types", @@ -10631,7 +10656,7 @@ dependencies = [ "reth-network-types", "reth-tokio-util", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", ] @@ -10645,7 +10670,7 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "auto_impl", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", "reth-consensus", "reth-eth-wire-types", @@ -10668,7 +10693,7 @@ dependencies = [ "enr", "secp256k1 0.30.0", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "url", ] @@ -10694,12 +10719,12 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59c dependencies = [ "anyhow", "bincode 1.3.3", - "derive_more 2.0.1", + "derive_more 2.1.1", "lz4_flex", "memmap2", "reth-fs-util", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", "zstd", ] @@ -10806,13 +10831,13 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", "clap", - "derive_more 2.0.1", + "derive_more 2.1.1", "dirs-next", "eyre", "futures", - "humantime 2.3.0", + "humantime 2.4.0", "ipnet", - "rand 0.9.2", + "rand 0.9.5", "reth-chainspec", "reth-cli-util", "reth-config", @@ -10842,9 +10867,9 @@ dependencies = [ "reth-transaction-pool", "secp256k1 0.30.0", "serde", - "strum 0.27.1", - "thiserror 2.0.12", - "toml 0.9.5", + "strum 0.27.2", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", "tracing", "url", "vergen", @@ -10914,7 +10939,7 @@ dependencies = [ "reth-transaction-pool", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-tungstenite", @@ -10931,9 +10956,9 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rpc-types-engine", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", - "humantime 2.3.0", + "humantime 2.4.0", "pin-project", "reth-engine-primitives", "reth-network-api", @@ -10953,7 +10978,7 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59c dependencies = [ "bytes", "eyre", - "http 1.3.1", + "http 1.4.2", "http-body-util", "jsonrpsee-server", "metrics 0.24.6", @@ -10961,7 +10986,7 @@ dependencies = [ "metrics-process", "metrics-util 0.20.4", "procfs", - "reqwest 0.13.3", + "reqwest 0.13.4", "reth-metrics", "reth-tasks", "tokio", @@ -10989,7 +11014,7 @@ dependencies = [ "alloy-consensus", "alloy-primitives", "alloy-rpc-types", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures-util", "metrics 0.24.6", "reth-chain-state", @@ -11036,7 +11061,7 @@ dependencies = [ "reth-trie-common", "serde", "sha2 0.10.9", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", ] @@ -11066,7 +11091,7 @@ dependencies = [ "byteorder", "bytes", "dashmap", - "derive_more 2.0.1", + "derive_more 2.1.1", "modular-bitfield", "once_cell", "quanta", @@ -11077,7 +11102,7 @@ dependencies = [ "revm-state 12.0.1", "secp256k1 0.30.0", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -11122,7 +11147,7 @@ dependencies = [ "revm-database 15.0.2", "rocksdb", "smallvec", - "strum 0.27.1", + "strum 0.27.2", "tracing", ] @@ -11148,8 +11173,8 @@ dependencies = [ "reth-static-file-types", "reth-storage-api", "reth-tokio-util", - "rustc-hash 2.1.1", - "thiserror 2.0.12", + "rustc-hash 2.1.3", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -11160,12 +11185,12 @@ version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ "alloy-primitives", - "derive_more 2.0.1", + "derive_more 2.1.1", "modular-bitfield", "reth-codecs", "serde", - "strum 0.27.1", - "thiserror 2.0.12", + "strum 0.27.2", + "thiserror 2.0.18", "tracing", ] @@ -11207,11 +11232,11 @@ dependencies = [ "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-signer", "alloy-signer-local", "async-trait", - "derive_more 2.0.1", + "derive_more 2.1.1", "dyn-clone", "futures", "itertools 0.14.0", @@ -11253,7 +11278,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -11279,7 +11304,7 @@ dependencies = [ "alloy-rpc-types-mev", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "jsonrpsee", "reth-chain-state", "reth-engine-primitives", @@ -11298,7 +11323,7 @@ dependencies = [ "alloy-network", "alloy-provider", "dyn-clone", - "http 1.3.1", + "http 1.4.2", "jsonrpsee", "metrics 0.24.6", "pin-project", @@ -11325,7 +11350,7 @@ dependencies = [ "reth-tokio-util", "reth-transaction-pool", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-util", "tower", @@ -11350,7 +11375,7 @@ dependencies = [ "reth-evm", "reth-primitives-traits", "reth-rpc-traits", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -11379,7 +11404,7 @@ dependencies = [ "reth-tasks", "reth-transaction-pool", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -11400,7 +11425,7 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-eth", "alloy-rpc-types-mev", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "async-trait", "auto_impl", "dyn-clone", @@ -11445,17 +11470,17 @@ dependencies = [ "alloy-primitives", "alloy-rpc-client", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-sol-types", "alloy-transport", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures", "itertools 0.14.0", "jsonrpsee-core", "jsonrpsee-types", "metrics 0.24.6", - "rand 0.9.2", - "reqwest 0.13.3", + "rand 0.9.5", + "reqwest 0.13.4", "reth-chain-state", "reth-chainspec", "reth-errors", @@ -11475,7 +11500,7 @@ dependencies = [ "revm-inspectors", "schnellru", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -11488,7 +11513,7 @@ version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ "alloy-rpc-types-engine", - "http 1.3.1", + "http 1.4.2", "jsonrpsee-http-client", "pin-project", "tower", @@ -11509,7 +11534,7 @@ dependencies = [ "reth-errors", "reth-network-api", "serde", - "strum 0.27.1", + "strum 0.27.2", ] [[package]] @@ -11524,7 +11549,7 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-signer", "reth-primitives-traits", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -11541,7 +11566,7 @@ dependencies = [ "num-traits", "page_size", "rayon", - "reqwest 0.13.3", + "reqwest 0.13.4", "reth-chainspec", "reth-codecs", "reth-config", @@ -11570,7 +11595,7 @@ dependencies = [ "reth-tasks", "reth-trie", "reth-trie-db", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -11598,7 +11623,7 @@ dependencies = [ "reth-static-file", "reth-static-file-types", "reth-tokio-util", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -11642,11 +11667,11 @@ version = "2.3.0" source = "git+https://github.com/paradigmxyz/reth?tag=v2.3.0#9384bc53d8c0c77e59cac83fdaaf3b372c6d2216" dependencies = [ "alloy-primitives", - "derive_more 2.0.1", + "derive_more 2.1.1", "fixed-map", "reth-stages-types", "serde", - "strum 0.27.1", + "strum 0.27.2", "tracing", ] @@ -11684,14 +11709,14 @@ dependencies = [ "alloy-eips 2.0.5", "alloy-primitives", "alloy-rlp", - "derive_more 2.0.1", + "derive_more 2.1.1", "reth-codecs", "reth-primitives-traits", "reth-prune-types", "reth-static-file-types", "revm-database-interface 12.1.1", "revm-state 12.0.1", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -11708,7 +11733,7 @@ dependencies = [ "pin-project", "rayon", "reth-metrics", - "thiserror 2.0.12", + "thiserror 2.0.18", "thread-priority", "tokio", "tracing", @@ -11740,7 +11765,7 @@ dependencies = [ "tracing-journald", "tracing-logfmt", "tracing-samply", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -11757,7 +11782,7 @@ dependencies = [ "opentelemetry_sdk", "tracing", "tracing-opentelemetry", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "url", ] @@ -11772,13 +11797,13 @@ dependencies = [ "alloy-rlp", "aquamarine", "auto_impl", - "bitflags 2.10.0", + "bitflags 2.13.0", "futures-util", "imbl", "metrics 0.24.6", "parking_lot", "pin-project", - "rand 0.9.2", + "rand 0.9.5", "reth-chain-state", "reth-chainspec", "reth-eth-wire-types", @@ -11794,12 +11819,12 @@ dependencies = [ "revm 40.0.3", "revm-interpreter 37.0.3", "revm-primitives 24.0.1", - "rustc-hash 2.1.1", + "rustc-hash 2.1.3", "schnellru", "serde", "serde_json", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -11839,11 +11864,11 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-rpc-types-eth", - "alloy-serde 2.1.0", + "alloy-serde 2.1.1", "alloy-trie 0.9.4", "arrayvec", "bytes", - "derive_more 2.0.1", + "derive_more 2.1.1", "itertools 0.14.0", "nybbles 0.4.8", "rayon", @@ -11885,7 +11910,7 @@ dependencies = [ "alloy-rlp", "crossbeam-channel", "crossbeam-utils", - "derive_more 2.0.1", + "derive_more 2.1.1", "itertools 0.14.0", "metrics 0.24.6", "rayon", @@ -11897,7 +11922,7 @@ dependencies = [ "reth-tasks", "reth-trie", "revm-state 12.0.1", - "thiserror 2.0.12", + "thiserror 2.0.18", "tracing", ] @@ -12065,7 +12090,7 @@ version = "7.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39a276ed142b4718dcf64bc9624f474373ed82ef20611025045c3fb23edbef9c" dependencies = [ - "alloy-eips 1.5.2", + "alloy-eips 1.8.3", "revm-bytecode 6.2.2", "revm-database-interface 7.0.5", "revm-primitives 20.2.1", @@ -12080,7 +12105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a69c3ce73454a09ef89a66177239d7c4f5f697227ae27254c99451866603b19d" dependencies = [ "alloy-eips 2.0.5", - "derive_more 2.0.1", + "derive_more 2.1.1", "revm-bytecode 11.0.1", "revm-database-interface 12.1.1", "revm-primitives 24.0.1", @@ -12112,7 +12137,7 @@ dependencies = [ "revm-primitives 24.0.1", "revm-state 12.0.1", "serde", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -12204,7 +12229,7 @@ dependencies = [ "revm 40.0.3", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] @@ -12314,7 +12339,7 @@ version = "7.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f64fbacb86008394aaebd3454f9643b7d5a782bd251135e17c5b33da592d84d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "revm-bytecode 6.2.2", "revm-primitives 20.2.1", "serde", @@ -12327,7 +12352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40eff6067185cf80932e06f6a9c8045b012ecb6f99a8d6edc618ec2792373e14" dependencies = [ "alloy-eip7928 0.4.5", - "bitflags 2.10.0", + "bitflags 2.13.0", "nonmax", "revm-bytecode 11.0.1", "revm-primitives 24.0.1", @@ -12352,7 +12377,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if 1.0.4", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", @@ -12383,14 +12408,14 @@ dependencies = [ "alloy-trie 0.8.1", "arrayvec", "itertools 0.14.0", - "thiserror 2.0.12", + "thiserror 2.0.18", ] [[package]] name = "rlimit" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" +checksum = "f35ee2729c56bb610f6dba436bf78135f728b7373bdffae2ec815b2d3eb98cc3" dependencies = [ "libc", ] @@ -12471,9 +12496,9 @@ dependencies = [ [[package]] name = "rug" -version = "1.29.0" +version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f6c8f906c90b48e0c1745c9f814c3a31c5eba847043b05c3e9a934dec7c4b3" +checksum = "07a8857882aec59d27254b02481c709327c13de6fad1da60bfc4f9783eaaa61e" dependencies = [ "az", "gmp-mpfr-sys", @@ -12483,14 +12508,15 @@ dependencies = [ [[package]] name = "ruint" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68df0380e5c9d20ce49534f292a36a7514ae21350726efe1865bdb1fa91d278" +checksum = "45caf26f647c19115bf9c453c70ffe4a4a3a6390dceebd942610584f99b8ddce" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "ark-ff 0.5.0", + "ark-ff 0.6.0", "bytes", "fastrlp 0.3.1", "fastrlp 0.4.0", @@ -12500,8 +12526,8 @@ dependencies = [ "parity-scale-codec", "primitive-types", "proptest", - "rand 0.8.5", - "rand 0.9.2", + "rand 0.8.7", + "rand 0.9.5", "rlp", "ruint-macro", "serde_core", @@ -12546,9 +12572,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" [[package]] name = "rustc-hash" @@ -12558,11 +12584,11 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" dependencies = [ - "rand 0.8.5", + "rand 0.9.5", ] [[package]] @@ -12586,27 +12612,27 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.26", + "semver 1.0.28", ] [[package]] name = "rustix" -version = "1.0.7" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138" dependencies = [ "aws-lc-rs", "log", @@ -12620,21 +12646,21 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.5.1", + "security-framework", ] [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046" dependencies = [ "web-time", "zeroize", @@ -12655,10 +12681,10 @@ dependencies = [ "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki", - "security-framework 3.5.1", + "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -12676,10 +12702,10 @@ dependencies = [ "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki", - "security-framework 3.5.1", + "security-framework", "security-framework-sys", - "webpki-root-certs 1.0.5", - "windows-sys 0.61.1", + "webpki-root-certs 1.0.8", + "windows-sys 0.52.0", ] [[package]] @@ -12690,9 +12716,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -12702,15 +12728,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "rusty-fork" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2" dependencies = [ "fnv", "quick-error", @@ -12719,36 +12745,193 @@ dependencies = [ ] [[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "safe_arch" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +name = "rvr-openvm" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "bytemuck", + "openvm-instructions", + "openvm-platform", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", + "rvr-state", + "thiserror 1.0.69", ] [[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] +name = "rvr-openvm-build" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" [[package]] -name = "schannel" -version = "0.1.28" +name = "rvr-openvm-ext-algebra" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "cc", + "num-bigint", + "openvm-algebra-transpiler", + "openvm-algebra-utils", + "openvm-instructions", + "rand 0.9.5", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", + "strum 0.26.3", +] + +[[package]] +name = "rvr-openvm-ext-bigint" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "openvm-bigint-transpiler", + "openvm-instructions", + "openvm-riscv-transpiler", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", + "strum 0.26.3", +] + +[[package]] +name = "rvr-openvm-ext-deferral" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "libloading", + "openvm-circuit", + "openvm-deferral-transpiler", + "openvm-instructions", + "openvm-stark-backend", + "rvr-openvm-ir", + "rvr-openvm-lift", +] + +[[package]] +name = "rvr-openvm-ext-ecc" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "openvm-ecc-transpiler", + "openvm-instructions", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", + "strum 0.26.3", +] + +[[package]] +name = "rvr-openvm-ext-keccak" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "openvm-instructions", + "openvm-keccak256-transpiler", + "p3-keccak-air", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", +] + +[[package]] +name = "rvr-openvm-ext-pairing" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "openvm-instructions", + "openvm-pairing-transpiler", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", +] + +[[package]] +name = "rvr-openvm-ext-riscv" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "libloading", + "openvm-circuit", + "openvm-instructions", + "openvm-platform", + "openvm-riscv-transpiler", + "rand 0.9.5", + "rvr-openvm-ir", + "rvr-openvm-lift", +] + +[[package]] +name = "rvr-openvm-ext-sha2" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "openvm-instructions", + "openvm-sha2-air", + "openvm-sha2-transpiler", + "rvr-openvm-build", + "rvr-openvm-ir", + "rvr-openvm-lift", +] + +[[package]] +name = "rvr-openvm-ir" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "serde", +] + +[[package]] +name = "rvr-openvm-lift" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" +dependencies = [ + "libloading", + "openvm-instructions", + "openvm-stark-backend", + "rustc-hash 2.1.3", + "rvr-openvm-ir", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "rvr-state" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "safe_arch" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" dependencies = [ - "windows-sys 0.61.1", + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", ] [[package]] @@ -12765,9 +12948,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.0.4" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" dependencies = [ "dyn-clone", "ref-cast", @@ -12820,7 +13003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand 0.8.7", "secp256k1-sys 0.10.1", "serde", ] @@ -12832,7 +13015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3c81b43dc2d8877c216a3fccf76677ee1ebccd429566d3e67447290d0c42b2" dependencies = [ "bitcoin_hashes", - "rand 0.9.2", + "rand 0.9.5", "secp256k1-sys 0.11.0", ] @@ -12856,24 +13039,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework" -version = "3.5.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -12882,9 +13052,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.15.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", @@ -12901,11 +13071,12 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -12917,12 +13088,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - [[package]] name = "send_wrapper" version = "0.6.0" @@ -12974,16 +13139,16 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.14.0", "itoa", "memchr", "serde", @@ -13002,9 +13167,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -13023,19 +13188,19 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.14.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "base64 0.22.1", + "bs58", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.12.1", + "indexmap 2.14.0", "schemars 0.9.0", - "schemars 1.0.4", - "serde", - "serde_derive", + "schemars 1.2.1", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -13043,14 +13208,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.14.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ - "darling 0.20.11", + "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13059,7 +13224,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.14.0", "itoa", "ryu", "serde", @@ -13078,15 +13243,26 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" dependencies = [ "cfg-if 1.0.4", "cpufeatures 0.2.17", "digest 0.10.7", ] +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha2" version = "0.9.9" @@ -13113,12 +13289,12 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" dependencies = [ "digest 0.10.7", - "keccak 0.1.5", + "keccak 0.1.6", ] [[package]] @@ -13133,9 +13309,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cbb88c189d6352cc8ae96a39d19c7ecad8f7330b29461187f2587fdc2988d5" +checksum = "a6287fd675f713484342a89cbf0a386abef5f15919cfad607e5e1f19e1e15331" dependencies = [ "cc", "cfg-if 1.0.4", @@ -13164,10 +13340,11 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -13181,11 +13358,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + [[package]] name = "simd_cesu8" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" dependencies = [ "rustc_version 0.4.1", "simdutf8", @@ -13199,21 +13382,21 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" +checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d" dependencies = [ "num-bigint", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.18", "time", ] [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" [[package]] name = "sketches-ddsketch" @@ -13223,18 +13406,15 @@ checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" [[package]] name = "sketches-ddsketch" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" +checksum = "0c6f73aeb92d671e0cc4dca167e59b2deb6387c375391bc99ee743f326994a2b" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slotmap" @@ -13247,9 +13427,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" dependencies = [ "serde", ] @@ -13263,7 +13443,7 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snark-verifier" version = "0.2.6" -source = "git+https://github.com/axiom-crypto/snark-verifier.git?tag=v0.2.6#364e82654c746b063aff528d8cb660890908278a" +source = "git+https://github.com/axiom-crypto/snark-verifier.git?branch=develop-v2.1.0#369f98ff87dbdde689ec576aa9c5fd2609599481" dependencies = [ "halo2-base", "halo2-ecc", @@ -13274,17 +13454,17 @@ dependencies = [ "num-integer", "num-traits", "pairing 0.23.0", - "rand 0.8.5", + "rand 0.8.7", "revm 27.1.0", "ruint", "serde", - "sha3 0.10.8", + "sha3 0.10.9", ] [[package]] name = "snark-verifier-sdk" version = "0.2.6" -source = "git+https://github.com/axiom-crypto/snark-verifier.git?tag=v0.2.6#364e82654c746b063aff528d8cb660890908278a" +source = "git+https://github.com/axiom-crypto/snark-verifier.git?branch=develop-v2.1.0#369f98ff87dbdde689ec576aa9c5fd2609599481" dependencies = [ "bincode 1.3.3", "ethereum-types", @@ -13296,7 +13476,7 @@ dependencies = [ "num-bigint", "num-integer", "num-traits", - "rand 0.8.5", + "rand 0.8.7", "rand_chacha 0.3.1", "serde", "serde_json", @@ -13315,12 +13495,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -13332,27 +13512,27 @@ dependencies = [ "base64 0.22.1", "bytes", "futures", - "http 1.3.1", + "http 1.4.2", "httparse", "log", - "rand 0.8.5", - "sha1", + "rand 0.8.7", + "sha1 0.10.7", ] [[package]] name = "spin" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" dependencies = [ "lock_api", ] [[package]] name = "spin" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" dependencies = [ "lock_api", ] @@ -13369,9 +13549,9 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -13408,7 +13588,7 @@ checksum = "59ab74230a0592602e361bd63c645413fa8cbe4500d10274e849179e5c72548f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13422,11 +13602,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros 0.27.1", + "strum_macros 0.27.2", ] [[package]] @@ -13439,20 +13619,19 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "strum_macros" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13480,9 +13659,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.102" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6397daf94fa90f058bd0fd88429dd9e5738999cca8d701813c80723add80462" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -13498,7 +13677,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13518,7 +13697,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13532,18 +13711,7 @@ dependencies = [ "ntapi", "objc2-core-foundation", "objc2-io-kit", - "windows 0.62.1", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "system-configuration-sys", + "windows", ] [[package]] @@ -13552,7 +13720,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -13581,15 +13749,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -13619,7 +13787,7 @@ dependencies = [ "cfg-if 1.0.4", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13630,7 +13798,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", "test-case-core", ] @@ -13645,11 +13813,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.18", ] [[package]] @@ -13660,18 +13828,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13682,26 +13850,25 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread-priority" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210811179577da3d54eb69ab0b50490ee40491a25d95b8c6011ba40771cb721" +checksum = "8d2e834949be5111506bb252643498af1514f600d9e1dceedaa42afae155b67f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.13.0", "cfg-if 1.0.4", "libc", "log", "rustversion", - "windows 0.61.3", + "windows", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" dependencies = [ "cfg-if 1.0.4", - "once_cell", ] [[package]] @@ -13715,9 +13882,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" +version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" +checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b" dependencies = [ "cc", "libc", @@ -13725,9 +13892,9 @@ dependencies = [ [[package]] name = "tikv-jemallocator" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865" +checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a" dependencies = [ "libc", "tikv-jemalloc-sys", @@ -13735,12 +13902,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.46" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" dependencies = [ "deranged", - "itoa", "libc", "num-conv", "num_threads", @@ -13752,15 +13918,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" dependencies = [ "num-conv", "time-core", @@ -13777,9 +13943,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -13797,9 +13963,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" dependencies = [ "tinyvec_macros", ] @@ -13822,9 +13988,9 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.3", + "socket2 0.6.5", "tokio-macros", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -13835,7 +14001,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -13850,9 +14016,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ "rustls", "tokio", @@ -13860,9 +14026,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -13889,9 +14055,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -13916,17 +14082,17 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.5" +version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ - "indexmap 2.12.1", - "serde", - "serde_spanned 1.0.3", - "toml_datetime 0.7.3", + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow 0.7.15", ] [[package]] @@ -13940,9 +14106,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] @@ -13953,7 +14128,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.14.0", "toml_datetime 0.6.11", "winnow 0.5.40", ] @@ -13964,21 +14139,33 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.14.0", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", - "winnow 0.7.14", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 0.7.14", + "winnow 1.0.4", ] [[package]] @@ -13989,20 +14176,20 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.4" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tonic" -version = "0.14.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a286e33f82f8a1ee2df63f4fa35c0becf4a85a0cb03091a15fd7bf0b402dc94a" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", "base64 0.22.1", "bytes", - "http 1.3.1", + "http 1.4.2", "http-body", "http-body-util", "hyper", @@ -14021,9 +14208,9 @@ dependencies = [ [[package]] name = "tonic-prost" -version = "0.14.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c55a2d6a14174563de34409c9f92ff981d006f56da9c6ecd40d9d4a31500b0" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" dependencies = [ "bytes", "prost", @@ -14032,14 +14219,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", "hdrhistogram", - "indexmap 2.12.1", + "indexmap 2.14.0", "pin-project-lite", "slab", "sync_wrapper", @@ -14052,22 +14239,21 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "async-compression", "base64 0.22.1", - "bitflags 2.10.0", + "bitflags 2.13.0", "bytes", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.2", "http-body", "http-body-util", "http-range-header", "httpdate", - "iri-string", "mime", "mime_guess", "percent-encoding", @@ -14078,6 +14264,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", + "url", "uuid", ] @@ -14107,9 +14294,9 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.7.20" +version = "0.7.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f28f45dd524790b44a7b372f7c3aec04a3af6b42d494e861b67de654cb25a5e" +checksum = "36bb7a33ce7f0807d44124b5119ea3581fd59028db56477a7aa01741c869ca6a" dependencies = [ "actix-web", "mutually_exclusive_features", @@ -14126,9 +14313,9 @@ checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" dependencies = [ "crossbeam-channel", "symlink", - "thiserror 2.0.12", + "thiserror 2.0.18", "time", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14139,7 +14326,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -14150,7 +14337,7 @@ checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" dependencies = [ "serde_json", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14173,7 +14360,7 @@ dependencies = [ "smallvec", "thiserror 1.0.69", "tracing", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14194,7 +14381,7 @@ checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" dependencies = [ "libc", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14217,7 +14404,7 @@ dependencies = [ "time", "tracing", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14232,7 +14419,7 @@ dependencies = [ "tracing", "tracing-core", "tracing-log", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "web-time", ] @@ -14245,11 +14432,11 @@ dependencies = [ "cfg-if 1.0.4", "itoa", "libc", - "mach2", + "mach2 0.5.0", "memmap2", "smallvec", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -14273,9 +14460,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -14324,7 +14511,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -14333,21 +14520,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tstr" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f8e0294f14baae476d0dd0a2d780b2e24d66e349a9de876f5126777a37bdba7" -dependencies = [ - "tstr_proc_macros", -] - -[[package]] -name = "tstr_proc_macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78122066b0cb818b8afd08f7ed22f7fdbc3e90815035726f0840d0d26c0747a" - [[package]] name = "tungstenite" version = "0.28.0" @@ -14356,23 +14528,17 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.3.1", + "http 1.4.2", "httparse", "log", - "rand 0.9.2", + "rand 0.9.5", "rustls", "rustls-pki-types", - "sha1", - "thiserror 2.0.12", + "sha1 0.10.7", + "thiserror 2.0.18", "utf-8", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "typeid" version = "1.0.3" @@ -14385,12 +14551,6 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" -[[package]] -name = "typewit" -version = "1.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" - [[package]] name = "ucd-trie" version = "0.1.7" @@ -14429,21 +14589,21 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-xid" @@ -14457,7 +14617,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common 0.1.6", + "crypto-common 0.1.7", "subtle", ] @@ -14503,14 +14663,15 @@ checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" [[package]] name = "url" -version = "2.5.4" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -14533,11 +14694,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.19.0" +version = "1.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.4.3", "js-sys", "wasm-bindgen", ] @@ -14652,38 +14813,20 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - [[package]] name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.120" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if 1.0.4", "once_cell", @@ -14694,9 +14837,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.70" +version = "0.4.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" dependencies = [ "js-sys", "wasm-bindgen", @@ -14704,9 +14847,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.120" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -14714,48 +14857,26 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.120" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.120" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap 2.12.1", - "wasm-encoder", - "wasmparser", -] - [[package]] name = "wasm-streams" version = "0.5.0" @@ -14769,18 +14890,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.10.0", - "hashbrown 0.15.4", - "indexmap 2.12.1", - "semver 1.0.26", -] - [[package]] name = "wasmtimer" version = "0.4.3" @@ -14797,9 +14906,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.97" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" dependencies = [ "js-sys", "wasm-bindgen", @@ -14821,14 +14930,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" dependencies = [ - "webpki-root-certs 1.0.5", + "webpki-root-certs 1.0.8", ] [[package]] name = "webpki-root-certs" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" +checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267" dependencies = [ "rustls-pki-types", ] @@ -14839,14 +14948,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.0", + "webpki-roots 1.0.8", ] [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf" dependencies = [ "rustls-pki-types", ] @@ -14889,7 +14998,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.52.0", ] [[package]] @@ -14900,93 +15009,47 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.61.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" -dependencies = [ - "windows-collections 0.2.0", - "windows-core 0.61.2", - "windows-future 0.2.1", - "windows-link 0.1.3", - "windows-numerics 0.2.0", -] - -[[package]] -name = "windows" -version = "0.62.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e6c4a1f363c8210c6f77ba24f645c61c6fb941eccf013da691f7e09515b8ac" -dependencies = [ - "windows-collections 0.3.1", - "windows-core 0.62.1", - "windows-future 0.3.1", - "windows-numerics 0.3.0", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "windows-core 0.61.2", + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", ] [[package]] name = "windows-collections" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123e712f464a8a60ce1a13f4c446d2d43ab06464cb5842ff68f5c71b6fb7852e" -dependencies = [ - "windows-core 0.62.1", -] - -[[package]] -name = "windows-core" -version = "0.61.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", + "windows-core", ] [[package]] name = "windows-core" -version = "0.62.1" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.2.0", - "windows-result 0.4.0", - "windows-strings 0.5.0", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", - "windows-threading 0.1.0", -] - -[[package]] -name = "windows-future" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f3db6b24b120200d649cd4811b4947188ed3a8d2626f7075146c5d178a9a4a" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "windows-core 0.62.1", - "windows-link 0.2.0", - "windows-threading 0.2.0", + "windows-core", + "windows-link", + "windows-threading", ] [[package]] @@ -14997,7 +15060,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -15008,86 +15071,52 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-link" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" - -[[package]] -name = "windows-numerics" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", -] +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-numerics" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce3498fe0aba81e62e477408383196b4b0363db5e0c27646f932676283b43d8" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core 0.62.1", - "windows-link 0.2.0", + "windows-core", + "windows-link", ] [[package]] name = "windows-registry" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" -dependencies = [ - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-result" -version = "0.3.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link 0.1.3", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] name = "windows-result" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" -dependencies = [ - "windows-link 0.2.0", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -15099,15 +15128,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[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" @@ -15132,16 +15152,16 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.4", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.61.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -15159,21 +15179,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[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.6" @@ -15192,37 +15197,28 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.4" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.0", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link 0.1.3", -] - -[[package]] -name = "windows-threading" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab47f085ad6932defa48855254c758cdd0e2f2d48e62a34118a268d8f345e118" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" dependencies = [ - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -15231,12 +15227,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[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.6" @@ -15245,9 +15235,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -15255,12 +15245,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[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.6" @@ -15269,9 +15253,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -15279,12 +15263,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[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.6" @@ -15293,9 +15271,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" @@ -15305,9 +15283,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -15315,12 +15293,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[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.6" @@ -15329,9 +15301,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -15339,12 +15311,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[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.6" @@ -15353,9 +15319,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -15363,12 +15329,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[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.6" @@ -15377,9 +15337,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -15387,12 +15347,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[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.6" @@ -15401,9 +15355,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" @@ -15416,140 +15370,33 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] [[package]] name = "winnow" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if 1.0.4", - "windows-sys 0.48.0", -] - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - [[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap 2.12.1", - "prettyplease", - "syn 2.0.102", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.102", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.10.0", - "indexmap 2.12.1", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.12.1", - "log", - "semver 1.0.26", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "ws_stream_wasm" @@ -15563,8 +15410,8 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror 2.0.12", + "send_wrapper", + "thiserror 2.0.18", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -15597,11 +15444,10 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -15609,82 +15455,82 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -15693,9 +15539,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -15704,13 +15550,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.102", + "syn 2.0.118", ] [[package]] @@ -15733,18 +15579,18 @@ dependencies = [ "jubjub", "lazy_static", "pasta_curves 0.5.1", - "rand 0.8.5", + "rand 0.8.7", "serde", "sha2 0.10.9", - "sha3 0.10.8", + "sha3 0.10.9", "subtle", ] [[package]] name = "zmij" -version = "1.0.19" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "zstd" @@ -15766,9 +15612,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index e574e3062..fad55dd1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,6 @@ members = [ "crates/mpt", "crates/revm-crypto", "crates/stateless-executor", - "crates/guest-mem", "crates/chainspec", "crates/stateless-witness", "crates/mpt-tools", @@ -13,6 +12,7 @@ members = [ "crates/curve-utils", "crates/kzg", "crates/kzg/tests/programs/verify_kzg", + "crates/accelerators", ] exclude = [] resolver = "3" @@ -25,8 +25,6 @@ edition = "2024" exclude = ["**/target"] [workspace.dependencies] -# Not directly used, just to have rayon feature always -hashbrown = { version = "0.15.4", features = ["rayon"] } eyre = "0.6" tracing = { version = "0.1", default-features = false } tracing-subscriber = "0.3" @@ -36,9 +34,9 @@ tokio = { version = "1.44.2", default-features = false, features = [ ] } serde_json = "1.0.110" serde = { version = "1.0", default-features = false, features = ["derive"] } -serde_with = "3.13.0" +serde_with = { version = "3.13.0", default-features = false, features = ["macros", "alloc"] } url = "2.3" -thiserror = "2.0.12" +thiserror = { version = "2.0.12", default-features = false } hex-literal = "1.0.0" rayon = "1.10.0" bincode = { version = "2.0.1", default-features = false, features = [ @@ -48,10 +46,9 @@ bincode = { version = "2.0.1", default-features = false, features = [ ] } toml = "0.9.2" smallvec = "1.13" -bumpalo = "3.19.0" -bytes = "1" -bitcode = { version = "0.6.5", default-features = false, features = ["serde"] } -itertools = "0.14" +bumpalo = { version = "3.19.0", default-features = false, features = ["collections"] } +bytes = { version = "1", default-features = false } +itertools = { version = "0.14", default-features = false } actix-web = "4" reqwest = "0.12.20" tracing-actix-web = "0.7" @@ -62,16 +59,15 @@ zstd = { version = "0.13", default-features = false } # workspace openvm-curve-utils = { path = "./crates/curve-utils", default-features = false } +openvm-accelerators = { path = "./crates/accelerators", default-features = false } openvm-kzg = { path = "./crates/kzg", default-features = false } openvm-mpt = { path = "./crates/mpt" } openvm-revm-crypto = { path = "./crates/revm-crypto" } -openvm-guest-mem = { path = "./crates/guest-mem" } openvm-stateless-executor = { path = "./crates/stateless-executor" } openvm-chainspec = { path = "./crates/chainspec" } # workspace (host only) openvm-stateless-witness = { path = "./crates/stateless-witness", default-features = false } openvm-rpc-proxy = { path = "./crates/rpc-proxy" } -openvm-reth-benchmark = { path = "./bin/reth-benchmark", default-features = false } # reth reth-primitives-traits = { version = "=0.4.1", default-features = false } @@ -112,29 +108,26 @@ alloy-rpc-client = { version = "=2.0.5", default-features = false } alloy-rpc-types = { version = "=2.0.5", default-features = false } alloy-rpc-types-debug = { version = "=2.0.5", default-features = false } alloy-transport = { version = "=2.0.5", default-features = false } -alloy-transport-http = { version = "=2.0.5", default-features = false, features = [ - "reqwest-rustls-tls", -] } - -openvm = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-keccak256 = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false, features = [ +openvm = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-keccak256 = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false, features = [ "bn254", "bls12_381", ] } -openvm-sha2 = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-k256 = { git = "https://github.com/openvm-org/openvm.git", package = "k256", branch = "main" } -openvm-p256 = { git = "https://github.com/openvm-org/openvm.git", package = "p256", branch = "main" } -openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } +openvm-sha2 = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-k256 = { git = "https://github.com/openvm-org/openvm.git", package = "k256", branch = "develop-v2.1.0" } +openvm-p256 = { git = "https://github.com/openvm-org/openvm.git", package = "p256", branch = "develop-v2.1.0" } +openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } # openvm (host only) -openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-sdk-config = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-build = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v2.0.0", default-features = false } +openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-sdk-config = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-build = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", branch = "develop-v2.1.0", default-features = false } # crates/kzg hex = { version = "0.4.3", default-features = false } @@ -152,6 +145,10 @@ rust.missing_debug_implementations = "warn" rust.unreachable_pub = "warn" rust.unused_must_use = "deny" rust.rust_2018_idioms = { level = "deny", priority = -1 } +rust.unexpected_cfgs = { level = "warn", check-cfg = [ + "cfg(openvm_intrinsics)", + 'cfg(target_os, values("openvm"))', +] } rustdoc.all = "warn" [profile.release] @@ -164,7 +161,7 @@ strip = "none" [profile.maxperf] inherits = "release" -lto = "fat" +lto = "thin" codegen-units = 1 [profile.dev] diff --git a/Dockerfile b/Dockerfile index cbb608496..44538abea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,15 +13,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -# Toolchains: stable for cargo-openvm, nightly for tco build +# Toolchains: stable for cargo-openvm, nightly for host build ENV CARGO_HOME="/root/.cargo" \ RUSTUP_HOME="/root/.rustup" \ PATH="/root/.cargo/bin:${PATH}" -RUN rustup toolchain install nightly-2026-01-18 \ - && rustup component add rust-src --toolchain nightly-2026-01-18 +RUN rustup toolchain install nightly-2026-01-18 # Install cargo-openvm (builds the guest ELF) -RUN cargo +1.91.1 install --git https://github.com/openvm-org/openvm.git --locked --force cargo-openvm +RUN cargo +1.91.1 install --git https://github.com/openvm-org/openvm.git --branch develop-v2.1.0 --locked --force cargo-openvm + +# Install the openvm rust toolchain +RUN cargo openvm toolchain install WORKDIR /app # Copy only Rust workspace files to keep build cache stable when server/ changes @@ -32,14 +34,14 @@ COPY rustfmt.toml ./ # Build guest ELF and place where host expects it WORKDIR /app/bin/stateless-guest -RUN RUSTFLAGS="" OPENVM_RUST_TOOLCHAIN=nightly-2026-01-18 cargo openvm build --no-transpile --profile=release \ +RUN RUSTFLAGS="" cargo openvm build --no-transpile --profile=release \ && mkdir -p ../reth-benchmark/elf \ - && cp target/riscv32im-risc0-zkvm-elf/release/openvm-stateless-guest ../reth-benchmark/elf/ + && cp target/riscv64im-unknown-openvm-elf/release/openvm-stateless-guest ../reth-benchmark/elf/ # Build host binary WORKDIR /app ENV JEMALLOC_SYS_WITH_MALLOC_CONF="retain:true,background_thread:true,metadata_thp:always,dirty_decay_ms:10000,muzzy_decay_ms:10000,abort_conf:true" -ARG FEATURES="metrics,jemalloc,tco,unprotected,cuda" +ARG FEATURES="metrics,jemalloc,rvr,unprotected,cuda" ARG PROFILE="release" # CUDA SASS targets: 89 = Ada, 120 = Blackwell ARG CUDA_ARCH="89,120" @@ -59,7 +61,7 @@ RUN S5CMD_VER=$(curl -s https://api.github.com/repos/peak/s5cmd/releases/latest WORKDIR /app COPY --from=builder /app/target/release/openvm-reth-benchmark /usr/local/bin/openvm-reth-benchmark -COPY --from=builder /app/bin/openvm-reth-benchmark/elf/openvm-stateless-guest /app/bin/openvm-reth-benchmark/elf/openvm-stateless-guest +COPY --from=builder /app/bin/reth-benchmark/elf/openvm-stateless-guest /app/bin/reth-benchmark/elf/openvm-stateless-guest COPY server /app/server RUN python3 -m venv /opt/venv \ diff --git a/bin/reth-benchmark/Cargo.toml b/bin/reth-benchmark/Cargo.toml index a96b9be4f..63306b14d 100644 --- a/bin/reth-benchmark/Cargo.toml +++ b/bin/reth-benchmark/Cargo.toml @@ -20,7 +20,6 @@ dotenv = "0.15.0" clap = { version = "4.5.7", features = ["derive", "env"] } clap_builder = "4.5.34" bincode = { workspace = true, features = ["std"] } -bitcode.workspace = true hex = "0.4.3" serde.workspace = true serde_json.workspace = true @@ -34,11 +33,12 @@ openvm-stateless-executor.workspace = true openvm-rpc-proxy.workspace = true # alloy -alloy-primitives.workspace = true alloy-provider.workspace = true alloy-rpc-client.workspace = true alloy-transport.workspace = true -alloy-transport-http.workspace = true +alloy-transport-http = { version = "=2.0.5", default-features = false, features = [ + "reqwest-rustls-tls", +] } # reth reth-ethereum-primitives.workspace = true @@ -46,14 +46,14 @@ reth-ethereum-primitives.workspace = true # Note: the openvm-sdk commit does not need to be exactly the same as the `openvm` commit used in the guest program: as long as # the openvm-sdk commit doesn't change any guest libraries, they are compatible # This allows us to not update revm and openvm-kzg each time we change openvm-sdk -openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v2.0.0", default-features = false } -openvm-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v2.0.0", default-features = false, optional = true } -openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } +openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", branch = "develop-v2.1.0", default-features = false } +openvm-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", branch = "develop-v2.1.0", default-features = false, optional = true } +openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } openvm.workspace = true -openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } -openvm-sdk-config = { git = "https://github.com/openvm-org/openvm.git", branch = "main", default-features = false } +openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } +openvm-sdk-config = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false } # halo2 halo2-axiom = { git = "https://github.com/axiom-crypto/halo2.git", tag = "v0.5.2", default-features = false, optional = true } @@ -61,12 +61,15 @@ halo2-axiom = { git = "https://github.com/axiom-crypto/halo2.git", tag = "v0.5.2 [package.metadata.cargo-machete] ignored = ["halo2-axiom"] +[package.metadata.cargo-shear] +ignored = ["alloy-transport-http", "halo2-axiom"] + [features] default = ["parallel", "jemalloc", "metrics"] parallel = ["openvm-sdk/parallel"] -metrics = ["openvm-sdk/metrics"] +metrics = ["openvm-sdk/metrics", "openvm-circuit/metrics", "openvm-stark-sdk/metrics"] tco = ["openvm-sdk/tco"] -aot = ["openvm-sdk/aot"] +rvr = ["openvm-sdk/rvr"] evm-prove = ["openvm-sdk/evm-prove", "halo2-axiom"] evm-verify = ["evm-prove", "openvm-sdk/evm-verify", "halo2-axiom"] perf-metrics = ["openvm-sdk/perf-metrics"] diff --git a/bin/reth-benchmark/README.md b/bin/reth-benchmark/README.md index b0d33a325..4ef6a5b79 100644 --- a/bin/reth-benchmark/README.md +++ b/bin/reth-benchmark/README.md @@ -86,7 +86,7 @@ Before running the benchmark, you must first compile the guest program using `ca cd bin/stateless-guest cargo openvm build mkdir -p ../reth-benchmark/elf -cp target/riscv32im-risc0-zkvm-elf/release/openvm-stateless-guest ../reth-benchmark/elf/ +cp target/riscv64im-unknown-openvm-elf/release/openvm-stateless-guest ../reth-benchmark/elf/ cd ../.. ``` diff --git a/bin/reth-benchmark/src/cli.rs b/bin/reth-benchmark/src/cli.rs index 66728b7b9..3c9762dd3 100644 --- a/bin/reth-benchmark/src/cli.rs +++ b/bin/reth-benchmark/src/cli.rs @@ -1,17 +1,41 @@ -use alloy_provider::{Provider as _, RootProvider}; -use clap::Parser; +use std::path::PathBuf; + +use alloy_provider::{network::Ethereum, Provider as _, RootProvider}; +use clap::Args; +use openvm_rpc_proxy::DEFAULT_PREIMAGE_CACHE_NIBBLES; use url::Url; -/// The arguments for configuring the chain data provider. -#[derive(Debug, Clone, Parser)] -pub(super) struct ProviderArgs { +#[derive(Debug, Clone, Args)] +pub struct RethInputSource { + /// The block number of the block to execute. + #[clap(long)] + pub block_number: Option, + /// The rpc url used to fetch data about the block. If not provided, will use the /// RPC_{chain_id} env var. #[clap(long)] - rpc_url: Option, + pub rpc_url: Option, + /// The chain ID. If not provided, requires the rpc_url argument to be provided. #[clap(long)] - chain_id: Option, + pub chain_id: Option, + + /// Optional path to the directory containing cached client input. A new cache file will be + /// created from RPC data if it doesn't already exist. + #[clap(long)] + pub cache_dir: Option, + + /// Optional path to the input file. + #[arg(long)] + pub input_path: Option, + + /// The number of nibbles to precompute for the preimage lookup table. + /// Higher values increase startup time but reduce RPC calls for missing storage keys. + /// + /// Warning: This is a form of grinding, so higher values will be slower on machines with many + /// CPU cores. + #[clap(long, default_value_t = DEFAULT_PREIMAGE_CACHE_NIBBLES, value_parser = clap::value_parser!(u8).range(..=8))] + pub preimage_cache_nibbles: u8, } pub(super) struct ProviderConfig { @@ -19,14 +43,25 @@ pub(super) struct ProviderConfig { pub chain_id: u64, } -impl ProviderArgs { - pub(super) async fn into_provider(self) -> eyre::Result { +impl RethInputSource { + pub fn new(block_number: u64) -> Self { + Self { + block_number: Some(block_number), + rpc_url: None, + chain_id: None, + cache_dir: None, + input_path: None, + preimage_cache_nibbles: DEFAULT_PREIMAGE_CACHE_NIBBLES, + } + } + + pub(super) async fn resolve_provider(&self) -> eyre::Result { // We don't need RPC when using cache with known chain ID, so we leave it as `Option` // here and decide on whether to panic later. // // On the other hand chain ID is always needed. - let (rpc_url, chain_id) = match (self.rpc_url, self.chain_id) { - (Some(rpc_url), Some(chain_id)) => (Some(rpc_url), chain_id), + let (rpc_url, chain_id) = match (self.rpc_url.as_ref(), self.chain_id) { + (Some(rpc_url), Some(chain_id)) => (Some(rpc_url.clone()), chain_id), (None, Some(chain_id)) => { match std::env::var(format!("RPC_{chain_id}")) { Ok(rpc_env_var) => { @@ -41,10 +76,10 @@ impl ProviderArgs { } (Some(rpc_url), None) => { // We can find out about chain ID from RPC. - let provider: RootProvider = RootProvider::new_http(rpc_url.clone()); + let provider = RootProvider::::new_http(rpc_url.clone()); let chain_id = provider.get_chain_id().await?; - (Some(rpc_url), chain_id) + (Some(rpc_url.clone()), chain_id) } (None, None) => { eyre::bail!("either --rpc-url or --chain-id must be used") diff --git a/bin/reth-benchmark/src/lib.rs b/bin/reth-benchmark/src/lib.rs index 3847aaa2e..3b05d8878 100644 --- a/bin/reth-benchmark/src/lib.rs +++ b/bin/reth-benchmark/src/lib.rs @@ -1,6 +1,11 @@ #![cfg_attr(feature = "tco", allow(incomplete_features))] #![cfg_attr(feature = "tco", feature(explicit_tail_calls))] -use std::{fs, io::Write, path::PathBuf, time::Instant}; +use std::{ + fs, + io::Write, + path::{Path, PathBuf}, + time::Instant, +}; use alloy_provider::RootProvider; use alloy_rpc_client::RpcClient; @@ -11,7 +16,7 @@ use openvm_circuit::arch::{ execution_mode::metered::segment_ctx::DEFAULT_MAX_MEMORY, instructions::exe::VmExe, verify_segments, VmCircuitConfig, }; -use openvm_rpc_proxy::{RpcExecutor, DEFAULT_PREIMAGE_CACHE_NIBBLES}; +use openvm_rpc_proxy::RpcExecutor; use openvm_sdk::{ config::{ AggregationSystemParams, AggregationTreeConfig, AppConfig, DEFAULT_APP_LOG_BLOWUP, @@ -19,7 +24,7 @@ use openvm_sdk::{ DEFAULT_ROOT_LOG_BLOWUP, }, fs::{read_object_from_file, write_object_to_file}, - Sdk, SC, + Sdk, StdIn, SC, }; use openvm_sdk_config::{SdkVmConfig, TranspilerConfig}; #[cfg(feature = "evm-verify")] @@ -37,7 +42,6 @@ use openvm_stark_sdk::{ air_builders::symbolic::{SymbolicExpressionDag, SymbolicExpressionNode}, codec::Encode, keygen::types::MultiStarkProvingKey, - p3_field::PrimeCharacteristicRing, SystemParams, }, }; @@ -52,9 +56,11 @@ use openvm_verify_stark_host::{ pub use reth_ethereum_primitives as reth_primitives; use tracing::{info, info_span}; +const VM_MAX_CONSTRAINT_DEGREE: usize = 4; + mod cli; -use cli::ProviderArgs; mod soundness; +pub use cli::RethInputSource; /// Enum representing the execution mode of the host executable. #[derive(Debug, Clone, clap::ValueEnum)] @@ -71,6 +77,7 @@ pub enum BenchMode { ProveApp, /// Generate a full end-to-end STARK proof with aggregation. ProveStark, + /// Generate the root STARK proof without halo2 wrapping. #[cfg(feature = "evm-verify")] ProveRoot, /// Generate a full end-to-end halo2 proof for EVM verifier. @@ -112,23 +119,44 @@ impl std::fmt::Display for BenchMode { } } +#[derive(Parser, Debug)] +#[command(allow_external_subcommands = true)] +pub struct BenchmarkCli { + /// Application level log blowup + #[arg(long, default_value_t = DEFAULT_APP_LOG_BLOWUP)] + pub app_log_blowup: usize, + + /// Log of univariate skip domain size + #[arg(long, default_value_t = DEFAULT_APP_L_SKIP)] + pub app_l_skip: usize, + + /// Aggregation (leaf) level log blowup + #[arg(long, default_value_t = DEFAULT_LEAF_LOG_BLOWUP)] + pub leaf_log_blowup: usize, + + /// Internal level log blowup + #[arg(long, default_value_t = DEFAULT_INTERNAL_LOG_BLOWUP)] + pub internal_log_blowup: usize, + + /// Root level log blowup + #[arg(long, default_value_t = DEFAULT_ROOT_LOG_BLOWUP)] + pub root_log_blowup: usize, + + #[command(flatten)] + pub agg_tree_config: AggregationTreeConfig, + + /// Estimated proving-memory cap per VM segment, in bytes + #[arg(long, default_value_t = DEFAULT_MAX_MEMORY)] + pub segment_max_memory: usize, +} + /// The arguments for the host executable. #[derive(Debug, Parser)] pub struct HostArgs { - /// The block number of the block to execute. - #[clap(long)] - block_number: Option, - #[clap(flatten)] - provider: ProviderArgs, - /// The execution mode. #[clap(long, value_enum)] mode: BenchMode, - /// Optional path to the directory containing cached client input. A new cache file will be - /// created from RPC data if it doesn't already exist. - #[clap(long)] - cache_dir: Option, /// The path to the CSV file containing the execution data. #[clap(long, default_value = "report.csv")] report_path: PathBuf, @@ -139,9 +167,8 @@ pub struct HostArgs { #[clap(flatten)] benchmark: BenchmarkCli, - /// Optional path to the input file. - #[arg(long)] - pub input_path: Option, + #[clap(flatten)] + input: RethInputSource, /// Path to write the fixtures to. Only needed for mode=make_input #[arg(long)] @@ -172,45 +199,41 @@ pub struct HostArgs { /// If specified, loads the agg proving key from this path. #[arg(long)] pub agg_pk_path: Option, - - /// The number of nibbles to precompute for the preimage lookup table. - /// Higher values increase startup time but reduce RPC calls for missing storage keys. - /// - /// Warning: This is a form of grinding, so higher values will be slower on machines with many - /// CPU cores. - #[clap(long, default_value_t = DEFAULT_PREIMAGE_CACHE_NIBBLES, value_parser = clap::value_parser!(u8).range(..=8))] - pub preimage_cache_nibbles: u8, } -#[derive(Parser, Debug)] -#[command(allow_external_subcommands = true)] -pub struct BenchmarkCli { - /// Application level log blowup - #[arg(long, default_value_t = DEFAULT_APP_LOG_BLOWUP)] - pub app_log_blowup: usize, - - /// Log of univariate skip domain size - #[arg(long, default_value_t = DEFAULT_APP_L_SKIP)] - pub app_l_skip: usize, - - /// Aggregation (leaf) level log blowup - #[arg(long, default_value_t = DEFAULT_LEAF_LOG_BLOWUP)] - pub leaf_log_blowup: usize, - - /// Internal level log blowup - #[arg(long, default_value_t = DEFAULT_INTERNAL_LOG_BLOWUP)] - pub internal_log_blowup: usize, +pub struct RethWorkload { + pub exe: VmExe, + pub stdin: StdIn, +} - /// Root level log blowup - #[arg(long, default_value_t = DEFAULT_ROOT_LOG_BLOWUP)] - pub root_log_blowup: usize, +impl std::fmt::Debug for RethWorkload { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("RethWorkload") + .field("exe", &self.exe) + .field("stdin_buffer_len", &self.stdin.buffer.len()) + .field("stdin_deferrals_len", &self.stdin.deferrals.len()) + .finish() + } +} - #[command(flatten)] - pub agg_tree_config: AggregationTreeConfig, +pub fn build_reth_workload( + vm_config: &SdkVmConfig, + stateless_input: &StatelessExecutorInput, + openvm_client_eth_elf: &[u8], +) -> Result { + let exe = build_reth_exe(vm_config, openvm_client_eth_elf)?; + let encoded_stateless_input: Vec = { + let words = openvm::serde::to_vec(stateless_input)?; + words.into_iter().flat_map(|w| w.to_le_bytes()).collect() + }; + let stdin = vec![encoded_stateless_input].into(); + Ok(RethWorkload { exe, stdin }) +} - /// Estimated proving-memory cap per VM segment, in bytes - #[arg(long, default_value_t = DEFAULT_MAX_MEMORY)] - pub segment_max_memory: usize, +pub fn build_reth_exe(vm_config: &SdkVmConfig, openvm_client_eth_elf: &[u8]) -> Result> { + let transpiler = vm_config.transpiler().clone(); + let elf = Elf::decode(openvm_client_eth_elf, MEM_SIZE as u32)?; + Ok(VmExe::from_elf(elf, transpiler)?) } pub fn reth_vm_config() -> SdkVmConfig { @@ -223,8 +246,6 @@ pub fn reth_vm_config() -> SdkVmConfig { config } -const VM_MAX_CONSTRAINT_DEGREE: usize = 4; - fn override_system_params( params: SystemParams, log_blowup: usize, @@ -258,6 +279,49 @@ fn override_log_blowup(params: SystemParams, log_blowup: usize) -> Result Result { + let block_number = source + .block_number + .ok_or_else(|| eyre::eyre!("--block-number is required to load reth input"))?; + + if let Some(path) = &source.input_path { + return try_load_input_from_path(path); + } + + let provider_config = source.resolve_provider().await?; + + match provider_config.chain_id { + #[allow(non_snake_case)] + CHAIN_ID_ETH_MAINNET => (), + _ => { + eyre::bail!("unknown chain ID: {}", provider_config.chain_id); + } + }; + + if let Some(stateless_input) = try_load_input_from_cache( + source.cache_dir.as_deref(), + provider_config.chain_id, + block_number, + )? { + return Ok(stateless_input); + } + + let Some(rpc_url) = provider_config.rpc_url else { + eyre::bail!("cache not found and RPC URL not provided"); + }; + + let client = RpcClient::builder().layer(RetryBackoffLayer::new(5, 1000, 100)).http(rpc_url); + let provider = RootProvider::new(client); + let rpc_executor = RpcExecutor::new(provider, source.preimage_cache_nibbles); + let stateless_input = rpc_executor.execute(block_number).await?; + + if let Some(cache_dir) = &source.cache_dir { + write_input_to_cache(cache_dir, provider_config.chain_id, block_number, &stateless_input)?; + } + + Ok(stateless_input) +} + pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> Result<()> { // Initialize the environment variables. dotenv::dotenv().ok(); @@ -272,8 +336,6 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> tracing::debug!("air_idx={air_idx} | {}", air.name()); } - let transpiler = vm_config.transpiler().clone(); - let app_params = override_system_params( app_params_with_100_bits_security(MAX_APP_LOG_STACKED_HEIGHT), args.benchmark.app_log_blowup, @@ -281,7 +343,7 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> )?; // Setup: this can all be done once before receiving proof input - let app_config = AppConfig::new(vm_config, app_params); + let app_config = AppConfig::new(vm_config.clone(), app_params); let agg_params = AggregationSystemParams { leaf: override_log_blowup( leaf_params_with_100_bits_security(), @@ -389,10 +451,8 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> return Ok(()); } - let elf = Elf::decode(openvm_client_eth_elf, MEM_SIZE as u32)?; - let exe = VmExe::from_elf(elf, transpiler)?; - if matches!(args.mode, BenchMode::GenerateVmVkey) { + let exe = build_reth_exe(&vm_config, openvm_client_eth_elf)?; let prover = sdk.prover(exe)?; let vk = VmStarkVerifyingKey { mvk: (*sdk.agg_vk()).clone(), @@ -405,77 +465,18 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> } let block_number = args + .input .block_number .ok_or_else(|| eyre::eyre!("--block-number is required for mode {}", args.mode))?; let program_name = format!("reth.{}.block_{}", args.mode, block_number); - // Parse the command line arguments. - let stateless_input_from_path = - args.input_path.as_ref().map(|path| try_load_input_from_path(path).unwrap()); - - let stateless_input = if let Some(stateless_input_from_path) = stateless_input_from_path { - stateless_input_from_path - } else { - let provider_config = args.provider.into_provider().await?; - match provider_config.chain_id { - #[allow(non_snake_case)] - CHAIN_ID_ETH_MAINNET => (), - _ => { - eyre::bail!("unknown chain ID: {}", provider_config.chain_id); - } - }; - let stateless_input_from_cache = try_load_input_from_cache( - args.cache_dir.as_ref(), - provider_config.chain_id, - block_number, - )?; - - match (stateless_input_from_cache, provider_config.rpc_url) { - (Some(stateless_input_from_cache), _) => stateless_input_from_cache, - (None, Some(rpc_url)) => { - // Cache not found but we have RPC - // Setup the provider. - let client = - RpcClient::builder().layer(RetryBackoffLayer::new(5, 1000, 100)).http(rpc_url); - let provider = RootProvider::new(client); - - // Setup the host executor. - let rpc_executor = RpcExecutor::new(provider, args.preimage_cache_nibbles); - - // Execute the host. - let stateless_input = - rpc_executor.execute(block_number).await.expect("failed to execute host"); - - if let Some(cache_dir) = args.cache_dir { - let input_folder = - cache_dir.join(format!("input/{}", provider_config.chain_id)); - if !input_folder.exists() { - std::fs::create_dir_all(&input_folder)?; - } - - let input_path = input_folder.join(format!("{}.bin", block_number)); - let mut cache_file = std::fs::File::create(input_path)?; - - bincode::serde::encode_into_std_write( - &stateless_input, - &mut cache_file, - bincode::config::standard(), - )?; - } - - stateless_input - } - (None, None) => { - eyre::bail!("cache not found and RPC URL not provided") - } - } - }; + let stateless_input = load_reth_input(&args.input).await?; // MakeInput: encode stateless_input as JSON and write to disk. if matches!(args.mode, BenchMode::MakeInput) { let words = openvm::serde::to_vec(&stateless_input)?; - let bytes: Vec = words.into_iter().flat_map(|w: u32| w.to_le_bytes()).collect(); + let bytes: Vec = words.into_iter().flat_map(|w: u64| w.to_le_bytes()).collect(); let hex = format!("0x01{}", hex::encode(&bytes)); let json = serde_json::json!({ "input": [hex] }); @@ -493,7 +494,6 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> // Host execution: run the stateless executor natively, no VM. if matches!(args.mode, BenchMode::ExecuteHost) { - let program_name = format!("reth.{}.block_{}", args.mode, block_number); let executor = StatelessExecutor; let start = Instant::now(); let header = info_span!("host.execute", group = program_name).in_scope(|| { @@ -508,27 +508,22 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> return Ok(()); } - let encoded_stateless_input: Vec = { - let words = openvm::serde::to_vec(&stateless_input)?; - words.into_iter().flat_map(|w| w.to_le_bytes()).map(F::from_u8).collect() - }; - - let stdin = vec![encoded_stateless_input].into(); + let RethWorkload { exe, stdin } = + build_reth_workload(&vm_config, &stateless_input, openvm_client_eth_elf)?; run_with_metric_collection("OUTPUT_PATH", move || { info_span!("reth-block", block_number = block_number).in_scope(|| -> Result<()> { match args.mode { BenchMode::Execute => { - let public_values = info_span!("sdk.execute", group = program_name) - .in_scope(|| sdk.execute(exe, stdin))?; + let compiled = sdk.compile(exe)?; + let public_values = sdk.execute(&compiled, stdin)?; let block_hash = hex::encode(&public_values); info!("Execute completed, block hash: {}", block_hash); println!("BENCH_BLOCK_HASH={block_hash}"); } BenchMode::ExecuteMetered => { - let (public_values, _segments) = - info_span!("sdk.execute_metered", group = program_name) - .in_scope(|| sdk.execute_metered(exe, stdin))?; + let compiled = sdk.compile_metered(exe)?; + let (public_values, _) = sdk.execute_metered(&compiled, stdin)?; let block_hash = hex::encode(&public_values); info!("Execute metered completed, block hash: {}", block_hash); println!("BENCH_BLOCK_HASH={block_hash}"); @@ -639,7 +634,7 @@ pub async fn run_reth_benchmark(args: HostArgs, openvm_client_eth_elf: &[u8]) -> { info!("Generating root proving key..."); let root_pk = sdk.root_pk(); - info!("Saving app root key to: {}", root_pk_path.display()); + info!("Saving root proving key to: {}", root_pk_path.display()); write_object_to_file(&root_pk_path, &root_pk)?; } @@ -754,7 +749,7 @@ fn max_rule_length(dag: &SymbolicExpressionDag) -> usize { } fn try_load_input_from_cache( - cache_dir: Option<&PathBuf>, + cache_dir: Option<&Path>, chain_id: u64, block_number: u64, ) -> Result> { @@ -776,7 +771,26 @@ fn try_load_input_from_cache( }) } -fn try_load_input_from_path(path: &PathBuf) -> Result { +fn write_input_to_cache( + cache_dir: &Path, + chain_id: u64, + block_number: u64, + stateless_input: &StatelessExecutorInput, +) -> Result<()> { + let input_folder = cache_dir.join(format!("input/{chain_id}")); + fs::create_dir_all(&input_folder)?; + + let input_path = input_folder.join(format!("{block_number}.bin")); + let mut cache_file = fs::File::create(input_path)?; + bincode::serde::encode_into_std_write( + stateless_input, + &mut cache_file, + bincode::config::standard(), + )?; + Ok(()) +} + +fn try_load_input_from_path(path: &Path) -> Result { let ext = path.extension().and_then(|s| s.to_str()).unwrap_or(""); if ext.eq_ignore_ascii_case("json") { let s = std::fs::read_to_string(path)?; diff --git a/bin/reth-benchmark/src/main.rs b/bin/reth-benchmark/src/main.rs index 8af569192..0fd205d36 100644 --- a/bin/reth-benchmark/src/main.rs +++ b/bin/reth-benchmark/src/main.rs @@ -1,5 +1,6 @@ #![cfg_attr(feature = "tco", allow(incomplete_features))] #![cfg_attr(feature = "tco", feature(explicit_tail_calls))] + use clap_builder::Parser; use openvm_reth_benchmark::{run_reth_benchmark, HostArgs}; diff --git a/bin/reth-verify/reth.vm.vk b/bin/reth-verify/reth.vm.vk index 3b7587945..0c416a4bf 100644 Binary files a/bin/reth-verify/reth.vm.vk and b/bin/reth-verify/reth.vm.vk differ diff --git a/bin/reth-verify/src/main.rs b/bin/reth-verify/src/main.rs index fa467f9e3..feb30a05b 100644 --- a/bin/reth-verify/src/main.rs +++ b/bin/reth-verify/src/main.rs @@ -41,7 +41,6 @@ fn load_stark_final_proof(path: &PathBuf) -> Result { let proof_bytes = fs::read(path) .wrap_err_with(|| format!("Failed to read STARK final proof {}", path.display()))?; let proof_bytes = decode_persisted_final_proof_bytes(path, proof_bytes)?; - VmStarkProof::decode_from_bytes(&proof_bytes) .wrap_err_with(|| format!("Failed to decode STARK final proof {}", path.display())) } diff --git a/bin/stateless-guest/Cargo.lock b/bin/stateless-guest/Cargo.lock index 566a968fe..4b66c0719 100644 --- a/bin/stateless-guest/Cargo.lock +++ b/bin/stateless-guest/Cargo.lock @@ -22,15 +22,15 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.2.34" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e0378e959aa6a885897522080a990e80eb317f1e9a222a604492ea50e13096" +checksum = "c36ddb69f5e41407e7a93aead3480f7c8ff076e73d01a951ae8f7ea4542c1ca0" dependencies = [ "alloy-primitives", "alloy-rlp", "num_enum", + "phf 0.14.0", "serde", - "strum", ] [[package]] @@ -52,7 +52,7 @@ dependencies = [ "either", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", - "rand 0.8.5", + "rand 0.8.7", "secp256k1 0.30.0", "serde", "serde_json", @@ -116,14 +116,16 @@ dependencies = [ [[package]] name = "alloy-eip7928" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8222b1d88f9a6d03be84b0f5e76bb60cd83991b43ad8ab6477f0e4a7809b98d" +checksum = "6b827a6d7784fe3eb3489d40699407a4cdcce74271421a01bdffe60cf573bb16" dependencies = [ "alloy-primitives", "alloy-rlp", "borsh", + "once_cell", "serde", + "thiserror", ] [[package]] @@ -149,7 +151,7 @@ dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", - "alloy-eip7928 0.3.3", + "alloy-eip7928 0.3.7", "alloy-primitives", "alloy-rlp", "alloy-serde", @@ -249,15 +251,14 @@ dependencies = [ "derive_more", "foldhash 0.2.0", "hashbrown 0.17.1", - "indexmap 2.13.0", + "indexmap 2.14.0", "itoa", "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-asm", "paste", "proptest", - "rand 0.9.2", + "rand 0.9.5", "rapidhash", - "rayon", "ruint", "rustc-hash", "secp256k1 0.31.1", @@ -278,13 +279,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36834a5c0a2fa56e171bf256c34d70fca07d0c0031583edea1c4946b7889c9e" +checksum = "9d4311c03125e8a18296504560b9de3d75ecbd0dcda7f71e6cf2a196d57e6fba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -317,7 +318,7 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.13.0", + "itertools 0.14.0", "serde", "serde_json", "serde_with", @@ -326,9 +327,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf028ac8bcb161ad7c104243e710cece8e1a794f65ee6c35c4c4d693c8e80ee" +checksum = "c1e97b3e0b9f816b25083045dcfa69431bd059a078e828e4d82d296d1949b96c" dependencies = [ "alloy-primitives", "serde", @@ -346,7 +347,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -358,12 +359,12 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.13.0", + "indexmap 2.14.0", "proc-macro-error2", "proc-macro2", "quote", "sha3", - "syn 2.0.114", + "syn 2.0.118", "syn-solidity", ] @@ -379,7 +380,7 @@ dependencies = [ "macro-string", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", "syn-solidity", ] @@ -390,7 +391,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "857b470ecdd2ed38beaf82ad1a38c516a8ff75266750f38b9eeed001d575241b" dependencies = [ "serde", - "winnow 1.0.3", + "winnow", ] [[package]] @@ -424,14 +425,14 @@ dependencies = [ [[package]] name = "alloy-tx-macros" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2cd27809c88c413e5542dbd5a8eff8c12f0086af920e881ae586d3a787d5e5" +checksum = "406bc1183f6843e0aba09f7b3365e828b597213d60793ba5cb41befc863e3a78" dependencies = [ - "darling 0.23.0", + "darling", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -546,6 +547,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7a806ac6c8307b929df4645776290a50ee2aac754ad09d8bdf73391309e43af" +dependencies = [ + "ark-ff-asm 0.6.0", + "ark-ff-macros 0.6.0", + "ark-serialize 0.6.0", + "ark-std 0.6.0", + "digest 0.10.7", + "educe", + "num-bigint", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.3.0" @@ -573,7 +591,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.114", + "syn 2.0.118", +] + +[[package]] +name = "ark-ff-asm" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1479009684adc073dff49a1025d3a7065b317a9ead25aaaca38cdc70058ba8a2" +dependencies = [ + "quote", + "syn 2.0.118", ] [[package]] @@ -611,7 +639,20 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", +] + +[[package]] +name = "ark-ff-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0691ed21ef00ef89c1e9bda832eba493dda3ec2f8d892fb25b705f73f06bb8" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] @@ -685,13 +726,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive", + "ark-serialize-derive 0.5.0", "ark-std 0.5.0", "arrayvec", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74dd304fd536fb95d0a328e72be759209cc496a9da094c5bc56e5fea4f9e86b" +dependencies = [ + "ark-serialize-derive 0.6.0", + "ark-std 0.6.0", + "digest 0.10.7", + "num-bigint", + "serde_with", +] + [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -700,7 +754,18 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f153690697a2b91e5e1251ff98411ee5371500a111a0fd317a70e588eb300f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] @@ -710,7 +775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -720,7 +785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -730,7 +795,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.7", +] + +[[package]] +name = "ark-std" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "367c9c827ed431bff6868b7aa926e05b16eb46603cc8b6e768e4a5553fa1d155" +dependencies = [ + "num-traits", + "rand 0.8.7", ] [[package]] @@ -741,9 +816,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" dependencies = [ "serde", ] @@ -766,14 +841,14 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base16ct" @@ -814,36 +889,57 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bitcoin-consensus-encoding" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d6094e2a1ba3c93b5a596fe5a10d1a10c3c6e06785cde89f693a044c01aa40" +dependencies = [ + "bitcoin-internals", +] + +[[package]] +name = "bitcoin-internals" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30a22d1f112dde8e16be7b45c63645dc165cef254f835b3e1e9553e485cfa64" +dependencies = [ + "hex-conservative 0.3.2", +] + [[package]] name = "bitcoin-io" -version = "0.1.4" +version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" +checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78" +dependencies = [ + "bitcoin-consensus-encoding", +] [[package]] name = "bitcoin_hashes" -version = "0.14.1" +version = "0.14.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ec84b80c482df901772e931a9a681e26a1b9ee2302edeff23cb30328745c8b" +checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2" dependencies = [ "bitcoin-io", - "hex-conservative", + "hex-conservative 0.2.2", ] [[package]] name = "bitflags" -version = "2.10.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" dependencies = [ "serde_core", ] [[package]] name = "bitvec" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" dependencies = [ "funty", "radium", @@ -908,32 +1004,42 @@ dependencies = [ [[package]] name = "borsh" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" dependencies = [ "borsh-derive", + "bytes", "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "3ae8fb4fb5740e4b2c4884ff95f5f32f5e8479db1e8fd8eb49ddbe09eb09bb7c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", ] [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byte-slice-cast" @@ -943,9 +1049,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "d6aedf8ae72766347502cf3cb4f41cf5e9cc37d28bee90f1fdaaae15f9cf9424" [[package]] name = "byteorder" @@ -955,18 +1061,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" dependencies = [ "serde", ] [[package]] name = "c-kzg" -version = "2.1.7" +version = "2.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6648ed1e4ea8e8a1a4a2c78e1cda29a3fd500bc622899c340d8525ea9a76b24a" +checksum = "38d04308254695569fdb9bfe3bacc1c91837a670d0806605eb82d63748fbd3a6" dependencies = [ "blst", "cc", @@ -979,9 +1085,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.54" +version = "1.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38" dependencies = [ "find-msvc-tools", "jobserver", @@ -1003,9 +1109,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", "num-traits", @@ -1021,9 +1127,9 @@ checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" [[package]] name = "const-hex" -version = "1.17.0" +version = "1.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735" +checksum = "33e2a781ebdf4467d1428dc4593067825fb646f6871475098d8577421af73558" dependencies = [ "cfg-if", "cpufeatures 0.2.17", @@ -1039,11 +1145,12 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -1107,9 +1214,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" [[package]] name = "critical-section" @@ -1119,9 +1226,9 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1129,18 +1236,18 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crunchy" @@ -1179,38 +1286,14 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "darling" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" -dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", -] - [[package]] name = "darling" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ - "darling_core 0.23.0", - "darling_macro 0.23.0", -] - -[[package]] -name = "darling_core" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.114", + "darling_core", + "darling_macro", ] [[package]] @@ -1224,18 +1307,7 @@ dependencies = [ "quote", "serde", "strsim", - "syn 2.0.114", -] - -[[package]] -name = "darling_macro" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" -dependencies = [ - "darling_core 0.21.3", - "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1244,16 +1316,16 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ - "darling_core 0.23.0", + "darling_core", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "dashmap" -version = "6.1.0" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1276,11 +1348,10 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ - "powerfmt", "serde_core", ] @@ -1297,13 +1368,13 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" +checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1325,7 +1396,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.114", + "syn 2.0.118", "unicode-xid", ] @@ -1362,13 +1433,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1407,14 +1478,14 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" dependencies = [ "serde", ] @@ -1453,22 +1524,22 @@ dependencies = [ [[package]] name = "enum-ordinalize" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" +checksum = "07f808d588c10e464ea6f7d3eaed500049eff30aaac103460f61828c2d65b3eb" dependencies = [ "enum-ordinalize-derive", ] [[package]] name = "enum-ordinalize-derive" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" +checksum = "42e528e2d34ba8a67a1a650b86beae8ef69fc5fdb638016f386b973226590432" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1489,9 +1560,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fastrlp" @@ -1528,9 +1599,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixed-hash" @@ -1539,7 +1610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand 0.8.7", "rustc-hex", "static_assertions", ] @@ -1561,7 +1632,7 @@ checksum = "6dc7a9cb3326bafb80642c5ce99b39a2c0702d4bfa8ee8a3e773791a6cbe2407" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1599,26 +1670,26 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-task", "pin-project-lite", - "pin-utils", + "slab", ] [[package]] @@ -1651,10 +1722,21 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", ] +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + [[package]] name = "glob" version = "0.3.3" @@ -1674,8 +1756,8 @@ dependencies = [ [[package]] name = "halo2curves-axiom" -version = "0.7.2" -source = "git+https://github.com/axiom-crypto/halo2curves.git?tag=v0.7.2#3a65a710e27fe03711f6fb4fc0c4469ae351974a" +version = "0.7.3" +source = "git+https://github.com/axiom-crypto/halo2curves.git?tag=v0.7.3#d744f712fbeaf62576b2b10842822919551c5ef8" dependencies = [ "blake2b_simd", "digest 0.10.7", @@ -1688,7 +1770,7 @@ dependencies = [ "pairing", "pasta_curves", "paste", - "rand 0.8.5", + "rand 0.8.7", "rand_core 0.6.4", "rayon", "serde", @@ -1722,12 +1804,6 @@ dependencies = [ "foldhash 0.1.5", ] -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - [[package]] name = "hashbrown" version = "0.17.1" @@ -1735,7 +1811,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ "foldhash 0.2.0", - "rayon", "serde", "serde_core", ] @@ -1770,6 +1845,15 @@ dependencies = [ "arrayvec", ] +[[package]] +name = "hex-conservative" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830e599c2904b08f0834ee6337d8fe8f0ed4a63b5d9e7a7f49c0ffa06d08d360" +dependencies = [ + "arrayvec", +] + [[package]] name = "hex-literal" version = "1.1.0" @@ -1796,9 +1880,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1820,12 +1904,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -1833,9 +1918,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -1846,9 +1931,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -1860,15 +1945,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -1880,15 +1965,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -1918,9 +2003,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -1943,7 +2028,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -1959,13 +2044,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", - "rayon", + "hashbrown 0.17.1", "serde", "serde_core", ] @@ -1999,27 +2083,28 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -2040,7 +2125,7 @@ dependencies = [ [[package]] name = "k256" version = "0.13.4" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", @@ -2067,28 +2152,43 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa468878266ad91431012b3e5ef1bf9b170eab22883503a318d46857afa4579a" +checksum = "dd5dc2c0d691cbf7595cde551ced329cca99c2387c2cbc97754c5d0cd045d3ee" dependencies = [ "digest 0.10.7", "sha3-asm", ] +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.9.8", + "spin 0.9.9", ] [[package]] name = "libc" -version = "0.2.180" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libm" @@ -2098,21 +2198,21 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "linked_list_allocator" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afa463f5405ee81cdb9cc2baf37e08ec7e4c8209442b5d72c04cfb2cd6e6286" +checksum = "2b23ac50abb8261cb38c6e2a7192d3302e0836dac1628f6a93b82b4fad185897" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "lock_api" @@ -2125,9 +2225,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "lru" @@ -2146,14 +2246,14 @@ checksum = "59a9dbbfc75d2688ed057456ce8a3ee3f48d12eec09229f560f3643b9f275653" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "modular-bitfield" @@ -2173,7 +2273,7 @@ checksum = "59b43b4fd69e3437618106f7754f34021b831a514f9e1a98ae863cabcd8d8dad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2201,13 +2301,13 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" dependencies = [ "num-integer", "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -2221,9 +2321,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-integer" @@ -2236,11 +2336,10 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -2269,7 +2368,7 @@ dependencies = [ "num-integer", "num-modular", "num-traits", - "rand 0.8.5", + "rand 0.8.7", ] [[package]] @@ -2305,9 +2404,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -2315,13 +2414,13 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2340,9 +2439,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" dependencies = [ "critical-section", "portable-atomic", @@ -2351,32 +2450,54 @@ dependencies = [ [[package]] name = "openvm" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "bytemuck", "getrandom 0.2.17", "getrandom 0.3.4", "num-bigint", "openvm-custom-insn", + "openvm-mem", "openvm-platform", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", ] +[[package]] +name = "openvm-accelerators" +version = "0.4.0" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-serialize 0.5.0", + "aurora-engine-modexp", + "k256 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", + "k256 0.13.4 (git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0)", + "openvm-curve-utils", + "openvm-ecc-guest", + "openvm-keccak256", + "openvm-kzg", + "openvm-pairing", + "openvm-pairing-guest", + "openvm-sha2", + "p256 0.13.2 (git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0)", + "ripemd", +] + [[package]] name = "openvm-algebra-complex-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-macros-common", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "openvm-algebra-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "halo2curves-axiom", "num-bigint", @@ -2384,7 +2505,7 @@ dependencies = [ "openvm-algebra-complex-macros", "openvm-algebra-moduli-macros", "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde-big-array", "strum_macros 0.26.4", ] @@ -2392,13 +2513,13 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "num-bigint", "num-prime", "openvm-macros-common", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2423,17 +2544,17 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "openvm-ecc-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", @@ -2444,7 +2565,7 @@ dependencies = [ "openvm-algebra-guest", "openvm-custom-insn", "openvm-ecc-sw-macros", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", "strum_macros 0.26.4", ] @@ -2452,31 +2573,27 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-macros-common", "quote", - "syn 2.0.114", + "syn 2.0.118", ] -[[package]] -name = "openvm-guest-mem" -version = "0.4.0" - [[package]] name = "openvm-keccak256" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-keccak256-guest", - "spin 0.10.0", + "spin 0.10.1", "tiny-keccak", ] [[package]] name = "openvm-keccak256-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-platform", ] @@ -2494,17 +2611,22 @@ dependencies = [ "openvm-pairing", "serde", "serde-big-array", - "spin 0.10.0", + "spin 0.10.1", ] [[package]] name = "openvm-macros-common" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ - "syn 2.0.114", + "syn 2.0.118", ] +[[package]] +name = "openvm-mem" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" + [[package]] name = "openvm-mpt" version = "0.4.0" @@ -2523,9 +2645,10 @@ dependencies = [ [[package]] name = "openvm-pairing" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "group", + "halo2curves-axiom", "hex-literal", "itertools 0.14.0", "num-bigint", @@ -2539,15 +2662,16 @@ dependencies = [ "openvm-ecc-sw-macros", "openvm-pairing-guest", "openvm-platform", - "openvm-rv32im-guest", + "openvm-riscv-guest", "serde", ] [[package]] name = "openvm-pairing-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ + "halo2curves-axiom", "hex-literal", "itertools 0.14.0", "lazy_static", @@ -2565,13 +2689,13 @@ dependencies = [ [[package]] name = "openvm-platform" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "critical-section", "embedded-alloc", "libm", "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-riscv-guest", ] [[package]] @@ -2580,23 +2704,15 @@ version = "0.4.0" dependencies = [ "alloy-consensus", "alloy-primitives", - "aurora-engine-modexp", - "k256 0.13.4 (git+https://github.com/openvm-org/openvm.git?branch=main)", - "openvm-curve-utils", - "openvm-ecc-guest", - "openvm-keccak256", - "openvm-kzg", - "openvm-pairing", - "openvm-sha2", - "p256 0.13.2 (git+https://github.com/openvm-org/openvm.git?branch=main)", + "openvm-accelerators", "revm", "revm-primitives", ] [[package]] -name = "openvm-rv32im-guest" +name = "openvm-riscv-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-custom-insn", "strum_macros 0.26.4", @@ -2605,7 +2721,7 @@ dependencies = [ [[package]] name = "openvm-sha2" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-sha2-guest", "sha2", @@ -2614,7 +2730,7 @@ dependencies = [ [[package]] name = "openvm-sha2-guest" version = "2.0.0" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "openvm-platform", ] @@ -2630,7 +2746,6 @@ dependencies = [ "bumpalo", "itertools 0.14.0", "openvm-chainspec", - "openvm-guest-mem", "openvm-mpt", "openvm-revm-crypto", "reth-consensus", @@ -2673,7 +2788,7 @@ dependencies = [ [[package]] name = "p256" version = "0.13.2" -source = "git+https://github.com/openvm-org/openvm.git?branch=main#3ee99e5002e123a6ca50c815c3e40ab0bd96b0e3" +source = "git+https://github.com/openvm-org/openvm.git?branch=develop-v2.1.0#7a530c6df3b1ff4a54e5871d440874cd19ffbe2e" dependencies = [ "ecdsa", "elliptic-curve", @@ -2722,7 +2837,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2748,7 +2863,7 @@ dependencies = [ "ff", "group", "lazy_static", - "rand 0.8.5", + "rand 0.8.7", "static_assertions", "subtle", ] @@ -2767,9 +2882,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.5" +version = "2.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +checksum = "47627dd7305c6a2d6c8c6bcd24c5a4c17dbbf425f4f9c5313e724b38fc9782e9" dependencies = [ "memchr", "ucd-trie", @@ -2782,10 +2897,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ "phf_macros", - "phf_shared", + "phf_shared 0.13.1", "serde", ] +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" +dependencies = [ + "phf_shared 0.14.0", +] + [[package]] name = "phf_generator" version = "0.13.1" @@ -2793,7 +2917,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ "fastrand", - "phf_shared", + "phf_shared 0.13.1", ] [[package]] @@ -2803,10 +2927,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ "phf_generator", - "phf_shared", + "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2819,16 +2943,19 @@ dependencies = [ ] [[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "phf_shared" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] [[package]] -name = "pin-utils" -version = "0.1.0" +name = "pin-project-lite" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkcs8" @@ -2842,21 +2969,21 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -2898,9 +3025,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] @@ -2924,7 +3051,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -2938,15 +3065,15 @@ dependencies = [ [[package]] name = "proptest" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set", "bit-vec", "bitflags", "num-traits", - "rand 0.9.2", + "rand 0.9.5", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax", @@ -2963,9 +3090,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.44" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" dependencies = [ "proc-macro2", ] @@ -2976,6 +3103,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "radium" version = "0.7.0" @@ -2984,9 +3117,9 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -2996,9 +3129,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", @@ -3055,18 +3188,18 @@ dependencies = [ [[package]] name = "rapidhash" -version = "4.2.1" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8b5b858a440a0bc02625b62dd95131b9201aa9f69f411195dd4a7cfb1de3d7" +checksum = "5da7e78a036ce858e8d55b7e7dc8ba3a88b78350fd2155d3591bbd966b58589e" dependencies = [ "rustversion", ] [[package]] name = "rayon" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -3108,14 +3241,14 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reth-chainspec" @@ -3163,7 +3296,7 @@ checksum = "ceeb8dab90194305d3f7e3f043a22d2db1fb54b6dcf5d8e75c5a4fa8540e1f57" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -3494,7 +3627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b378c2653331fe60969d9745e802cd773d82a20d8aaced914dfcf26ab8f0d9" dependencies = [ "bitvec", - "phf", + "phf 0.13.1", "revm-primitives", "serde", ] @@ -3691,26 +3824,28 @@ dependencies = [ [[package]] name = "rlsf" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf" +checksum = "1646a59a9734b8b7a0ac51689388a60fe1625d4b956348e9de07591a1478457a" dependencies = [ "cfg-if", "const-default", "libc", + "rustversion", "svgbobdoc", ] [[package]] name = "ruint" -version = "1.17.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c141e807189ad38a07276942c6623032d3753c8859c146104ac2e4d68865945a" +checksum = "45caf26f647c19115bf9c453c70ffe4a4a3a6390dceebd942610584f99b8ddce" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "ark-ff 0.5.0", + "ark-ff 0.6.0", "bytes", "fastrlp 0.3.1", "fastrlp 0.4.0", @@ -3720,8 +3855,8 @@ dependencies = [ "parity-scale-codec", "primitive-types", "proptest", - "rand 0.8.5", - "rand 0.9.2", + "rand 0.8.7", + "rand 0.9.5", "rlp", "ruint-macro", "serde_core", @@ -3737,9 +3872,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" [[package]] name = "rustc-hex" @@ -3762,14 +3897,14 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.27", + "semver 1.0.28", ] [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags", "errno", @@ -3780,9 +3915,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "rusty-fork" @@ -3810,9 +3945,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" dependencies = [ "dyn-clone", "ref-cast", @@ -3848,7 +3983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand 0.8.7", "secp256k1-sys 0.10.1", "serde", ] @@ -3860,7 +3995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3c81b43dc2d8877c216a3fccf76677ee1ebccd429566d3e67447290d0c42b2" dependencies = [ "bitcoin_hashes", - "rand 0.9.2", + "rand 0.9.5", "secp256k1-sys 0.11.0", ] @@ -3893,9 +4028,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "semver-parser" @@ -3951,16 +4086,16 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.0", "itoa", "memchr", "serde", @@ -3970,17 +4105,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.16.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "base64 0.22.1", + "bs58", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.13.0", + "indexmap 2.14.0", "schemars 0.9.0", - "schemars 1.2.0", + "schemars 1.2.1", "serde_core", "serde_json", "serde_with_macros", @@ -3989,14 +4125,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4032,9 +4168,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cbb88c189d6352cc8ae96a39d19c7ecad8f7330b29461187f2587fdc2988d5" +checksum = "a6287fd675f713484342a89cbf0a386abef5f15919cfad607e5e1f19e1e15331" dependencies = [ "cc", "cfg-if", @@ -4042,9 +4178,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signature" @@ -4058,30 +4194,36 @@ dependencies = [ [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" dependencies = [ "serde", ] [[package]] name = "spin" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" [[package]] name = "spin" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" [[package]] name = "spki" @@ -4130,7 +4272,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4142,7 +4284,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4177,9 +4319,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -4195,7 +4337,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4206,7 +4348,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4217,12 +4359,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.24.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix", "windows-sys", @@ -4245,7 +4387,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4259,12 +4401,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.46" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde_core", @@ -4274,15 +4415,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" dependencies = [ "num-conv", "time-core", @@ -4299,42 +4440,57 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +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 = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.14.0", "toml_datetime", "toml_parser", - "winnow 0.7.14", + "winnow", ] [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 0.7.14", + "winnow", ] [[package]] @@ -4356,7 +4512,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4410,15 +4566,15 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-width" @@ -4489,18 +4645,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -4511,9 +4667,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4521,22 +4677,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] @@ -4562,7 +4718,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4573,7 +4729,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] @@ -4611,33 +4767,24 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.51.0" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "wyz" @@ -4650,9 +4797,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -4661,82 +4808,82 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.34" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d" +checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.34" +version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d" +checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -4745,9 +4892,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -4756,20 +4903,20 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.118", ] [[package]] name = "zmij" -version = "1.0.17" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "zstd" diff --git a/bin/stateless-guest/Cargo.toml b/bin/stateless-guest/Cargo.toml index 30aa8e692..50b0050af 100644 --- a/bin/stateless-guest/Cargo.toml +++ b/bin/stateless-guest/Cargo.toml @@ -10,21 +10,26 @@ edition = "2021" openvm-stateless-executor = { path = "../../crates/stateless-executor", default-features = false } # openvm -openvm = { git = "https://github.com/openvm-org/openvm.git", branch = "main", features = [ - "std", -] } -openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "main", optional = true } -openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "main", optional = true } +openvm = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", default-features = false, features = ["getrandom-unsupported"] } +openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", optional = true } +openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", branch = "develop-v2.1.0", optional = true } # Enable std feature for host builds (provides critical-section implementation) -[target.'cfg(not(target_os = "zkvm"))'.dependencies] +[target.'cfg(not(any(target_os = "none", target_os = "openvm")))'.dependencies] openvm-stateless-executor = { path = "../../crates/stateless-executor", default-features = false, features = ["std"] } [package.metadata.cargo-machete] ignored = ["openvm-algebra-guest", "openvm-ecc-guest"] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(openvm_intrinsics)', + 'cfg(target_os, values("openvm"))', +] } + [features] default = ["extensions"] +std = ["openvm/std", "openvm-stateless-executor/std"] extensions = [ "openvm-stateless-executor/openvm", "dep:openvm-algebra-guest", @@ -34,7 +39,7 @@ heap-embedded-alloc = ["openvm/heap-embedded-alloc"] [profile.release] panic = "abort" -lto = "fat" +lto = "thin" strip = true [profile.profiling] diff --git a/bin/stateless-guest/openvm.toml b/bin/stateless-guest/openvm.toml index fa23c1a13..130945596 100644 --- a/bin/stateless-guest/openvm.toml +++ b/bin/stateless-guest/openvm.toml @@ -1,6 +1,5 @@ -openvm_version = "v1.5" -[app_vm_config.rv32i] -[app_vm_config.rv32m] +[app_vm_config.rv64i] +[app_vm_config.rv64m] [app_vm_config.io] [app_vm_config.keccak] diff --git a/bin/stateless-guest/src/main.rs b/bin/stateless-guest/src/main.rs index 6a1f66b57..3b75b5aea 100644 --- a/bin/stateless-guest/src/main.rs +++ b/bin/stateless-guest/src/main.rs @@ -1,7 +1,15 @@ +#![cfg_attr( + all(not(feature = "std"), any(openvm_intrinsics, target_os = "openvm")), + no_main +)] +#![cfg_attr(not(feature = "std"), no_std)] + use openvm::io::{read, reveal_bytes32}; use openvm_stateless_executor::{io::StatelessExecutorInput, ChainVariant, StatelessExecutor}; -#[cfg(all(target_os = "zkvm", feature = "extensions"))] +openvm::entry!(main); + +#[cfg(all(any(openvm_intrinsics, target_os = "openvm"), feature = "extensions"))] openvm::init!(); pub fn main() { diff --git a/crates/accelerators/Cargo.toml b/crates/accelerators/Cargo.toml new file mode 100644 index 000000000..8479efdc2 --- /dev/null +++ b/crates/accelerators/Cargo.toml @@ -0,0 +1,56 @@ +[package] +name = "openvm-accelerators" +description = "OpenVM cryptographic accelerator interface" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[dependencies] +# openvm +openvm-curve-utils = { workspace = true, features = ["bn254", "bls12_381"] } +openvm-ecc-guest.workspace = true +openvm-kzg = { workspace = true, features = ["use-intrinsics"] } +openvm-p256.workspace = true +openvm-pairing = { workspace = true, features = ["bn254", "bls12_381"] } +openvm-keccak256.workspace = true +openvm-sha2.workspace = true + +# crypto +ark-bls12-381 = { version = "0.5", default-features = false, features = ["curve"] } +ark-ec = { version = "0.5", default-features = false } +ark-serialize = { version = "0.5", default-features = false } +aurora-engine-modexp = { version = "1.2.0", default-features = false } +ripemd = { version = "0.1.3", default-features = false } + +# The OpenVM-accelerated k256 fork; its ECDSA recovery relies on zkVM hints +# and is unimplemented outside the guest. +[target.'cfg(any(target_os = "none", target_os = "openvm"))'.dependencies] +openvm-k256.workspace = true + +# Host implementations when not building for the zkVM guest. +[target.'cfg(not(any(target_os = "none", target_os = "openvm")))'.dependencies] +k256 = { version = "0.13", default-features = false, features = ["ecdsa"] } +openvm-keccak256 = { workspace = true, features = ["tiny_keccak"] } +# Not imported directly: enables the host pairing backend used by the KZG +# verification. openvm-pairing's `halo2curves` feature does not forward to +# openvm-pairing-guest, so the inner feature is enabled explicitly. +openvm-pairing = { workspace = true, features = ["halo2curves"] } +openvm-pairing-guest = { workspace = true, features = ["halo2curves"] } +openvm-sha2 = { workspace = true, features = ["import_sha2"] } + +[dev-dependencies] +hex-literal.workspace = true + +[package.metadata.cargo-shear] +ignored = ["openvm-pairing-guest"] + +[package.metadata.cargo-machete] +ignored = ["openvm-pairing-guest"] + +[features] +default = [] +std = [] diff --git a/crates/accelerators/src/blake2f.rs b/crates/accelerators/src/blake2f.rs new file mode 100644 index 000000000..76689a19a --- /dev/null +++ b/crates/accelerators/src/blake2f.rs @@ -0,0 +1,166 @@ +//! BLAKE2b compression function F (EIP-152). +//! +//! Operates on raw BLAKE2b state with an arbitrary round count. + +// Ported from revm-precompile 36.0.3's EIP-152 adaptation: +// https://docs.rs/crate/revm-precompile/36.0.3/source/src/blake2/portable.rs +// That implementation is adapted from blake2b_simd: +// https://github.com/oconnor663/blake2_simd +// +// Copyright (c) 2018 Jack O'Connor +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; + +pub type zkvm_blake2f_state = ZkvmBytes<64>; +pub type zkvm_blake2f_message = ZkvmBytes<128>; +pub type zkvm_blake2f_offset = ZkvmBytes<16>; + +/// Apply BLAKE2 compression function F to `h` in place. +/// +/// # Safety +/// +/// - `h` must be valid for reads and writes of one [`zkvm_blake2f_state`]. +/// - `m` must be valid for reads of one [`zkvm_blake2f_message`]. +/// - `t` must be valid for reads of one [`zkvm_blake2f_offset`]. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_blake2f( + rounds: u32, + h: *mut zkvm_blake2f_state, + m: *const zkvm_blake2f_message, + t: *const zkvm_blake2f_offset, + f: u8, +) -> zkvm_status { + if h.is_null() || m.is_null() || t.is_null() || f > 1 { + return ZKVM_EFAIL; + } + + // SAFETY: the non-null inputs satisfy the function's pointer requirements. + // Read every input before writing `h` so overlapping arguments are supported. + let (state, message, offset) = unsafe { (h.read(), m.read(), t.read()) }; + + let mut state_words = [0; 8]; + for (word, bytes) in state_words.iter_mut().zip(state.data.as_chunks::<8>().0) { + *word = Word::from_le_bytes(*bytes); + } + let mut message_words = [0; 16]; + for (word, bytes) in message_words.iter_mut().zip(message.data.as_chunks::<8>().0) { + *word = Word::from_le_bytes(*bytes); + } + let offset_words = [ + Word::from_le_bytes(offset.data[..8].try_into().unwrap()), + Word::from_le_bytes(offset.data[8..].try_into().unwrap()), + ]; + + compress(rounds, &mut state_words, &message_words, &offset_words, f == 1); + + let mut value = zkvm_blake2f_state { data: [0; 64] }; + for (bytes, word) in value.data.as_chunks_mut::<8>().0.iter_mut().zip(state_words) { + *bytes = word.to_le_bytes(); + } + + // SAFETY: `h` satisfies the function's write requirement; all reads are complete. + unsafe { h.write(value) }; + ZKVM_EOK +} + +type Word = u64; + +const IV: [Word; 8] = [ + 0x6A09E667F3BCC908, + 0xBB67AE8584CAA73B, + 0x3C6EF372FE94F82B, + 0xA54FF53A5F1D36F1, + 0x510E527FADE682D1, + 0x9B05688C2B3E6C1F, + 0x1F83D9ABFB41BD6B, + 0x5BE0CD19137E2179, +]; + +// The message schedule has period 10 (RFC 7693 section 2.7). EIP-152 permits +// arbitrary round counts, so rounds beyond the standard 12 must use `r % 10`. +const SIGMA: [[u8; 16]; 10] = [ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + [14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3], + [11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4], + [7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8], + [9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13], + [2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9], + [12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11], + [13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10], + [6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5], + [10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0], +]; + +#[inline(always)] +const fn g(v: &mut [Word; 16], a: usize, b: usize, c: usize, d: usize, x: Word, y: Word) { + v[a] = v[a].wrapping_add(v[b]).wrapping_add(x); + v[d] = (v[d] ^ v[a]).rotate_right(32); + v[c] = v[c].wrapping_add(v[d]); + v[b] = (v[b] ^ v[c]).rotate_right(24); + v[a] = v[a].wrapping_add(v[b]).wrapping_add(y); + v[d] = (v[d] ^ v[a]).rotate_right(16); + v[c] = v[c].wrapping_add(v[d]); + v[b] = (v[b] ^ v[c]).rotate_right(63); +} + +#[inline(always)] +const fn round(round: usize, m: &[Word; 16], v: &mut [Word; 16]) { + let schedule = SIGMA[round % SIGMA.len()]; + + g(v, 0, 4, 8, 12, m[schedule[0] as usize], m[schedule[1] as usize]); + g(v, 1, 5, 9, 13, m[schedule[2] as usize], m[schedule[3] as usize]); + g(v, 2, 6, 10, 14, m[schedule[4] as usize], m[schedule[5] as usize]); + g(v, 3, 7, 11, 15, m[schedule[6] as usize], m[schedule[7] as usize]); + + g(v, 0, 5, 10, 15, m[schedule[8] as usize], m[schedule[9] as usize]); + g(v, 1, 6, 11, 12, m[schedule[10] as usize], m[schedule[11] as usize]); + g(v, 2, 7, 8, 13, m[schedule[12] as usize], m[schedule[13] as usize]); + g(v, 3, 4, 9, 14, m[schedule[14] as usize], m[schedule[15] as usize]); +} + +fn compress(rounds: u32, h: &mut [Word; 8], m: &[Word; 16], t: &[Word; 2], f: bool) { + let mut v = [ + h[0], + h[1], + h[2], + h[3], + h[4], + h[5], + h[6], + h[7], + IV[0], + IV[1], + IV[2], + IV[3], + IV[4] ^ t[0], + IV[5] ^ t[1], + IV[6] ^ if f { Word::MAX } else { 0 }, + IV[7], + ]; + + for round_index in 0..rounds as usize { + round(round_index, m, &mut v); + } + + for (index, word) in h.iter_mut().enumerate() { + *word ^= v[index] ^ v[index + 8]; + } +} diff --git a/crates/accelerators/src/bls12_381/codec.rs b/crates/accelerators/src/bls12_381/codec.rs new file mode 100644 index 000000000..205be15ba --- /dev/null +++ b/crates/accelerators/src/bls12_381/codec.rs @@ -0,0 +1,90 @@ +//! EIP-2537 BLS12-381 point and scalar codecs. + +use openvm_curve_utils::SubgroupCheck; +use openvm_ecc_guest::{algebra::IntMod, weierstrass::WeierstrassPoint, Group}; +use openvm_pairing::bls12_381 as bls; + +use crate::error::Error; + +const FP_LEN: usize = 48; + +#[inline] +fn read_fp(input: &[u8]) -> Result { + bls::Fp::from_be_bytes(input).ok_or(Error::FieldElementInvalid) +} + +#[inline] +fn read_fp2(c0: &[u8], c1: &[u8]) -> Result { + Ok(bls::Fp2::new(read_fp(c0)?, read_fp(c1)?)) +} + +#[inline] +pub(super) fn read_g1_no_subgroup_check(input: &[u8; 96]) -> Result { + let x = read_fp(&input[..FP_LEN])?; + let y = read_fp(&input[FP_LEN..])?; + // SAFETY: the coordinates are canonical; `from_xy` checks the curve equation. + unsafe { bls::G1Affine::from_xy(x, y) }.ok_or(Error::PointNotOnCurve) +} + +#[inline] +pub(super) fn read_g1(input: &[u8; 96]) -> Result { + let point = read_g1_no_subgroup_check(input)?; + point.is_in_correct_subgroup().then_some(point).ok_or(Error::PointNotInSubgroup) +} + +#[inline] +pub(super) fn read_g2_no_subgroup_check(input: &[u8; 192]) -> Result { + let x = read_fp2(&input[..FP_LEN], &input[FP_LEN..2 * FP_LEN])?; + let y = read_fp2(&input[2 * FP_LEN..3 * FP_LEN], &input[3 * FP_LEN..])?; + // SAFETY: the coordinates are canonical; `from_xy` checks the twist equation. + unsafe { bls::G2Affine::from_xy(x, y) }.ok_or(Error::PointNotOnCurve) +} + +#[inline] +pub(super) fn read_g2(input: &[u8; 192]) -> Result { + let point = read_g2_no_subgroup_check(input)?; + point.is_in_correct_subgroup().then_some(point).ok_or(Error::PointNotInSubgroup) +} + +#[inline] +pub(super) fn read_scalar(input: &[u8; 32]) -> bls::Scalar { + bls::Scalar::from_be_bytes_unchecked(input) +} + +#[inline] +pub(super) fn encode_g1(point: &bls::G1Affine) -> [u8; 96] { + let mut output = [0; 96]; + if point.is_identity() { + return output; + } + + let x: &[u8] = point.x().as_le_bytes(); + let y: &[u8] = point.y().as_le_bytes(); + for index in 0..FP_LEN { + output[index] = x[FP_LEN - 1 - index]; + output[index + FP_LEN] = y[FP_LEN - 1 - index]; + } + output +} + +#[inline] +pub(super) fn encode_g2(point: &bls::G2Affine) -> [u8; 192] { + let mut output = [0; 192]; + if point.is_identity() { + return output; + } + + let x = point.x(); + let y = point.y(); + let x_c0 = x.c0.as_le_bytes(); + let x_c1 = x.c1.as_le_bytes(); + let y_c0 = y.c0.as_le_bytes(); + let y_c1 = y.c1.as_le_bytes(); + for index in 0..FP_LEN { + output[index] = x_c0[FP_LEN - 1 - index]; + output[index + FP_LEN] = x_c1[FP_LEN - 1 - index]; + output[index + 2 * FP_LEN] = y_c0[FP_LEN - 1 - index]; + output[index + 3 * FP_LEN] = y_c1[FP_LEN - 1 - index]; + } + output +} diff --git a/crates/accelerators/src/bls12_381/map.rs b/crates/accelerators/src/bls12_381/map.rs new file mode 100644 index 000000000..51cd772e1 --- /dev/null +++ b/crates/accelerators/src/bls12_381/map.rs @@ -0,0 +1,64 @@ +//! BLS12-381 map-to-curve operations. + +use ark_bls12_381::{Fq, Fq2, G1Affine, G2Affine}; +use ark_ec::{ + hashing::{curve_maps::wb::WBMap, map_to_curve_hasher::MapToCurve}, + AffineRepr, +}; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; + +use crate::error::Error; + +const FP_LEN: usize = 48; + +#[inline] +pub(super) fn fp_to_g1(input: &[u8; 48]) -> Result<[u8; 96], Error> { + let point = WBMap::map_to_curve(read_fq(input)?) + .expect("the arkworks WB map is defined for every field element") + .clear_cofactor(); + Ok(encode_g1(&point)) +} + +#[inline] +pub(super) fn fp2_to_g2(input: &[u8; 96]) -> Result<[u8; 192], Error> { + let c0 = read_fq(&input[..FP_LEN])?; + let c1 = read_fq(&input[FP_LEN..])?; + let point = WBMap::map_to_curve(Fq2::new(c0, c1)) + .expect("the arkworks WB map is defined for every field element") + .clear_cofactor(); + Ok(encode_g2(&point)) +} + +fn read_fq(input_be: &[u8]) -> Result { + let mut input_le = [0; FP_LEN]; + input_le.copy_from_slice(input_be); + input_le.reverse(); + Fq::deserialize_uncompressed(&input_le[..]).map_err(|_| Error::FieldElementInvalid) +} + +fn encode_fq(fq: &Fq, output: &mut [u8]) { + fq.serialize_uncompressed(&mut output[..]).expect("field element serialization is infallible"); + output.reverse(); +} + +fn encode_g1(point: &G1Affine) -> [u8; 96] { + let mut output = [0; 96]; + let Some((x, y)) = point.xy() else { + return output; + }; + encode_fq(&x, &mut output[..FP_LEN]); + encode_fq(&y, &mut output[FP_LEN..]); + output +} + +fn encode_g2(point: &G2Affine) -> [u8; 192] { + let mut output = [0; 192]; + let Some((x, y)) = point.xy() else { + return output; + }; + encode_fq(&x.c0, &mut output[..FP_LEN]); + encode_fq(&x.c1, &mut output[FP_LEN..2 * FP_LEN]); + encode_fq(&y.c0, &mut output[2 * FP_LEN..3 * FP_LEN]); + encode_fq(&y.c1, &mut output[3 * FP_LEN..]); + output +} diff --git a/crates/accelerators/src/bls12_381/mod.rs b/crates/accelerators/src/bls12_381/mod.rs new file mode 100644 index 000000000..95173f371 --- /dev/null +++ b/crates/accelerators/src/bls12_381/mod.rs @@ -0,0 +1,290 @@ +//! BLS12-381 accelerators (EIP-2537). + +mod codec; +mod map; + +use alloc::vec::Vec; + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +use codec::{ + encode_g1, encode_g2, read_g1, read_g1_no_subgroup_check, read_g2, read_g2_no_subgroup_check, + read_scalar, +}; +use openvm_ecc_guest::{ + weierstrass::{IntrinsicCurve, WeierstrassPoint}, + AffinePoint, +}; +use openvm_pairing::{bls12_381::Bls12_381, PairingCheck}; + +use crate::error::Error; + +pub type zkvm_bls12_381_g1_point = ZkvmBytes<96>; +pub type zkvm_bls12_381_g2_point = ZkvmBytes<192>; +pub type zkvm_bls12_381_scalar = ZkvmBytes<32>; +pub type zkvm_bls12_381_fp = ZkvmBytes<48>; +pub type zkvm_bls12_381_fp2 = ZkvmBytes<96>; + +#[repr(C)] +#[derive(Clone, Copy, Debug)] +pub struct zkvm_bls12_381_g1_msm_pair { + pub point: zkvm_bls12_381_g1_point, + pub scalar: zkvm_bls12_381_scalar, +} + +#[repr(C)] +#[derive(Clone, Copy, Debug)] +pub struct zkvm_bls12_381_g2_msm_pair { + pub point: zkvm_bls12_381_g2_point, + pub scalar: zkvm_bls12_381_scalar, +} + +#[repr(C)] +#[derive(Clone, Copy, Debug)] +pub struct zkvm_bls12_381_pairing_pair { + pub g1: zkvm_bls12_381_g1_point, + pub g2: zkvm_bls12_381_g2_point, +} + +/// BLS12-381 G1 point addition. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_g1_add( + p1: *const zkvm_bls12_381_g1_point, + p2: *const zkvm_bls12_381_g1_point, + result: *mut zkvm_bls12_381_g1_point, +) -> zkvm_status { + if p1.is_null() || p2.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees valid reads. The output is written only after these + // shared borrows are no longer used, so overlapping storage is supported. + let value = unsafe { g1_add(&(*p1).data, &(*p2).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bls12_381_g1_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// BLS12-381 G1 multi-scalar multiplication. +/// +/// # Safety +/// +/// `pairs` must be valid for `num_pairs` reads when non-empty, and `result` +/// must be non-NULL and valid for one write. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_g1_msm( + pairs: *const zkvm_bls12_381_g1_msm_pair, + num_pairs: usize, + result: *mut zkvm_bls12_381_g1_point, +) -> zkvm_status { + if result.is_null() || (pairs.is_null() && num_pairs != 0) { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that non-empty input is valid for `num_pairs` reads. + let pairs = + if num_pairs == 0 { &[] } else { unsafe { core::slice::from_raw_parts(pairs, num_pairs) } }; + match g1_msm(pairs) { + Ok(data) => { + // SAFETY: all input reads are complete; `result` is valid for writes. + unsafe { result.write(zkvm_bls12_381_g1_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// BLS12-381 G2 point addition. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_g2_add( + p1: *const zkvm_bls12_381_g2_point, + p2: *const zkvm_bls12_381_g2_point, + result: *mut zkvm_bls12_381_g2_point, +) -> zkvm_status { + if p1.is_null() || p2.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees valid reads. The output is written only after these + // shared borrows are no longer used, so overlapping storage is supported. + let value = unsafe { g2_add(&(*p1).data, &(*p2).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bls12_381_g2_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// BLS12-381 G2 multi-scalar multiplication. +/// +/// # Safety +/// +/// `pairs` must be valid for `num_pairs` reads when non-empty, and `result` +/// must be non-NULL and valid for one write. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_g2_msm( + pairs: *const zkvm_bls12_381_g2_msm_pair, + num_pairs: usize, + result: *mut zkvm_bls12_381_g2_point, +) -> zkvm_status { + if result.is_null() || (pairs.is_null() && num_pairs != 0) { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that non-empty input is valid for `num_pairs` reads. + let pairs = + if num_pairs == 0 { &[] } else { unsafe { core::slice::from_raw_parts(pairs, num_pairs) } }; + match g2_msm(pairs) { + Ok(data) => { + // SAFETY: all input reads are complete; `result` is valid for writes. + unsafe { result.write(zkvm_bls12_381_g2_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// BLS12-381 pairing check. +/// +/// # Safety +/// +/// `pairs` must be valid for `num_pairs` reads when non-empty, and `verified` +/// must be non-NULL and valid for one write. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_pairing( + pairs: *const zkvm_bls12_381_pairing_pair, + num_pairs: usize, + verified: *mut bool, +) -> zkvm_status { + if verified.is_null() || (pairs.is_null() && num_pairs != 0) { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that non-empty input is valid for `num_pairs` reads. + let pairs = + if num_pairs == 0 { &[] } else { unsafe { core::slice::from_raw_parts(pairs, num_pairs) } }; + match pairing(pairs) { + Ok(value) => { + // SAFETY: all input reads are complete; `verified` is valid for writes. + unsafe { verified.write(value) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// Map a BLS12-381 base-field element to G1. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_map_fp_to_g1( + field_element: *const zkvm_bls12_381_fp, + result: *mut zkvm_bls12_381_g1_point, +) -> zkvm_status { + if field_element.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees a valid read. The output is written only after this + // shared borrow is no longer used, so overlapping storage is supported. + let value = unsafe { map::fp_to_g1(&(*field_element).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bls12_381_g1_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// Map a BLS12-381 quadratic-extension-field element to G2. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bls12_map_fp2_to_g2( + field_element: *const zkvm_bls12_381_fp2, + result: *mut zkvm_bls12_381_g2_point, +) -> zkvm_status { + if field_element.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees a valid read. The output is written only after this + // shared borrow is no longer used, so overlapping storage is supported. + let value = unsafe { map::fp2_to_g2(&(*field_element).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bls12_381_g2_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +#[inline] +fn g1_add(p1: &[u8; 96], p2: &[u8; 96]) -> Result<[u8; 96], Error> { + Ok(encode_g1(&(read_g1_no_subgroup_check(p1)? + read_g1_no_subgroup_check(p2)?))) +} + +fn g1_msm(pairs: &[zkvm_bls12_381_g1_msm_pair]) -> Result<[u8; 96], Error> { + let mut points = Vec::with_capacity(pairs.len()); + let mut scalars = Vec::with_capacity(pairs.len()); + for pair in pairs { + points.push(read_g1(&pair.point.data)?); + scalars.push(read_scalar(&pair.scalar.data)); + } + if points.is_empty() { + Ok([0; 96]) + } else { + Ok(encode_g1(&Bls12_381::msm(&scalars, &points))) + } +} + +#[inline] +fn g2_add(p1: &[u8; 192], p2: &[u8; 192]) -> Result<[u8; 192], Error> { + Ok(encode_g2(&(read_g2_no_subgroup_check(p1)? + read_g2_no_subgroup_check(p2)?))) +} + +fn g2_msm(pairs: &[zkvm_bls12_381_g2_msm_pair]) -> Result<[u8; 192], Error> { + let mut points = Vec::with_capacity(pairs.len()); + let mut scalars = Vec::with_capacity(pairs.len()); + for pair in pairs { + points.push(read_g2(&pair.point.data)?); + scalars.push(read_scalar(&pair.scalar.data)); + } + if points.is_empty() { + Ok([0; 192]) + } else { + Ok(encode_g2(&openvm_ecc_guest::msm(&scalars, &points))) + } +} + +fn pairing(pairs: &[zkvm_bls12_381_pairing_pair]) -> Result { + let mut g1_points = Vec::with_capacity(pairs.len()); + let mut g2_points = Vec::with_capacity(pairs.len()); + for pair in pairs { + let (g1_x, g1_y) = read_g1(&pair.g1.data)?.into_coords(); + let (g2_x, g2_y) = read_g2(&pair.g2.data)?.into_coords(); + g1_points.push(AffinePoint::new(g1_x, g1_y)); + g2_points.push(AffinePoint::new(g2_x, g2_y)); + } + if g1_points.is_empty() { + Ok(true) + } else { + Ok(Bls12_381::pairing_check(&g1_points, &g2_points).is_ok()) + } +} diff --git a/crates/accelerators/src/bn254/codec.rs b/crates/accelerators/src/bn254/codec.rs new file mode 100644 index 000000000..b766e5712 --- /dev/null +++ b/crates/accelerators/src/bn254/codec.rs @@ -0,0 +1,54 @@ +use openvm_curve_utils::SubgroupCheck; +use openvm_ecc_guest::{algebra::IntMod, weierstrass::WeierstrassPoint}; +use openvm_pairing::bn254 as bn; + +use crate::error::Error; + +const FQ_LEN: usize = 32; + +#[inline] +fn read_fq(input: &[u8]) -> Result { + bn::Fp::from_be_bytes(input).ok_or(Error::FieldElementInvalid) +} + +#[inline] +fn read_fq2(input: &[u8; 64]) -> Result { + let imag = read_fq(&input[..FQ_LEN])?; + let real = read_fq(&input[FQ_LEN..])?; + Ok(bn::Fp2::new(real, imag)) +} + +#[inline] +pub(super) fn read_g1(input: &[u8; 64]) -> Result { + let x = read_fq(&input[..FQ_LEN])?; + let y = read_fq(&input[FQ_LEN..])?; + // SAFETY: the coordinates are canonical; `from_xy` checks the curve equation. + let point = unsafe { bn::G1Affine::from_xy(x, y) }.ok_or(Error::PointNotOnCurve)?; + point.is_in_correct_subgroup().then_some(point).ok_or(Error::PointNotInSubgroup) +} + +#[inline] +pub(super) fn read_g2(input: &[u8; 128]) -> Result { + let x = read_fq2(input[..64].try_into().unwrap())?; + let y = read_fq2(input[64..].try_into().unwrap())?; + // SAFETY: the coordinates are canonical; `from_xy` checks the curve equation. + let point = unsafe { bn::G2Affine::from_xy(x, y) }.ok_or(Error::PointNotOnCurve)?; + point.is_in_correct_subgroup().then_some(point).ok_or(Error::PointNotInSubgroup) +} + +#[inline] +pub(super) fn read_scalar(input: &[u8; 32]) -> bn::Scalar { + bn::Scalar::from_be_bytes_unchecked(input) +} + +#[inline] +pub(super) fn encode_g1(point: bn::G1Affine) -> [u8; 64] { + let mut output = [0; 64]; + let x: &[u8] = point.x().as_le_bytes(); + let y: &[u8] = point.y().as_le_bytes(); + for index in 0..FQ_LEN { + output[index] = x[FQ_LEN - 1 - index]; + output[index + FQ_LEN] = y[FQ_LEN - 1 - index]; + } + output +} diff --git a/crates/accelerators/src/bn254/mod.rs b/crates/accelerators/src/bn254/mod.rs new file mode 100644 index 000000000..e8549f2ce --- /dev/null +++ b/crates/accelerators/src/bn254/mod.rs @@ -0,0 +1,136 @@ +//! BN254 accelerators (EIP-196 and EIP-197). + +mod codec; + +use alloc::vec::Vec; + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +use codec::{encode_g1, read_g1, read_g2, read_scalar}; +use openvm_ecc_guest::{ + weierstrass::{IntrinsicCurve, WeierstrassPoint}, + AffinePoint, +}; +use openvm_pairing::{bn254::Bn254, PairingCheck}; + +use crate::error::Error; + +pub type zkvm_bn254_g1_point = ZkvmBytes<64>; +pub type zkvm_bn254_g2_point = ZkvmBytes<128>; +pub type zkvm_bn254_scalar = ZkvmBytes<32>; + +#[repr(C)] +#[derive(Clone, Copy, Debug)] +pub struct zkvm_bn254_pairing_pair { + pub g1: zkvm_bn254_g1_point, + pub g2: zkvm_bn254_g2_point, +} + +/// Add two BN254 G1 points. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bn254_g1_add( + p1: *const zkvm_bn254_g1_point, + p2: *const zkvm_bn254_g1_point, + result: *mut zkvm_bn254_g1_point, +) -> zkvm_status { + if p1.is_null() || p2.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees valid reads. The output is written only after these + // shared borrows are no longer used, so overlapping storage is supported. + let value = unsafe { g1_add(&(*p1).data, &(*p2).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bn254_g1_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// Multiply a BN254 G1 point by a scalar. +/// +/// # Safety +/// +/// Each pointer must be non-NULL and valid for one value of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bn254_g1_mul( + point: *const zkvm_bn254_g1_point, + scalar: *const zkvm_bn254_scalar, + result: *mut zkvm_bn254_g1_point, +) -> zkvm_status { + if point.is_null() || scalar.is_null() || result.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees valid reads. The output is written only after these + // shared borrows are no longer used, so overlapping storage is supported. + let value = unsafe { g1_mul(&(*point).data, &(*scalar).data) }; + match value { + Ok(data) => { + // SAFETY: `result` is non-NULL and valid for writes. + unsafe { result.write(zkvm_bn254_g1_point { data }) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +/// Check a BN254 pairing equation. +/// +/// # Safety +/// +/// `pairs` must be valid for `num_pairs` reads when non-empty, and `verified` +/// must be non-NULL and valid for one write. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_bn254_pairing( + pairs: *const zkvm_bn254_pairing_pair, + num_pairs: usize, + verified: *mut bool, +) -> zkvm_status { + if verified.is_null() || (pairs.is_null() && num_pairs != 0) { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that non-empty input is valid for `num_pairs` reads. + let pairs = + if num_pairs == 0 { &[] } else { unsafe { core::slice::from_raw_parts(pairs, num_pairs) } }; + let value = pairing(pairs.iter().map(|pair| (&pair.g1.data, &pair.g2.data))); + match value { + Ok(value) => { + // SAFETY: `verified` is non-NULL and all input reads are complete. + unsafe { verified.write(value) }; + ZKVM_EOK + } + Err(_) => ZKVM_EFAIL, + } +} + +fn g1_add(p1: &[u8; 64], p2: &[u8; 64]) -> Result<[u8; 64], Error> { + Ok(encode_g1(read_g1(p1)? + read_g1(p2)?)) +} + +fn g1_mul(point: &[u8; 64], scalar: &[u8; 32]) -> Result<[u8; 64], Error> { + Ok(encode_g1(Bn254::msm(&[read_scalar(scalar)], &[read_g1(point)?]))) +} + +fn pairing<'a>( + pairs: impl IntoIterator, +) -> Result { + let pairs = pairs.into_iter(); + let mut g1_points = Vec::with_capacity(pairs.size_hint().0); + let mut g2_points = Vec::with_capacity(pairs.size_hint().0); + for (g1, g2) in pairs { + let (g1_x, g1_y) = read_g1(g1)?.into_coords(); + let (g2_x, g2_y) = read_g2(g2)?.into_coords(); + g1_points.push(AffinePoint::new(g1_x, g1_y)); + g2_points.push(AffinePoint::new(g2_x, g2_y)); + } + if g1_points.is_empty() { + Ok(true) + } else { + Ok(Bn254::pairing_check(&g1_points, &g2_points).is_ok()) + } +} diff --git a/crates/accelerators/src/error.rs b/crates/accelerators/src/error.rs new file mode 100644 index 000000000..3928c2744 --- /dev/null +++ b/crates/accelerators/src/error.rs @@ -0,0 +1,8 @@ +//! Shared curve-decoding errors. + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) enum Error { + FieldElementInvalid, + PointNotOnCurve, + PointNotInSubgroup, +} diff --git a/crates/accelerators/src/keccak256.rs b/crates/accelerators/src/keccak256.rs new file mode 100644 index 000000000..bc111693c --- /dev/null +++ b/crates/accelerators/src/keccak256.rs @@ -0,0 +1,31 @@ +//! Keccak-256 accelerator. + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; + +pub type zkvm_keccak256_hash = ZkvmBytes<32>; + +/// Compute the Keccak-256 hash of `data[..len]` into `output`. +/// +/// A NULL `data` pointer is accepted only when `len == 0`. +/// +/// # Safety +/// +/// - `data`, if non-NULL, must be valid for reads of `len` bytes. +/// - `output`, if non-NULL, must be valid for writes of one [`zkvm_keccak256_hash`]. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_keccak256( + data: *const u8, + len: usize, + output: *mut zkvm_keccak256_hash, +) -> zkvm_status { + if output.is_null() || (data.is_null() && len != 0) { + return ZKVM_EFAIL; + } + // SAFETY: non-NULL checked above; validity is guaranteed by the caller. + let data = if len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(data, len) } }; + let value = zkvm_keccak256_hash { data: openvm_keccak256::keccak256(data) }; + // SAFETY: `output` is non-NULL and valid for writes. All input reads are complete, so + // overlapping input/output storage is supported. + unsafe { output.write(value) }; + ZKVM_EOK +} diff --git a/crates/accelerators/src/kzg.rs b/crates/accelerators/src/kzg.rs new file mode 100644 index 000000000..83982e247 --- /dev/null +++ b/crates/accelerators/src/kzg.rs @@ -0,0 +1,48 @@ +//! KZG point-evaluation accelerator (EIP-4844). + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +use openvm_kzg::{Bytes32, Bytes48, KzgProof}; + +pub type zkvm_kzg_commitment = ZkvmBytes<48>; +pub type zkvm_kzg_proof = ZkvmBytes<48>; +pub type zkvm_kzg_field_element = ZkvmBytes<32>; + +/// Verify a KZG point-evaluation proof. +/// +/// # Safety +/// +/// Every pointer must be non-NULL and valid for one read or write of its pointee type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_kzg_point_eval( + commitment: *const zkvm_kzg_commitment, + z: *const zkvm_kzg_field_element, + y: *const zkvm_kzg_field_element, + proof: *const zkvm_kzg_proof, + verified: *mut bool, +) -> zkvm_status { + if commitment.is_null() || z.is_null() || y.is_null() || proof.is_null() || verified.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees valid reads. `verified` is written only after these + // shared borrows are no longer used, so overlapping storage is supported. + let value = unsafe { verify(&(*commitment).data, &(*z).data, &(*y).data, &(*proof).data) } + .unwrap_or(false); + // SAFETY: `verified` is non-NULL and valid for writes. + unsafe { verified.write(value) }; + ZKVM_EOK +} + +fn verify(commitment: &[u8; 48], z: &[u8; 32], y: &[u8; 32], proof: &[u8; 48]) -> Result { + let commitment = Bytes48::from_slice(commitment).map_err(|_| ())?; + let z = Bytes32::from_slice(z).map_err(|_| ())?; + let y = Bytes32::from_slice(y).map_err(|_| ())?; + let proof = Bytes48::from_slice(proof).map_err(|_| ())?; + KzgProof::verify_kzg_proof( + &commitment, + &z, + &y, + &proof, + openvm_kzg::EnvKzgSettings::default().get(), + ) + .map_err(|_| ()) +} diff --git a/crates/accelerators/src/lib.rs b/crates/accelerators/src/lib.rs new file mode 100644 index 000000000..1ae378709 --- /dev/null +++ b/crates/accelerators/src/lib.rs @@ -0,0 +1,44 @@ +//! OpenVM implementation of the standard zkVM accelerator C interface. + +#![cfg_attr(not(feature = "std"), no_std)] +#![allow(non_camel_case_types)] + +extern crate alloc; + +mod blake2f; +mod bls12_381; +mod bn254; +mod error; +mod keccak256; +mod kzg; +mod modexp; +mod ripemd160; +mod secp256k1; +mod secp256r1; +mod sha256; +mod types; + +pub use blake2f::{zkvm_blake2f, zkvm_blake2f_message, zkvm_blake2f_offset, zkvm_blake2f_state}; +pub use bls12_381::{ + zkvm_bls12_381_fp, zkvm_bls12_381_fp2, zkvm_bls12_381_g1_msm_pair, zkvm_bls12_381_g1_point, + zkvm_bls12_381_g2_msm_pair, zkvm_bls12_381_g2_point, zkvm_bls12_381_pairing_pair, + zkvm_bls12_381_scalar, zkvm_bls12_g1_add, zkvm_bls12_g1_msm, zkvm_bls12_g2_add, + zkvm_bls12_g2_msm, zkvm_bls12_map_fp2_to_g2, zkvm_bls12_map_fp_to_g1, zkvm_bls12_pairing, +}; +pub use bn254::{ + zkvm_bn254_g1_add, zkvm_bn254_g1_mul, zkvm_bn254_g1_point, zkvm_bn254_g2_point, + zkvm_bn254_pairing, zkvm_bn254_pairing_pair, zkvm_bn254_scalar, +}; +pub use keccak256::{zkvm_keccak256, zkvm_keccak256_hash}; +pub use kzg::{zkvm_kzg_commitment, zkvm_kzg_field_element, zkvm_kzg_point_eval, zkvm_kzg_proof}; +pub use modexp::zkvm_modexp; +pub use ripemd160::{zkvm_ripemd160, zkvm_ripemd160_hash}; +pub use secp256k1::{ + zkvm_secp256k1_ecrecover, zkvm_secp256k1_hash, zkvm_secp256k1_pubkey, zkvm_secp256k1_signature, + zkvm_secp256k1_verify, +}; +pub use secp256r1::{ + zkvm_secp256r1_hash, zkvm_secp256r1_pubkey, zkvm_secp256r1_signature, zkvm_secp256r1_verify, +}; +pub use sha256::{zkvm_sha256, zkvm_sha256_hash}; +pub use types::{zkvm_status, ZKVM_EFAIL, ZKVM_EOK}; diff --git a/crates/accelerators/src/modexp.rs b/crates/accelerators/src/modexp.rs new file mode 100644 index 000000000..8319314e4 --- /dev/null +++ b/crates/accelerators/src/modexp.rs @@ -0,0 +1,139 @@ +//! Modular exponentiation accelerator. + +use alloc::{vec, vec::Vec}; + +use crate::types::{zkvm_status, ZKVM_EFAIL, ZKVM_EOK}; +use openvm_ecc_guest::algebra::{ExpBytes, IntMod, Reduce}; +use openvm_pairing::bn254 as bn; + +const BN_SCALAR_LEN: usize = 32; + +/// Compute `base^exp mod modulus`. +/// +/// # Safety +/// +/// Each non-empty input must be valid for its corresponding length, and `output` +/// must be valid for `mod_len` writes when `mod_len != 0`. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_modexp( + base: *const u8, + base_len: usize, + exp: *const u8, + exp_len: usize, + modulus: *const u8, + mod_len: usize, + output: *mut u8, +) -> zkvm_status { + if (base.is_null() && base_len != 0) || + (exp.is_null() && exp_len != 0) || + (modulus.is_null() && mod_len != 0) || + (output.is_null() && mod_len != 0) + { + return ZKVM_EFAIL; + } + + // SAFETY: non-NULL pointers and lengths were checked above; the caller guarantees validity. + let base = + if base_len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(base, base_len) } }; + // SAFETY: see above. + let exp = if exp_len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(exp, exp_len) } }; + // SAFETY: see above. + let modulus = + if mod_len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(modulus, mod_len) } }; + let value = modexp(base, exp, modulus); + if mod_len != 0 { + // SAFETY: all input reads are complete and `output` is valid for `mod_len` writes. + unsafe { core::ptr::copy_nonoverlapping(value.as_ptr(), output, mod_len) }; + } + ZKVM_EOK +} + +fn modexp(base: &[u8], exp: &[u8], modulus: &[u8]) -> Vec { + let mut result = if is_bn254_fr(modulus) { + accelerated_modexp_bn254_fr(base, exp) + } else { + aurora_engine_modexp::modexp(base, exp, modulus) + }; + + let output_len = modulus.len(); + match result.len().cmp(&output_len) { + core::cmp::Ordering::Greater => { + let start = result.len() - output_len; + result.copy_within(start.., 0); + result.truncate(output_len); + } + core::cmp::Ordering::Less => { + let value_len = result.len(); + let padding = output_len - value_len; + result.resize(output_len, 0); + result.copy_within(0..value_len, padding); + result[..padding].fill(0); + } + core::cmp::Ordering::Equal => {} + } + result +} + +fn is_bn254_fr(modulus: &[u8]) -> bool { + let stripped = match modulus.iter().position(|&byte| byte != 0) { + Some(index) => &modulus[index..], + None => return false, + }; + stripped.len() == BN_SCALAR_LEN && stripped.iter().rev().eq(bn::Scalar::MODULUS.as_ref().iter()) +} + +fn accelerated_modexp_bn254_fr(base: &[u8], exp: &[u8]) -> Vec { + let padded_len = base.len().next_multiple_of(BN_SCALAR_LEN).max(BN_SCALAR_LEN); + let mut padded = vec![0u8; padded_len]; + padded[padded_len - base.len()..].copy_from_slice(base); + let base_fr = bn::Scalar::reduce_be_bytes(&padded); + base_fr.exp_bytes(true, exp).to_be_bytes().as_ref().to_vec() +} + +#[cfg(test)] +mod tests { + use super::*; + + const BN254_FR: [u8; 32] = [ + 0x30, 0x64, 0x4e, 0x72, 0xe1, 0x31, 0xa0, 0x29, 0xb8, 0x50, 0x45, 0xb6, 0x81, 0x81, 0x58, + 0x5d, 0x28, 0x33, 0xe8, 0x48, 0x79, 0xb9, 0x70, 0x91, 0x43, 0xe1, 0xf5, 0x93, 0xf0, 0x00, + 0x00, 0x01, + ]; + + fn check(base: &[u8], exp: &[u8]) { + let expected = aurora_engine_modexp::modexp(base, exp, &BN254_FR); + let actual = accelerated_modexp_bn254_fr(base, exp); + let mut expected_padded = vec![0u8; BN_SCALAR_LEN]; + let offset = BN_SCALAR_LEN - expected.len(); + expected_padded[offset..].copy_from_slice(&expected); + assert_eq!(actual, expected_padded, "base={base:?}, exp={exp:?}"); + } + + #[test] + fn recognizes_bn254_fr() { + assert!(is_bn254_fr(&BN254_FR)); + let mut padded = vec![0u8; 10]; + padded.extend_from_slice(&BN254_FR); + assert!(is_bn254_fr(&padded)); + assert!(!is_bn254_fr(&[0u8; 32])); + let mut wrong = BN254_FR; + *wrong.last_mut().unwrap() ^= 1; + assert!(!is_bn254_fr(&wrong)); + } + + #[test] + fn accelerated_bn254_fr_matches_software() { + for (base, exp) in [ + (&[3][..], &[5][..]), + (&[0], &[5]), + (&[3], &[0]), + (&[][..], &[][..]), + (&[0xff; 32], &[1]), + (&[0xab; 64], &[3]), + (&[0x42; 100], &[2]), + (&[2], &[0xff; 32]), + ] { + check(base, exp); + } + } +} diff --git a/crates/accelerators/src/ripemd160.rs b/crates/accelerators/src/ripemd160.rs new file mode 100644 index 000000000..339f7ded2 --- /dev/null +++ b/crates/accelerators/src/ripemd160.rs @@ -0,0 +1,42 @@ +//! RIPEMD-160 accelerator. + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; + +pub type zkvm_ripemd160_hash = ZkvmBytes<32>; + +/// Compute the RIPEMD-160 hash of `data[..len]` into `output`. +/// +/// A NULL `data` pointer is accepted only when `len == 0`. +/// +/// # Safety +/// +/// - `data`, if non-NULL, must be valid for reads of `len` bytes. +/// - `output`, if non-NULL, must be valid for writes of one [`zkvm_ripemd160_hash`]. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_ripemd160( + data: *const u8, + len: usize, + output: *mut zkvm_ripemd160_hash, +) -> zkvm_status { + if output.is_null() || (data.is_null() && len != 0) { + return ZKVM_EFAIL; + } + // SAFETY: non-NULL checked above; validity is guaranteed by the caller. + let data = if len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(data, len) } }; + let value = zkvm_ripemd160_hash { data: ripemd160(data) }; + // SAFETY: `output` is non-NULL and valid for writes. All input reads are complete, so + // overlapping input/output storage is supported. + unsafe { output.write(value) }; + ZKVM_EOK +} + +#[inline] +fn ripemd160(data: &[u8]) -> [u8; 32] { + use ripemd::Digest; + let mut hasher = ripemd::Ripemd160::new(); + hasher.update(data); + + let mut output = [0; 32]; + hasher.finalize_into((&mut output[12..]).into()); + output +} diff --git a/crates/accelerators/src/secp256k1.rs b/crates/accelerators/src/secp256k1.rs new file mode 100644 index 000000000..bed812a20 --- /dev/null +++ b/crates/accelerators/src/secp256k1.rs @@ -0,0 +1,95 @@ +//! secp256k1 ECDSA accelerator. + +#[cfg(any(target_os = "none", target_os = "openvm"))] +use openvm_k256 as k256; + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +use k256::ecdsa::{signature::hazmat::PrehashVerifier, RecoveryId, Signature, VerifyingKey}; + +pub type zkvm_secp256k1_hash = ZkvmBytes<32>; +pub type zkvm_secp256k1_signature = ZkvmBytes<64>; +pub type zkvm_secp256k1_pubkey = ZkvmBytes<64>; + +/// Recover an uncompressed public key from a signature and recovery ID. +/// +/// # Safety +/// +/// Every non-NULL pointer must be valid for a read or write of its pointed-to type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_secp256k1_ecrecover( + msg: *const zkvm_secp256k1_hash, + sig: *const zkvm_secp256k1_signature, + recid: u8, + output: *mut zkvm_secp256k1_pubkey, +) -> zkvm_status { + if msg.is_null() || sig.is_null() || output.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that the non-NULL inputs are valid for reads. Copying both + // inputs before writing supports overlap with `output`. + let (msg, sig) = unsafe { (msg.read(), sig.read()) }; + let Some(data) = recover(&msg.data, &sig.data, recid) else { + return ZKVM_EFAIL; + }; + // SAFETY: `output` is non-NULL and valid for writes. + unsafe { output.write(zkvm_secp256k1_pubkey { data }) }; + ZKVM_EOK +} + +/// Verify a signature, writing `false` for malformed or invalid cryptographic inputs. +/// +/// # Safety +/// +/// Every non-NULL pointer must be valid for a read or write of its pointed-to type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_secp256k1_verify( + msg: *const zkvm_secp256k1_hash, + sig: *const zkvm_secp256k1_signature, + pubkey: *const zkvm_secp256k1_pubkey, + verified: *mut bool, +) -> zkvm_status { + if msg.is_null() || sig.is_null() || pubkey.is_null() || verified.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that the non-NULL inputs are valid for reads. Copying every + // input before writing supports overlap with `verified`. + let (msg, sig, pubkey) = unsafe { (msg.read(), sig.read(), pubkey.read()) }; + let value = verify(&msg.data, &sig.data, &pubkey.data); + // SAFETY: `verified` is non-NULL and valid for writes. + unsafe { verified.write(value) }; + ZKVM_EOK +} + +fn recover(msg: &[u8; 32], sig: &[u8; 64], mut recid: u8) -> Option<[u8; 64]> { + let mut signature = Signature::from_slice(sig).ok()?; + // k256 recovery requires low-s; changing s to -s also flips the recovery-ID parity. + if let Some(normalized) = signature.normalize_s() { + signature = normalized; + recid ^= 1; + } + let recovery_id = RecoveryId::from_byte(recid)?; + + #[cfg(any(target_os = "none", target_os = "openvm"))] + let key = VerifyingKey::recover_from_prehash_noverify(msg, &signature.to_bytes(), recovery_id) + .ok()?; + #[cfg(not(any(target_os = "none", target_os = "openvm")))] + let key = VerifyingKey::recover_from_prehash(msg, &signature, recovery_id).ok()?; + + key.to_encoded_point(false).as_bytes().get(1..65)?.try_into().ok() +} + +fn verify(msg: &[u8; 32], sig: &[u8; 64], pubkey: &[u8; 64]) -> bool { + let mut sec1 = [0u8; 65]; + sec1[0] = 0x04; + sec1[1..].copy_from_slice(pubkey); + let Ok(key) = VerifyingKey::from_sec1_bytes(&sec1) else { + return false; + }; + let Ok(mut signature) = Signature::from_slice(sig) else { + return false; + }; + if let Some(normalized) = signature.normalize_s() { + signature = normalized; + } + key.verify_prehash(msg, &signature).is_ok() +} diff --git a/crates/accelerators/src/secp256r1.rs b/crates/accelerators/src/secp256r1.rs new file mode 100644 index 000000000..d8ae7608f --- /dev/null +++ b/crates/accelerators/src/secp256r1.rs @@ -0,0 +1,46 @@ +//! secp256r1 ECDSA accelerator. + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +use openvm_p256::{ + ecdsa::{signature::hazmat::PrehashVerifier, Signature, VerifyingKey}, + EncodedPoint, +}; + +pub type zkvm_secp256r1_hash = ZkvmBytes<32>; +pub type zkvm_secp256r1_signature = ZkvmBytes<64>; +pub type zkvm_secp256r1_pubkey = ZkvmBytes<64>; + +/// Verify a signature, writing `false` for malformed or invalid cryptographic inputs. +/// +/// # Safety +/// +/// Every non-NULL pointer must be valid for a read or write of its pointed-to type. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_secp256r1_verify( + msg: *const zkvm_secp256r1_hash, + sig: *const zkvm_secp256r1_signature, + pubkey: *const zkvm_secp256r1_pubkey, + verified: *mut bool, +) -> zkvm_status { + if msg.is_null() || sig.is_null() || pubkey.is_null() || verified.is_null() { + return ZKVM_EFAIL; + } + // SAFETY: the caller guarantees that the non-NULL inputs are valid for reads. Copying every + // input before writing supports overlap with `verified`. + let (msg, sig, pubkey) = unsafe { (msg.read(), sig.read(), pubkey.read()) }; + let value = verify(&msg.data, &sig.data, &pubkey.data); + // SAFETY: `verified` is non-NULL and valid for writes. + unsafe { verified.write(value) }; + ZKVM_EOK +} + +fn verify(msg: &[u8; 32], sig: &[u8; 64], pubkey: &[u8; 64]) -> bool { + let encoded_point = EncodedPoint::from_untagged_bytes(&(*pubkey).into()); + let Ok(key) = VerifyingKey::from_encoded_point(&encoded_point) else { + return false; + }; + let Ok(signature) = Signature::from_slice(sig) else { + return false; + }; + key.verify_prehash(msg, &signature).is_ok() +} diff --git a/crates/accelerators/src/sha256.rs b/crates/accelerators/src/sha256.rs new file mode 100644 index 000000000..4bb824bf2 --- /dev/null +++ b/crates/accelerators/src/sha256.rs @@ -0,0 +1,33 @@ +//! SHA-256 accelerator. + +use crate::types::{zkvm_status, ZkvmBytes, ZKVM_EFAIL, ZKVM_EOK}; +#[cfg(not(openvm_intrinsics))] +use openvm_sha2::Digest; + +pub type zkvm_sha256_hash = ZkvmBytes<32>; + +/// Compute the SHA-256 hash of `data[..len]` into `output`. +/// +/// A NULL `data` pointer is accepted only when `len == 0`. +/// +/// # Safety +/// +/// - `data`, if non-NULL, must be valid for reads of `len` bytes. +/// - `output`, if non-NULL, must be valid for writes of one [`zkvm_sha256_hash`]. +#[unsafe(no_mangle)] +pub unsafe extern "C" fn zkvm_sha256( + data: *const u8, + len: usize, + output: *mut zkvm_sha256_hash, +) -> zkvm_status { + if output.is_null() || (data.is_null() && len != 0) { + return ZKVM_EFAIL; + } + // SAFETY: non-NULL checked above; validity is guaranteed by the caller. + let data = if len == 0 { &[] } else { unsafe { core::slice::from_raw_parts(data, len) } }; + let value = zkvm_sha256_hash { data: openvm_sha2::Sha256::digest(data).into() }; + // SAFETY: `output` is non-NULL and valid for writes. All input reads are complete, so + // overlapping input/output storage is supported. + unsafe { output.write(value) }; + ZKVM_EOK +} diff --git a/crates/accelerators/src/types.rs b/crates/accelerators/src/types.rs new file mode 100644 index 000000000..47cd563fc --- /dev/null +++ b/crates/accelerators/src/types.rs @@ -0,0 +1,12 @@ +//! Types for the standard zkVM accelerator C interface. + +pub type zkvm_status = core::ffi::c_int; + +pub const ZKVM_EOK: zkvm_status = 0; +pub const ZKVM_EFAIL: zkvm_status = -1; + +#[repr(C, align(8))] +#[derive(Clone, Copy, Debug)] +pub struct ZkvmBytes { + pub data: [u8; N], +} diff --git a/crates/accelerators/tests/blake2f.rs b/crates/accelerators/tests/blake2f.rs new file mode 100644 index 000000000..aeb287b3c --- /dev/null +++ b/crates/accelerators/tests/blake2f.rs @@ -0,0 +1,107 @@ +//! BLAKE2f conformance using the official EIP-152 test vectors 4-7. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_blake2f, zkvm_blake2f_message, zkvm_blake2f_offset, zkvm_blake2f_state, ZKVM_EFAIL, + ZKVM_EOK, +}; + +/// EIP-152 vectors 4-7 share the same h, m and t inputs. +const H: [u8; 64] = hex!( + "48c9bdf267e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5" + "d182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b" +); +const T: [u8; 16] = hex!("03000000000000000000000000000000"); + +fn m() -> zkvm_blake2f_message { + let mut m = zkvm_blake2f_message { data: [0; 128] }; + m.data[..3].copy_from_slice(b"abc"); + m +} + +fn check(rounds: u32, f: u8, expected: [u8; 64]) { + let mut h = zkvm_blake2f_state { data: H }; + let m = m(); + let t = zkvm_blake2f_offset { data: T }; + + let status = unsafe { zkvm_blake2f(rounds, &mut h, &m, &t, f) }; + assert_eq!(status, ZKVM_EOK, "rounds={rounds}, f={f}"); + assert_eq!(h.data, expected, "rounds={rounds}, f={f}"); +} + +#[test] +fn blake2f_eip152_vector_4_zero_rounds() { + check( + 0, + 1, + hex!( + "08c9bcf367e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5" + "d282e6ad7f520e511f6c3e2b8c68059b9442be0454267ce079217e1319cde05b" + ), + ); +} + +#[test] +fn blake2f_eip152_vector_5_twelve_rounds() { + check( + 12, + 1, + hex!( + "ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1" + "7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923" + ), + ); +} + +#[test] +fn blake2f_eip152_vector_6_no_final_flag() { + check( + 12, + 0, + hex!( + "75ab69d3190a562c51aef8d88f1c2775876944407270c42c9844252c26d28752" + "98743e7f6d5ea2f2d3e8d226039cd31b4e426ac4f2d3d666a610c2116fde4735" + ), + ); +} + +#[test] +fn blake2f_eip152_vector_7_one_round() { + check( + 1, + 1, + hex!( + "b63a380cb2897d521994a85234ee2c181b5f844d2c624c002677e9703449d2fb" + "a551b3a8333bcdf5f2f7e08993d53923de3d64fcc68c034e717b9293fed7a421" + ), + ); +} + +#[test] +fn zkvm_blake2f_invalid_final_flag_preserves_state() { + let mut h = zkvm_blake2f_state { data: H }; + let m = m(); + let t = zkvm_blake2f_offset { data: T }; + + let status = unsafe { zkvm_blake2f(12, &mut h, &m, &t, 2) }; + assert_eq!(status, ZKVM_EFAIL); + assert_eq!(h.data, H); +} + +#[test] +fn zkvm_blake2f_null_pointers() { + let mut h = zkvm_blake2f_state { data: H }; + let m = m(); + let t = zkvm_blake2f_offset { data: T }; + + let status = unsafe { zkvm_blake2f(12, core::ptr::null_mut(), &m, &t, 1) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_blake2f(12, &mut h, core::ptr::null(), &t, 1) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_blake2f(12, &mut h, &m, core::ptr::null(), 1) }; + assert_eq!(status, ZKVM_EFAIL); + // The state must be untouched when a pointer is NULL. + assert_eq!(h.data, H); +} diff --git a/crates/accelerators/tests/bls12_381.rs b/crates/accelerators/tests/bls12_381.rs new file mode 100644 index 000000000..906a90c5a --- /dev/null +++ b/crates/accelerators/tests/bls12_381.rs @@ -0,0 +1,334 @@ +//! BLS12-381 add/MSM/pairing/map conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_bls12_381_fp, zkvm_bls12_381_fp2, zkvm_bls12_381_g1_msm_pair, zkvm_bls12_381_g1_point, + zkvm_bls12_381_g2_msm_pair, zkvm_bls12_381_g2_point, zkvm_bls12_381_pairing_pair, + zkvm_bls12_381_scalar, zkvm_bls12_g1_add, zkvm_bls12_g1_msm, zkvm_bls12_g2_add, + zkvm_bls12_g2_msm, zkvm_bls12_map_fp2_to_g2, zkvm_bls12_map_fp_to_g1, zkvm_bls12_pairing, + ZKVM_EFAIL, ZKVM_EOK, +}; + +fn scalar(value: u8) -> zkvm_bls12_381_scalar { + let mut scalar = zkvm_bls12_381_scalar { data: [0; 32] }; + scalar.data[31] = value; + scalar +} + +/// BLS12-381 G1 generator (`x || y`). +const BLS_G1_GEN: zkvm_bls12_381_g1_point = zkvm_bls12_381_g1_point { + data: hex!( + "17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb" + "08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1" + ), +}; + +/// Doubled BLS12-381 G1 generator, stripped from the EIP-2537 test-vector padding. +const BLS_G1_2GEN: zkvm_bls12_381_g1_point = zkvm_bls12_381_g1_point { + data: hex!( + "0572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e" + "166a9d8cabc673a322fda673779d8e3822ba3ecb8670e461f73bb9021d5fd76a4c56d9d4cd16bd1bba86881979749d28" + ), +}; + +/// BLS12-381 G2 generator in EIP-2537 order (`x_c0 || x_c1 || y_c0 || y_c1`). +const BLS_G2_GEN: zkvm_bls12_381_g2_point = zkvm_bls12_381_g2_point { + data: hex!( + "024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" + "13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e" + "0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801" + "0606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be" + ), +}; + +/// Doubled BLS12-381 G2 generator, stripped from the EIP-2537 test-vector padding. +const BLS_G2_2GEN: zkvm_bls12_381_g2_point = zkvm_bls12_381_g2_point { + data: hex!( + "1638533957d540a9d2370f17cc7ed5863bc0b995b8825e0ee1ea1e1e4d00dbae81f14b0bf3611b78c952aacab827a053" + "0a4edef9c1ed7f729f520e47730a124fd70662a904ba1074728114d1031e1572c6c886f6b57ec72a6178288c47c33577" + "0468fb440d82b0630aeb8dca2b5256789a66da69bf91009cbfe6bd221e47aa8ae88dece9764bf3bd999d95d71e4c9899" + "0f6d4552fa65dd2638b361543f887136a43253d9c66c411697003f7a13c308f5422e1aa0a59c8967acdefd8b6e36ccf3" + ), +}; + +/// BLS12-381 scalar field order minus one; multiplying by it negates a point. +const BLS_R_MINUS_1: zkvm_bls12_381_scalar = zkvm_bls12_381_scalar { + data: hex!("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000"), +}; + +fn neg_g1_generator() -> zkvm_bls12_381_g1_point { + let pairs = [zkvm_bls12_381_g1_msm_pair { point: BLS_G1_GEN, scalar: BLS_R_MINUS_1 }]; + let mut output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_g1_msm(pairs.as_ptr(), pairs.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + output +} + +#[test] +fn bls12_g1_add_msm_vectors() { + let mut output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_g1_add(&BLS_G1_GEN, &BLS_G1_GEN, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BLS_G1_2GEN.data); + + let pairs = [zkvm_bls12_381_g1_msm_pair { point: BLS_G1_GEN, scalar: scalar(2) }]; + output.data.fill(0); + let status = unsafe { zkvm_bls12_g1_msm(pairs.as_ptr(), pairs.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BLS_G1_2GEN.data); +} + +#[test] +fn bls12_g2_add_msm_vectors() { + let mut output = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_g2_add(&BLS_G2_GEN, &BLS_G2_GEN, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BLS_G2_2GEN.data); + + let pairs = [zkvm_bls12_381_g2_msm_pair { point: BLS_G2_GEN, scalar: scalar(2) }]; + output.data.fill(0); + let status = unsafe { zkvm_bls12_g2_msm(pairs.as_ptr(), pairs.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BLS_G2_2GEN.data); +} + +#[test] +fn bls12_pairing_vectors() { + let neg_g1 = neg_g1_generator(); + let pairs = [ + zkvm_bls12_381_pairing_pair { g1: BLS_G1_GEN, g2: BLS_G2_GEN }, + zkvm_bls12_381_pairing_pair { g1: neg_g1, g2: BLS_G2_GEN }, + ]; + let mut verified = false; + + let status = unsafe { zkvm_bls12_pairing(pairs.as_ptr(), pairs.len(), &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let status = unsafe { zkvm_bls12_pairing(pairs.as_ptr(), 1, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn bls12_rejects_invalid_points() { + let mut off_curve_g1 = BLS_G1_GEN; + off_curve_g1.data[95] ^= 1; + let mut g1_output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_g1_add(&off_curve_g1, &BLS_G1_GEN, &mut g1_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let mut off_curve_g2 = BLS_G2_GEN; + off_curve_g2.data[191] ^= 1; + let mut g2_output = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_g2_add(&off_curve_g2, &BLS_G2_GEN, &mut g2_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let pairs = [zkvm_bls12_381_pairing_pair { g1: off_curve_g1, g2: BLS_G2_GEN }]; + let mut verified = true; + let status = unsafe { zkvm_bls12_pairing(pairs.as_ptr(), pairs.len(), &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + assert!(verified); +} + +#[test] +fn zkvm_bls12_null_pointers() { + let mut g1_output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_g1_add(core::ptr::null(), &BLS_G1_GEN, &mut g1_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bls12_g1_add(&BLS_G1_GEN, &BLS_G1_GEN, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); + + g1_output.data.fill(0xff); + let status = unsafe { zkvm_bls12_g1_msm(core::ptr::null(), 0, &mut g1_output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(g1_output.data, [0u8; 96]); + + let status = unsafe { zkvm_bls12_g1_msm(core::ptr::null(), 1, &mut g1_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let mut g2_output = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_g2_add(core::ptr::null(), &BLS_G2_GEN, &mut g2_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bls12_g2_add(&BLS_G2_GEN, &BLS_G2_GEN, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); + + g2_output.data.fill(0xff); + let status = unsafe { zkvm_bls12_g2_msm(core::ptr::null(), 0, &mut g2_output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(g2_output.data, [0u8; 192]); + + let status = unsafe { zkvm_bls12_g2_msm(core::ptr::null(), 1, &mut g2_output) }; + assert_eq!(status, ZKVM_EFAIL); + + let pairs = [zkvm_bls12_381_pairing_pair { g1: BLS_G1_GEN, g2: BLS_G2_GEN }]; + let mut verified = false; + + let status = unsafe { zkvm_bls12_pairing(core::ptr::null(), 0, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let status = unsafe { zkvm_bls12_pairing(core::ptr::null(), 1, &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bls12_pairing(pairs.as_ptr(), pairs.len(), core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} + +/* ============================================================================ + * Map to curve + * ============================================================================ */ + +/// Official EIP-2537 vectors for MAP_FP_TO_G1, from https://github.com/ethereum/EIPs/blob/master/assets/eip-2537/map_fp_to_G1_bls.json +const MAP_FP_TO_G1_VECTORS: [([u8; 48], [u8; 96]); 2] = [ + // "bls_g1map_" + ( + hex!("156c8a6a2c184569d69a76be144b5cdc5141d2d2ca4fe341f011e25e3969c55ad9e9b9ce2eb833c81a908e5fa4ac5f03"), + hex!( + "184bb665c37ff561a89ec2122dd343f20e0f4cbcaec84e3c3052ea81d1834e192c426074b02ed3dca4e7676ce4ce48ba" + "04407b8d35af4dacc809927071fc0405218f1401a6d15af775810e4e460064bcc9468beeba82fdc751be70476c888bf3" + ), + ), + // "bls_g1map_616263" + ( + hex!("147e1ed29f06e4c5079b9d14fc89d2820d32419b990c1c7bb7dbea2a36a045124b31ffbde7c99329c05c559af1c6cc82"), + hex!( + "009769f3ab59bfd551d53a5f846b9984c59b97d6842b20a2c565baa167945e3d026a3755b6345df8ec7e6acb6868ae6d" + "1532c00cf61aa3d0ce3e5aa20c3b531a2abd2c770a790a2613818303c6b830ffc0ecf6c357af3317b9575c567f11cd2c" + ), + ), +]; + +/// Official EIP-2537 vectors for MAP_FP2_TO_G2, from https://github.com/ethereum/EIPs/blob/master/assets/eip-2537/map_fp2_to_G2_bls.json +const MAP_FP2_TO_G2_VECTORS: [([u8; 96], [u8; 192]); 2] = [ + // "bls_g2map_" + ( + hex!( + "07355d25caf6e7f2f0cb2812ca0e513bd026ed09dda65b177500fa31714e09ea0ded3a078b526bed3307f804d4b93b04" + "02829ce3c021339ccb5caf3e187f6370e1e2a311dec9b75363117063ab2015603ff52c3d3b98f19c2f65575e99e8b78c" + ), + hex!( + "00e7f4568a82b4b7dc1f14c6aaa055edf51502319c723c4dc2688c7fe5944c213f510328082396515734b6612c4e7bb7" + "126b855e9e69b1f691f816e48ac6977664d24d99f8724868a184186469ddfd4617367e94527d4b74fc86413483afb35b" + "0caead0fd7b6176c01436833c79d305c78be307da5f6af6c133c47311def6ff1e0babf57a0fb5539fce7ee12407b0a42" + "1498aadcf7ae2b345243e281ae076df6de84455d766ab6fcdaad71fab60abb2e8b980a440043cd305db09d283c895e3d" + ), + ), + // "bls_g2map_616263" + ( + hex!( + "138879a9559e24cecee8697b8b4ad32cced053138ab913b99872772dc753a2967ed50aabc907937aefb2439ba06cc50c" + "0a1ae7999ea9bab1dcc9ef8887a6cb6e8f1e22566015428d220b7eec90ffa70ad1f624018a9ad11e78d588bd3617f9f2" + ), + hex!( + "108ed59fd9fae381abfd1d6bce2fd2fa220990f0f837fa30e0f27914ed6e1454db0d1ee957b219f61da6ff8be0d6441f" + "0296238ea82c6d4adb3c838ee3cb2346049c90b96d602d7bb1b469b905c9228be25c627bffee872def773d5b2a2eb57d" + "033f90f6057aadacae7963b0a0b379dd46750c1c94a6357c99b65f63b79e321ff50fe3053330911c56b6ceea08fee656" + "153606c417e59fb331b7ae6bce4fbf7c5190c33ce9402b5ebe2b70e44fca614f3f1382a3625ed5493843d0b0a652fc3f" + ), + ), +]; + +/// The largest canonical field element. +const BLS_FP_MAX: [u8; 48] = + hex!("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaaa"); + +/// The base field modulus itself, which is not a canonical field element. +const BLS_FP_MODULUS: [u8; 48] = + hex!("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab"); + +#[test] +fn bls12_map_fp_to_g1_vectors() { + for (input, expected) in MAP_FP_TO_G1_VECTORS { + let field_element = zkvm_bls12_381_fp { data: input }; + let mut output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_map_fp_to_g1(&field_element, &mut output) }; + assert_eq!(status, ZKVM_EOK, "input={input:?}"); + assert_eq!(output.data, expected, "input={input:?}"); + } +} + +#[test] +fn bls12_map_fp2_to_g2_vectors() { + for (input, expected) in MAP_FP2_TO_G2_VECTORS { + let field_element = zkvm_bls12_381_fp2 { data: input }; + let mut output = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_map_fp2_to_g2(&field_element, &mut output) }; + assert_eq!(status, ZKVM_EOK, "input={input:?}"); + assert_eq!(output.data, expected, "input={input:?}"); + } +} + +/// Mapped points must be valid members of the prime-order subgroup. +/// +/// MSM re-parses the point and validates subgroup membership, so this is an +/// independent check that the cofactor was cleared; multiplying by one must +/// return the point itself. +#[test] +fn bls12_map_lands_in_prime_order_subgroup() { + let fp = zkvm_bls12_381_fp { data: MAP_FP_TO_G1_VECTORS[0].0 }; + let mut mapped_g1 = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_map_fp_to_g1(&fp, &mut mapped_g1) }; + assert_eq!(status, ZKVM_EOK); + + let pairs = [zkvm_bls12_381_g1_msm_pair { point: mapped_g1, scalar: scalar(1) }]; + let mut output_g1 = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_g1_msm(pairs.as_ptr(), pairs.len(), &mut output_g1) }; + assert_eq!(status, ZKVM_EOK, "mapped G1 point must pass the subgroup check"); + assert_eq!(output_g1.data, mapped_g1.data); + + let fp2 = zkvm_bls12_381_fp2 { data: MAP_FP2_TO_G2_VECTORS[0].0 }; + let mut mapped_g2 = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_map_fp2_to_g2(&fp2, &mut mapped_g2) }; + assert_eq!(status, ZKVM_EOK); + + let pairs = [zkvm_bls12_381_g2_msm_pair { point: mapped_g2, scalar: scalar(1) }]; + let mut output_g2 = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_g2_msm(pairs.as_ptr(), pairs.len(), &mut output_g2) }; + assert_eq!(status, ZKVM_EOK, "mapped G2 point must pass the subgroup check"); + assert_eq!(output_g2.data, mapped_g2.data); +} + +#[test] +fn bls12_map_field_element_range() { + // The largest canonical element is accepted, the modulus itself is not. + let mut output = zkvm_bls12_381_g1_point { data: [0; 96] }; + let field_element = zkvm_bls12_381_fp { data: BLS_FP_MAX }; + let status = unsafe { zkvm_bls12_map_fp_to_g1(&field_element, &mut output) }; + assert_eq!(status, ZKVM_EOK); + + for input in [BLS_FP_MODULUS, [0xff; 48]] { + let field_element = zkvm_bls12_381_fp { data: input }; + let status = unsafe { zkvm_bls12_map_fp_to_g1(&field_element, &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + } + + // Either half of an Fp2 input is checked. + let mut g2 = zkvm_bls12_381_g2_point { data: [0; 192] }; + for modulus_offset in [0, 48] { + let mut input = [0; 96]; + input[modulus_offset..modulus_offset + 48].copy_from_slice(&BLS_FP_MODULUS); + let field_element = zkvm_bls12_381_fp2 { data: input }; + let status = unsafe { zkvm_bls12_map_fp2_to_g2(&field_element, &mut g2) }; + assert_eq!(status, ZKVM_EFAIL); + } +} + +#[test] +fn zkvm_bls12_map_null_pointers() { + let field_element = zkvm_bls12_381_fp { data: MAP_FP_TO_G1_VECTORS[0].0 }; + let mut g1 = zkvm_bls12_381_g1_point { data: [0; 96] }; + let status = unsafe { zkvm_bls12_map_fp_to_g1(core::ptr::null(), &mut g1) }; + assert_eq!(status, ZKVM_EFAIL); + let status = unsafe { zkvm_bls12_map_fp_to_g1(&field_element, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); + + let field_element = zkvm_bls12_381_fp2 { data: MAP_FP2_TO_G2_VECTORS[0].0 }; + let mut g2 = zkvm_bls12_381_g2_point { data: [0; 192] }; + let status = unsafe { zkvm_bls12_map_fp2_to_g2(core::ptr::null(), &mut g2) }; + assert_eq!(status, ZKVM_EFAIL); + let status = unsafe { zkvm_bls12_map_fp2_to_g2(&field_element, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/bn254.rs b/crates/accelerators/tests/bn254.rs new file mode 100644 index 000000000..44b975748 --- /dev/null +++ b/crates/accelerators/tests/bn254.rs @@ -0,0 +1,133 @@ +//! BN254 add/mul/pairing conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_bn254_g1_add, zkvm_bn254_g1_mul, zkvm_bn254_g1_point, zkvm_bn254_g2_point, + zkvm_bn254_pairing, zkvm_bn254_pairing_pair, zkvm_bn254_scalar, ZKVM_EFAIL, ZKVM_EOK, +}; + +fn scalar(value: u8) -> zkvm_bn254_scalar { + let mut scalar = zkvm_bn254_scalar { data: [0; 32] }; + scalar.data[31] = value; + scalar +} + +/// BN254 generator (1, 2). +fn generator() -> zkvm_bn254_g1_point { + let mut point = zkvm_bn254_g1_point { data: [0; 64] }; + point.data[31] = 1; + point.data[63] = 2; + point +} + +/// Doubled BN254 generator, from the EIP-196 reference vectors. +const BN254_2GEN: zkvm_bn254_g1_point = zkvm_bn254_g1_point { + data: hex!( + "030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd3" + "15ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4" + ), +}; + +/// BN254 negated generator (1, p - 2). +const BN254_NEG_GEN: zkvm_bn254_g1_point = zkvm_bn254_g1_point { + data: hex!( + "0000000000000000000000000000000000000000000000000000000000000001" + "30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd45" + ), +}; + +/// BN254 G2 generator in EIP-197 order (`x_c1 || x_c0 || y_c1 || y_c0`). +const BN254_G2_GEN: zkvm_bn254_g2_point = zkvm_bn254_g2_point { + data: hex!( + "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2" + "1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed" + "090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b" + "12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa" + ), +}; + +#[test] +fn zkvm_bn254_add_mul_smoke() { + let point = generator(); + let mut output = zkvm_bn254_g1_point { data: [0; 64] }; + + let status = unsafe { zkvm_bn254_g1_add(&point, &point, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BN254_2GEN.data); + + output.data = [0; 64]; + let status = unsafe { zkvm_bn254_g1_mul(&point, &scalar(2), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output.data, BN254_2GEN.data); +} + +#[test] +fn zkvm_bn254_pairing_smoke() { + let pairs = [ + zkvm_bn254_pairing_pair { g1: generator(), g2: BN254_G2_GEN }, + zkvm_bn254_pairing_pair { g1: BN254_NEG_GEN, g2: BN254_G2_GEN }, + ]; + let mut verified = false; + + let status = unsafe { zkvm_bn254_pairing(pairs.as_ptr(), pairs.len(), &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let status = unsafe { zkvm_bn254_pairing(pairs.as_ptr(), 1, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn bn254_rejects_invalid_point() { + let mut not_on_curve = generator(); + not_on_curve.data[63] = 3; + let mut output = zkvm_bn254_g1_point { data: [0; 64] }; + + let status = unsafe { zkvm_bn254_g1_mul(¬_on_curve, &scalar(2), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let pairs = [zkvm_bn254_pairing_pair { g1: not_on_curve, g2: BN254_G2_GEN }]; + let mut verified = true; + let status = unsafe { zkvm_bn254_pairing(pairs.as_ptr(), pairs.len(), &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + assert!(verified); +} + +#[test] +fn zkvm_bn254_null_pointers() { + let point = generator(); + let scalar = scalar(2); + let mut output = zkvm_bn254_g1_point { data: [0; 64] }; + + let status = unsafe { zkvm_bn254_g1_add(core::ptr::null(), &point, &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_g1_add(&point, core::ptr::null(), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_g1_add(&point, &point, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_g1_mul(core::ptr::null(), &scalar, &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_g1_mul(&point, core::ptr::null(), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_g1_mul(&point, &scalar, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); + + let pairs = [zkvm_bn254_pairing_pair { g1: point, g2: BN254_G2_GEN }]; + let mut verified = false; + + let status = unsafe { zkvm_bn254_pairing(core::ptr::null(), 0, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let status = unsafe { zkvm_bn254_pairing(core::ptr::null(), 1, &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_bn254_pairing(pairs.as_ptr(), pairs.len(), core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/keccak256.rs b/crates/accelerators/tests/keccak256.rs new file mode 100644 index 000000000..db11e8a4e --- /dev/null +++ b/crates/accelerators/tests/keccak256.rs @@ -0,0 +1,36 @@ +//! Keccak-256 C-interface conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{zkvm_keccak256, zkvm_keccak256_hash, ZKVM_EFAIL, ZKVM_EOK}; + +#[test] +fn keccak256_abc() { + let data = *b"abc"; + let mut output = zkvm_keccak256_hash { data: [0; 32] }; + let status = unsafe { zkvm_keccak256(data.as_ptr(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45") + ); +} + +#[test] +fn keccak256_null_pointers() { + let data = *b"abc"; + let mut output = zkvm_keccak256_hash { data: [0; 32] }; + + // A NULL `data` with `len == 0` is the empty input. + let status = unsafe { zkvm_keccak256(core::ptr::null(), 0, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") + ); + + let status = unsafe { zkvm_keccak256(core::ptr::null(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_keccak256(data.as_ptr(), data.len(), core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/kzg.rs b/crates/accelerators/tests/kzg.rs new file mode 100644 index 000000000..d4fb894a8 --- /dev/null +++ b/crates/accelerators/tests/kzg.rs @@ -0,0 +1,76 @@ +//! KZG point-evaluation conformance. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_kzg_commitment, zkvm_kzg_field_element, zkvm_kzg_point_eval, zkvm_kzg_proof, ZKVM_EFAIL, + ZKVM_EOK, +}; + +// ethereum/consensus-spec-tests: +// verify_kzg_proof_case_correct_proof_1ce8e4f69d5df899. +const COMMITMENT: [u8; 48] = + hex!("93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556"); +const Z: [u8; 32] = hex!("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000"); +const Y: [u8; 32] = [0; 32]; +const PROOF: [u8; 48] = + hex!("92c51ff81dd71dab71cefecd79e8274b4b7ba36a0f40e2dc086bc4061c7f63249877db23297212991fd63e07b7ebc348"); + +/// The compressed point at infinity: 0xc0 followed by zeros. +fn infinity() -> zkvm_kzg_commitment { + let mut point = zkvm_kzg_commitment { data: [0; 48] }; + point.data[0] = 0xc0; + point +} + +fn scalar(value: u8) -> zkvm_kzg_field_element { + let mut s = zkvm_kzg_field_element { data: [0; 32] }; + s.data[31] = value; + s +} + +#[test] +fn zkvm_kzg_point_eval_smoke() { + let commitment = zkvm_kzg_commitment { data: COMMITMENT }; + let proof = zkvm_kzg_proof { data: PROOF }; + let z = zkvm_kzg_field_element { data: Z }; + let y = zkvm_kzg_field_element { data: Y }; + let mut verified = false; + + let status = unsafe { zkvm_kzg_point_eval(&commitment, &z, &y, &proof, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + // Malformed cryptographic inputs are a completed verification with a false result. + let mut garbage = zkvm_kzg_commitment { data: [0; 48] }; + garbage.data[0] = 0x01; + let status = unsafe { zkvm_kzg_point_eval(&garbage, &z, &y, &proof, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn zkvm_kzg_point_eval_null_pointers() { + let commitment = infinity(); + let proof: zkvm_kzg_proof = infinity(); + let z = scalar(2); + let y = scalar(0); + let mut verified = false; + + let status = unsafe { zkvm_kzg_point_eval(core::ptr::null(), &z, &y, &proof, &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = + unsafe { zkvm_kzg_point_eval(&commitment, core::ptr::null(), &y, &proof, &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = + unsafe { zkvm_kzg_point_eval(&commitment, &z, core::ptr::null(), &proof, &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = + unsafe { zkvm_kzg_point_eval(&commitment, &z, &y, core::ptr::null(), &mut verified) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_kzg_point_eval(&commitment, &z, &y, &proof, core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/modexp.rs b/crates/accelerators/tests/modexp.rs new file mode 100644 index 000000000..d47f4acfb --- /dev/null +++ b/crates/accelerators/tests/modexp.rs @@ -0,0 +1,97 @@ +//! Modexp conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{zkvm_modexp, ZKVM_EFAIL, ZKVM_EOK}; + +/// BN254 Fr (the scalar field) modulus, big-endian. Not to be confused with +/// the base field prime, which shares the leading bytes. +const BN254_FR: [u8; 32] = hex!("30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"); + +#[test] +fn bn254_fr_accelerated_path_matches_reference() { + let base = [0xab; 32]; + let exp = [0x07]; + let mut output = [0; 32]; + let status = unsafe { + zkvm_modexp( + base.as_ptr(), + base.len(), + exp.as_ptr(), + exp.len(), + BN254_FR.as_ptr(), + BN254_FR.len(), + output.as_mut_ptr(), + ) + }; + assert_eq!(status, ZKVM_EOK); + let reference = aurora_engine_modexp::modexp(&[0xab; 32], &[0x07], &BN254_FR); + let mut expected = [0; 32]; + expected[32 - reference.len()..].copy_from_slice(&reference); + assert_eq!(output, expected); +} + +#[test] +fn zkvm_modexp_smoke() { + // 3^5 mod 7 = 5 + let base = [3u8]; + let exp = [5u8]; + let modulus = [7u8]; + let mut output = [0xffu8; 1]; + let status = unsafe { + zkvm_modexp(base.as_ptr(), 1, exp.as_ptr(), 1, modulus.as_ptr(), 1, output.as_mut_ptr()) + }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output, [5]); +} + +#[test] +fn zkvm_modexp_null_pointers() { + let base = [3u8]; + let exp = [5u8]; + let modulus = [7u8]; + let mut output = [0xffu8; 1]; + + // NULL base and exp with zero lengths are empty inputs: 0^0 mod 7 = 1. + let status = unsafe { + zkvm_modexp( + core::ptr::null(), + 0, + core::ptr::null(), + 0, + modulus.as_ptr(), + 1, + output.as_mut_ptr(), + ) + }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(output, [1]); + + // A NULL pointer with a non-zero length fails. + let status = unsafe { + zkvm_modexp(core::ptr::null(), 1, exp.as_ptr(), 1, modulus.as_ptr(), 1, output.as_mut_ptr()) + }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { + zkvm_modexp( + base.as_ptr(), + 1, + core::ptr::null(), + 1, + modulus.as_ptr(), + 1, + output.as_mut_ptr(), + ) + }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { + zkvm_modexp(base.as_ptr(), 1, exp.as_ptr(), 1, core::ptr::null(), 1, output.as_mut_ptr()) + }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { + zkvm_modexp(base.as_ptr(), 1, exp.as_ptr(), 1, modulus.as_ptr(), 1, core::ptr::null_mut()) + }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/ripemd160.rs b/crates/accelerators/tests/ripemd160.rs new file mode 100644 index 000000000..502eb8aa1 --- /dev/null +++ b/crates/accelerators/tests/ripemd160.rs @@ -0,0 +1,36 @@ +//! RIPEMD-160 C-interface conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{zkvm_ripemd160, zkvm_ripemd160_hash, ZKVM_EFAIL, ZKVM_EOK}; + +#[test] +fn ripemd160_abc() { + let data = *b"abc"; + let mut output = zkvm_ripemd160_hash { data: [0xff; 32] }; + let status = unsafe { zkvm_ripemd160(data.as_ptr(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("0000000000000000000000008eb208f7e05d987a9b044a8e98c6b087f15a0bfc") + ); +} + +#[test] +fn ripemd160_null_pointers() { + let data = *b"abc"; + let mut output = zkvm_ripemd160_hash { data: [0xff; 32] }; + + // A NULL `data` with `len == 0` is the empty input. + let status = unsafe { zkvm_ripemd160(core::ptr::null(), 0, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("0000000000000000000000009c1185a5c5e9fc54612808977ee8f548b2258d31") + ); + + let status = unsafe { zkvm_ripemd160(core::ptr::null(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_ripemd160(data.as_ptr(), data.len(), core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/accelerators/tests/secp256k1.rs b/crates/accelerators/tests/secp256k1.rs new file mode 100644 index 000000000..6c8573fc6 --- /dev/null +++ b/crates/accelerators/tests/secp256k1.rs @@ -0,0 +1,103 @@ +//! secp256k1 C-interface conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_keccak256, zkvm_keccak256_hash, zkvm_secp256k1_ecrecover, zkvm_secp256k1_hash, + zkvm_secp256k1_pubkey, zkvm_secp256k1_signature, zkvm_secp256k1_verify, ZKVM_EFAIL, ZKVM_EOK, +}; + +const MSG: zkvm_secp256k1_hash = zkvm_secp256k1_hash { + data: hex!("456e9aea5e197a1f1af7a3e85a3212fa4049a3ba34c2289b4c860fc0b0c64ef3"), +}; +const SIG: zkvm_secp256k1_signature = zkvm_secp256k1_signature { + data: hex!( + "9242685bf161793cc25603c231bc2f568eb630ea16aa137d2664ac8038825608" + "4f8ae3bd7535248d0bd448298cc2e2071e56992d0774dc340c368ae950852ada" + ), +}; +const ADDRESS: [u8; 20] = hex!("7156526fbd7a3c72969b54f64e42c10fbb768c8a"); + +#[test] +fn secp256k1_ecrecover_vector() { + let mut pubkey = zkvm_secp256k1_pubkey { data: [0; 64] }; + let status = unsafe { zkvm_secp256k1_ecrecover(&MSG, &SIG, 1, &mut pubkey) }; + assert_eq!(status, ZKVM_EOK); + + let mut digest = zkvm_keccak256_hash { data: [0; 32] }; + let status = unsafe { zkvm_keccak256(pubkey.data.as_ptr(), pubkey.data.len(), &mut digest) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!(digest.data[12..], ADDRESS); +} + +#[test] +fn secp256k1_ecrecover_invalid_inputs() { + let unchanged = [0x55; 64]; + let mut pubkey = zkvm_secp256k1_pubkey { data: unchanged }; + + let status = unsafe { zkvm_secp256k1_ecrecover(&MSG, &SIG, 4, &mut pubkey) }; + assert_eq!(status, ZKVM_EFAIL); + assert_eq!(pubkey.data, unchanged); + + let zero_sig = zkvm_secp256k1_signature { data: [0; 64] }; + let status = unsafe { zkvm_secp256k1_ecrecover(&MSG, &zero_sig, 0, &mut pubkey) }; + assert_eq!(status, ZKVM_EFAIL); + assert_eq!(pubkey.data, unchanged); +} + +#[test] +fn secp256k1_recover_and_verify() { + let mut pubkey = zkvm_secp256k1_pubkey { data: [0; 64] }; + let status = unsafe { zkvm_secp256k1_ecrecover(&MSG, &SIG, 1, &mut pubkey) }; + assert_eq!(status, ZKVM_EOK); + + let mut verified = false; + let status = unsafe { zkvm_secp256k1_verify(&MSG, &SIG, &pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let mut wrong_msg = MSG; + wrong_msg.data[0] ^= 1; + let status = unsafe { zkvm_secp256k1_verify(&wrong_msg, &SIG, &pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); + + let bad_pubkey = zkvm_secp256k1_pubkey { data: [0xff; 64] }; + let status = unsafe { zkvm_secp256k1_verify(&MSG, &SIG, &bad_pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn secp256k1_null_pointers() { + let mut pubkey = zkvm_secp256k1_pubkey { data: [0; 64] }; + assert_eq!( + unsafe { zkvm_secp256k1_ecrecover(core::ptr::null(), &SIG, 1, &mut pubkey) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256k1_ecrecover(&MSG, core::ptr::null(), 1, &mut pubkey) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256k1_ecrecover(&MSG, &SIG, 1, core::ptr::null_mut()) }, + ZKVM_EFAIL + ); + + let mut verified = false; + assert_eq!( + unsafe { zkvm_secp256k1_verify(core::ptr::null(), &SIG, &pubkey, &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256k1_verify(&MSG, core::ptr::null(), &pubkey, &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256k1_verify(&MSG, &SIG, core::ptr::null(), &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256k1_verify(&MSG, &SIG, &pubkey, core::ptr::null_mut()) }, + ZKVM_EFAIL + ); +} diff --git a/crates/accelerators/tests/secp256r1.rs b/crates/accelerators/tests/secp256r1.rs new file mode 100644 index 000000000..f8356b7bf --- /dev/null +++ b/crates/accelerators/tests/secp256r1.rs @@ -0,0 +1,81 @@ +//! secp256r1 C-interface conformance vectors. +//! +//! Vectors are from https://github.com/daimo-eth/p256-verifier/tree/master/test-vectors. + +use hex_literal::hex; +use openvm_accelerators::{ + zkvm_secp256r1_hash, zkvm_secp256r1_pubkey, zkvm_secp256r1_signature, zkvm_secp256r1_verify, + ZKVM_EFAIL, ZKVM_EOK, +}; + +fn parts( + input: &[u8; 160], +) -> (zkvm_secp256r1_hash, zkvm_secp256r1_signature, zkvm_secp256r1_pubkey) { + ( + zkvm_secp256r1_hash { data: input[..32].try_into().unwrap() }, + zkvm_secp256r1_signature { data: input[32..96].try_into().unwrap() }, + zkvm_secp256r1_pubkey { data: input[96..].try_into().unwrap() }, + ) +} + +const VALID: [u8; 160] = hex!( + "4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4d" + "a73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac" + "36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d60" + "4aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff3" + "7618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e" +); + +#[test] +fn secp256r1_verify_vectors() { + let (msg, sig, pubkey) = parts(&VALID); + let mut verified = false; + let status = unsafe { zkvm_secp256r1_verify(&msg, &sig, &pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(verified); + + let mut wrong_msg = msg; + wrong_msg.data[0] = 0x3c; + let status = unsafe { zkvm_secp256r1_verify(&wrong_msg, &sig, &pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn secp256r1_verify_malformed_inputs() { + let (msg, sig, pubkey) = parts(&VALID); + let mut verified = true; + + let bad_sig = zkvm_secp256r1_signature { data: [0xff; 64] }; + let status = unsafe { zkvm_secp256r1_verify(&msg, &bad_sig, &pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); + + let bad_pubkey = zkvm_secp256r1_pubkey { data: [0; 64] }; + let status = unsafe { zkvm_secp256r1_verify(&msg, &sig, &bad_pubkey, &mut verified) }; + assert_eq!(status, ZKVM_EOK); + assert!(!verified); +} + +#[test] +fn secp256r1_verify_null_pointers() { + let (msg, sig, pubkey) = parts(&VALID); + let mut verified = false; + + assert_eq!( + unsafe { zkvm_secp256r1_verify(core::ptr::null(), &sig, &pubkey, &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256r1_verify(&msg, core::ptr::null(), &pubkey, &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256r1_verify(&msg, &sig, core::ptr::null(), &mut verified) }, + ZKVM_EFAIL + ); + assert_eq!( + unsafe { zkvm_secp256r1_verify(&msg, &sig, &pubkey, core::ptr::null_mut()) }, + ZKVM_EFAIL + ); +} diff --git a/crates/accelerators/tests/sha256.rs b/crates/accelerators/tests/sha256.rs new file mode 100644 index 000000000..a4bf78cfc --- /dev/null +++ b/crates/accelerators/tests/sha256.rs @@ -0,0 +1,36 @@ +//! SHA-256 C-interface conformance vectors. + +use hex_literal::hex; +use openvm_accelerators::{zkvm_sha256, zkvm_sha256_hash, ZKVM_EFAIL, ZKVM_EOK}; + +#[test] +fn sha256_abc() { + let data = *b"abc"; + let mut output = zkvm_sha256_hash { data: [0; 32] }; + let status = unsafe { zkvm_sha256(data.as_ptr(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad") + ); +} + +#[test] +fn sha256_null_pointers() { + let data = *b"abc"; + let mut output = zkvm_sha256_hash { data: [0; 32] }; + + // A NULL `data` with `len == 0` is the empty input. + let status = unsafe { zkvm_sha256(core::ptr::null(), 0, &mut output) }; + assert_eq!(status, ZKVM_EOK); + assert_eq!( + output.data, + hex!("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + ); + + let status = unsafe { zkvm_sha256(core::ptr::null(), data.len(), &mut output) }; + assert_eq!(status, ZKVM_EFAIL); + + let status = unsafe { zkvm_sha256(data.as_ptr(), data.len(), core::ptr::null_mut()) }; + assert_eq!(status, ZKVM_EFAIL); +} diff --git a/crates/chainspec/src/lib.rs b/crates/chainspec/src/lib.rs index cdded0b53..ac3216d14 100644 --- a/crates/chainspec/src/lib.rs +++ b/crates/chainspec/src/lib.rs @@ -1,3 +1,7 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; + use alloy_eips::{eip7840::BlobParams, eip7892::BlobScheduleBlobParams}; use alloy_hardforks::mainnet::{MAINNET_BPO1_TIMESTAMP, MAINNET_BPO2_TIMESTAMP}; use reth_chainspec::{ diff --git a/crates/curve-utils/src/lib.rs b/crates/curve-utils/src/lib.rs index 602aba726..b9bcc25ac 100644 --- a/crates/curve-utils/src/lib.rs +++ b/crates/curve-utils/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(target_os = "zkvm", no_std)] +#![cfg_attr(any(openvm_intrinsics, target_os = "openvm"), no_std)] //! Subgroup membership checks for elliptic curve points. //! //! For pairing-based cryptography to be secure, points must lie in the correct diff --git a/crates/guest-mem/Cargo.toml b/crates/guest-mem/Cargo.toml deleted file mode 100644 index a448912d4..000000000 --- a/crates/guest-mem/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "openvm-guest-mem" -description = "Optimized mem* routines for the OpenVM guest target" -version.workspace = true -edition.workspace = true -homepage.workspace = true -repository.workspace = true - -[lints] -workspace = true - -[dependencies] diff --git a/crates/guest-mem/src/lib.rs b/crates/guest-mem/src/lib.rs deleted file mode 100644 index 1399215f6..000000000 --- a/crates/guest-mem/src/lib.rs +++ /dev/null @@ -1,126 +0,0 @@ -//! Word-at-a-time `memcmp`/`bcmp` for the guest. -//! -//! `openvm` ships optimized `memcpy`/`memset` assembly, but `memcmp` falls -//! back to compiler-builtins' byte-at-a-time loop, which costs several -//! instructions per byte on rv32. Slice equality on byte-array types (`U256` -//! words in the EVM interpreter, hashes, RLP node references) lowers to -//! `memcmp`/`bcmp` calls, making this one of the hottest functions in the -//! guest. The strong symbols defined here override compiler-builtins' weak -//! definitions at link time. -//! -//! `#![no_builtins]` prevents LLVM from recognizing the comparison loop as a -//! memcmp idiom and lowering it back into a `memcmp` libcall. - -#![no_std] -#![no_builtins] - -// The word-compare path derives the first differing byte from the least -// significant differing bits, which is only correct on little-endian targets. -const _: () = assert!(cfg!(target_endian = "little")); - -const WORD: usize = core::mem::size_of::(); - -/// Compares `n` bytes at `a` and `b` with C `memcmp` semantics, reading a -/// word at a time when both pointers share the same alignment. -/// -/// # Safety -/// -/// `a` and `b` must be valid for reads of `n` bytes. -pub unsafe fn compare_bytes(mut a: *const u8, mut b: *const u8, mut n: usize) -> i32 { - unsafe { - if a.addr() % WORD == b.addr() % WORD { - while a.addr() % WORD != 0 && n > 0 { - let (x, y) = (*a, *b); - if x != y { - return i32::from(x) - i32::from(y); - } - a = a.add(1); - b = b.add(1); - n -= 1; - } - while n >= WORD { - let x = *a.cast::(); - let y = *b.cast::(); - if x != y { - // Little-endian: the lowest differing byte address holds - // the least significant differing byte of the word. - let shift = ((x ^ y).trailing_zeros() / 8) * 8; - return i32::from((x >> shift) as u8) - i32::from((y >> shift) as u8); - } - a = a.add(WORD); - b = b.add(WORD); - n -= WORD; - } - } - while n > 0 { - let (x, y) = (*a, *b); - if x != y { - return i32::from(x) - i32::from(y); - } - a = a.add(1); - b = b.add(1); - n -= 1; - } - 0 - } -} - -#[cfg(target_os = "zkvm")] -mod c_exports { - #[unsafe(no_mangle)] - unsafe extern "C" fn memcmp(a: *const u8, b: *const u8, n: usize) -> i32 { - unsafe { super::compare_bytes(a, b, n) } - } - - // Equality-only variant of `memcmp`; the compiler emits calls to it for - // slice `==` where the ordering is unused. - #[unsafe(no_mangle)] - unsafe extern "C" fn bcmp(a: *const u8, b: *const u8, n: usize) -> i32 { - unsafe { super::compare_bytes(a, b, n) } - } -} - -#[cfg(test)] -mod tests { - use super::compare_bytes; - - fn reference(a: &[u8], b: &[u8]) -> i32 { - for (x, y) in core::iter::zip(a, b) { - if x != y { - return i32::from(*x) - i32::from(*y); - } - } - 0 - } - - #[test] - fn matches_reference_across_alignments_lengths_and_diff_positions() { - let mut base = [0u8; 96]; - for (i, byte) in base.iter_mut().enumerate() { - *byte = (i * 37 % 251) as u8; - } - for a_off in 0..8 { - for b_off in 0..8 { - for len in 0..48 { - let a = &base[a_off..a_off + len]; - let mut b_buf = [0u8; 96]; - b_buf[b_off..b_off + len].copy_from_slice(a); - // diff_pos == len leaves the buffers equal. - for diff_pos in 0..=len { - let mut b_buf = b_buf; - if diff_pos < len { - b_buf[b_off + diff_pos] ^= 0x80; - } - let b = &b_buf[b_off..b_off + len]; - let got = unsafe { compare_bytes(a.as_ptr(), b.as_ptr(), len) }; - assert_eq!( - got, - reference(a, b), - "a_off={a_off} b_off={b_off} len={len} diff_pos={diff_pos}" - ); - } - } - } - } - } -} diff --git a/crates/kzg/Cargo.toml b/crates/kzg/Cargo.toml index a2d8e5656..4da0c82ab 100644 --- a/crates/kzg/Cargo.toml +++ b/crates/kzg/Cargo.toml @@ -6,6 +6,9 @@ homepage.workspace = true exclude.workspace = true version.workspace = true +[lints] +workspace = true + [dependencies] openvm-algebra-guest.workspace = true openvm-curve-utils = { workspace = true, features = ["bls12_381"] } @@ -22,7 +25,7 @@ serde-big-array.workspace = true [dev-dependencies] serde_yaml.workspace = true -[target.'cfg(not(target_os = "zkvm"))'.dev-dependencies] +[target.'cfg(not(any(target_os = "none", target_os = "openvm")))'.dev-dependencies] openvm-stark-sdk.workspace = true openvm.workspace = true @@ -43,3 +46,6 @@ hex = { workspace = true, features = ["alloc"] } default = ["use-intrinsics"] test-utils = [] use-intrinsics = [] # When enabled, uses OpenVM intrinsic functions + +[package.metadata.cargo-shear] +ignored = ["openvm-circuit"] diff --git a/crates/kzg/README.md b/crates/kzg/README.md index 4d6201ffc..0d622c2cb 100644 --- a/crates/kzg/README.md +++ b/crates/kzg/README.md @@ -2,14 +2,17 @@ ## Quickstart -To run guest tests with OpenVM proving, run: +To run the guest tests, run: ```bash +# Prove a single test vector: cargo test --release test_single_valid_verify_kzg -- --show-output +# Execute (without proving) all valid and invalid test vectors: cargo test --release test_multiple_valid_verify_kzg -- --show-output +cargo test --release test_multiple_invalid_verify_kzg -- --show-output cargo test --release test_single_invalid_verify_kzg -- --show-output -# The following takes longer: -cargo test --release --ignored test_multiple_invalid_verify_kzg -- --show-output +# Prove all valid test vectors (expensive): +cargo test --release test_prove_multiple_valid_verify_kzg -- --ignored --show-output ``` ## Crates diff --git a/crates/kzg/build.rs b/crates/kzg/build.rs index beffb6caa..0269f6dab 100644 --- a/crates/kzg/build.rs +++ b/crates/kzg/build.rs @@ -3,18 +3,18 @@ const TRUSTED_SETUP_FILE: &str = include_str!("src/trusted_setup.txt"); include!("src/enums.rs"); include!("src/consts.rs"); -#[cfg(any(target_os = "zkvm", doc))] +#[cfg(doc)] fn main() { - // Binaries cannot be built in a RISC-V environment or when building docs + // Binaries cannot be built when building docs } -#[cfg(not(any(target_os = "zkvm", doc)))] +#[cfg(not(doc))] fn main() { use bls12_381::{G1Affine, G2Affine, Scalar}; use std::{fs, io::Write, path::Path}; #[derive(Debug, Clone, PartialEq, Eq)] - pub struct KzgSettingsOwned { + struct KzgSettingsOwned { pub roots_of_unity: [Scalar; NUM_ROOTS_OF_UNITY], pub g1_points: [G1Affine; NUM_G1_POINTS], pub g2_points: [G2Affine; NUM_G2_POINTS], @@ -26,7 +26,7 @@ fn main() { .map_err(|e| KzgError::InvalidHexFormat(format!("Failed to decode hex: {}", e))) } - pub fn load_trusted_setup_file_brute() -> Result { + fn load_trusted_setup_file_brute() -> Result { let trusted_setup_file: Vec = TRUSTED_SETUP_FILE.split('\n').map(|x| x.to_string()).collect(); diff --git a/crates/kzg/src/kzg_proof.rs b/crates/kzg/src/kzg_proof.rs index e2eda5fca..fd9c6307b 100644 --- a/crates/kzg/src/kzg_proof.rs +++ b/crates/kzg/src/kzg_proof.rs @@ -4,11 +4,11 @@ use alloc::{string::ToString, vec::Vec}; #[cfg(not(feature = "use-intrinsics"))] use bls12_381::{multi_miller_loop, G2Prepared, Gt}; use bls12_381::{G1Affine, G2Affine, Scalar}; -#[cfg(target_os = "zkvm")] +#[cfg(any(openvm_intrinsics, target_os = "openvm"))] use core::cmp::Ordering; use hex_literal::hex; use openvm_algebra_guest::{field::FieldExtension, IntMod}; -#[cfg(target_os = "zkvm")] +#[cfg(any(openvm_intrinsics, target_os = "openvm"))] use openvm_curve_utils::SubgroupCheck; use openvm_ecc_guest::{ weierstrass::{CachedMulTable, IntrinsicCurve, WeierstrassPoint}, @@ -30,6 +30,7 @@ const G2_AFFINE_GENERATOR: Bls12_381G2Affine = Bls12_381G2Affine::new( ) ); +#[derive(Debug)] pub struct KzgProof {} impl KzgProof { @@ -188,7 +189,7 @@ fn to_openvm_g2_affine(g2: G2Affine) -> Bls12_381G2Affine { /// Returns true if the field element is lexicographically larger than its negation. /// /// The input `y` does not need to be reduced modulo the modulus. -#[cfg(target_os = "zkvm")] +#[cfg(any(openvm_intrinsics, target_os = "openvm"))] fn is_lex_largest(y: &Fp) -> bool { let neg_y = -y.clone(); // This is a way to force y and -y are both in reduced form simultaneously using `iseqmod` @@ -207,7 +208,7 @@ fn is_lex_largest(y: &Fp) -> bool { } // hint_decompress is currently not implemented on host because of the need to do a sqrt -#[cfg(target_os = "zkvm")] +#[cfg(any(openvm_intrinsics, target_os = "openvm"))] pub fn safe_g1_affine_from_bytes(bytes: &Bytes48) -> Result { use openvm_ecc_guest::weierstrass::FromCompressed; @@ -247,7 +248,7 @@ pub fn safe_g1_affine_from_bytes(bytes: &Bytes48) -> Result Bls12_381G1Affine { if g1.is_identity().unwrap_u8() != 0 { return ::IDENTITY; @@ -258,7 +259,7 @@ fn to_openvm_g1_affine(g1: G1Affine) -> Bls12_381G1Affine { unsafe { Bls12_381G1Affine::from_xy_unchecked(x, y) } } -#[cfg(not(target_os = "zkvm"))] +#[cfg(not(any(openvm_intrinsics, target_os = "openvm")))] pub fn safe_g1_affine_from_bytes(bytes: &Bytes48) -> Result { let g1 = safe_g1_affine_from_bytes_native(bytes)?; Ok(to_openvm_g1_affine(g1)) @@ -295,7 +296,7 @@ pub mod tests { let kzg_settings = KzgSettings::load_trusted_setup_file().unwrap(); for (test_file, data) in &VERIFY_KZG_PROOF_TESTS { - let test: Test = serde_yaml::from_str(data).unwrap(); + let test: Test> = serde_yaml::from_str(data).unwrap(); let (Ok(commitment), Ok(z), Ok(y), Ok(proof)) = ( test.input.get_commitment(), test.input.get_z(), diff --git a/crates/kzg/src/lib.rs b/crates/kzg/src/lib.rs index 6e8f6d834..d953298bd 100644 --- a/crates/kzg/src/lib.rs +++ b/crates/kzg/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(target_os = "zkvm", no_std)] +#![cfg_attr(any(openvm_intrinsics, target_os = "openvm"), no_std)] extern crate alloc; diff --git a/crates/kzg/src/trusted_setup.rs b/crates/kzg/src/trusted_setup.rs index 1783801f7..dab003861 100644 --- a/crates/kzg/src/trusted_setup.rs +++ b/crates/kzg/src/trusted_setup.rs @@ -6,6 +6,7 @@ use spin::Once; // https://users.rust-lang.org/t/can-i-conveniently-compile-bytes-into-a-rust-program-with-a-specific-alignment/24049/2 #[repr(C)] // guarantee 'bytes' comes after '_align' +#[derive(Debug)] pub struct AlignedAs { pub _align: [Align; 0], pub bytes: Bytes, diff --git a/crates/kzg/src/types.rs b/crates/kzg/src/types.rs index 38cbde3e4..e200d9477 100644 --- a/crates/kzg/src/types.rs +++ b/crates/kzg/src/types.rs @@ -10,7 +10,7 @@ use crate::{get_kzg_settings, Bytes32, Bytes48, KzgError}; /// Inputs to pass to the VM for KZG proof verification /// Excludes `KzgSettings`, which is read from disk by the VM -#[derive(Clone, Deserialize, Serialize)] +#[derive(Debug, Clone, Deserialize, Serialize)] pub struct KzgInputs { pub commitment_bytes: Bytes48, pub z_bytes: Bytes32, diff --git a/crates/kzg/tests/integration_tests.rs b/crates/kzg/tests/integration_tests.rs index 6c7e1a0bf..a57c033a8 100644 --- a/crates/kzg/tests/integration_tests.rs +++ b/crates/kzg/tests/integration_tests.rs @@ -10,7 +10,7 @@ use openvm_kzg::{ }; use openvm_sdk::{ config::{AggregationSystemParams, AppConfig}, - Sdk, StdIn, + CompiledExePure, ExecutableFormat, Sdk, StdIn, }; use openvm_sdk_config::SdkVmConfig; use openvm_stark_sdk::utils::setup_tracing; @@ -19,57 +19,95 @@ use serde_yaml::from_str; #[test] fn test_single_valid_verify_kzg() { let (_, data) = SINGLE_VALID_KZG_PROOF_TEST[0]; - run_test_from_yaml_str(data); + let sdk = create_sdk(); + let elf = build_guest(&sdk); + let input = parse_inputs(data).expect("Invalid test inputs"); + sdk.app_prover(elf).unwrap().prove(stdin(&input)).unwrap(); } #[test] fn test_multiple_valid_verify_kzg() { + let sdk = create_sdk(); + let elf = build_guest(&sdk); + let compiled = sdk.compile(elf).unwrap(); for (test_file, data) in ONLY_VALID_KZG_PROOF_TESTS { println!("Running test: {}", test_file); - run_test_from_yaml_str(data); + let input = parse_inputs(data).expect("Invalid test inputs"); + sdk.execute(&compiled, stdin(&input)) + .unwrap_or_else(|err| panic!("Test {} failed: {}", test_file, err)); + } +} + +/// Proves every valid vector with a shared prover so keygen runs once. +#[test] +#[ignore = "expensive: proves every valid KZG vector"] +fn test_prove_multiple_valid_verify_kzg() { + let sdk = create_sdk(); + let elf = build_guest(&sdk); + let mut prover = sdk.app_prover(elf).unwrap(); + for (test_file, data) in ONLY_VALID_KZG_PROOF_TESTS { + println!("Proving test: {}", test_file); + let input = parse_inputs(data).expect("Invalid test inputs"); + prover.prove(stdin(&input)).unwrap(); } } #[test] fn test_single_invalid_verify_kzg() { let (test_file, data) = ONLY_INVALID_KZG_PROOF_TESTS[0]; - let result = std::panic::catch_unwind(|| run_test_from_yaml_str(data)); - assert!(result.is_err(), "Test {} should have panicked", test_file); + let sdk = create_sdk(); + let elf = build_guest(&sdk); + let compiled = sdk.compile(elf).unwrap(); + assert_rejected(&sdk, &compiled, test_file, data); } -#[ignore = "takes too long"] #[test] fn test_multiple_invalid_verify_kzg() { + let sdk = create_sdk(); + let elf = build_guest(&sdk); + let compiled = sdk.compile(elf).unwrap(); for (test_file, data) in ONLY_INVALID_KZG_PROOF_TESTS { println!("Running test: {}", test_file); - let result = std::panic::catch_unwind(|| run_test_from_yaml_str(data)); - assert!(result.is_err(), "Test {} should have panicked", test_file); + assert_rejected(&sdk, &compiled, test_file, data); } } -pub fn run_test_from_yaml_str(data: &str) { - let test: Test = from_str(data).unwrap(); +/// Passes if the vector is rejected at input parsing or by the guest trapping. +fn assert_rejected(sdk: &Sdk, compiled: &CompiledExePure<'_>, test_file: &str, data: &str) { + let Some(input) = parse_inputs(data) else { + return; + }; + let result = sdk.execute(compiled, stdin(&input)); + assert!(result.is_err(), "Test {} should have failed", test_file); +} + +fn parse_inputs(data: &str) -> Option { + let test: Test> = from_str(data).unwrap(); let (Ok(commitment), Ok(z), Ok(y), Ok(proof)) = ( test.input.get_commitment(), test.input.get_z(), test.input.get_y(), test.input.get_proof(), ) else { - panic!("Invalid test inputs"); + return None; }; + Some(KzgInputs { commitment_bytes: commitment, z_bytes: z, y_bytes: y, proof_bytes: proof }) +} - let input = - KzgInputs { commitment_bytes: commitment, z_bytes: z, y_bytes: y, proof_bytes: proof }; - - run_guest_program(input); +fn stdin(input: &KzgInputs) -> StdIn { + let mut io = StdIn::default(); + io.write(input); + io } -pub fn run_guest_program(input: KzgInputs) { +fn create_sdk() -> Sdk { setup_tracing(); let app_config: AppConfig = toml::from_str(include_str!("programs/verify_kzg/openvm.toml")).unwrap(); - let sdk = Sdk::new(app_config, AggregationSystemParams::default()).unwrap(); + Sdk::new(app_config, AggregationSystemParams::default()).unwrap() +} +fn build_guest(sdk: &Sdk) -> ExecutableFormat { let guest_opts = GuestOptions::default(); let target_filter = Some(TargetFilter { name: "verify-kzg-program".to_string(), kind: "bin".to_string() }); @@ -77,11 +115,5 @@ pub fn run_guest_program(input: KzgInputs) { pkg_dir.push("tests"); pkg_dir.push("programs"); pkg_dir.push("verify_kzg"); - - let elf = sdk.build(guest_opts, &pkg_dir, &target_filter, None).unwrap(); - - let mut io = StdIn::default(); - io.write(&input); - - sdk.app_prover(elf).unwrap().prove(io).unwrap(); + sdk.build(guest_opts, &pkg_dir, &target_filter, None).unwrap().into() } diff --git a/crates/kzg/tests/programs/verify_kzg/Cargo.toml b/crates/kzg/tests/programs/verify_kzg/Cargo.toml index ec7643741..ca2699bc2 100644 --- a/crates/kzg/tests/programs/verify_kzg/Cargo.toml +++ b/crates/kzg/tests/programs/verify_kzg/Cargo.toml @@ -14,5 +14,8 @@ openvm-kzg.workspace = true [package.metadata.cargo-machete] ignored = ["openvm-algebra-guest", "openvm-ecc-guest"] +[package.metadata.cargo-shear] +ignored = ["openvm-algebra-guest", "openvm-ecc-guest"] + [features] default = ["openvm-kzg/use-intrinsics"] diff --git a/crates/kzg/tests/programs/verify_kzg/openvm.toml b/crates/kzg/tests/programs/verify_kzg/openvm.toml index 20d06d34d..aaa3d7c77 100644 --- a/crates/kzg/tests/programs/verify_kzg/openvm.toml +++ b/crates/kzg/tests/programs/verify_kzg/openvm.toml @@ -1,5 +1,5 @@ -[app_vm_config.rv32i] -[app_vm_config.rv32m] +[app_vm_config.rv64i] +[app_vm_config.rv64m] [app_vm_config.io] [app_vm_config.modular] diff --git a/crates/mpt/Cargo.toml b/crates/mpt/Cargo.toml index cfc941905..3d8717404 100644 --- a/crates/mpt/Cargo.toml +++ b/crates/mpt/Cargo.toml @@ -21,12 +21,10 @@ revm-primitives.workspace = true alloy-rlp.workspace = true alloy-trie.workspace = true -[dev-dependencies] -hex-literal.workspace = true - [lints] workspace = true [features] default = [] -host = [] +std = [] +host = ["std"] diff --git a/crates/mpt/src/hp.rs b/crates/mpt/src/hp.rs index 1ae15075a..31b528738 100644 --- a/crates/mpt/src/hp.rs +++ b/crates/mpt/src/hp.rs @@ -1,5 +1,5 @@ //! Hex-prefix (HP) helpers and nibble utilities for MPT paths. -use core::{cmp, iter}; +use core::cmp; use smallvec::SmallVec; /// Compact vector for nibble sequences used in key traversal. @@ -7,30 +7,77 @@ pub(crate) type Nibbles = SmallVec<[u8; 64]>; // Hex-prefix (HP) encoding flags for MPT paths pub(crate) const HP_FLAG_ODD: u8 = 0x10; // path has odd number of nibbles; low nibble of first byte is data -#[allow(dead_code)] pub(crate) const HP_FLAG_LEAF: u8 = 0x20; // node is a leaf (vs extension) -/// Returns the length of the common prefix (in nibbles) between two nibble slices. -#[inline] -pub(crate) fn lcp(a: &[u8], b: &[u8]) -> usize { - for (i, (a, b)) in iter::zip(a, b).enumerate() { - if a != b { - return i; +/// A cursor over the nibbles of a lookup key. Trie traversal tracks a nibble offset into the raw +/// key bytes and computes nibbles by shift/mask on demand, instead of materializing the nibble +/// array up front. +#[derive(Copy, Clone, Debug)] +pub(crate) struct KeyNibbles<'k> { + key: &'k [u8], + /// Position of the cursor, in nibbles from the start of `key`. + offset: usize, +} + +impl<'k> KeyNibbles<'k> { + #[inline(always)] + pub(crate) fn new(key: &'k [u8]) -> Self { + Self { key, offset: 0 } + } + + /// Number of nibbles remaining after the cursor. Since the key is a whole number of bytes, + /// this always has the same parity as `offset`. + #[inline(always)] + pub(crate) fn remaining(&self) -> usize { + 2 * self.key.len() - self.offset + } + + #[inline(always)] + pub(crate) fn is_empty(&self) -> bool { + self.remaining() == 0 + } + + /// The `i`-th nibble after the cursor. + #[inline(always)] + pub(crate) fn nib(&self, i: usize) -> u8 { + let j = self.offset + i; + let byte = self.key[j / 2]; + if j % 2 == 0 { + byte >> 4 + } else { + byte & 0x0f + } + } + + /// Splits off the first nibble, like `slice::split_first`. + #[inline(always)] + pub(crate) fn split_first(&self) -> Option<(u8, Self)> { + if self.is_empty() { + None + } else { + Some((self.nib(0), self.advanced(1))) } } - cmp::min(a.len(), b.len()) + + /// The cursor advanced by `n` nibbles. + #[inline(always)] + pub(crate) fn advanced(&self, n: usize) -> Self { + debug_assert!(n <= self.remaining()); + Self { key: self.key, offset: self.offset + n } + } } -/// Converts a byte slice into a vector of nibbles. -/// Uses `SmallVec` to avoid heap allocation for typical key sizes (≤32 bytes = 64 nibbles). +/// Returns the length of the common prefix (in nibbles) between a nibble slice and the key +/// nibbles at the cursor. #[inline] -pub(crate) fn to_nibs(slice: &[u8]) -> Nibbles { - let mut result = SmallVec::with_capacity(2 * slice.len()); - for byte in slice { - result.push(byte >> 4); - result.push(byte & 0x0f); +pub(crate) fn lcp_key(nibs: &[u8], key: KeyNibbles<'_>) -> usize { + let max = cmp::min(nibs.len(), key.remaining()); + for (i, &nib) in nibs[..max].iter().enumerate() { + if nib != key.nib(i) { + return i; + } } - result + max } /// Decodes a compact hex-prefix-encoded path (as used in MPT leaf/extension nodes) @@ -72,138 +119,112 @@ pub(crate) fn encoded_path_nibble_count(encoded_path: &[u8]) -> usize { 2 * (encoded_path.len() - 1) + if is_odd { 1 } else { 0 } } -/// Compares a compact hex-prefix path with a nibble slice for equality without allocating. +/// Compares a compact hex-prefix path with the key nibbles at the cursor for equality, without +/// allocating. #[inline] -pub(crate) fn encoded_path_eq_nibs(encoded_path: &[u8], nibs: &[u8]) -> bool { +pub(crate) fn encoded_path_eq_key(encoded_path: &[u8], key: KeyNibbles<'_>) -> bool { let nib_count = encoded_path_nibble_count(encoded_path); - if nib_count != nibs.len() { + if nib_count != key.remaining() { return false; } - if nib_count == 0 { - return true; - } - - let first = encoded_path[0]; - let is_odd = (first & HP_FLAG_ODD) != 0; - let mut i = 0usize; // index in nibs - let mut j = 1usize; // index in encoded_path bytes - - if is_odd { - if nibs[i] != (first & 0x0f) { - return false; - } - i += 1; - } - - while i + 1 < nibs.len() { - let b = encoded_path[j]; - if nibs[i] != (b >> 4) { - return false; - } - if nibs[i + 1] != (b & 0x0f) { - return false; - } - i += 2; - j += 1; - } - - if i < nibs.len() { - // one last high nibble remains - let b = encoded_path[j]; - if nibs[i] != (b >> 4) { - return false; - } - } - true + encoded_path_matches_key(encoded_path, nib_count, key) } -/// If `encoded_path` is a prefix of `nibs`, returns the tail `&nibs[matched_len..]`. +/// If `encoded_path` is a prefix of the key nibbles at the cursor, returns the cursor advanced +/// past it. #[inline] -pub(crate) fn encoded_path_strip_prefix<'a>( +pub(crate) fn encoded_path_strip_prefix_key<'k>( encoded_path: &[u8], - nibs: &'a [u8], -) -> Option<&'a [u8]> { + key: KeyNibbles<'k>, +) -> Option> { let nib_count = encoded_path_nibble_count(encoded_path); - if nib_count > nibs.len() { + if nib_count > key.remaining() { return None; } + encoded_path_matches_key(encoded_path, nib_count, key).then(|| key.advanced(nib_count)) +} + +/// Whether the first `nib_count` key nibbles at the cursor equal the path's nibbles. +/// +/// After the path's optional odd leading nibble its data is whole bytes, so a cursor that is +/// byte-aligned there can be compared as a whole byte slice. That is always the case when the path +/// spans the entire remaining key: a cursor's parity matches its remaining length's, and a path's +/// parity matches its nibble count's, so equal lengths force equal parity. Only a path shorter +/// than the remaining key — an extension — can land misaligned and need the nibble-wise loop. +#[inline] +fn encoded_path_matches_key(encoded_path: &[u8], nib_count: usize, key: KeyNibbles<'_>) -> bool { + debug_assert!(nib_count <= key.remaining(), "caller must bound the path by the key"); if nib_count == 0 { - return Some(nibs); + return true; } let first = encoded_path[0]; let is_odd = (first & HP_FLAG_ODD) != 0; - let mut i = 0usize; // index in nibs - let mut j = 1usize; // index in encoded_path bytes - - if is_odd { - if nibs[i] != (first & 0x0f) { - return None; - } - i += 1; + let start = usize::from(is_odd); + if is_odd && key.nib(0) != (first & 0x0f) { + return false; } - while i + 1 < nib_count { - let b = encoded_path[j]; - if nibs[i] != (b >> 4) { - return None; - } - if nibs[i + 1] != (b & 0x0f) { - return None; - } - i += 2; - j += 1; + let path_data = &encoded_path[1..]; + if (key.offset + start) % 2 == 0 { + let key_start = (key.offset + start) / 2; + return key.key[key_start..key_start + path_data.len()] == *path_data; } - if i < nib_count { - let b = encoded_path[j]; - if nibs[i] != (b >> 4) { - return None; + // The path's byte boundaries are misaligned with the key's (possible for extension paths); + // compare nibble by nibble. + for (j, &byte) in path_data.iter().enumerate() { + let i = start + 2 * j; + if key.nib(i) != (byte >> 4) || key.nib(i + 1) != (byte & 0x0f) { + return false; } - i += 1; } - Some(&nibs[i..]) + true } -/// Encodes nibbles into the standard hex-prefix format directly into the bump arena. +/// Encodes the key nibbles remaining after the cursor into hex-prefix format in the bump arena. +/// +/// The cursor's offset and its remaining length always share a parity, so after the encoding's +/// optional odd leading nibble the cursor sits on a byte boundary and the rest of the path is a +/// direct copy of the key's remaining bytes. See [`to_encoded_path_with_bump`] for paths rebuilt +/// from a stored node's nibbles, which have no such alignment to exploit. #[inline] -pub(crate) fn to_encoded_path_with_bump<'a>( +pub(crate) fn encoded_path_from_key<'a>( bump: &'a bumpalo::Bump, - nibs: &[u8], + key: KeyNibbles<'_>, is_leaf: bool, ) -> &'a [u8] { - let is_odd = !nibs.len().is_multiple_of(2); - let encoded_len = 1 + (nibs.len() / 2); - let mut encoded = bumpalo::collections::Vec::with_capacity_in(encoded_len, bump); + let remaining = key.remaining(); + let is_odd = !remaining.is_multiple_of(2); + let start = usize::from(is_odd); - let mut prefix = if is_leaf { 0x20 } else { 0x00 }; + let mut prefix = if is_leaf { HP_FLAG_LEAF } else { 0x00 }; if is_odd { - prefix |= 0x10; - encoded.push(prefix | nibs[0]); - for i in (1..nibs.len()).step_by(2) { - encoded.push((nibs[i] << 4) | nibs[i + 1]); - } - } else { - encoded.push(prefix); - for i in (0..nibs.len()).step_by(2) { - encoded.push((nibs[i] << 4) | nibs[i + 1]); - } + prefix |= HP_FLAG_ODD | key.nib(0); } - encoded.into_bump_slice() + let encoded = bump.alloc_slice_fill_copy(1 + remaining / 2, 0); + encoded[0] = prefix; + encoded[1..].copy_from_slice(&key.key[(key.offset + start) / 2..]); + encoded } -/// Encodes nibbles into the standard hex-prefix format. -#[cfg(feature = "host")] +/// Encodes a materialized nibble sequence into the standard hex-prefix format directly into the +/// bump arena. This is the form used for paths rebuilt from a stored node's nibbles; paths built +/// from a lookup key go through [`encoded_path_from_key`], which needs no nibble array. #[inline] -pub(crate) fn to_encoded_path(nibs: &[u8], is_leaf: bool) -> Vec { +pub(crate) fn to_encoded_path_with_bump<'a>( + bump: &'a bumpalo::Bump, + nibs: &[u8], + is_leaf: bool, +) -> &'a [u8] { let is_odd = !nibs.len().is_multiple_of(2); let encoded_len = 1 + (nibs.len() / 2); - let mut encoded = Vec::with_capacity(encoded_len); + let mut encoded = bumpalo::collections::Vec::with_capacity_in(encoded_len, bump); - let mut prefix = if is_leaf { 0x20 } else { 0x00 }; + let mut prefix = if is_leaf { HP_FLAG_LEAF } else { 0x00 }; if is_odd { - prefix |= 0x10; + prefix |= HP_FLAG_ODD; encoded.push(prefix | nibs[0]); for i in (1..nibs.len()).step_by(2) { encoded.push((nibs[i] << 4) | nibs[i + 1]); @@ -215,7 +236,7 @@ pub(crate) fn to_encoded_path(nibs: &[u8], is_leaf: bool) -> Vec { } } - encoded + encoded.into_bump_slice() } #[cfg(test)] @@ -231,19 +252,95 @@ mod tests { assert_eq!(encoded_path_nibble_count(&[0x00, 0xab, 0xcd]), 4); } + /// Collects the nibbles remaining after a cursor, for assertions. + fn nibs_of(key: KeyNibbles<'_>) -> Vec { + (0..key.remaining()).map(|i| key.nib(i)).collect() + } + + #[test] + fn test_key_nibbles_cursor() { + let key = KeyNibbles::new(&[0x12, 0x34]); + assert_eq!(key.remaining(), 4); + assert_eq!(nibs_of(key), vec![1, 2, 3, 4]); + + let (first, rest) = key.split_first().unwrap(); + assert_eq!(first, 1); + assert_eq!(nibs_of(rest), vec![2, 3, 4]); + + let empty = key.advanced(4); + assert!(empty.is_empty()); + assert!(empty.split_first().is_none()); + } + + /// The byte-slice fast paths in `encoded_path_matches_key` and `encoded_path_from_key` rely on + /// this: a cursor into a whole number of bytes sits at an odd offset only when an odd number + /// of nibbles remains, so skipping a path's odd leading nibble always lands on a byte boundary. + #[test] + fn test_cursor_offset_and_remaining_share_parity() { + for key_len in 0..4usize { + let bytes = vec![0xab; key_len]; + let key = KeyNibbles::new(&bytes); + for offset in 0..=2 * key_len { + assert_eq!(offset % 2, key.advanced(offset).remaining() % 2); + } + } + } + #[test] fn test_eq_and_strip_prefix() { // path [1, 2, 3] as HP: ODD + EXT, first byte 0x10 | 0x1, then 0x23 let path = [HP_FLAG_ODD | 0x01, 0x23]; - let key = [1, 2, 3]; - assert!(encoded_path_eq_nibs(&path, &key)); - assert_eq!(encoded_path_strip_prefix(&path, &key), Some(&[][..])); + // key nibbles [1, 2, 3]: cursor at offset 1 into bytes [0x01, 0x23] + let key = KeyNibbles::new(&[0x01, 0x23]).advanced(1); + assert!(encoded_path_eq_key(&path, key)); + assert!(encoded_path_strip_prefix_key(&path, key).unwrap().is_empty()); + + // key nibbles [1, 2, 3, 4, 5]: cursor at offset 1 into bytes [0x01, 0x23, 0x45] + let key_longer = KeyNibbles::new(&[0x01, 0x23, 0x45]).advanced(1); + assert!(!encoded_path_eq_key(&path, key_longer)); + let tail = encoded_path_strip_prefix_key(&path, key_longer).unwrap(); + assert_eq!(nibs_of(tail), vec![4, 5]); + + // key nibbles [1, 2, 4] + let key_mismatch = KeyNibbles::new(&[0x01, 0x24]).advanced(1); + assert!(encoded_path_strip_prefix_key(&path, key_mismatch).is_none()); + + // even-length path [2, 3] against a misaligned (odd-offset) cursor + let even_path = [0x00, 0x23]; + let key_misaligned = KeyNibbles::new(&[0x02, 0x34]).advanced(1); + let tail = encoded_path_strip_prefix_key(&even_path, key_misaligned).unwrap(); + assert_eq!(nibs_of(tail), vec![4]); + assert!(encoded_path_strip_prefix_key( + &even_path, + KeyNibbles::new(&[0x02, 0x44]).advanced(1) + ) + .is_none()); + } - let key_longer = [1, 2, 3, 4, 5]; - assert_eq!(encoded_path_strip_prefix(&path, &key_longer), Some(&key_longer[3..])); + #[test] + fn test_encoded_path_from_key() { + let bump = bumpalo::Bump::new(); - let key_mismatch = [1, 2, 4]; - assert!(encoded_path_strip_prefix(&path, &key_mismatch).is_none()); + let key = KeyNibbles::new(&[0xab, 0xcd]); + // leaf with an even remainder + assert_eq!(encoded_path_from_key(&bump, key, true), &[0x20, 0xab, 0xcd]); + // extension with an odd remainder + assert_eq!(encoded_path_from_key(&bump, key.advanced(1), false), &[0x1b, 0xcd]); + // leaf with an odd remainder + assert_eq!(encoded_path_from_key(&bump, key.advanced(3), true), &[0x3d]); + // empty remainder + assert_eq!(encoded_path_from_key(&bump, key.advanced(4), true), &[0x20]); + } + + #[test] + fn test_lcp_key() { + let key = KeyNibbles::new(&[0xab, 0xcd]); + assert_eq!(lcp_key(&[], key), 0); + assert_eq!(lcp_key(&[0xa], key), 1); + assert_eq!(lcp_key(&[0xa, 0xb, 0xd], key), 2); + assert_eq!(lcp_key(&[0xa, 0xb, 0xc, 0xd], key), 4); + assert_eq!(lcp_key(&[0xa, 0xb, 0xc, 0xd, 0xe], key), 4); + assert_eq!(lcp_key(&[0xb, 0xc], key.advanced(1)), 2); } #[test] @@ -263,21 +360,4 @@ mod tests { let nibbles = vec![0x0a, 0x0b, 0x0c]; assert_eq!(to_encoded_path_with_bump(&bump, &nibbles, true), vec![0x3a, 0xbc]); } - - #[test] - fn test_lcp() { - let cases = [ - (vec![], vec![], 0), - (vec![0xa], vec![0xa], 1), - (vec![0xa, 0xb], vec![0xa, 0xc], 1), - (vec![0xa, 0xb], vec![0xa, 0xb], 2), - (vec![0xa, 0xb], vec![0xa, 0xb, 0xc], 2), - (vec![0xa, 0xb, 0xc], vec![0xa, 0xb, 0xc], 3), - (vec![0xa, 0xb, 0xc], vec![0xa, 0xb, 0xc, 0xd], 3), - (vec![0xa, 0xb, 0xc, 0xd], vec![0xa, 0xb, 0xc, 0xd], 4), - ]; - for (a, b, cpl) in cases { - assert_eq!(lcp(&a, &b), cpl) - } - } } diff --git a/crates/mpt/src/lib.rs b/crates/mpt/src/lib.rs index ede499cff..05d150e87 100644 --- a/crates/mpt/src/lib.rs +++ b/crates/mpt/src/lib.rs @@ -1,3 +1,7 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; + mod trie; pub use trie::*; diff --git a/crates/mpt/src/node.rs b/crates/mpt/src/node.rs index 8effa94c1..a1d9bf259 100644 --- a/crates/mpt/src/node.rs +++ b/crates/mpt/src/node.rs @@ -1,11 +1,16 @@ -use std::cell::Cell; +use core::{cell::Cell, num::NonZeroU32}; use revm_primitives::hex; pub(crate) type NodeId = u32; +/// Id of a branch child node. `NonZero` so that a child slot (`Option`) fits in +/// 4 bytes — `Option` has no niche and takes 8. Node id 0 is the null-node sentinel +/// (`NULL_NODE_ID`) and is never stored as a branch child. +pub(crate) type BranchChildId = NonZeroU32; + /// Children slots of a branch node, allocated in the trie's bump arena. -pub(crate) type BranchChildren<'a> = &'a [Cell>; 16]; +pub(crate) type BranchChildren<'a> = &'a [Cell>; 16]; /// Node data for arena-based trie with zero-copy optimization. /// @@ -49,8 +54,8 @@ pub(crate) enum NodeRef<'a> { Digest(&'a [u8]), } -impl std::fmt::Display for NodeRef<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Display for NodeRef<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { NodeRef::Bytes(bytes) => write!(f, "Bytes(0x{})", hex::encode(bytes)), NodeRef::Digest(digest) => write!(f, "Digest(0x{})", hex::encode(digest)), diff --git a/crates/mpt/src/resolver.rs b/crates/mpt/src/resolver.rs index 94cb0358e..add478b02 100644 --- a/crates/mpt/src/resolver.rs +++ b/crates/mpt/src/resolver.rs @@ -1,5 +1,5 @@ use crate::{ - node::{NodeData, NodeId}, + node::{BranchChildId, NodeData, NodeId}, trie::{NULL_NODE_ID, NULL_NODE_REF_SLICE}, Error, Mpt, }; @@ -77,10 +77,11 @@ impl MptResolver { return Err(Error::ValueInBranch); } - let mut childs: [Option; 16] = Default::default(); + let mut childs: [Option; 16] = Default::default(); for (i, mut item) in items.into_iter().take(16).enumerate() { let child_id = self.resolve_internal(&mut item, mpt)?; - childs[i] = if child_id == NULL_NODE_ID { None } else { Some(child_id) }; + // `BranchChildId::new` maps the `NULL_NODE_ID` sentinel (0) to `None`. + childs[i] = BranchChildId::new(child_id); } // The children array is allocated in `mpt`'s own bump, so no copy is needed. let children = mpt.alloc_branch(childs); diff --git a/crates/mpt/src/state.rs b/crates/mpt/src/state.rs index 8e5f5af1e..d14f4734b 100644 --- a/crates/mpt/src/state.rs +++ b/crates/mpt/src/state.rs @@ -1,3 +1,5 @@ +use alloc::{vec, vec::Vec}; + use alloy_trie::TrieAccount; use bumpalo::Bump; use revm::database::BundleState; diff --git a/crates/mpt/src/tests.rs b/crates/mpt/src/tests.rs index 58f9a5231..477d6f8c4 100644 --- a/crates/mpt/src/tests.rs +++ b/crates/mpt/src/tests.rs @@ -1,6 +1,9 @@ use revm_primitives::{b256, keccak256, B256}; -use crate::{node::NodeData, Error, Mpt}; +use crate::{ + node::{BranchChildId, NodeData}, + Error, Mpt, +}; trait RlpBytes { /// Returns the RLP-encoding. @@ -229,6 +232,47 @@ fn test_serde_keccak_trie() -> Result<(), Error> { Ok(()) } +/// A child reference that disagrees with the child's own encoding must be rejected. Decoding +/// compares the two for their whole length, so accepting one would mean accepting a witness that +/// does not hash to the claimed root. Every byte of the digest is checked, including the last, +/// which is what a comparison that stopped short would miss. +#[cfg(feature = "host")] +#[test] +fn test_serde_rejects_corrupted_digest_reference() -> Result<(), Error> { + const N: usize = 64; + + let bump = bumpalo::Bump::new(); + let mut trie = Mpt::new(&bump); + for i in 0..N { + assert!(trie.insert_rlp(keccak256(i.to_be_bytes()).as_slice(), i)?); + } + let encoded = trie.encode_trie(); + + // Sanity check that the unmodified encoding decodes, so a rejection below is the corruption + // and not an unrelated failure. + Mpt::decode_trie(&bump, &mut encoded.as_slice(), trie.num_nodes())?; + + // The first 32-byte RLP string in the encoding is a digest reference. Corrupting a byte of + // its payload leaves every length in the encoding intact, so the reference comparison is the + // only thing that can catch it. + let digest_header = alloy_rlp::EMPTY_STRING_CODE + 32; + let header_at = encoded.iter().position(|&b| b == digest_header).expect("a digest reference"); + + for offset in [1, 16, 32] { + let mut corrupted = encoded.clone(); + corrupted[header_at + offset] ^= 0x01; + assert!( + matches!( + Mpt::decode_trie(&bump, &mut corrupted.as_slice(), trie.num_nodes()), + Err(Error::NodeRefMismatch) + ), + "corrupting digest byte {offset} was not rejected" + ); + } + + Ok(()) +} + /// Test that deleting a key that would cause branch collapse fails if sibling is unresolved Digest. /// This tests the soundness fix: we must not assume an unresolved Digest is a Branch node. #[test] @@ -258,9 +302,9 @@ fn test_delete_with_unresolved_sibling_errors() { let digest_id = trie.add_node(NodeData::Digest(fake_digest), None); // Create a branch with these two children - let mut children: [Option; 16] = Default::default(); - children[0] = Some(leaf_id); - children[1] = Some(digest_id); + let mut children: [Option; 16] = Default::default(); + children[0] = BranchChildId::new(leaf_id); + children[1] = BranchChildId::new(digest_id); let branch_children = trie.alloc_branch(children); let branch_node_id = trie.add_node(NodeData::Branch(branch_children), None); diff --git a/crates/mpt/src/trie.rs b/crates/mpt/src/trie.rs index ac4cf6a41..b9b654130 100644 --- a/crates/mpt/src/trie.rs +++ b/crates/mpt/src/trie.rs @@ -1,4 +1,6 @@ -use std::{ +use alloc::vec::Vec; +use core::{ + alloc::Layout, cell::{Cell, RefCell}, mem::MaybeUninit, }; @@ -6,16 +8,16 @@ use std::{ use alloy_rlp::Encodable; use bumpalo::Bump; use bytes::Buf; -use revm_primitives::{hex, keccak256, B256}; +use revm_primitives::{keccak256, B256}; use smallvec::SmallVec; use crate::{ bump_bufmut::BumpBytesMut, hp::{ - encoded_path_eq_nibs, encoded_path_strip_prefix, lcp, prefix_to_nibs, - to_encoded_path_with_bump, to_nibs, + encoded_path_eq_key, encoded_path_from_key, encoded_path_strip_prefix_key, lcp_key, + prefix_to_nibs, to_encoded_path_with_bump, KeyNibbles, }, - node::{BranchChildren, NodeData, NodeId, NodeRef}, + node::{BranchChildId, BranchChildren, NodeData, NodeId, NodeRef}, }; /// OpenVM memory alignment word size. @@ -24,6 +26,9 @@ const MIN_ALIGN: usize = 4; /// Initial capacity of [`MptTrie`]'s `rlp_scratch`. const RLP_SCRATCH_INIT_CAPACITY: usize = 600; +/// Length of a node reference that is a keccak digest rather than the node's own encoding. +const DIGEST_LEN: usize = 32; + /// Sentinel index representing the null node when decoding and in internal references. /// In a default MPT, `nodes[0]` starts as `Null`, but the root may later be changed to a /// non-null node (e.g. `Digest`) for convenience. `NULL_NODE_ID` is still used by the decoder @@ -110,12 +115,50 @@ fn is_null_ref(slice: &[u8]) -> bool { matches!(slice, [byte] if *byte == alloy_rlp::EMPTY_STRING_CODE) } -/// Byte-slice equality as an explicit loop. Slice `==` compiles to a `memcmp` call; the node -/// references compared during decoding are at most 33 bytes, where the call overhead dominates -/// an inline loop. +/// Byte-slice equality as an explicit loop. Slice `==` on slices of unknown length compiles to a +/// `memcmp` call; the node references compared during decoding are at most 33 bytes, where the +/// call overhead dominates an inline loop. Prefer [`digest_eq`] whenever one side is a full-length +/// digest, since a length known at compile time turns the comparison into whole-word loads. #[inline(always)] fn bytes_eq(a: &[u8], b: &[u8]) -> bool { - a.len() == b.len() && std::iter::zip(a, b).all(|(x, y)| x == y) + a.len() == b.len() && core::iter::zip(a, b).all(|(x, y)| x == y) +} + +/// Equality against a 32-byte node reference. +/// +/// Fixing the length lets the comparison stay inline as four word loads per side and an XOR +/// chain, where a loop over slices of unknown length pays several instructions for every byte. +/// Slices of different lengths are never equal, so a reference that is not a full digest is +/// inequality rather than a case to fall back on. +#[inline(always)] +fn digest_eq(a: &[u8], b: &[u8]) -> bool { + match (<&[u8; DIGEST_LEN]>::try_from(a), <&[u8; DIGEST_LEN]>::try_from(b)) { + (Ok(a), Ok(b)) => a == b, + _ => false, + } +} + +/// Appends a 32-byte node reference to `out`. +/// +/// Fixing the length keeps the copy inline as whole-word moves. Handing the buffer a slice whose +/// length the compiler cannot see turns the copy into a `memcpy` call, and at this size the call +/// costs more than the bytes it moves — encoding node references is the decoder's busiest copy. +#[inline(always)] +fn put_digest(digest: &[u8], out: &mut B) { + match <&[u8; DIGEST_LEN]>::try_from(digest) { + Ok(digest) => out.put_slice(digest), + // A digest reference always holds `DIGEST_LEN` bytes, so this arm exists only to keep the + // function total without a conversion that could panic. + Err(_) => out.put_slice(digest), + } +} + +/// Converts a node id to a branch child slot id. +/// The only zero id is the null-node sentinel ([`NULL_NODE_ID`]), which is never stored as a +/// branch child. +#[inline(always)] +fn branch_child_id(node_id: NodeId) -> BranchChildId { + BranchChildId::new(node_id).expect("the null-node sentinel is never a branch child") } /// Writes an RLP header with the given base code (`EMPTY_LIST_CODE` for lists, @@ -175,7 +218,7 @@ impl<'a> Mpt<'a> { match self.nodes[node_id as usize] { NodeData::Branch(children) => { for child_id in children.iter().filter_map(Cell::get) { - self.encode_trie_internal(child_id, out); + self.encode_trie_internal(child_id.get(), out); } } NodeData::Extension(_, ext_id) => { @@ -264,13 +307,13 @@ impl<'a> Mpt<'a> { } NodeRef::Bytes(rlp_node) } else if payload_length == 32 && !list { - if !bytes_eq(payload, expected_node_ref.as_slice()) { + if !digest_eq(payload, expected_node_ref.as_slice()) { return Err(Error::NodeRefMismatch); } expected_node_ref } else { let digest = keccak256(rlp_node); - if !bytes_eq(digest.as_slice(), expected_node_ref.as_slice()) { + if !digest_eq(digest.as_slice(), expected_node_ref.as_slice()) { return Err(Error::NodeRefMismatch); } expected_node_ref @@ -329,7 +372,7 @@ impl<'a> Mpt<'a> { if is_null_ref(child0_expected_node_ref.as_slice()) { None } else { - Some(self.decode_trie_internal(bytes, child0_expected_node_ref)?) + Some(branch_child_id(self.decode_trie_internal(bytes, child0_expected_node_ref)?)) } }; @@ -338,7 +381,7 @@ impl<'a> Mpt<'a> { if is_null_ref(child1_expected_node_ref.as_slice()) { None } else { - Some(self.decode_trie_internal(bytes, child1_expected_node_ref)?) + Some(branch_child_id(self.decode_trie_internal(bytes, child1_expected_node_ref)?)) } }; @@ -350,8 +393,8 @@ impl<'a> Mpt<'a> { let childs = unsafe { &mut *self .bump - .alloc_layout(std::alloc::Layout::new::<[Cell>; 16]>()) - .cast::<[MaybeUninit>; 16]>() + .alloc_layout(Layout::new::<[Cell>; 16]>()) + .cast::<[MaybeUninit>; 16]>() .as_ptr() }; @@ -375,7 +418,9 @@ impl<'a> Mpt<'a> { if is_null_ref(child_expected_node_ref.as_slice()) { None } else { - Some(self.decode_trie_internal(bytes, child_expected_node_ref)?) + Some(branch_child_id( + self.decode_trie_internal(bytes, child_expected_node_ref)?, + )) } }); } @@ -388,8 +433,8 @@ impl<'a> Mpt<'a> { // SAFETY: all elements of the array were initialized above, and `Cell` is // `repr(transparent)` over `T`. let children: BranchChildren<'a> = unsafe { - &*(childs as *const [MaybeUninit>; 16] - as *const [Cell>; 16]) + &*(childs as *const [MaybeUninit>; 16] + as *const [Cell>; 16]) }; let node_id = self.add_node(NodeData::Branch(children), Some(node_ref)); Ok(node_id) @@ -448,7 +493,7 @@ impl<'a> Mpt<'a> { encode_header(alloy_rlp::EMPTY_LIST_CODE, payload_length, out); for child_id in children.iter() { match child_id.get() { - Some(id) => self.reference_encode(id, out), + Some(id) => self.reference_encode(id.get(), out), None => out.put_u8(alloy_rlp::EMPTY_STRING_CODE), } } @@ -488,7 +533,7 @@ impl<'a> Mpt<'a> { // if the reference is a digest, RLP-encode it with its fixed known length NodeRef::Digest(digest) => { out.put_u8(alloy_rlp::EMPTY_STRING_CODE + 32); - out.put_slice(digest); + put_digest(digest, out); } } } @@ -501,7 +546,7 @@ impl<'a> Mpt<'a> { NodeData::Branch(children) => { 1 + children .iter() - .map(|child| child.get().map_or(1, |id| self.reference_length(id))) + .map(|child| child.get().map_or(1, |id| self.reference_length(id.get()))) .sum::() } NodeData::Leaf(encoded_path, value) => encoded_path.length() + value.length(), @@ -559,7 +604,7 @@ impl<'a> Mpt<'a> { /// Retrieves the value associated with a given key in the trie. #[inline] pub fn get<'s>(&'s self, key: &[u8]) -> Result, Error> { - self.get_internal(self.root_id, &to_nibs(key)) + self.get_internal(self.root_id, KeyNibbles::new(key)) } /// Retrieves the RLP-decoded value corresponding to the key. @@ -577,8 +622,7 @@ impl<'a> Mpt<'a> { /// Inserts a key-value pair into the trie. #[inline] pub fn insert(&mut self, key: &[u8], value: &'a [u8]) -> Result { - let key_nibs = &to_nibs(key); - self.insert_internal(self.root_id, key_nibs, value) + self.insert_internal(self.root_id, KeyNibbles::new(key), value) } /// Inserts an RLP-encoded value into the trie. @@ -599,8 +643,7 @@ impl<'a> Mpt<'a> { /// present, it returns `true`. Otherwise, it returns `false`. #[inline] pub fn delete(&mut self, key: &[u8]) -> Result { - let key_nibs = &to_nibs(key); - self.delete_internal(self.root_id, key_nibs) + self.delete_internal(self.root_id, KeyNibbles::new(key)) } #[inline] @@ -629,7 +672,7 @@ impl<'a> Mpt<'a> { /// Allocates a branch children array in the bump arena, to be stored in a /// [`NodeData::Branch`]. #[inline] - pub(crate) fn alloc_branch(&self, children: [Option; 16]) -> BranchChildren<'a> { + pub(crate) fn alloc_branch(&self, children: [Option; 16]) -> BranchChildren<'a> { self.bump.alloc(children.map(Cell::new)) } @@ -668,13 +711,17 @@ impl<'a> Mpt<'a> { } #[inline] - fn get_internal(&self, node_id: NodeId, key_nibs: &[u8]) -> Result, Error> { + fn get_internal( + &self, + node_id: NodeId, + key: KeyNibbles<'_>, + ) -> Result, Error> { match &self.nodes[node_id as usize] { NodeData::Null => Ok(None), NodeData::Branch(children) => { - if let Some((i, tail)) = key_nibs.split_first() { - match children[*i as usize].get() { - Some(id) => self.get_internal(id, tail), + if let Some((i, tail)) = key.split_first() { + match children[usize::from(i)].get() { + Some(id) => self.get_internal(id.get(), tail), None => Ok(None), } } else { @@ -683,7 +730,7 @@ impl<'a> Mpt<'a> { } NodeData::Leaf(path_bytes, value) => { // Compare compact path to key nibbles without allocating - if encoded_path_eq_nibs(path_bytes, key_nibs) { + if encoded_path_eq_key(path_bytes, key) { Ok(Some(value)) } else { Ok(None) @@ -691,7 +738,7 @@ impl<'a> Mpt<'a> { } NodeData::Extension(path_bytes, child_id) => { // Strip compact path prefix without allocating - if let Some(tail) = encoded_path_strip_prefix(path_bytes, key_nibs) { + if let Some(tail) = encoded_path_strip_prefix_key(path_bytes, key) { self.get_internal(*child_id, tail) } else { Ok(None) @@ -705,23 +752,23 @@ impl<'a> Mpt<'a> { fn insert_internal( &mut self, node_id: NodeId, - key_nibs: &[u8], + key: KeyNibbles<'_>, value: &'a [u8], ) -> Result { let updated = match self.nodes[node_id as usize] { NodeData::Null => { - let path = to_encoded_path_with_bump(self.bump, key_nibs, true); + let path = encoded_path_from_key(self.bump, key, true); self.nodes[node_id as usize] = NodeData::Leaf(path, value); true } NodeData::Branch(children) => { - if let Some((i, tail)) = key_nibs.split_first() { - match children[*i as usize].get() { - Some(id) => self.insert_internal(id, tail, value)?, + if let Some((i, tail)) = key.split_first() { + match children[usize::from(i)].get() { + Some(id) => self.insert_internal(id.get(), tail, value)?, None => { - let path = to_encoded_path_with_bump(self.bump, tail, true); + let path = encoded_path_from_key(self.bump, tail, true); let new_leaf_id = self.add_node(NodeData::Leaf(path, value), None); - children[*i as usize].set(Some(new_leaf_id)); + children[usize::from(i)].set(Some(branch_child_id(new_leaf_id))); true } } @@ -730,7 +777,7 @@ impl<'a> Mpt<'a> { } } NodeData::Leaf(prefix, old_value) => { - if encoded_path_eq_nibs(prefix, key_nibs) { + if encoded_path_eq_key(prefix, key) { // update the value if it is different if old_value == value { return Ok(false); @@ -739,25 +786,26 @@ impl<'a> Mpt<'a> { true } else { let self_nibs = prefix_to_nibs(prefix); - let common_len = lcp(&self_nibs, key_nibs); + let common_len = lcp_key(&self_nibs, key); - if common_len == self_nibs.len() || common_len == key_nibs.len() { + if common_len == self_nibs.len() || common_len == key.remaining() { return Err(Error::ValueInBranch); } else { // otherwise, create a branch with two children let split_point = common_len + 1; - let mut children: [Option; 16] = Default::default(); + let mut children: [Option; 16] = Default::default(); let leaf1_path = to_encoded_path_with_bump(self.bump, &self_nibs[split_point..], true); let leaf1_id = self.add_node(NodeData::Leaf(leaf1_path, old_value), None); let leaf2_path = - to_encoded_path_with_bump(self.bump, &key_nibs[split_point..], true); + encoded_path_from_key(self.bump, key.advanced(split_point), true); let leaf2_id = self.add_node(NodeData::Leaf(leaf2_path, value), None); - children[self_nibs[common_len] as usize] = Some(leaf1_id); - children[key_nibs[common_len] as usize] = Some(leaf2_id); + children[self_nibs[common_len] as usize] = Some(branch_child_id(leaf1_id)); + children[usize::from(key.nib(common_len))] = + Some(branch_child_id(leaf2_id)); let branch_children = self.alloc_branch(children); let new_node_data = if common_len > 0 { @@ -778,31 +826,31 @@ impl<'a> Mpt<'a> { } } NodeData::Extension(prefix, child_id) => { - if let Some(tail) = encoded_path_strip_prefix(prefix, key_nibs) { + if let Some(tail) = encoded_path_strip_prefix_key(prefix, key) { self.insert_internal(child_id, tail, value)? } else { let self_nibs = prefix_to_nibs(prefix); - let common_len = lcp(&self_nibs, key_nibs); + let common_len = lcp_key(&self_nibs, key); - if common_len == key_nibs.len() { + if common_len == key.remaining() { return Err(Error::ValueInBranch); } let split_point = common_len + 1; - let mut children: [Option; 16] = Default::default(); + let mut children: [Option; 16] = Default::default(); if split_point < self_nibs.len() { let ext_path = to_encoded_path_with_bump(self.bump, &self_nibs[split_point..], false); let ext_id = self.add_node(NodeData::Extension(ext_path, child_id), None); - children[self_nibs[common_len] as usize] = Some(ext_id); + children[self_nibs[common_len] as usize] = Some(branch_child_id(ext_id)); } else { - children[self_nibs[common_len] as usize] = Some(child_id); + children[self_nibs[common_len] as usize] = Some(branch_child_id(child_id)); } let leaf_path = - to_encoded_path_with_bump(self.bump, &key_nibs[split_point..], true); + encoded_path_from_key(self.bump, key.advanced(split_point), true); let leaf_id = self.add_node(NodeData::Leaf(leaf_path, value), None); - children[key_nibs[common_len] as usize] = Some(leaf_id); + children[usize::from(key.nib(common_len))] = Some(branch_child_id(leaf_id)); let branch_children = self.alloc_branch(children); let new_node_data = if common_len > 0 { @@ -830,20 +878,21 @@ impl<'a> Mpt<'a> { } #[inline] - fn delete_internal(&mut self, node_id: NodeId, key_nibs: &[u8]) -> Result { + fn delete_internal(&mut self, node_id: NodeId, key: KeyNibbles<'_>) -> Result { let updated = match self.nodes[node_id as usize] { NodeData::Null => false, NodeData::Branch(children) => { - if let Some((i, tail)) = key_nibs.split_first() { - match children[*i as usize].get() { + if let Some((i, tail)) = key.split_first() { + match children[usize::from(i)].get() { Some(id) => { + let id = id.get(); if !self.delete_internal(id, tail)? { return Ok(false); } // if the node is now empty, remove it if matches!(self.nodes[id as usize], NodeData::Null) { - children[*i as usize].set(None); + children[usize::from(i)].set(None); } } None => return Ok(false), @@ -855,7 +904,7 @@ impl<'a> Mpt<'a> { let mut remaining_iter = children .iter() .enumerate() - .filter_map(|(index, n)| n.get().map(|id| (index, id))); + .filter_map(|(index, n)| n.get().map(|id| (index, id.get()))); // there will always be at least one remaining node let (index, child_id) = remaining_iter.next().unwrap(); @@ -900,14 +949,14 @@ impl<'a> Mpt<'a> { true } NodeData::Leaf(prefix, _) => { - if !encoded_path_eq_nibs(prefix, key_nibs) { + if !encoded_path_eq_key(prefix, key) { return Ok(false); } self.nodes[node_id as usize] = NodeData::Null; true } NodeData::Extension(prefix, child_id) => { - let tail = match encoded_path_strip_prefix(prefix, key_nibs) { + let tail = match encoded_path_strip_prefix_key(prefix, key) { Some(tail) => tail, None => return Ok(false), }; @@ -1003,10 +1052,11 @@ impl<'a> Mpt<'a> { return Err(Error::ValueInBranch); } - let mut childs: [Option; 16] = Default::default(); + let mut childs: [Option; 16] = Default::default(); for (i, mut item) in items.into_iter().take(16).enumerate() { let child_id = self.decode_from_proof_rlp_internal(&mut item)?; - childs[i] = if child_id == NULL_NODE_ID { None } else { Some(child_id) }; + // `BranchChildId::new` maps the `NULL_NODE_ID` sentinel (0) to `None`. + childs[i] = BranchChildId::new(child_id); } let children = self.alloc_branch(childs); self.add_node(NodeData::Branch(children), None) @@ -1039,7 +1089,7 @@ impl<'a> Mpt<'a> { match &self.nodes[node_id as usize] { NodeData::Branch(children) => { for child_id in children.iter().filter_map(Cell::get) { - self.payloads_internal(child_id, payloads); + self.payloads_internal(child_id.get(), payloads); } } NodeData::Extension(_, ext_id) => { @@ -1050,12 +1100,14 @@ impl<'a> Mpt<'a> { } } +#[cfg(feature = "std")] impl Mpt<'_> { pub fn print_trie(&self) { self.print_trie_internal(self.root_id, 0); } fn print_trie_internal(&self, node_id: NodeId, depth: usize) { + use revm_primitives::hex; let indent = " ".repeat(depth); match &self.nodes[node_id as usize] { NodeData::Null => { @@ -1066,7 +1118,7 @@ impl Mpt<'_> { for (i, child) in children.iter().enumerate() { if let Some(child_id) = child.get() { println!("{} [{}]:", indent, hex::encode([i as u8])); - self.print_trie_internal(child_id, depth + 2); + self.print_trie_internal(child_id.get(), depth + 2); } } } diff --git a/crates/revm-crypto/Cargo.toml b/crates/revm-crypto/Cargo.toml index 7c356ee1c..fea11ff40 100644 --- a/crates/revm-crypto/Cargo.toml +++ b/crates/revm-crypto/Cargo.toml @@ -12,32 +12,19 @@ workspace = true [dependencies] # revm revm.workspace = true +openvm-accelerators.workspace = true # alloy alloy-primitives = { workspace = true, features = ["map-foldhash"] } alloy-consensus = { workspace = true, features = ["crypto-backend"] } -# OpenVM dependencies for optimized crypto (only needed when running in zkvm) -openvm-curve-utils = { workspace = true, features = ["bn254", "bls12_381"] } -openvm-ecc-guest = { workspace = true } -openvm-sha2 = { workspace = true, features = ["import_sha2"] } -openvm-pairing = { workspace = true, features = ["bn254", "bls12_381"] } -openvm-k256 = { workspace = true } -openvm-p256 = { workspace = true } -openvm-kzg = { workspace = true, features = ["use-intrinsics"] } -openvm-keccak256 = { workspace = true } -aurora-engine-modexp = { version = "1.2.0", default-features = false } - -[dev-dependencies] -# arkworks-rs -ark-ff = "0.5" -ark-bn254 = "0.5" -ark-bls12-381 = "0.5" -ark-ec = "0.5" - -[target.'cfg(target_os = "zkvm")'.dependencies] +[target.'cfg(all(target_arch = "riscv64", any(target_os = "none", target_os = "openvm")))'.dependencies] revm-primitives = { workspace = true, features = ["hashbrown"] } alloy-primitives = { workspace = true, features = ["native-keccak"] } -[target.'cfg(not(target_os = "zkvm"))'.dependencies] -openvm-keccak256 = { workspace = true, features = ["tiny_keccak"] } +[features] +default = [] +std = ["openvm-accelerators/std"] + +[package.metadata.cargo-shear] +ignored = ["revm-primitives"] diff --git a/crates/revm-crypto/src/alloy.rs b/crates/revm-crypto/src/alloy.rs new file mode 100644 index 000000000..2c0980d24 --- /dev/null +++ b/crates/revm-crypto/src/alloy.rs @@ -0,0 +1,67 @@ +//! Alloy signer adapter for the standard zkVM accelerator C interface. + +use alloc::{boxed::Box, sync::Arc}; +use core::error::Error; + +use crate::status_ok; +use alloy_consensus::crypto::{ + backend::{install_default_provider, CryptoProvider}, + RecoveryError, +}; +use alloy_primitives::Address; +use openvm_accelerators::{ + zkvm_keccak256, zkvm_keccak256_hash, zkvm_secp256k1_ecrecover, zkvm_secp256k1_hash, + zkvm_secp256k1_pubkey, zkvm_secp256k1_signature, zkvm_secp256k1_verify, +}; + +#[derive(Debug, Default)] +struct OpenVmK256Provider; + +impl CryptoProvider for OpenVmK256Provider { + fn recover_signer_unchecked( + &self, + signature: &[u8; 65], + msg: &[u8; 32], + ) -> Result { + let msg = zkvm_secp256k1_hash { data: *msg }; + let sig = zkvm_secp256k1_signature { data: signature[..64].try_into().unwrap() }; + let mut pubkey = zkvm_secp256k1_pubkey { data: [0; 64] }; + let status = unsafe { zkvm_secp256k1_ecrecover(&msg, &sig, signature[64], &mut pubkey) }; + if !status_ok(status) { + return Err(RecoveryError::new()); + } + Ok(address_from_pubkey(&pubkey.data)) + } + + fn verify_and_compute_signer_unchecked( + &self, + pubkey: &[u8; 65], + sig: &[u8; 64], + msg: &[u8; 32], + ) -> Result { + if pubkey[0] != 0x04 { + return Err(RecoveryError::new()); + } + let msg = zkvm_secp256k1_hash { data: *msg }; + let sig = zkvm_secp256k1_signature { data: *sig }; + let pubkey = zkvm_secp256k1_pubkey { data: pubkey[1..].try_into().unwrap() }; + let mut verified = false; + let status = unsafe { zkvm_secp256k1_verify(&msg, &sig, &pubkey, &mut verified) }; + if !status_ok(status) || !verified { + return Err(RecoveryError::new()); + } + Ok(address_from_pubkey(&pubkey.data)) + } +} + +fn address_from_pubkey(pubkey: &[u8; 64]) -> Address { + let mut hash = zkvm_keccak256_hash { data: [0; 32] }; + let status = unsafe { zkvm_keccak256(pubkey.as_ptr(), pubkey.len(), &mut hash) }; + assert!(status_ok(status), "zkVM accelerator call failed"); + Address::from_slice(&hash.data[12..]) +} + +pub(super) fn install() -> Result<(), Box> { + install_default_provider(Arc::new(OpenVmK256Provider))?; + Ok(()) +} diff --git a/crates/revm-crypto/src/lib.rs b/crates/revm-crypto/src/lib.rs index 0cfbbd94a..c3fe83c15 100644 --- a/crates/revm-crypto/src/lib.rs +++ b/crates/revm-crypto/src/lib.rs @@ -1,728 +1,24 @@ -//! OpenVM Crypto Implementation for REVM +//! OpenVM crypto providers for REVM and Alloy. //! -//! This module provides OpenVM-optimized implementations of cryptographic operations -//! for both transaction validation (via Alloy crypto provider) and precompile execution. +//! These adapters use the standard zkVM accelerator C interface. -use alloy_consensus::crypto::{ - backend::{install_default_provider, CryptoProvider}, - RecoveryError, -}; -use alloy_primitives::Address; -use openvm_ecc_guest::{ - algebra::IntMod, - weierstrass::{IntrinsicCurve, WeierstrassPoint}, - AffinePoint, Group, -}; -use openvm_k256::ecdsa::{signature::hazmat::PrehashVerifier, RecoveryId, Signature, VerifyingKey}; -use openvm_keccak256::keccak256; -use openvm_kzg::{Bytes32, Bytes48, KzgProof}; -use openvm_pairing::{ - bls12_381::{self as bls, Bls12_381}, - bn254::{self as bn, Bn254}, - PairingCheck, -}; -use openvm_sha2::Digest; -use revm::{ - install_crypto, - precompile::{ - bls12_381::{ - G1Point as BlsG1Point, G1PointScalar as BlsG1PointScalar, G2Point as BlsG2Point, - G2PointScalar as BlsG2PointScalar, - }, - bls12_381_const::{ - FP_LENGTH as BLS_FP_LEN, G1_LENGTH as BLS_G1_LEN, G2_LENGTH as BLS_G2_LEN, - SCALAR_LENGTH as BLS_SCALAR_LEN, - }, - Crypto, PrecompileHalt, - }, -}; -use std::{sync::Arc, vec::Vec}; +#![cfg_attr(not(feature = "std"), no_std)] -use openvm_curve_utils::SubgroupCheck; +extern crate alloc; -// BN254 constants -const BN_FQ_LEN: usize = 32; -const BN_G1_LEN: usize = 64; -const BN_G2_LEN: usize = 128; -/// BN_SCALAR_LEN specifies the number of bytes needed to represent an Fr element. -/// This is an element in the scalar field of BN254. -const BN_SCALAR_LEN: usize = 32; +mod alloy; +mod revm; -/// OpenVM k256 backend for Alloy crypto operations (transaction validation) -#[derive(Debug, Default)] -struct OpenVmK256Provider; +use alloc::boxed::Box; +use core::error::Error; +use openvm_accelerators::{zkvm_status, ZKVM_EOK}; -impl CryptoProvider for OpenVmK256Provider { - fn recover_signer_unchecked( - &self, - sig: &[u8; 65], - msg: &[u8; 32], - ) -> Result { - // Extract components: sig[0..32]=r, sig[32..64]=s, sig[64]=recovery_id - // Parse signature using OpenVM k256 - let mut signature = Signature::from_slice(&sig[..64]).map_err(|_| RecoveryError::new())?; - - // Normalize signature if needed - let mut recid = sig[64]; - if let Some(sig_normalized) = signature.normalize_s() { - signature = sig_normalized; - recid ^= 1; - } - - // Create recovery ID - let recovery_id = RecoveryId::from_byte(recid).ok_or(RecoveryError::new())?; - - // Recover public key using OpenVM - let recovered_key = - VerifyingKey::recover_from_prehash_noverify(msg, &signature.to_bytes(), recovery_id) - .map_err(|_| RecoveryError::new())?; - - // Hash the uncompressed SEC1 key without the 0x04 prefix. - let public_key = recovered_key.to_encoded_point(false); - let encoded_pubkey = &public_key.as_bytes()[1..65]; - - // Hash to get Ethereum address - let pubkey_hash = keccak256(encoded_pubkey); - let address_bytes = &pubkey_hash[12..32]; // Last 20 bytes - - Ok(Address::from_slice(address_bytes)) - } - - fn verify_and_compute_signer_unchecked( - &self, - pubkey: &[u8; 65], - sig: &[u8; 64], - msg: &[u8; 32], - ) -> Result { - let vk = VerifyingKey::from_sec1_bytes(pubkey).map_err(|_| RecoveryError::new())?; - - let mut signature = Signature::from_slice(sig).map_err(|_| RecoveryError::new())?; - if let Some(sig_normalized) = signature.normalize_s() { - signature = sig_normalized; - } - - vk.verify_prehash(msg.as_ref(), &signature).map_err(|_| RecoveryError::new())?; - - // Compute address directly from the provided pubkey bytes (skip 0x04 prefix) - let pubkey_hash = keccak256(&pubkey[1..65]); - Ok(Address::from_slice(&pubkey_hash[12..32])) - } -} - -/// OpenVM custom crypto implementation for faster precompiles -#[derive(Debug, Default)] -struct OpenVmCrypto; - -impl Crypto for OpenVmCrypto { - /// Custom SHA-256 implementation with openvm optimization - fn sha256(&self, input: &[u8]) -> [u8; 32] { - openvm_sha2::Sha256::digest(input).into() - } - - /// Custom BN254 G1 addition with openvm optimization - fn bn254_g1_add(&self, p1_bytes: &[u8], p2_bytes: &[u8]) -> Result<[u8; 64], PrecompileHalt> { - let p1 = read_bn_g1_point(p1_bytes)?; - let p2 = read_bn_g1_point(p2_bytes)?; - let result = p1 + p2; - Ok(encode_bn_g1_point(result)) - } - - /// Custom BN254 G1 scalar multiplication with openvm optimization - fn bn254_g1_mul( - &self, - point_bytes: &[u8], - scalar_bytes: &[u8], - ) -> Result<[u8; 64], PrecompileHalt> { - let p = read_bn_g1_point(point_bytes)?; - let s = read_bn_scalar(scalar_bytes); - let result = Bn254::msm(&[s], &[p]); - Ok(encode_bn_g1_point(result)) - } - - /// Custom BN254 pairing check with openvm optimization - fn bn254_pairing_check(&self, pairs: &[(&[u8], &[u8])]) -> Result { - if pairs.is_empty() { - return Ok(true); - } - let mut g1_points = Vec::with_capacity(pairs.len()); - let mut g2_points = Vec::with_capacity(pairs.len()); - - for (g1_bytes, g2_bytes) in pairs { - let g1 = read_bn_g1_point(g1_bytes)?; - let g2 = read_bn_g2_point(g2_bytes)?; - - let (g1_x, g1_y) = g1.into_coords(); - let g1 = AffinePoint::new(g1_x, g1_y); - - let (g2_x, g2_y) = g2.into_coords(); - let g2 = AffinePoint::new(g2_x, g2_y); - - g1_points.push(g1); - g2_points.push(g2); - } - - let pairing_result = Bn254::pairing_check(&g1_points, &g2_points).is_ok(); - Ok(pairing_result) - } - - /// Custom BLS12-381 G1 addition with openvm optimization - fn bls12_381_g1_add( - &self, - a: BlsG1Point, - b: BlsG1Point, - ) -> Result<[u8; BLS_G1_LEN], PrecompileHalt> { - // EIP-2537 G1ADD validates on-curve only, not subgroup membership. - let p1 = read_bls_g1_point_no_subgroup_check(&a)?; - let p2 = read_bls_g1_point_no_subgroup_check(&b)?; - let sum = p1 + p2; - Ok(encode_bls_g1_point(&sum)) - } - - /// Custom BLS12-381 G1 MSM with openvm optimization - fn bls12_381_g1_msm( - &self, - pairs: &mut dyn Iterator>, - ) -> Result<[u8; BLS_G1_LEN], PrecompileHalt> { - let mut scalars = Vec::new(); - let mut points = Vec::new(); - - for pair in pairs { - let (point_bytes, scalar_bytes) = pair?; - points.push(read_bls_g1_point(&point_bytes)?); - scalars.push(read_bls_scalar(&scalar_bytes)); - } - - if points.is_empty() { - return Ok([0u8; BLS_G1_LEN]); - } - - let result = Bls12_381::msm(&scalars, &points); - Ok(encode_bls_g1_point(&result)) - } - - /// Custom BLS12-381 G2 addition with openvm optimization - fn bls12_381_g2_add( - &self, - a: BlsG2Point, - b: BlsG2Point, - ) -> Result<[u8; BLS_G2_LEN], PrecompileHalt> { - // EIP-2537 G2ADD validates on-curve only, not subgroup membership. - let p1 = read_bls_g2_point_no_subgroup_check(&a)?; - let p2 = read_bls_g2_point_no_subgroup_check(&b)?; - let sum = p1 + p2; - Ok(encode_bls_g2_point(&sum)) - } - - /// Custom BLS12-381 G2 MSM with openvm optimization - fn bls12_381_g2_msm( - &self, - pairs: &mut dyn Iterator>, - ) -> Result<[u8; BLS_G2_LEN], PrecompileHalt> { - let mut scalars = Vec::new(); - let mut points = Vec::new(); - - for pair in pairs { - let (point_bytes, scalar_bytes) = pair?; - points.push(read_bls_g2_point(&point_bytes)?); - scalars.push(read_bls_scalar(&scalar_bytes)); - } - - if points.is_empty() { - return Ok([0u8; BLS_G2_LEN]); - } - - // directly using openvm_ecc_guest::msm here - let result = openvm_ecc_guest::msm(&scalars, &points); - Ok(encode_bls_g2_point(&result)) - } - - /// Custom BLS12-381 pairing check with openvm optimization - fn bls12_381_pairing_check( - &self, - pairs: &[(BlsG1Point, BlsG2Point)], - ) -> Result { - if pairs.is_empty() { - return Ok(true); - } - - let mut g1_points = Vec::with_capacity(pairs.len()); - let mut g2_points = Vec::with_capacity(pairs.len()); - - for (g1_bytes, g2_bytes) in pairs { - let g1 = read_bls_g1_point(g1_bytes)?; - let g2 = read_bls_g2_point(g2_bytes)?; - - let (g1_x, g1_y) = g1.into_coords(); - let (g2_x, g2_y) = g2.into_coords(); - - g1_points.push(AffinePoint::new(g1_x, g1_y)); - g2_points.push(AffinePoint::new(g2_x, g2_y)); - } - - let pairing_result = Bls12_381::pairing_check(&g1_points, &g2_points).is_ok(); - Ok(pairing_result) - } - - /// Custom secp256k1 ECDSA signature recovery with openvm optimization - fn secp256k1_ecrecover( - &self, - sig_bytes: &[u8; 64], - mut recid: u8, - msg_hash: &[u8; 32], - ) -> Result<[u8; 32], PrecompileHalt> { - let mut sig = Signature::from_slice(sig_bytes) - .map_err(|_| PrecompileHalt::other("Invalid signature format"))?; - - if let Some(sig_normalized) = sig.normalize_s() { - sig = sig_normalized; - recid ^= 1; - } - - let recovery_id = RecoveryId::from_byte(recid) - .ok_or_else(|| PrecompileHalt::other("Invalid recovery ID"))?; - - let recovered_key = - VerifyingKey::recover_from_prehash_noverify(msg_hash, &sig.to_bytes(), recovery_id) - .map_err(|_| PrecompileHalt::other("Key recovery failed"))?; - - let public_key = recovered_key.to_encoded_point(false); - let encoded_pubkey = &public_key.as_bytes()[1..65]; - - let pubkey_hash = keccak256(encoded_pubkey); - let mut address = [0u8; 32]; - address[12..].copy_from_slice(&pubkey_hash[12..]); - - Ok(address) - } - - /// Custom secp256r1 signature verification with openvm optimization - fn secp256r1_verify_signature(&self, msg: &[u8; 32], sig: &[u8; 64], pk: &[u8; 64]) -> bool { - use openvm_p256::{ - ecdsa::{signature::hazmat::PrehashVerifier, Signature, VerifyingKey}, - EncodedPoint, - }; - - // Can fail only if the input is not exact length. - let Ok(signature) = Signature::from_slice(sig) else { - return false; - }; - // Decode the public key bytes (x,y coordinates) using EncodedPoint - let encoded_point = EncodedPoint::from_untagged_bytes(&(*pk).into()); - // Create VerifyingKey from the encoded point - let Ok(public_key) = VerifyingKey::from_encoded_point(&encoded_point) else { - return false; - }; - - public_key.verify_prehash(msg, &signature).is_ok() - } - - /// Custom KZG point evaluation with configurable backends - fn verify_kzg_proof( - &self, - z: &[u8; 32], - y: &[u8; 32], - commitment: &[u8; 48], - proof: &[u8; 48], - ) -> Result<(), PrecompileHalt> { - let env = openvm_kzg::EnvKzgSettings::default(); - let kzg_settings = env.get(); - - let commitment_bytes = Bytes48::from_slice(commitment) - .map_err(|_| PrecompileHalt::other("invalid commitment bytes"))?; - let z_bytes = - Bytes32::from_slice(z).map_err(|_| PrecompileHalt::other("invalid z bytes"))?; - let y_bytes = - Bytes32::from_slice(y).map_err(|_| PrecompileHalt::other("invalid y bytes"))?; - let proof_bytes = - Bytes48::from_slice(proof).map_err(|_| PrecompileHalt::other("invalid proof bytes"))?; - - let valid = KzgProof::verify_kzg_proof( - &commitment_bytes, - &z_bytes, - &y_bytes, - &proof_bytes, - kzg_settings, - ) - .map_err(|_| PrecompileHalt::other("openvm kzg proof verification failed"))?; - if valid { - Ok(()) - } else { - Err(PrecompileHalt::BlobVerifyKzgProofFailed) - } - } - - /// Custom modular exponentiation with BN254 Fr acceleration - fn modexp(&self, base: &[u8], exp: &[u8], modulus: &[u8]) -> Result, PrecompileHalt> { - if is_bn254_fr(modulus) { - return Ok(accelerated_modexp_bn254_fr(base, exp)); - } - Ok(aurora_engine_modexp::modexp(base, exp, modulus)) - } -} - -/// Returns true if the modulus (big-endian, possibly with leading zeros) equals BN254 Fr. -fn is_bn254_fr(modulus: &[u8]) -> bool { - // Strip leading zeros - let stripped = match modulus.iter().position(|&b| b != 0) { - Some(i) => &modulus[i..], - None => return false, // all zeros - }; - // bn::Scalar::MODULUS is little-endian; compare against reversed input - stripped.len() == BN_SCALAR_LEN && stripped.iter().rev().eq(bn::Scalar::MODULUS.as_ref().iter()) -} - -/// Accelerated modexp for BN254 Fr using field arithmetic intrinsics. -fn accelerated_modexp_bn254_fr(base: &[u8], exp: &[u8]) -> Vec { - use openvm_ecc_guest::algebra::{ExpBytes, Reduce}; - - // OpenVM's field reduction requires inputs to be aligned to the field byte size. - let padded_len = base.len().next_multiple_of(BN_SCALAR_LEN).max(BN_SCALAR_LEN); - let mut padded = vec![0u8; padded_len]; - padded[padded_len - base.len()..].copy_from_slice(base); - let base_fr = bn::Scalar::reduce_be_bytes(&padded); - - base_fr.exp_bytes(true, exp).to_be_bytes().as_ref().to_vec() +fn status_ok(status: zkvm_status) -> bool { + status == ZKVM_EOK } -/// Install OpenVM crypto implementations globally -pub fn install_openvm_crypto() -> Result> { - // Install OpenVM k256 provider for Alloy (transaction validation) - install_default_provider(Arc::new(OpenVmK256Provider))?; - - // Install OpenVM crypto for REVM precompiles - let installed = install_crypto(OpenVmCrypto); - - Ok(installed) -} - -// Helper functions for BN254 operations - -#[inline] -fn read_bn_fq(input: &[u8]) -> Result { - if input.len() < BN_FQ_LEN { - Err(PrecompileHalt::Bn254FieldPointNotAMember) - } else { - bn::Fp::from_be_bytes(&input[..BN_FQ_LEN]).ok_or(PrecompileHalt::Bn254FieldPointNotAMember) - } -} - -#[inline] -fn read_bn_fq2(input: &[u8]) -> Result { - let y = read_bn_fq(&input[..BN_FQ_LEN])?; - let x = read_bn_fq(&input[BN_FQ_LEN..BN_FQ_LEN * 2])?; - Ok(bn::Fp2::new(x, y)) -} - -#[inline] -fn read_bn_g1_point(input: &[u8]) -> Result { - if input.len() != BN_G1_LEN { - return Err(PrecompileHalt::Bn254PairLength); - } - let px = read_bn_fq(&input[0..BN_FQ_LEN])?; - let py = read_bn_fq(&input[BN_FQ_LEN..BN_G1_LEN])?; - // SAFETY: `read_bn_fq` produces canonical Fp elements; `from_xy` itself checks the curve - // equation and returns `None` if `(px, py)` is not on the curve. - let point = unsafe { bn::G1Affine::from_xy(px, py) } - .ok_or(PrecompileHalt::Bn254AffineGFailedToCreate)?; - if point.is_in_correct_subgroup() { - Ok(point) - } else { - Err(PrecompileHalt::Bn254AffineGFailedToCreate) - } -} - -#[inline] -fn read_bn_g2_point(input: &[u8]) -> Result { - if input.len() != BN_G2_LEN { - return Err(PrecompileHalt::Bn254PairLength); - } - let c0 = read_bn_fq2(&input[0..BN_G1_LEN])?; - let c1 = read_bn_fq2(&input[BN_G1_LEN..BN_G2_LEN])?; - // SAFETY: `read_bn_fq2` produces canonical Fp2 elements; `from_xy` itself checks the curve - // equation and returns `None` if `(c0, c1)` is not on the twist. - let point = unsafe { bn::G2Affine::from_xy(c0, c1) } - .ok_or(PrecompileHalt::Bn254AffineGFailedToCreate)?; - if point.is_in_correct_subgroup() { - Ok(point) - } else { - Err(PrecompileHalt::Bn254AffineGFailedToCreate) - } -} - -#[inline] -fn encode_bn_g1_point(point: bn::G1Affine) -> [u8; BN_G1_LEN] { - let mut output = [0u8; BN_G1_LEN]; - - let x_bytes: &[u8] = point.x().as_le_bytes(); - let y_bytes: &[u8] = point.y().as_le_bytes(); - for i in 0..BN_FQ_LEN { - output[i] = x_bytes[BN_FQ_LEN - 1 - i]; - output[i + BN_FQ_LEN] = y_bytes[BN_FQ_LEN - 1 - i]; - } - output -} - -/// Reads a scalar from the input slice -/// -/// Note: The scalar does not need to be canonical. -/// -/// # Panics -/// -/// If `input.len()` is not equal to [`BN_SCALAR_LEN`]. -#[inline] -fn read_bn_scalar(input: &[u8]) -> bn::Scalar { - assert_eq!( - input.len(), - BN_SCALAR_LEN, - "unexpected scalar length. got {}, expected {BN_SCALAR_LEN}", - input.len() - ); - bn::Scalar::from_be_bytes_unchecked(input) -} - -// Helper functions for BLS12-381 operations - -#[inline] -fn read_bls_fp(input: &[u8]) -> Result { - if input.len() != BLS_FP_LEN { - return Err(PrecompileHalt::other("invalid BLS12-381 fp length")); - } - bls::Fp::from_be_bytes(input) - .ok_or_else(|| PrecompileHalt::other("element not in BLS12-381 base field")) -} - -#[inline] -fn read_bls_fp2(c0: &[u8], c1: &[u8]) -> Result { - let real = read_bls_fp(c0)?; - let imag = read_bls_fp(c1)?; - Ok(bls::Fp2::new(real, imag)) -} - -#[inline] -fn read_bls_g1_point_no_subgroup_check( - point: &BlsG1Point, -) -> Result { - let px = read_bls_fp(&point.0)?; - let py = read_bls_fp(&point.1)?; - // SAFETY: `read_bls_fp` produces canonical Fp elements; `from_xy` itself checks the curve - // equation and returns `None` if `(px, py)` is not on the curve. - unsafe { bls::G1Affine::from_xy(px, py) }.ok_or(PrecompileHalt::Bls12381G1NotOnCurve) -} - -#[inline] -fn read_bls_g1_point(point: &BlsG1Point) -> Result { - let point = read_bls_g1_point_no_subgroup_check(point)?; - if point.is_in_correct_subgroup() { - Ok(point) - } else { - Err(PrecompileHalt::Bls12381G1NotInSubgroup) - } -} - -#[inline] -fn read_bls_g2_point_no_subgroup_check( - point: &BlsG2Point, -) -> Result { - let x = read_bls_fp2(&point.0, &point.1)?; - let y = read_bls_fp2(&point.2, &point.3)?; - // SAFETY: `read_bls_fp2` produces canonical Fp2 elements; `from_xy` itself checks the curve - // equation and returns `None` if `(x, y)` is not on the twist. - unsafe { bls::G2Affine::from_xy(x, y) }.ok_or(PrecompileHalt::Bls12381G2NotOnCurve) -} - -#[inline] -fn read_bls_g2_point(point: &BlsG2Point) -> Result { - let point = read_bls_g2_point_no_subgroup_check(point)?; - if point.is_in_correct_subgroup() { - Ok(point) - } else { - Err(PrecompileHalt::Bls12381G2NotInSubgroup) - } -} - -#[inline] -fn read_bls_scalar(input: &[u8]) -> bls::Scalar { - assert_eq!( - input.len(), - BLS_SCALAR_LEN, - "unexpected scalar length. got {}, expected {BLS_SCALAR_LEN}", - input.len() - ); - bls::Scalar::from_be_bytes_unchecked(input) -} - -#[inline] -fn encode_bls_g1_point(point: &bls::G1Affine) -> [u8; BLS_G1_LEN] { - if point.is_identity() { - return [0u8; BLS_G1_LEN]; - } - - let mut output = [0u8; BLS_G1_LEN]; - let x_bytes: &[u8] = point.x().as_le_bytes(); - let y_bytes: &[u8] = point.y().as_le_bytes(); - for i in 0..BLS_FP_LEN { - output[i] = x_bytes[BLS_FP_LEN - 1 - i]; - output[i + BLS_FP_LEN] = y_bytes[BLS_FP_LEN - 1 - i]; - } - output -} - -#[inline] -fn encode_bls_g2_point(point: &bls::G2Affine) -> [u8; BLS_G2_LEN] { - if point.is_identity() { - return [0u8; BLS_G2_LEN]; - } - - let mut output = [0u8; BLS_G2_LEN]; - let x = point.x(); - let y = point.y(); - let x_c0 = x.c0.as_le_bytes(); - let x_c1 = x.c1.as_le_bytes(); - let y_c0 = y.c0.as_le_bytes(); - let y_c1 = y.c1.as_le_bytes(); - for i in 0..BLS_FP_LEN { - output[i] = x_c0[BLS_FP_LEN - 1 - i]; - output[i + BLS_FP_LEN] = x_c1[BLS_FP_LEN - 1 - i]; - output[i + (2 * BLS_FP_LEN)] = y_c0[BLS_FP_LEN - 1 - i]; - output[i + (3 * BLS_FP_LEN)] = y_c1[BLS_FP_LEN - 1 - i]; - } - output -} - -#[cfg(test)] -mod tests { - use super::*; - - /// Runs `secp256r1_verify_signature` on a 160-byte P256VERIFY input (msg || sig || pk). - fn p256_verify_input(input_hex: &str) -> bool { - let input = alloy_primitives::hex::decode(input_hex).unwrap(); - assert_eq!(input.len(), 160); - OpenVmCrypto.secp256r1_verify_signature( - input[..32].try_into().unwrap(), - input[32..96].try_into().unwrap(), - input[96..160].try_into().unwrap(), - ) - } - - // Test vectors from https://github.com/daimo-eth/p256-verifier/tree/master/test-vectors, - // as used by revm-precompile's secp256r1 tests. - #[test] - fn test_secp256r1_verify_signature() { - // valid signature - assert!(p256_verify_input("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e")); - assert!(p256_verify_input("3fec5769b5cf4e310a7d150508e82fb8e3eda1c2c94c61492d3bd8aea99e06c9e22466e928fdccef0de49e3503d2657d00494a00e764fd437bdafa05f5922b1fbbb77c6817ccf50748419477e843d5bac67e6a70e97dde5a57e0c983b777e1ad31a80482dadf89de6302b1988c82c29544c9c07bb910596158f6062517eb089a2f54c9a0f348752950094d3228d3b940258c75fe2a413cb70baa21dc2e352fc5")); - // wrong message - assert!(!p256_verify_input("3cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e")); - // signature values out of range - assert!(!p256_verify_input("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e")); - // public key not on the curve - assert!(!p256_verify_input("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")); - } - - /// BN254 Fr modulus in big-endian bytes - fn bn254_fr_modulus_be() -> Vec { - let m = bn::Scalar::MODULUS; - m.as_ref().iter().rev().copied().collect() - } - - /// Reference implementation: aurora_engine_modexp - fn reference_modexp(base: &[u8], exp: &[u8], modulus: &[u8]) -> Vec { - aurora_engine_modexp::modexp(base, exp, modulus) - } - - /// Helper: run accelerated and compare against reference. - /// The accelerated path always returns BN_SCALAR_LEN bytes, so we left-pad the - /// reference output to match. - fn check(base: &[u8], exp: &[u8]) { - let modulus = bn254_fr_modulus_be(); - let expected = reference_modexp(base, exp, &modulus); - let actual = accelerated_modexp_bn254_fr(base, exp); - let mut expected_padded = vec![0u8; BN_SCALAR_LEN]; - let offset = BN_SCALAR_LEN - expected.len(); - expected_padded[offset..].copy_from_slice(&expected); - assert_eq!(actual, expected_padded, "base={base:?}, exp={exp:?}"); - } - - #[test] - fn test_is_bn254_fr() { - // Exact modulus - assert!(is_bn254_fr(&bn254_fr_modulus_be())); - - // With leading zeros - let mut padded = vec![0u8; 10]; - padded.extend_from_slice(&bn254_fr_modulus_be()); - assert!(is_bn254_fr(&padded)); - - // All zeros → false - assert!(!is_bn254_fr(&[0u8; 32])); - - // Wrong modulus (flip last bit) - let mut m = bn254_fr_modulus_be(); - *m.last_mut().unwrap() ^= 1; - assert!(!is_bn254_fr(&m)); - } - - #[test] - fn test_accelerated_modexp_bn254_fr() { - // --- short base (<=32 bytes), value < modulus --- - check(&[3], &[5]); // 3^5 mod Fr - check(&[0], &[5]); // 0^5 = 0 - check(&[3], &[0]); // 3^0 = 1 - check(&[0], &[0]); // 0^0 = 1 by convention - check(&[], &[]); // empty inputs - check(&[0, 0, 0, 3], &[5]); // leading zeros in base - - // --- short base, value >= modulus (triggers reduce fallback) --- - let m = bn254_fr_modulus_be(); - check(&m, &[1]); // Fr mod Fr = 0, so 0^1 = 0 - let mut m_plus_1 = m.clone(); - *m_plus_1.last_mut().unwrap() = m_plus_1.last().unwrap().wrapping_add(1); - check(&m_plus_1, &[2]); // (Fr+1)^2 mod Fr = 1 - check(&[0xff; 32], &[1]); // max 256-bit value, >= modulus - - // --- large base (> 32 bytes, reduce_be_bytes path) --- - check(&[0xab; 64], &[3]); // aligned (multiple of 32) - check(&[0x42; 100], &[2]); // unaligned (tests padding fix) - check(&[0xab; 64], &[0xff; 32]); // large base + large exponent - - // --- larger exponents --- - check(&[2], &[0xff; 32]); // 2^(2^256-1) mod Fr - check(&[2], &[0, 0, 0, 5]); // leading zeros in exponent - check(&[3], &[0xab; 64]); // exponent > 32 bytes - - // --- cross-path consistency: same value through different code paths --- - // 33-byte base with leading zero (reduce_be_bytes path) vs 32-byte base (from_be_bytes - // path) - let base_32 = [0xab; 32]; - let mut base_33 = vec![0u8]; - base_33.extend_from_slice(&base_32); - let exp = &[7]; - assert_eq!( - accelerated_modexp_bn254_fr(&base_32, exp), - accelerated_modexp_bn254_fr(&base_33, exp), - "33-byte base with leading zero must match 32-byte base" - ); - } - - /// Test the `Crypto::modexp` dispatch: accelerated path for BN254 Fr, - /// aurora fallback for other moduli. - #[test] - fn test_modexp_dispatch() { - let crypto = OpenVmCrypto; - let fr_mod = bn254_fr_modulus_be(); - - // Accelerated path: BN254 Fr modulus - let accel = crypto.modexp(&[3], &[5], &fr_mod).unwrap(); - let reference = reference_modexp(&[3], &[5], &fr_mod); - let mut ref_padded = vec![0u8; BN_SCALAR_LEN]; - let offset = BN_SCALAR_LEN - reference.len(); - ref_padded[offset..].copy_from_slice(&reference); - assert_eq!(accel, ref_padded, "accelerated path should match reference"); - - // Fallback path: non-BN254 modulus (e.g. small prime 7) - let other_mod = &[7]; - let fallback = crypto.modexp(&[3], &[4], other_mod).unwrap(); - let expected = reference_modexp(&[3], &[4], other_mod); - assert_eq!(fallback, expected, "fallback path should match reference"); - } +/// Install the OpenVM implementations globally. +pub fn install_openvm_crypto() -> Result> { + alloy::install()?; + Ok(revm::install()) } diff --git a/crates/revm-crypto/src/revm.rs b/crates/revm-crypto/src/revm.rs new file mode 100644 index 000000000..ba7468a8a --- /dev/null +++ b/crates/revm-crypto/src/revm.rs @@ -0,0 +1,391 @@ +//! REVM adapter for the standard zkVM accelerator C interface. + +use alloc::vec::Vec; +use core::mem::MaybeUninit; + +use crate::status_ok; +use openvm_accelerators::{ + zkvm_blake2f, zkvm_blake2f_message, zkvm_blake2f_offset, zkvm_blake2f_state, zkvm_bls12_381_fp, + zkvm_bls12_381_fp2, zkvm_bls12_381_g1_msm_pair, zkvm_bls12_381_g1_point, + zkvm_bls12_381_g2_msm_pair, zkvm_bls12_381_g2_point, zkvm_bls12_381_pairing_pair, + zkvm_bls12_381_scalar, zkvm_bls12_g1_add, zkvm_bls12_g1_msm, zkvm_bls12_g2_add, + zkvm_bls12_g2_msm, zkvm_bls12_map_fp2_to_g2, zkvm_bls12_map_fp_to_g1, zkvm_bls12_pairing, + zkvm_bn254_g1_add, zkvm_bn254_g1_mul, zkvm_bn254_g1_point, zkvm_bn254_g2_point, + zkvm_bn254_pairing, zkvm_bn254_pairing_pair, zkvm_bn254_scalar, zkvm_keccak256, + zkvm_keccak256_hash, zkvm_kzg_commitment, zkvm_kzg_field_element, zkvm_kzg_point_eval, + zkvm_kzg_proof, zkvm_modexp, zkvm_ripemd160, zkvm_ripemd160_hash, zkvm_secp256k1_ecrecover, + zkvm_secp256k1_hash, zkvm_secp256k1_pubkey, zkvm_secp256k1_signature, zkvm_secp256r1_hash, + zkvm_secp256r1_pubkey, zkvm_secp256r1_signature, zkvm_secp256r1_verify, zkvm_sha256, + zkvm_sha256_hash, +}; +use revm::precompile::{ + bls12_381::{ + G1Point as BlsG1Point, G1PointScalar as BlsG1PointScalar, G2Point as BlsG2Point, + G2PointScalar as BlsG2PointScalar, + }, + bls12_381_const::{FP_LENGTH as BLS_FP_LEN, G1_LENGTH as BLS_G1_LEN, G2_LENGTH as BLS_G2_LEN}, + Crypto, PrecompileHalt, +}; + +fn bls_g1((x, y): BlsG1Point) -> zkvm_bls12_381_g1_point { + let mut data = [0; BLS_G1_LEN]; + data[..BLS_FP_LEN].copy_from_slice(&x); + data[BLS_FP_LEN..].copy_from_slice(&y); + zkvm_bls12_381_g1_point { data } +} + +fn bls_g2((x0, x1, y0, y1): BlsG2Point) -> zkvm_bls12_381_g2_point { + let mut data = [0; BLS_G2_LEN]; + for (output, coordinate) in data.chunks_exact_mut(BLS_FP_LEN).zip([x0, x1, y0, y1]) { + output.copy_from_slice(&coordinate); + } + zkvm_bls12_381_g2_point { data } +} + +fn write_words(words: &[u64; N], bytes: &mut [u8]) { + for (output, word) in bytes.chunks_exact_mut(8).zip(words) { + output.copy_from_slice(&word.to_le_bytes()); + } +} + +#[derive(Debug, Default)] +struct OpenVmCrypto; + +impl Crypto for OpenVmCrypto { + fn sha256(&self, input: &[u8]) -> [u8; 32] { + let mut output = zkvm_sha256_hash { data: [0; 32] }; + let status = unsafe { zkvm_sha256(input.as_ptr(), input.len(), &mut output) }; + assert!(status_ok(status), "zkVM accelerator call failed"); + output.data + } + + fn ripemd160(&self, input: &[u8]) -> [u8; 32] { + let mut output = zkvm_ripemd160_hash { data: [0; 32] }; + let status = unsafe { zkvm_ripemd160(input.as_ptr(), input.len(), &mut output) }; + assert!(status_ok(status), "zkVM accelerator call failed"); + output.data + } + + fn bn254_g1_add(&self, p1: &[u8], p2: &[u8]) -> Result<[u8; 64], PrecompileHalt> { + let p1 = zkvm_bn254_g1_point { + data: p1.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }; + let p2 = zkvm_bn254_g1_point { + data: p2.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }; + let mut output = zkvm_bn254_g1_point { data: [0; 64] }; + let status = unsafe { zkvm_bn254_g1_add(&p1, &p2, &mut output) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bn254AffineGFailedToCreate); + } + Ok(output.data) + } + + fn bn254_g1_mul(&self, point: &[u8], scalar: &[u8]) -> Result<[u8; 64], PrecompileHalt> { + let point = zkvm_bn254_g1_point { + data: point.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }; + let scalar = zkvm_bn254_scalar { + data: scalar.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }; + let mut output = zkvm_bn254_g1_point { data: [0; 64] }; + let status = unsafe { zkvm_bn254_g1_mul(&point, &scalar, &mut output) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bn254AffineGFailedToCreate); + } + Ok(output.data) + } + + fn bn254_pairing_check(&self, pairs: &[(&[u8], &[u8])]) -> Result { + let pairs: Result, _> = pairs + .iter() + .map(|&(g1, g2)| { + Ok(zkvm_bn254_pairing_pair { + g1: zkvm_bn254_g1_point { + data: g1.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }, + g2: zkvm_bn254_g2_point { + data: g2.try_into().map_err(|_| PrecompileHalt::Bn254PairLength)?, + }, + }) + }) + .collect(); + let pairs = pairs?; + let mut verified = false; + let status = unsafe { zkvm_bn254_pairing(pairs.as_ptr(), pairs.len(), &mut verified) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bn254AffineGFailedToCreate); + } + Ok(verified) + } + + fn secp256k1_ecrecover( + &self, + sig: &[u8; 64], + recid: u8, + msg: &[u8; 32], + ) -> Result<[u8; 32], PrecompileHalt> { + let msg = zkvm_secp256k1_hash { data: *msg }; + let sig = zkvm_secp256k1_signature { data: *sig }; + let mut pubkey = zkvm_secp256k1_pubkey { data: [0; 64] }; + let status = unsafe { zkvm_secp256k1_ecrecover(&msg, &sig, recid, &mut pubkey) }; + if !status_ok(status) { + return Err(PrecompileHalt::Secp256k1RecoverFailed); + } + let mut hash = zkvm_keccak256_hash { data: [0; 32] }; + let status = unsafe { zkvm_keccak256(pubkey.data.as_ptr(), pubkey.data.len(), &mut hash) }; + assert!(status_ok(status), "zkVM accelerator call failed"); + hash.data[..12].fill(0); + Ok(hash.data) + } + + fn modexp(&self, base: &[u8], exp: &[u8], modulus: &[u8]) -> Result, PrecompileHalt> { + let mut output = alloc::vec![0; modulus.len()]; + let status = unsafe { + zkvm_modexp( + base.as_ptr(), + base.len(), + exp.as_ptr(), + exp.len(), + modulus.as_ptr(), + modulus.len(), + output.as_mut_ptr(), + ) + }; + assert!(status_ok(status), "zkVM accelerator call failed"); + Ok(output) + } + + fn blake2_compress(&self, rounds: u32, h: &mut [u64; 8], m: &[u64; 16], t: &[u64; 2], f: bool) { + let mut state = zkvm_blake2f_state { data: [0; 64] }; + let mut message = zkvm_blake2f_message { data: [0; 128] }; + let mut offset = zkvm_blake2f_offset { data: [0; 16] }; + write_words(h, &mut state.data); + write_words(m, &mut message.data); + write_words(t, &mut offset.data); + let status = unsafe { zkvm_blake2f(rounds, &mut state, &message, &offset, u8::from(f)) }; + assert!(status_ok(status), "zkVM accelerator call failed"); + for (word, bytes) in h.iter_mut().zip(state.data.as_chunks::<8>().0) { + *word = u64::from_le_bytes(*bytes); + } + } + + fn secp256r1_verify_signature(&self, msg: &[u8; 32], sig: &[u8; 64], pk: &[u8; 64]) -> bool { + let msg = zkvm_secp256r1_hash { data: *msg }; + let sig = zkvm_secp256r1_signature { data: *sig }; + let pubkey = zkvm_secp256r1_pubkey { data: *pk }; + let mut verified = false; + let status = unsafe { zkvm_secp256r1_verify(&msg, &sig, &pubkey, &mut verified) }; + status_ok(status) && verified + } + + fn verify_kzg_proof( + &self, + z: &[u8; 32], + y: &[u8; 32], + commitment: &[u8; 48], + proof: &[u8; 48], + ) -> Result<(), PrecompileHalt> { + let commitment = zkvm_kzg_commitment { data: *commitment }; + let z = zkvm_kzg_field_element { data: *z }; + let y = zkvm_kzg_field_element { data: *y }; + let proof = zkvm_kzg_proof { data: *proof }; + let mut verified = false; + let status = unsafe { zkvm_kzg_point_eval(&commitment, &z, &y, &proof, &mut verified) }; + if status_ok(status) && verified { + Ok(()) + } else { + Err(PrecompileHalt::BlobVerifyKzgProofFailed) + } + } + + fn bls12_381_g1_add( + &self, + a: BlsG1Point, + b: BlsG1Point, + ) -> Result<[u8; BLS_G1_LEN], PrecompileHalt> { + let (a, b) = (bls_g1(a), bls_g1(b)); + let mut output = MaybeUninit::::uninit(); + let status = unsafe { zkvm_bls12_g1_add(&a, &b, output.as_mut_ptr()) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bls12381G1NotOnCurve); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } + + fn bls12_381_g1_msm( + &self, + pairs: &mut dyn Iterator>, + ) -> Result<[u8; BLS_G1_LEN], PrecompileHalt> { + let mut wire_pairs = Vec::with_capacity(pairs.size_hint().0); + for pair in pairs { + let (point, scalar) = pair?; + wire_pairs.push(zkvm_bls12_381_g1_msm_pair { + point: bls_g1(point), + scalar: zkvm_bls12_381_scalar { data: scalar }, + }); + } + let mut output = MaybeUninit::::uninit(); + let status = unsafe { + zkvm_bls12_g1_msm(wire_pairs.as_ptr(), wire_pairs.len(), output.as_mut_ptr()) + }; + if !status_ok(status) { + return Err(PrecompileHalt::Bls12381G1NotInSubgroup); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } + + fn bls12_381_g2_add( + &self, + a: BlsG2Point, + b: BlsG2Point, + ) -> Result<[u8; BLS_G2_LEN], PrecompileHalt> { + let (a, b) = (bls_g2(a), bls_g2(b)); + let mut output = MaybeUninit::::uninit(); + let status = unsafe { zkvm_bls12_g2_add(&a, &b, output.as_mut_ptr()) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bls12381G2NotOnCurve); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } + + fn bls12_381_g2_msm( + &self, + pairs: &mut dyn Iterator>, + ) -> Result<[u8; BLS_G2_LEN], PrecompileHalt> { + let mut wire_pairs = Vec::with_capacity(pairs.size_hint().0); + for pair in pairs { + let (point, scalar) = pair?; + wire_pairs.push(zkvm_bls12_381_g2_msm_pair { + point: bls_g2(point), + scalar: zkvm_bls12_381_scalar { data: scalar }, + }); + } + let mut output = MaybeUninit::::uninit(); + let status = unsafe { + zkvm_bls12_g2_msm(wire_pairs.as_ptr(), wire_pairs.len(), output.as_mut_ptr()) + }; + if !status_ok(status) { + return Err(PrecompileHalt::Bls12381G2NotInSubgroup); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } + + fn bls12_381_pairing_check( + &self, + pairs: &[(BlsG1Point, BlsG2Point)], + ) -> Result { + let pairs: Vec<_> = pairs + .iter() + .copied() + .map(|(p1, p2)| zkvm_bls12_381_pairing_pair { g1: bls_g1(p1), g2: bls_g2(p2) }) + .collect(); + let mut verified = MaybeUninit::::uninit(); + let status = + unsafe { zkvm_bls12_pairing(pairs.as_ptr(), pairs.len(), verified.as_mut_ptr()) }; + if !status_ok(status) { + return Err(PrecompileHalt::Bls12381G1NotInSubgroup); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { verified.assume_init() }) + } + + fn bls12_381_fp_to_g1( + &self, + fp: &[u8; BLS_FP_LEN], + ) -> Result<[u8; BLS_G1_LEN], PrecompileHalt> { + let fp = zkvm_bls12_381_fp { data: *fp }; + let mut output = MaybeUninit::::uninit(); + let status = unsafe { zkvm_bls12_map_fp_to_g1(&fp, output.as_mut_ptr()) }; + if !status_ok(status) { + return Err(PrecompileHalt::NonCanonicalFp); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } + + fn bls12_381_fp2_to_g2( + &self, + fp2: ([u8; BLS_FP_LEN], [u8; BLS_FP_LEN]), + ) -> Result<[u8; BLS_G2_LEN], PrecompileHalt> { + let mut data = [0; BLS_FP_LEN * 2]; + data[..BLS_FP_LEN].copy_from_slice(&fp2.0); + data[BLS_FP_LEN..].copy_from_slice(&fp2.1); + let fp2 = zkvm_bls12_381_fp2 { data }; + let mut output = MaybeUninit::::uninit(); + let status = unsafe { zkvm_bls12_map_fp2_to_g2(&fp2, output.as_mut_ptr()) }; + if !status_ok(status) { + return Err(PrecompileHalt::NonCanonicalFp); + } + // SAFETY: the C interface initializes the output when it returns success. + Ok(unsafe { output.assume_init() }.data) + } +} + +pub(super) fn install() -> bool { + revm::install_crypto(OpenVmCrypto) +} + +#[cfg(test)] +mod tests { + use super::*; + use revm::precompile::DefaultCrypto; + + #[test] + fn portable_operations_match_revm() { + let input = b"OpenVM accelerator C interface"; + assert_eq!(OpenVmCrypto.sha256(input), DefaultCrypto.sha256(input)); + assert_eq!(OpenVmCrypto.ripemd160(input), DefaultCrypto.ripemd160(input)); + assert_eq!( + OpenVmCrypto.modexp(&[0x12; 40], &[0x34; 3], &[0xef; 24]), + DefaultCrypto.modexp(&[0x12; 40], &[0x34; 3], &[0xef; 24]) + ); + + let mut actual = [ + 0x6a09e667f3bcc908, + 0xbb67ae8584caa73b, + 0x3c6ef372fe94f82b, + 0xa54ff53a5f1d36f1, + 0x510e527fade682d1, + 0x9b05688c2b3e6c1f, + 0x1f83d9abfb41bd6b, + 0x5be0cd19137e2179, + ]; + let mut expected = actual; + let message = [0x0123_4567_89ab_cdef; 16]; + let offset = [0x1020_3040_5060_7080, 0x90a0_b0c0_d0e0_f000]; + OpenVmCrypto.blake2_compress(12, &mut actual, &message, &offset, true); + DefaultCrypto.blake2_compress(12, &mut expected, &message, &offset, true); + assert_eq!(actual, expected); + } + + #[test] + fn p256_accepts_valid_and_rejects_invalid_signatures() { + let input = alloy_primitives::hex::decode("4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e").unwrap(); + let msg = input[..32].try_into().unwrap(); + let signature = input[32..96].try_into().unwrap(); + let public_key = input[96..].try_into().unwrap(); + assert!(OpenVmCrypto.secp256r1_verify_signature(msg, signature, public_key)); + assert!(!OpenVmCrypto.secp256r1_verify_signature(msg, &[0; 64], public_key)); + } + + #[test] + fn c_status_failures_are_mapped_at_the_client_boundary() { + assert_eq!( + OpenVmCrypto.secp256k1_ecrecover(&[0; 64], 0, &[0; 32]), + Err(PrecompileHalt::Secp256k1RecoverFailed) + ); + assert_eq!( + OpenVmCrypto.bls12_381_fp_to_g1(&[0xff; BLS_FP_LEN]), + Err(PrecompileHalt::NonCanonicalFp) + ); + assert_eq!( + OpenVmCrypto.bn254_g1_add(&[0; 63], &[0; 64]), + Err(PrecompileHalt::Bn254PairLength) + ); + } +} diff --git a/crates/stateless-executor/Cargo.toml b/crates/stateless-executor/Cargo.toml index 0d7a61bef..0ae627d9f 100644 --- a/crates/stateless-executor/Cargo.toml +++ b/crates/stateless-executor/Cargo.toml @@ -36,14 +36,11 @@ revm.workspace = true revm-primitives.workspace = true # alloy -alloy-primitives = { workspace = true, features = ["rayon", "map-foldhash"] } +alloy-primitives = { workspace = true, features = ["map-foldhash"] } alloy-consensus = { workspace = true, features = ["crypto-backend", "serde-bincode-compat"] } alloy-rlp.workspace = true alloy-trie.workspace = true -[target.'cfg(target_os = "zkvm")'.dependencies] -openvm-guest-mem.workspace = true - [package.metadata.cargo-machete] ignored = ["reth-ethereum-primitives"] @@ -52,5 +49,5 @@ bincode = { workspace = true, features = ["serde", "std"] } [features] default = [] -std = ["openvm-chainspec/std"] +std = ["openvm-chainspec/std", "openvm-mpt/std"] openvm = ["dep:openvm-revm-crypto"] diff --git a/crates/stateless-executor/src/io.rs b/crates/stateless-executor/src/io.rs index 27789d808..d5e120640 100644 --- a/crates/stateless-executor/src/io.rs +++ b/crates/stateless-executor/src/io.rs @@ -1,4 +1,5 @@ -use std::iter::once; +use alloc::{format, string::ToString, vec::Vec}; +use core::iter::once; use crate::error::StatelessExecutorError; use alloy_consensus::Header; diff --git a/crates/stateless-executor/src/lib.rs b/crates/stateless-executor/src/lib.rs index 9aa31fe26..41bb8e9b0 100644 --- a/crates/stateless-executor/src/lib.rs +++ b/crates/stateless-executor/src/lib.rs @@ -1,8 +1,13 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; + pub mod error; /// Client program input data types. pub mod io; -use std::{fmt::Debug, sync::Arc}; +use alloc::{sync::Arc, vec, vec::Vec}; +use core::fmt::Debug; use alloy_consensus::{proofs::calculate_receipt_root, Header, TxReceipt}; use alloy_primitives::Bloom; @@ -17,11 +22,6 @@ use reth_revm::db::CacheDB; use bumpalo::Bump; -// Links the guest's optimized `memcmp`/`bcmp` overrides into every binary -// that executes blocks inside the zkVM. -#[cfg(target_os = "zkvm")] -use openvm_guest_mem as _; - use crate::{ error::StatelessExecutorError, io::{StatelessExecutorInput, StatelessExecutorInputWithState}, @@ -56,7 +56,6 @@ impl StatelessExecutor { // Install OpenVM crypto optimizations #[cfg(feature = "openvm")] { - println!("Installing OpenVM crypto optimizations"); openvm_revm_crypto::install_openvm_crypto() .expect("failed to install OpenVM crypto provider"); } diff --git a/run.sh b/run.sh index 9fd9b52d7..03fea66be 100755 --- a/run.sh +++ b/run.sh @@ -4,7 +4,7 @@ # # Options: # --mode Set the proving mode (default: prove-app) -# Valid modes: prove-app, prove-stark, prove-evm, keygen, generate-vm-vkey +# Valid modes: prove-app, prove-stark, prove-root, prove-evm, keygen, keygen-root, generate-vm-vkey # --generate-vm-vkey Shortcut for --mode generate-vm-vkey # --profile Set the Cargo build profile (default: profiling) # Valid profiles: dev, release, profiling @@ -18,7 +18,9 @@ # --num-children-internal # --segment-max-memory # --cuda Force CUDA acceleration (auto-detected if nvidia-smi available) -# --tco Use TCO instead of AOT (default is AOT on x86_64) +# --exec-mode Select the OpenVM execution backend: interpreter | tco | rvr. +# Defaults to rvr. +# rvr requires clang-22 and lld on PATH. # --perf Run with perf + samply host profiling and upload to Firefox Profiler # --nsys Run with nsys profiling and output summary stats # --nsys-gpu-metrics Include nsys GPU hardware metrics (`--gpu-metrics-devices=all`). @@ -50,14 +52,16 @@ DEST="$REPO_ROOT/bin/reth-benchmark/elf/openvm-stateless-guest" build_openvm_guest_elf() { cd "$REPO_ROOT/bin/stateless-guest" - OPENVM_RUST_TOOLCHAIN=$RUST_TOOLCHAIN cargo openvm build + cargo openvm build mkdir -p ../reth-benchmark/elf - SRC="target/riscv32im-risc0-zkvm-elf/release/openvm-stateless-guest" - cp "$SRC" "$DEST" + SRC="target/riscv64im-unknown-openvm-elf/release/openvm-stateless-guest" + if [ ! -f "$DEST" ] || ! cmp -s "$SRC" "$DEST"; then + cp "$SRC" "$DEST" + fi cd "$WORKDIR" } -cd $WORKDIR +cd "$WORKDIR" # =============== GPU memory usage monitoring ============================ source "$REPO_ROOT/scripts/gpu_monitor.sh" @@ -75,7 +79,7 @@ PROFILE_OVERRIDE="" BLOCK_NUMBER_OVERRIDE="" USE_CUDA=false CUDA_REASON="" -USE_TCO=false +EXEC_MODE="" USE_PERF=false USE_NSYS=false USE_NSYS_GPU_METRICS=false @@ -137,9 +141,17 @@ while [[ $# -gt 0 ]]; do CUDA_REASON="requested via --cuda script argument" shift ;; - --tco) - USE_TCO=true - shift + --exec-mode) + case "${2:-}" in + interpreter|tco|rvr) + EXEC_MODE="$2" + ;; + *) + echo "Error: --exec-mode requires one of: interpreter, tco, rvr (got '${2:-}')" >&2 + exit 1 + ;; + esac + shift 2 ;; --perf) USE_PERF=true @@ -271,6 +283,10 @@ if [ "$USE_NSYS" = "true" ]; then fi if [ "$MODE" = "prove-evm" ] || [ "$MODE" = "prove-root" ] || [ "$MODE" = "keygen-root" ]; then FEATURES="$FEATURES,evm-verify" + arch=$(uname -m) + if [ "$arch" = "x86_64" ] || [ "$arch" = "amd64" ]; then + FEATURES="$FEATURES,halo2-asm" + fi fi # `keygen-root` is a shell-level alias: enable evm-verify (handled above) and pass --mode keygen @@ -284,18 +300,14 @@ arch=$(uname -m) case $arch in arm64|aarch64) RUSTFLAGS="-Ctarget-cpu=native" - if [ "$USE_TCO" = "false" ]; then - USE_TCO=true + if [ -z "$EXEC_MODE" ]; then + EXEC_MODE="rvr" fi ;; x86_64|amd64) RUSTFLAGS="-Ctarget-cpu=native" - if [ "$USE_TCO" = "false" ]; then - # aot enables halo2curves-axiom/asm which is x86_64-only - FEATURES="$FEATURES,aot" - if [ "$MODE" = "prove-evm" ]; then - FEATURES="$FEATURES,halo2-asm" - fi + if [ -z "$EXEC_MODE" ]; then + EXEC_MODE="rvr" fi ;; *) @@ -303,9 +315,25 @@ echo "Unsupported architecture: $arch" exit 1 ;; esac -if [ "$USE_TCO" = "true" ]; then - FEATURES="$FEATURES,tco" -fi +case "$EXEC_MODE" in + interpreter) + # default interpreted execution; no extra backend feature + ;; + tco) + FEATURES="$FEATURES,tco" + ;; + rvr) + FEATURES="$FEATURES,rvr" + missing=() + command -v clang-22 >/dev/null 2>&1 || missing+=("clang-22") + command -v lld >/dev/null 2>&1 || missing+=("lld") + if [ "${#missing[@]}" -gt 0 ]; then + echo "Error: --exec-mode rvr requires the following tools on PATH: ${missing[*]}" >&2 + echo " Install them or rerun with --exec-mode interpreter." >&2 + exit 1 + fi + ;; +esac if [ "$USE_PERF" = "true" ] || [ "$USE_NSYS" = "true" ]; then RUSTFLAGS="$RUSTFLAGS -C force-frame-pointers=yes" # Default to profiling profile for host profiling if not overridden @@ -385,11 +413,11 @@ if [ "$USE_PERF" = "true" ]; then echo "Running with perf profiling (freq=${PERF_FREQ})..." export OUTPUT_PATH="metrics.json" - perf record -F $PERF_FREQ --call-graph=dwarf -g -o perf.data -- $BIN $BIN_ARGS + perf record -F $PERF_FREQ --call-graph=fp -g -o perf.data -- $BIN $BIN_ARGS echo "Converting perf.data with samply..." mkdir -p samply_profile - samply import perf.data --unstable-presymbolicate --save-only --output samply_profile/profile.json.gz + samply import perf.data --presymbolicate --save-only --output samply_profile/profile.json.gz echo "Saved profile: samply_profile/profile.json.gz" FIREFOX_PROFILER_URL=$(python3 "$REPO_ROOT/scripts/upload_firefox_profile.py" samply_profile/profile.json.gz) || true @@ -401,7 +429,7 @@ if [ "$USE_PERF" = "true" ]; then fi elif [ "$USE_NSYS" = "true" ]; then NSYS_OUTPUT="reth.nsys-rep" - NSYS_ARGS="--trace=cuda,nvtx,osrt --sample=cpu --cpuctxsw=true --cuda-memory-usage=true --force-overwrite=true -o $NSYS_OUTPUT" + NSYS_ARGS="--trace=cuda,nvtx,osrt --sample=cpu --cpuctxsw=process-tree --cuda-memory-usage=true --force-overwrite=true -o $NSYS_OUTPUT" if [ "$USE_NSYS_GPU_METRICS" = "true" ]; then NSYS_ARGS="$NSYS_ARGS --gpu-metrics-devices=all" fi diff --git a/scripts/ethproofs_analyzer.py b/scripts/ethproofs_analyzer.py deleted file mode 100644 index 43f280c98..000000000 --- a/scripts/ethproofs_analyzer.py +++ /dev/null @@ -1,460 +0,0 @@ -#!/usr/bin/env python3 -""" -Fetches data from ethproofs.org API and analyzes proving times. - -Finds top K blocks by: -- Gas used -- Proving time (max, median, avg, min across provers) - -Usage: - python3 ethproofs_analyzer.py # Fetch 1 page (100 blocks), show all metrics - python3 ethproofs_analyzer.py --pages 5 # Fetch 5 pages (500 blocks) - python3 ethproofs_analyzer.py --pages 10 --size 50 # Fetch 10 pages of 50 blocks each - python3 ethproofs_analyzer.py --file data.json # Load from file - python3 ethproofs_analyzer.py --top-k 5 # Show top 5 blocks per metric - python3 ethproofs_analyzer.py --metric median # Show only median proving time - python3 ethproofs_analyzer.py --metric gas # Show only gas used - python3 ethproofs_analyzer.py --cluster axiom # Only proofs from the Axiom cluster (substring) - python3 ethproofs_analyzer.py --zkvm openvm2 # Only proofs from the OpenVM 2.0 zkVM - python3 ethproofs_analyzer.py --list-provers # Print distinct provers seen in the data -""" - -import argparse -import json -import sys -import urllib.parse -import urllib.request - -API_URL = "https://ethproofs.org/api/blocks" - -# Table column widths -COL_RANK = 4 -COL_BLOCK = 10 -COL_GAS = 14 -COL_TXS = 5 -COL_TIME = 13 -COL_TIMESTAMP = 19 - -# Table headers and separators -GAS_TABLE_HEADER = f"| {'Rank':>{COL_RANK}} | {'Block':<{COL_BLOCK}} | {'Gas':>{COL_GAS}} | {'Txs':>{COL_TXS}} | {'Timestamp':<{COL_TIMESTAMP}} |" -GAS_TABLE_SEP = f"|{'-' * (COL_RANK + 2)}|{'-' * (COL_BLOCK + 2)}|{'-' * (COL_GAS + 2)}|{'-' * (COL_TXS + 2)}|{'-' * (COL_TIMESTAMP + 2)}|" -TIME_TABLE_SEP = f"|{'-' * (COL_RANK + 2)}|{'-' * (COL_BLOCK + 2)}|{'-' * (COL_TIME + 2)}|{'-' * (COL_GAS + 2)}|{'-' * (COL_TXS + 2)}|" - - -def fmt_timestamp(ts: str | None) -> str: - """Format timestamp without timezone.""" - if ts and len(ts) > 19: - return ts[:19] # Keep only YYYY-MM-DD HH:MM:SS - return ts or "N/A" - - -def fmt_time(ms: float) -> str: - """Format milliseconds as seconds.""" - return f"{ms / 1000:.2f}s" - - -def fmt_gas(gas: int | None) -> str: - """Format gas with commas.""" - return f"{gas:,}" if gas else "N/A" - - -def time_table_header(label: str) -> str: - """Generate header row for proving time tables.""" - col = f"Time ({label})" - return f"| {'Rank':>{COL_RANK}} | {'Block':<{COL_BLOCK}} | {col:<{COL_TIME}} | {'Gas':>{COL_GAS}} | {'Txs':>{COL_TXS}} |" - - -def fetch_blocks( - page_index: int = 0, page_size: int = 100, machine_type: str = "multi" -) -> dict: - """Fetch a single page of blocks from the ethproofs API.""" - params = urllib.parse.urlencode( - {"page_index": page_index, "page_size": page_size, "machine_type": machine_type} - ) - url = f"{API_URL}?{params}" - - with urllib.request.urlopen(url, timeout=30) as response: - return json.loads(response.read().decode()) - - -def fetch_multiple_pages( - num_pages: int = 1, page_size: int = 100, machine_type: str = "multi" -) -> dict: - """Fetch multiple pages and combine results.""" - all_rows = [] - - for page_idx in range(num_pages): - # Show progress on same line - print(f"\r Fetching page {page_idx + 1}/{num_pages}...", end="", flush=True) - try: - data = fetch_blocks( - page_index=page_idx, page_size=page_size, machine_type=machine_type - ) - rows = data.get("rows", []) - all_rows.extend(rows) - - # Stop if we got fewer blocks than requested (no more data) - if len(rows) < page_size: - print( - f"\r Fetched {len(all_rows):,} blocks ({page_idx + 1} pages, reached end of data)" - ) - break - except Exception as e: - print(f"\r Error on page {page_idx + 1}: {e}") - break - else: - print( - f"\r Fetched {len(all_rows):,} blocks ({num_pages} pages) " - ) - - return {"rows": all_rows} - - -def load_from_file(filepath: str) -> dict: - """Load JSON data from a file.""" - with open(filepath, "r") as f: - return json.load(f) - - -def proof_prover_info(proof: dict) -> tuple[str | None, str | None, str | None, int | None]: - """Extract (cluster_name, zkvm_slug, zkvm_name, num_gpus) from a proof.""" - cv = proof.get("cluster_version") or {} - cluster = cv.get("cluster") or {} - zkvm = (cv.get("zkvm_version") or {}).get("zkvm") or {} - return ( - cluster.get("name"), - zkvm.get("slug"), - zkvm.get("name"), - cluster.get("num_gpus"), - ) - - -def proof_matches(proof: dict, cluster_filter: str | None, zkvm_filter: str | None) -> bool: - """Return True if the proof's cluster/zkvm matches the filters (substring, case-insensitive).""" - cluster_name, zkvm_slug, zkvm_name, _ = proof_prover_info(proof) - if cluster_filter: - if not cluster_name or cluster_filter.lower() not in cluster_name.lower(): - return False - if zkvm_filter: - zf = zkvm_filter.lower() - slug_match = zkvm_slug and zf in zkvm_slug.lower() - name_match = zkvm_name and zf in zkvm_name.lower() - if not (slug_match or name_match): - return False - return True - - -def list_provers(data: dict) -> None: - """Print distinct (zkvm, cluster, num_gpus) combinations present in the data.""" - rows = data.get("rows", []) - seen: dict[tuple, int] = {} - for block in rows: - for p in block.get("proofs", []): - cluster_name, zkvm_slug, zkvm_name, num_gpus = proof_prover_info(p) - key = (zkvm_name, zkvm_slug, cluster_name, num_gpus) - seen[key] = seen.get(key, 0) + 1 - - if not seen: - print("No provers found in the data.") - return - - print("## Provers seen\n") - print(f"| {'zkVM':<20} | {'slug':<12} | {'Cluster':<32} | {'GPUs':>4} | {'Proofs':>7} |") - print(f"|{'-' * 22}|{'-' * 14}|{'-' * 34}|{'-' * 6}|{'-' * 9}|") - for (zkvm_name, zkvm_slug, cluster_name, num_gpus), count in sorted( - seen.items(), key=lambda kv: (-kv[1], kv[0][0] or "", kv[0][2] or "") - ): - print( - f"| {(zkvm_name or 'N/A'):<20} | {(zkvm_slug or 'N/A'):<12} | {(cluster_name or 'N/A'):<32} | {(num_gpus if num_gpus is not None else 'N/A'):>4} | {count:>7} |" - ) - - -def analyze_blocks( - data: dict, - top_k: int = 1, - metric: str = "all", - cluster_filter: str | None = None, - zkvm_filter: str | None = None, -) -> None: - """Analyze blocks to find max gas used and proving time statistics.""" - rows = data.get("rows", []) - - if not rows: - print("No blocks found in the response.") - return - - filter_active = bool(cluster_filter or zkvm_filter) - - # Track blocks with gas for sorting - blocks_with_gas_list = [] - blocks_with_gas = 0 - - # For each block, calculate stats across its provers - block_stats = [] - - for block in rows: - gas_used = block.get("gas_used") - proofs = block.get("proofs", []) - - # Apply prover filter: only count proofs (and gas) from blocks where at - # least one proof matches the filter. - matching_proofs = [ - p for p in proofs if proof_matches(p, cluster_filter, zkvm_filter) - ] - if filter_active and not matching_proofs: - continue - - if gas_used is not None: - blocks_with_gas += 1 - blocks_with_gas_list.append((block, gas_used)) - - proofs_for_stats = matching_proofs if filter_active else proofs - proving_times = [ - p.get("proving_time") - for p in proofs_for_stats - if p.get("proving_time") is not None - ] - - if proving_times: - sorted_times = sorted(proving_times) - n = len(sorted_times) - - block_min = sorted_times[0] - block_max = sorted_times[-1] - block_avg = sum(sorted_times) / n - if n % 2 == 0: - block_median = (sorted_times[n // 2 - 1] + sorted_times[n // 2]) / 2 - else: - block_median = sorted_times[n // 2] - - block_stats.append( - (block, block_median, block_avg, block_max, block_min, proving_times) - ) - - # Sort and get top K for each metric - top_gas = sorted(blocks_with_gas_list, key=lambda x: x[1], reverse=True)[:top_k] - top_median = sorted(block_stats, key=lambda x: x[1], reverse=True)[:top_k] - top_avg = sorted(block_stats, key=lambda x: x[2], reverse=True)[:top_k] - top_max = sorted(block_stats, key=lambda x: x[3], reverse=True)[:top_k] - top_min = sorted(block_stats, key=lambda x: x[4], reverse=True)[:top_k] - - total_proofs = sum(len(entry[5]) for entry in block_stats) - - if filter_active: - parts = [] - if cluster_filter: - parts.append(f"cluster~'{cluster_filter}'") - if zkvm_filter: - parts.append(f"zkvm~'{zkvm_filter}'") - print(f"**Filter:** {', '.join(parts)}") - print( - f"Fetched {len(rows):,} blocks, {len(block_stats):,} match filter " - f"({blocks_with_gas:,} with gas, {total_proofs:,} matching proofs)\n" - ) - else: - print( - f"Fetched {len(rows):,} blocks ({blocks_with_gas:,} with gas, {total_proofs:,} proofs)\n" - ) - - # Max gas section - if metric in ("all", "gas"): - print(f"## Top {top_k} by Gas Used\n") - if top_gas: - print(GAS_TABLE_HEADER) - print(GAS_TABLE_SEP) - for rank, (block, gas) in enumerate(top_gas, 1): - print( - f"| {rank:>{COL_RANK}} | {block.get('block_number'):<{COL_BLOCK}} | {fmt_gas(gas):>{COL_GAS}} | {block.get('transaction_count'):>{COL_TXS}} | {fmt_timestamp(block.get('timestamp')):<{COL_TIMESTAMP}} |" - ) - else: - print("No blocks with gas data found") - - # Proving time sections - if not block_stats and metric in ("all", "max", "median", "avg", "min"): - print("\nNo proofs with proving time data found") - return - - if metric in ("all", "max"): - print(f"\n## Top {top_k} by MAX Proving Time\n") - print(time_table_header("Max")) - print(TIME_TABLE_SEP) - for rank, entry in enumerate(top_max, 1): - block, _, _, time_ms, _, _ = entry - bn = block.get("block_number") - gas = block.get("gas_used") - txs = block.get("transaction_count") or "N/A" - print( - f"| {rank:>{COL_RANK}} | {bn:<{COL_BLOCK}} | {fmt_time(time_ms):<{COL_TIME}} | {fmt_gas(gas):>{COL_GAS}} | {txs:>{COL_TXS}} |" - ) - - if metric in ("all", "median"): - print(f"\n## Top {top_k} by MEDIAN Proving Time\n") - print(time_table_header("Median")) - print(TIME_TABLE_SEP) - for rank, entry in enumerate(top_median, 1): - block, time_ms, _, _, _, _ = entry - bn = block.get("block_number") - gas = block.get("gas_used") - txs = block.get("transaction_count") or "N/A" - print( - f"| {rank:>{COL_RANK}} | {bn:<{COL_BLOCK}} | {fmt_time(time_ms):<{COL_TIME}} | {fmt_gas(gas):>{COL_GAS}} | {txs:>{COL_TXS}} |" - ) - - if metric in ("all", "avg"): - print(f"\n## Top {top_k} by AVG Proving Time\n") - print(time_table_header("Avg")) - print(TIME_TABLE_SEP) - for rank, entry in enumerate(top_avg, 1): - block, _, time_ms, _, _, _ = entry - bn = block.get("block_number") - gas = block.get("gas_used") - txs = block.get("transaction_count") or "N/A" - print( - f"| {rank:>{COL_RANK}} | {bn:<{COL_BLOCK}} | {fmt_time(time_ms):<{COL_TIME}} | {fmt_gas(gas):>{COL_GAS}} | {txs:>{COL_TXS}} |" - ) - - if metric in ("all", "min"): - print(f"\n## Top {top_k} by MIN Proving Time\n") - print(time_table_header("Min")) - print(TIME_TABLE_SEP) - for rank, entry in enumerate(top_min, 1): - block, _, _, _, time_ms, _ = entry - bn = block.get("block_number") - gas = block.get("gas_used") - txs = block.get("transaction_count") or "N/A" - print( - f"| {rank:>{COL_RANK}} | {bn:<{COL_BLOCK}} | {fmt_time(time_ms):<{COL_TIME}} | {fmt_gas(gas):>{COL_GAS}} | {txs:>{COL_TXS}} |" - ) - - -def main(): - parser = argparse.ArgumentParser( - description="Analyze ethproofs.org block data to find top blocks by gas used and proving time", - formatter_class=argparse.RawDescriptionHelpFormatter, - epilog=""" -Examples: - %(prog)s Fetch 1 page (100 blocks), show all metrics - %(prog)s --pages 5 Fetch 5 pages (500 blocks) - %(prog)s --pages 10 --size 50 Fetch 10 pages of 50 blocks each - %(prog)s --file data.json Load from local JSON file - %(prog)s --top-k 10 Show top 10 blocks per metric - %(prog)s --metric median Show only median proving time - %(prog)s --metric gas Show only gas used - """, - ) - parser.add_argument( - "--pages", - "-p", - type=int, - default=1, - help="Number of pages to fetch (default: 1)", - ) - parser.add_argument( - "--size", - "-s", - type=int, - default=100, - help="Number of blocks per page (default: 100)", - ) - parser.add_argument( - "--file", "-f", type=str, help="Load data from a JSON file instead of fetching" - ) - parser.add_argument( - "--machine-type", - "-m", - type=str, - default="multi", - choices=["multi", "single"], - help="Machine type filter (default: multi)", - ) - parser.add_argument( - "--top-k", - "-k", - type=int, - default=1, - help="Number of top blocks to show per metric (default: 1)", - ) - parser.add_argument( - "--metric", - type=str, - default="all", - choices=["all", "gas", "max", "median", "avg", "min"], - help="Which metric to show (default: all)", - ) - parser.add_argument( - "--cluster", - type=str, - default=None, - help="Filter to proofs whose cluster name contains this text (case-insensitive), e.g. 'Axiom 16x5090' or 'axiom'", - ) - parser.add_argument( - "--zkvm", - type=str, - default=None, - help="Filter to proofs whose zkvm slug/name contains this text (case-insensitive), e.g. 'openvm2'", - ) - parser.add_argument( - "--list-provers", - action="store_true", - help="List distinct provers (zkvm + cluster) seen in the fetched data and exit", - ) - - args = parser.parse_args() - - print("\n# ETHPROOFS ANALYZER\n") - - if args.file: - print(f"**Source:** {args.file}\n") - try: - data = load_from_file(args.file) - except FileNotFoundError: - print(f"Error: File not found: {args.file}") - sys.exit(1) - except json.JSONDecodeError as e: - print(f"Error parsing JSON: {e}") - sys.exit(1) - - if args.list_provers: - list_provers(data) - else: - analyze_blocks( - data, - top_k=args.top_k, - metric=args.metric, - cluster_filter=args.cluster, - zkvm_filter=args.zkvm, - ) - else: - print(f"**Source:** {API_URL} ") - print( - f"**Config:** {args.pages} × {args.size} blocks, filter={args.machine_type}\n" - ) - - try: - data = fetch_multiple_pages( - num_pages=args.pages, - page_size=args.size, - machine_type=args.machine_type, - ) - print() - if args.list_provers: - list_provers(data) - else: - analyze_blocks( - data, - top_k=args.top_k, - metric=args.metric, - cluster_filter=args.cluster, - zkvm_filter=args.zkvm, - ) - except urllib.error.URLError as e: - print(f"\nError: {e}") - print("Try: python3 ethproofs_analyzer.py --file data.json") - sys.exit(1) - except json.JSONDecodeError as e: - print(f"Error parsing response: {e}") - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/scripts/generate-inputs-parallel.sh b/scripts/generate-inputs-parallel.sh index 55a67b431..ed41a1dda 100755 --- a/scripts/generate-inputs-parallel.sh +++ b/scripts/generate-inputs-parallel.sh @@ -51,7 +51,7 @@ else exit 1 fi -cd bin/openvm-reth-benchmark +cd bin/reth-benchmark # The binary has a static include_bytes! but doesn't really need this ELF for proof input generation: mkdir -p elf touch elf/openvm-stateless-guest diff --git a/scripts/precompile_analyzer.py b/scripts/precompile_analyzer.py index d5a25bfbb..9d6cc775f 100755 --- a/scripts/precompile_analyzer.py +++ b/scripts/precompile_analyzer.py @@ -1,26 +1,58 @@ -#!/usr/bin/env python3 +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.10" +# dependencies = ["httpx", "tenacity", "rich", "python-dotenv"] +# /// """ -Analyzes precompile calls in Ethereum blocks using debug_traceBlockByNumber. +Analyzes precompile calls in an Ethereum block via debug_traceBlockByNumber. + +For a block it reports how many times each precompile (ecrecover, bn254_*, kzg, …) +was called, and the transactions that called them most. Needs an RPC endpoint with +the `debug` namespace enabled. + +RPC endpoints are read from .env as RPC_1, RPC_2, … and tried in order until one +serves the trace (override with --rpc); public trace-capable fallbacks are tried +last. Run --check to see which support tracing. + +Run it directly (uv installs the dependencies on first use): + ./scripts/precompile_analyzer.py + uv run scripts/precompile_analyzer.py # equivalent + +Typical workflow — find a slow block with ethproofs_analyzer, then inspect it here: + ./scripts/ethproofs_analyzer.py --last 1d --metric min --top-k 20 # hardest blocks for every prover + ./scripts/ethproofs_analyzer.py --last 1d --compare --top-k 20 # highest OpenVM/fastest ratio + ./scripts/precompile_analyzer.py # inspect its precompile load Usage: - python3 precompile_analyzer.py - python3 precompile_analyzer.py --rpc - python3 precompile_analyzer.py -v - python3 precompile_analyzer.py --top-k 10 - python3 precompile_analyzer.py --filter bn254_add - python3 precompile_analyzer.py --filter bn254_add,bn254_mul - python3 precompile_analyzer.py --check + ./scripts/precompile_analyzer.py 21000000 # analyze a block + ./scripts/precompile_analyzer.py 21000000 --rpc http://host:8545 # against a specific RPC + ./scripts/precompile_analyzer.py 21000000 -v # include tx and call-frame counts + ./scripts/precompile_analyzer.py 21000000 --top-k 10 # top 10 transactions + ./scripts/precompile_analyzer.py 21000000 --filter bn254_add,bn254_mul + ./scripts/precompile_analyzer.py --check # verify tracing support """ import argparse -import json +import os +import re import sys -import urllib.request +from pathlib import Path +import httpx +import tenacity +from dotenv import dotenv_values +from rich.console import Console + +# Endpoint used when no --rpc and no RPC_N in the environment or .env. DEFAULT_RPC_URL = "http://localhost:8545" +# Public trace-capable endpoints, tried after the configured ones. +FALLBACK_RPCS = ["https://eth.drpc.org"] DEFAULT_TOP_K = 5 -# Precompile addresses +# .env at the repository root (one level above scripts/). +ENV_PATH = Path(__file__).resolve().parent.parent / ".env" + +# Precompile address -> name, by hardfork. PRECOMPILES = { # Frontier "0x0000000000000000000000000000000000000001": "ecrecover", @@ -48,280 +80,224 @@ "0x0000000000000000000000000000000000000100": "p256_verify", } -# Case-insensitive lookup for filtering +# Lower-cased precompile name -> canonical name, for case-insensitive --filter. PRECOMPILE_NAMES = {name.lower(): name for name in PRECOMPILES.values()} -# Table column widths -COL_RANK = 4 -COL_TX = 66 -COL_CALLS = 6 -COL_PRECOMPILE = 22 +# Column widths (chars). +COL_RANK, COL_TX, COL_CALLS, COL_PRECOMPILE = 4, 66, 6, 22 + + +def print_table(columns: list[tuple[str, int, str]], rows: list[tuple]) -> None: + """Print a markdown table. + + columns: (header, width, align) per column, align being '<' or '>'. + rows: row tuples whose cells line up positionally with columns. + """ + cell = lambda value, width, align: f"{value:{align}{width}}" + print("| " + " | ".join(cell(h, w, a) for h, w, a in columns) + " |") + print("|" + "|".join("-" * (w + 2) for _, w, _ in columns) + "|") + for row in rows: + print("| " + " | ".join(cell(v, w, a) for v, (_, w, a) in zip(row, columns)) + " |") + + +# --- RPC -------------------------------------------------------------------- + + +def resolve_rpcs(explicit: list[str] | None) -> list[tuple[str, str]]: + """(label, url) endpoints to try in order: explicit --rpc, else RPC_1, RPC_2, … , else + default — always followed by the public fallbacks. + + Labels are safe to print; URLs hold secrets and must not be logged. + """ + if explicit: + pairs = [(f"RPC #{i}", url) for i, url in enumerate(explicit, 1)] + else: + values = {**dotenv_values(ENV_PATH), **os.environ} + keys = sorted((k for k in values if re.fullmatch(r"RPC_\d+", k)), + key=lambda k: int(k.split("_")[1])) + pairs = [(k, values[k]) for k in keys if values[k]] or [("default", DEFAULT_RPC_URL)] + urls = {url for _, url in pairs} + pairs += [(f"fallback ({url})", url) for url in FALLBACK_RPCS if url not in urls] + return pairs + + +def redact(text) -> str: + """Strip the key-bearing path from any URL in text, leaving only scheme and host.""" + return re.sub(r"(https?://[^/\s]+)/[^\s'\"]*", r"\1/…", str(text)) + + +def make_client(url: str) -> httpx.Client: + """An httpx client targeting one RPC endpoint.""" + return httpx.Client(base_url=url, timeout=120, headers={"Content-Type": "application/json"}) -# Table formatting -SUMMARY_HEADER = f"| {'Precompile':<{COL_PRECOMPILE}} | {'Calls':>{COL_CALLS}} |" -SUMMARY_SEP = f"|{'-' * (COL_PRECOMPILE + 2)}|{'-' * (COL_CALLS + 2)}|" -TX_HEADER = ( - f"| {'Rank':>{COL_RANK}} | {'Transaction':<{COL_TX}} | {'Calls':>{COL_CALLS}} |" +def is_transient(exc: BaseException) -> bool: + """True for errors worth retrying: timeouts, connection drops, and 5xx responses.""" + if isinstance(exc, httpx.TransportError): + return True + if isinstance(exc, httpx.HTTPStatusError): + return exc.response.status_code >= 500 + return False + + +@tenacity.retry( + retry=tenacity.retry_if_exception(is_transient), + wait=tenacity.wait_exponential(multiplier=0.5, max=5), + stop=tenacity.stop_after_attempt(4), + reraise=True, ) -TX_SEP = f"|{'-' * (COL_RANK + 2)}|{'-' * (COL_TX + 2)}|{'-' * (COL_CALLS + 2)}|" - - -def rpc_call(url: str, method: str, params: list) -> dict: - """Make a JSON-RPC call.""" - payload = { - "jsonrpc": "2.0", - "method": method, - "params": params, - "id": 1, - } - req = urllib.request.Request( - url, - data=json.dumps(payload).encode(), - headers={"Content-Type": "application/json"}, - ) - with urllib.request.urlopen(req, timeout=120) as response: - return json.loads(response.read().decode()) +def rpc_call(client: httpx.Client, method: str, params: list) -> dict: + """Make a JSON-RPC call, retrying transient errors with exponential backoff.""" + resp = client.post("", json={"jsonrpc": "2.0", "method": method, "params": params, "id": 1}) + if 400 <= resp.status_code < 500: + try: + error = resp.json()["error"] + except (ValueError, KeyError): + error = None + if error: + raise RuntimeError(f"RPC error: {error}") + resp.raise_for_status() + result = resp.json() + if "error" in result: + raise RuntimeError(f"RPC error: {result['error']}") + return result -def process_call_for_tx(call: dict, counts: dict[str, int]) -> None: - """Process a single call and its subcalls, counting precompile calls for a tx.""" - to_addr = call.get("to", "").lower() - if to_addr in PRECOMPILES: - name = PRECOMPILES[to_addr] - counts[name] = counts.get(name, 0) + 1 +# --- Tracing ---------------------------------------------------------------- + +def count_precompiles(call: dict, counts: dict[str, int]) -> None: + """Tally precompile calls in a call frame and its subcalls (recursive).""" + name = PRECOMPILES.get(call.get("to", "").lower()) + if name: + counts[name] = counts.get(name, 0) + 1 for subcall in call.get("calls", []): - process_call_for_tx(subcall, counts) + count_precompiles(subcall, counts) def count_call_frames(call: dict) -> int: - """Count total call frames in a call tree.""" - n = 1 - for sub in call.get("calls", []): - n += count_call_frames(sub) - return n - + """Count the call frames in a call tree (recursive).""" + return 1 + sum(count_call_frames(sub) for sub in call.get("calls", [])) -def analyze_block(rpc_url: str, block_number: int, verbose: bool = False) -> list: - """Analyze a single block and return per-transaction precompile counts.""" - block_hex = hex(block_number) - tracer_config = {"tracer": "callTracer"} - result = rpc_call(rpc_url, "debug_traceBlockByNumber", [block_hex, tracer_config]) - if result is None: - raise Exception("RPC returned None") - if "error" in result: - raise Exception(f"RPC error: {result['error']}") +def analyze_block(client: httpx.Client, block_number: int, verbose: bool = False) -> list: + """Trace a block and return [(tx_hash, {precompile: count})] for txs that used any.""" + with Console(stderr=True).status(f"Tracing block {block_number}..."): + result = rpc_call(client, "debug_traceBlockByNumber", + [hex(block_number), {"tracer": "callTracer"}]) trace = result.get("result", []) if verbose: - total_calls = 0 - for tx in trace: - if "result" in tx: - total_calls += count_call_frames(tx["result"]) - print(f" Transactions: {len(trace)}, Call frames: {total_calls}") + frames = sum(count_call_frames(tx["result"]) for tx in trace if "result" in tx) + print(f" Transactions: {len(trace)}, Call frames: {frames}") - # Build per-transaction stats tx_stats = [] for tx_trace in trace: - tx_hash = tx_trace.get("txHash", "unknown") counts: dict[str, int] = {} if "result" in tx_trace: - process_call_for_tx(tx_trace["result"], counts) + count_precompiles(tx_trace["result"], counts) if counts: - tx_stats.append((tx_hash, counts)) - + tx_stats.append((tx_trace.get("txHash", "unknown"), counts)) return tx_stats -def check_rpc(rpc_url: str) -> bool: - """Check if RPC endpoint supports debug_traceBlockByNumber.""" +def check_rpc(client: httpx.Client) -> bool: + """Report whether the RPC endpoint supports debug_traceBlockByNumber.""" print("Checking for debug_traceBlockByNumber support...") - try: - result = rpc_call(rpc_url, "eth_blockNumber", []) - if "error" in result: - print(f" eth_blockNumber failed: {result['error']}") - return False - block_num = int(result["result"], 16) + block_num = int(rpc_call(client, "eth_blockNumber", [])["result"], 16) print(f" eth_blockNumber: {block_num}") - - # Use an older block for testing (100 blocks back) - test_block = block_num - 100 - tracer_config = {"tracer": "callTracer"} - - result = rpc_call( - rpc_url, "debug_traceBlockByNumber", [hex(test_block), tracer_config] - ) - - if "error" in result: - print(f" debug_traceBlockByNumber failed: {result['error']}") - return False - - trace = result.get("result", []) + trace = rpc_call(client, "debug_traceBlockByNumber", + [hex(block_num - 100), {"tracer": "callTracer"}]).get("result", []) print(f" debug_traceBlockByNumber: OK ({len(trace)} transactions)") return True - except Exception as e: - print(f" Error: {e}") + except (httpx.HTTPError, RuntimeError, KeyError, ValueError) as e: + print(f" Error: {redact(e)}") return False -def normalize_precompile_name(name: str) -> str | None: - """Normalize precompile name (case-insensitive). Returns None if invalid.""" - return PRECOMPILE_NAMES.get(name.lower()) +# --- Reporting -------------------------------------------------------------- def parse_filter(filter_arg: str) -> list[str]: - """Parse comma-separated filter argument and normalize names.""" + """Parse a comma-separated --filter value into canonical precompile names.""" names = [] - for part in filter_arg.split(","): - part = part.strip() + for part in (p.strip() for p in filter_arg.split(",")): if not part: continue - normalized = normalize_precompile_name(part) - if normalized is None: + canonical = PRECOMPILE_NAMES.get(part.lower()) + if canonical is None: valid = ", ".join(sorted(PRECOMPILES.values())) raise ValueError(f"Invalid precompile name: {part}\nValid names: {valid}") - names.append(normalized) + names.append(canonical) return names -def filter_tx_stats( - tx_stats: list, filter_names: list[str] -) -> list[tuple[str, dict[str, int]]]: - """Filter transaction stats to only include specified precompiles.""" - if not filter_names: - return tx_stats - - filtered = [] - for tx_hash, counts in tx_stats: - filtered_counts = {k: v for k, v in counts.items() if k in filter_names} - if filtered_counts: - filtered.append((tx_hash, filtered_counts)) - return filtered - - -def print_summary( - tx_stats: list, block_number: int, filter_names: list[str] | None -) -> None: - """Print block-level precompile summary.""" - # Aggregate counts across all transactions +def print_summary(tx_stats: list, block_number: int, filter_names: list[str] | None) -> None: + """Print block-level precompile totals.""" totals: dict[str, int] = {} for _, counts in tx_stats: for name, count in counts.items(): - if filter_names and name not in filter_names: - continue - totals[name] = totals.get(name, 0) + count - - total = sum(totals.values()) - - if filter_names: - filter_str = ", ".join(filter_names) - print(f"## Block {block_number} Summary (filtered: {filter_str})\n") - else: - print(f"## Block {block_number} Summary\n") - - print(SUMMARY_HEADER) - print(SUMMARY_SEP) - - for name, count in sorted(totals.items(), key=lambda x: -x[1]): - if count > 0: - print(f"| {name:<{COL_PRECOMPILE}} | {count:>{COL_CALLS}} |") + if not filter_names or name in filter_names: + totals[name] = totals.get(name, 0) + count - print(SUMMARY_SEP) - print(f"| {'Total':<{COL_PRECOMPILE}} | {total:>{COL_CALLS}} |") + suffix = f" (filtered: {', '.join(filter_names)})" if filter_names else "" + print(f"## Block {block_number} Summary{suffix}\n") + rows = [(name, count) for name, count in sorted(totals.items(), key=lambda x: -x[1]) if count] + rows.append(("Total", sum(totals.values()))) + print_table([("Precompile", COL_PRECOMPILE, "<"), ("Calls", COL_CALLS, ">")], rows) -def print_top_transactions( - tx_stats: list, top_k: int, filter_names: list[str] | None -) -> None: - """Print top transactions by precompile calls.""" +def print_top_transactions(tx_stats: list, top_k: int, filter_names: list[str] | None) -> None: + """Print the transactions with the most precompile calls.""" if filter_names: - # Filter and sort by matching precompiles - filtered = filter_tx_stats(tx_stats, filter_names) - sorted_stats = sorted(filtered, key=lambda x: -sum(x[1].values())) - top = sorted_stats[:top_k] - - filter_str = ", ".join(filter_names) - print(f"\n## Top {len(top)} Transactions using {filter_str}\n") + stats = [(h, {k: v for k, v in c.items() if k in filter_names}) for h, c in tx_stats] + stats = [(h, c) for h, c in stats if c] + heading = f"Transactions using {', '.join(filter_names)}" else: - # Sort by total precompile calls - sorted_stats = sorted(tx_stats, key=lambda x: -sum(x[1].values())) - top = sorted_stats[:top_k] + stats, heading = tx_stats, "Transactions by Precompile Calls" - print(f"\n## Top {len(top)} Transactions by Precompile Calls\n") + top = sorted(stats, key=lambda x: -sum(x[1].values()))[:top_k] + print(f"\n## Top {len(top)} {heading}\n") + print_table( + [("Rank", COL_RANK, ">"), ("Transaction", COL_TX, "<"), ("Calls", COL_CALLS, ">")], + [(rank, tx_hash, sum(counts.values())) for rank, (tx_hash, counts) in enumerate(top, 1)], + ) - print(TX_HEADER) - print(TX_SEP) - for rank, (tx_hash, counts) in enumerate(top, 1): - total = sum(counts.values()) - print(f"| {rank:>{COL_RANK}} | {tx_hash:<{COL_TX}} | {total:>{COL_CALLS}} |") +# --- CLI -------------------------------------------------------------------- def main(): parser = argparse.ArgumentParser( - description="Analyze precompile calls in Ethereum blocks using debug_traceBlockByNumber", - formatter_class=argparse.RawDescriptionHelpFormatter, - epilog=""" -Examples: - %(prog)s 21000000 Analyze block 21000000 - %(prog)s 21000000 --rpc http://localhost:8545 - %(prog)s 21000000 -v Verbose output - %(prog)s 21000000 --top-k 10 Show top 10 transactions - %(prog)s 21000000 --filter ecrecover Filter by precompile - %(prog)s 21000000 --filter bn254_add,bn254_mul Filter by multiple precompiles - %(prog)s --check Check if RPC supports trace method - """, - ) - parser.add_argument( - "block", - type=int, - nargs="?", - help="Block number to analyze", - ) - parser.add_argument( - "--rpc", - type=str, - default=DEFAULT_RPC_URL, - help=f"RPC endpoint URL (default: {DEFAULT_RPC_URL})", - ) - parser.add_argument( - "--check", - action="store_true", - help="Check if RPC endpoint supports debug_traceBlockByNumber", - ) - parser.add_argument( - "--verbose", - "-v", - action="store_true", - help="Print debug information about the trace response", - ) - parser.add_argument( - "--top-k", - "-k", - type=int, - default=DEFAULT_TOP_K, - help=f"Number of top transactions to show (default: {DEFAULT_TOP_K})", - ) - parser.add_argument( - "--filter", - "-f", - type=str, - help="Filter by precompile name(s), comma-separated (e.g., bn254_add,bn254_mul)", + description="Analyze precompile calls in an Ethereum block via debug_traceBlockByNumber", ) + parser.add_argument("block", type=int, nargs="?", help="Block number to analyze") + parser.add_argument("--rpc", nargs="+", metavar="URL", + help="One or more RPC URLs to try in order " + "(default: RPC_1, RPC_2, … from .env, then localhost)") + parser.add_argument("--check", action="store_true", + help="Check whether the RPC endpoints support debug_traceBlockByNumber") + parser.add_argument("--verbose", "-v", action="store_true", + help="Also report transaction and call-frame counts") + parser.add_argument("--top-k", "-k", type=int, default=DEFAULT_TOP_K, + help=f"Number of top transactions to show (default: {DEFAULT_TOP_K})") + parser.add_argument("--filter", "-f", + help="Only these precompiles, comma-separated (e.g. bn254_add,bn254_mul)") args = parser.parse_args() + rpcs = resolve_rpcs(args.rpc) if args.check: - success = check_rpc(args.rpc) - sys.exit(0 if success else 1) + ok = False + for label, url in rpcs: + print(f"\n{label}") + ok |= check_rpc(make_client(url)) + sys.exit(0 if ok else 1) if args.block is None: parser.error("block number is required (or use --check)") - # Parse and validate filter if provided filter_names = None if args.filter: try: @@ -332,22 +308,27 @@ def main(): print("\n# PRECOMPILE ANALYZER\n") print(f"**Block:** {args.block}\n") - try: - tx_stats = analyze_block(args.rpc, args.block, args.verbose) - - if not tx_stats: - print("No precompile calls found in this block.") - sys.exit(0) + # Try each endpoint until one serves the trace. + tx_stats, used = None, None + for label, url in rpcs: + try: + tx_stats = analyze_block(make_client(url), args.block, args.verbose) + used = label + break + except (httpx.HTTPError, RuntimeError) as e: + print(f" {label} unavailable: {redact(e)}") + + if used is None: + print("\nError: no working RPC (set RPC_1, RPC_2, … in .env, or pass --rpc).") + sys.exit(1) + print(f"**RPC:** {used}\n") - print_summary(tx_stats, args.block, filter_names) - print_top_transactions(tx_stats, args.top_k, filter_names) + if not tx_stats: + print("No precompile calls found in this block.") + sys.exit(0) - except urllib.error.URLError as e: - print(f"\nError: {e}") - sys.exit(1) - except Exception as e: - print(f"\nError: {e}") - sys.exit(1) + print_summary(tx_stats, args.block, filter_names) + print_top_transactions(tx_stats, args.top_k, filter_names) if __name__ == "__main__":