Skip to content

feat: GKR LogUp #1565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cc2be88
feat(cli): install pinned nightly toolchain automatically (#1541)
jonathanpwang Mar 29, 2025
ac89432
chore: fix book lints (#1543)
yi-sun Mar 29, 2025
98c5ec0
book: update install instructions with tag (#1545)
jonathanpwang Mar 30, 2025
3658b89
docs: add link to whitepaper (#1546)
jonathanpwang Mar 31, 2025
cbaf116
fix: don't segment due to fixed-size traces (#1548)
zlangley Apr 1, 2025
78dcfbd
chore: fix broken links (#1547)
bodhi-crypo Apr 1, 2025
6a02604
fix(ci): run openvm-cli tests (#1552)
shuklaayush Apr 1, 2025
17cefbc
fix: Update Mod Builder symbolic expression multiplication test (#1551)
Avaneesh-axiom Apr 1, 2025
5868d83
fix: use absolute paths in `VmConfig` derive macro (#1550)
shuklaayush Apr 1, 2025
40927aa
feat: make provers generic over engine (#1553)
Golovanov399 Apr 2, 2025
51f07d5
fix: RootVerifierLocalProver should respect AIR heights (#1554)
nyunyunyunyu Apr 3, 2025
a9f68e0
feat(test): add execution benchmarks (#1556)
shuklaayush Apr 4, 2025
a5550a9
feat: `OpenVmHalo2Verifier` (#1549)
HrikB Apr 5, 2025
7fc3f10
chore: cargo openvm build also outputs committed exe (#1560)
luffykai Apr 7, 2025
fd7c864
chore(ci): enforce conventional commits PR title (#1564)
jonathanpwang Apr 9, 2025
a10f050
chore(deps): bump tokio from 1.43.0 to 1.43.1 (#1562)
dependabot[bot] Apr 9, 2025
bd00292
chore(deps): bump crossbeam-channel from 0.5.14 to 0.5.15 (#1569)
dependabot[bot] Apr 10, 2025
e827799
fix(docs): typo in access adapter split/merge algorithm (#1566)
shuklaayush Apr 10, 2025
24c2cf3
feat(sdk)!: configurable aggregation tree shape in SDK (#1570)
jonathanpwang Apr 12, 2025
39d6771
perf: set default `num_children_internal=3` (#1573)
jonathanpwang Apr 12, 2025
e4e180c
chore(fmt): wrap comments and format code comments (#1575)
jonathanpwang Apr 14, 2025
c6207ba
chore: feature gate `revm` and `alloy` imports (#1572)
jonathanpwang Apr 14, 2025
5939109
fix: circuit flamegraphs with segmentation (#1571) (#1576)
Avaneesh-axiom Apr 14, 2025
c69bdc3
wip
zlangley Apr 7, 2025
2958db1
update prof
zlangley Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 112 additions & 0 deletions .github/workflows/benchmarks-execute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: "benchmarks-execute"

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]
paths:
- "benchmarks/execute/**"
- "crates/circuits/**"
- "crates/toolchain/**"
- "crates/prof/**"
- "crates/sdk/**"
- "crates/vm/**"
- "extensions/**"
- "Cargo.toml"
- ".github/workflows/benchmarks-execute.yml"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
execute-benchmarks:
runs-on:
- runs-on=${{ github.run_id }}
- runner=8cpu-linux-x64
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Run execution benchmarks
working-directory: benchmarks/execute
run: cargo run | tee benchmark_output.log

- name: Parse benchmark results
working-directory: benchmarks/execute
run: |
# Determine if running in GitHub Actions environment
if [ -n "$GITHUB_STEP_SUMMARY" ]; then
SUMMARY_FILE="$GITHUB_STEP_SUMMARY"
echo "### Benchmark Results Summary" >> "$SUMMARY_FILE"
else
SUMMARY_FILE="benchmark_summary.md"
echo "### Benchmark Results Summary" > "$SUMMARY_FILE"
echo "Saving summary to $SUMMARY_FILE"
fi

# Set up summary table header
echo "| Program | Total Time (ms) |" >> "$SUMMARY_FILE"
echo "| ------- | --------------- |" >> "$SUMMARY_FILE"

# Variables to track current program and total time
current_program=""
total_time=0

# Process the output file line by line
while IFS= read -r line; do
# Check if line contains "Running program" message
if [[ $line =~ i\ \[info\]:\ Running\ program:\ ([a-zA-Z0-9_-]+) ]]; then
# If we were processing a program, output its results
if [[ -n "$current_program" ]]; then
echo "| $current_program | $total_time |" >> "$SUMMARY_FILE"
fi

# Start tracking new program
current_program="${BASH_REMATCH[1]}"
total_time=0
fi

# Check for program completion to catch programs that might have no execution segments
if [[ $line =~ i\ \[info\]:\ Completed\ program:\ ([a-zA-Z0-9_-]+) ]]; then
completed_program="${BASH_REMATCH[1]}"
# If no segments were found for this program, ensure it's still in the output
if [[ "$current_program" == "$completed_program" && $total_time == 0 ]]; then
echo "| $current_program | 0 |" >> "$SUMMARY_FILE"
current_program=""
fi
fi

# Check if line contains execution time (looking for the format with ms or s)
if [[ $line =~ execute_segment\ \[\ ([0-9.]+)(ms|s)\ \|\ [0-9.]+%\ \]\ segment ]]; then
segment_time="${BASH_REMATCH[1]}"
unit="${BASH_REMATCH[2]}"

# Convert to milliseconds if in seconds
if [[ "$unit" == "s" ]]; then
segment_time=$(echo "scale=6; $segment_time * 1000" | bc)
fi

# Add segment time to total
total_time=$(echo "scale=6; $total_time + $segment_time" | bc)
fi
done < benchmark_output.log

# Output the last program result if there was one
if [[ -n "$current_program" ]]; then
echo "| $current_program | $total_time |" >> "$SUMMARY_FILE"
fi

# If not in GitHub Actions, print the summary to the terminal
if [ -z "$GITHUB_STEP_SUMMARY" ]; then
echo -e "\nBenchmark Summary:"
cat "$SUMMARY_FILE"
fi
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]
paths:
- "benchmarks/**"
- "benchmarks/prove/**"
- "crates/circuits/**"
- "crates/toolchain/**"
- "crates/prof/**"
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "crates/cli/**"
- "examples/**"
- "Cargo.toml"
- ".github/workflows/cli.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -39,10 +40,6 @@ jobs:
- name: Install solc # svm should support arm64 linux
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version

- name: Install tools
run: |
rustup component add rust-src --toolchain nightly-2025-02-14

- name: Install cargo-openvm
working-directory: crates/cli
run: |
Expand Down Expand Up @@ -74,3 +71,8 @@ jobs:
export RUST_BACKTRACE=1
cargo build
cargo run --bin cargo-openvm -- openvm keygen --config ./example/app_config.toml --output app.pk --vk-output app.vk

- name: Run CLI tests
working-directory: crates/cli
run: |
cargo nextest run --cargo-profile=fast
6 changes: 3 additions & 3 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Lint
runs-on:
- runs-on=${{ github.run_id }}
- runner=8cpu-linux-x64
- runner=64cpu-linux-x64
- extras=s3-cache
steps:
- uses: runs-on/action@v1
Expand Down Expand Up @@ -45,8 +45,8 @@ jobs:
run: |
# list of features generated using:
# echo -e "\033[1;32mAll unique features across workspace:\033[0m" && cargo metadata --format-version=1 --no-deps | jq -r '.packages[].features | to_entries[] | .key' | sort -u | sed 's/^/• /'
cargo clippy --all-targets --all --tests --features "aggregation bench-metrics bls12_381 bn254 default entrypoint export-getrandom export-libm function-span getrandom halo2-compiler halo2curves heap-embedded-alloc k256 mimalloc nightly-features panic-handler parallel rust-runtime static-verifier std test-utils unstable" -- -D warnings
cargo clippy --all-targets --all --tests --no-default-features --features "jemalloc jemalloc-prof" -- -D warnings
cargo clippy --all-targets --all --tests --features "aggregation bench-metrics bls12_381 bn254 default entrypoint evm-prove evm-verify export-getrandom export-libm function-span getrandom halo2-compiler halo2curves heap-embedded-alloc k256 jemalloc jemalloc-prof nightly-features panic-handler parallel rust-runtime static-verifier std test-utils unstable" -- -D warnings
cargo clippy --all-targets --all --tests --no-default-features --features "mimalloc" -- -D warnings

- name: Run fmt, clippy for guest
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/native-compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "extensions/native/circuit/**"
- "extensions/native/compiler/**"
- "Cargo.toml"
- ".github/workflows/native-compiler.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Copied from https://github.com/paradigmxyz/reth/blob/a5755f72eb54d2c88d6f0b5778413144451e1724/.github/workflows/pr-title.yml
name: Pull Request

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

permissions:
pull-requests: read
contents: read

jobs:
conventional-title:
name: Validate PR title is Conventional Commit
runs-on:
- runs-on=${{ github.run_id }}
- runner=8cpu-linux-x64
permissions:
pull-requests: write
steps:
- name: Check title
id: lint_pr_title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
test
perf
refactor
docs
ci
continue-on-error: true
- name: Add PR Comment for Invalid Title
if: steps.lint_pr_title.outcome == 'failure'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
message: |
Your PR title doesn't follow the Conventional Commit guidelines.

**Example of valid titles:**
- `feat: add new user login`
- `fix: correct button size`
- `docs: update README`

**Usage:**
- `feat`: Introduces a new feature
- `fix`: Patches a bug
- `chore`: General maintenance tasks or updates
- `test`: Adding new tests or modifying existing tests
- `perf`: Performance improvements
- `refactor`: Changes to improve code structure
- `docs`: Documentation updates
- `ci`: Changes to CI/CD configurations

**Breaking Changes**

Breaking changes are noted by using an exclamation mark. For example:
- `feat!: changed the API`
- `chore(node)!: Removed unused public function`

**Help**

For more information, follow the guidelines here: https://www.conventionalcommits.org/en/v1.0.0/

- name: Remove Comment for Valid Title
if: steps.lint_pr_title.outcome == 'success'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true

- name: Fail workflow if title invalid
if: steps.lint_pr_title.outcome == 'failure'
run: exit 1
7 changes: 7 additions & 0 deletions .github/workflows/primitives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
- "crates/circuits/primitives/**"
- "crates/circuits/poseidon2-air/**"
- "crates/circuits/sha256-air/**"
- "crates/circuits/mod-builder/**"
- "Cargo.toml"
- ".github/workflows/primitives.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -49,3 +51,8 @@ jobs:
working-directory: crates/circuits/sha256-air
run: |
cargo nextest run --cargo-profile fast --features parallel

- name: Run tests for mod-builder
working-directory: crates/circuits/mod-builder
run: |
cargo nextest run --cargo-profile fast --features parallel
1 change: 1 addition & 0 deletions .github/workflows/recursion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- "extensions/native/compiler/**"
- "extensions/native/recursion/**"
- "Cargo.toml"
- ".github/workflows/recursion.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "crates/vm/**"
- "crates/sdk/**"
- "Cargo.toml"
- ".github/workflows/sdk.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -38,6 +39,9 @@ jobs:
- name: Install solc # svm should support arm64 linux
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install architecture specific tools
run: |
arch=$(uname -m)
Expand Down Expand Up @@ -73,8 +77,24 @@ jobs:
run: |
bash ../../extensions/native/recursion/trusted_setup_s3.sh

- name: Run openvm-sdk contracts/ tests
working-directory: crates/sdk/contracts
run: |
forge fmt --check
forge build --sizes
forge test

- name: Check IOpenVmHalo2Verifier.sol abi correctness
working-directory: crates/sdk/contracts
run: |
forge build
jq -S '.abi' ./out/IOpenVmHalo2Verifier.sol/IOpenVmHalo2Verifier.json > compiled_abi.json
jq -S . ./abi/IOpenVmHalo2Verifier.json > expected_abi_sorted.json
diff -u expected_abi_sorted.json compiled_abi.json

- name: Run openvm-sdk crate tests
working-directory: crates/sdk
run: |
export RUST_BACKTRACE=1
cargo nextest run --cargo-profile=fast --test-threads=2 --features parallel

1 change: 1 addition & 0 deletions .github/workflows/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "crates/vm/**"
- "extensions/native/**"
- "Cargo.toml"
- ".github/workflows/vm.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rustc-*
# Bench metrics
.bench_metrics/
__pycache__/
metrics.json

# KZG trusted setup
**/params
Expand All @@ -32,3 +33,6 @@ __pycache__/
# Profiling
**/flamegraph.svg
**/profile.json

# openvm generated files
crates/cli/openvm/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "toolchain/tests/rv32im-test-vectors/riscv-tests"]
path = crates/toolchain/tests/rv32im-test-vectors/riscv-tests
url = https://github.com/riscv-software-src/riscv-tests.git
[submodule "crates/sdk/contracts/lib/forge-std"]
path = crates/sdk/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
Loading
Loading