Skip to content

Commit

Permalink
feat: use new IVC scheme (#8480)
Browse files Browse the repository at this point in the history
Replaces the old `ClientIvc` with `AztecIvc` (renamed to `ClientIVC`).
This was facilitated by the introduction of `auto_verify_mode` which
makes the new class behave a bit like the old one by automatically
"completing" the kernel circuits with recursive verifiers if
`auto_verify_mode == true`. (Note: a notable difference is that the old
model appended recursion logic to _any_ circuit, not just kernels. This
change means that it does not make sense to accumulate an odd number of
circuits into the IVC).
  • Loading branch information
ledwards2225 authored Sep 17, 2024
1 parent 03127b2 commit 1c7b06d
Show file tree
Hide file tree
Showing 35 changed files with 784 additions and 1,372 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- barretenberg/cpp/pil/**
- barretenberg/cpp/src/barretenberg/vm/**
- barretenberg/cpp/src/barretenberg/**/generated/*
- barretenberg/cpp/src/barretenberg/client_ivc.{hpp,cpp}
- barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.{hpp,cpp}
non-docs:
- '!(docs/**)'
non-misc-ci:
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ if [ ! -d ./srs_db/grumpkin ]; then
# The Grumpkin SRS is generated manually at the moment, only up to a large enough size for tests
# If tests require more points, the parameter can be increased here. Note: IPA requires
# dyadic_circuit_size + 1 points so in general this number will be a power of two plus 1
cd ./build && cmake --build . --parallel --target grumpkin_srs_gen && ./bin/grumpkin_srs_gen 8193
cd ./build && cmake --build . --parallel --target grumpkin_srs_gen && ./bin/grumpkin_srs_gen 32769
fi
11 changes: 1 addition & 10 deletions barretenberg/cpp/scripts/benchmark_client_ivc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
set -eu

TARGET=${1:-"client_ivc_bench"}

if [ "$TARGET" = "client_ivc_bench" ]; then
BENCHMARK="ClientIVCBench/Full/6"
elif [ "$TARGET" = "aztec_ivc_bench" ]; then
BENCHMARK="AztecIVCBench/FullStructured/6"
else
echo "Error: Unrecognized TARGET '$TARGET'."
exit 1
fi

BENCHMARK="ClientIVCBench/Full/6"
BUILD_DIR="build-op-count-time"
FILTER="${BENCHMARK}$" # '$' to ensure only specified bench is run

Expand Down
6 changes: 2 additions & 4 deletions barretenberg/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ if (ENABLE_PIC AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_subdirectory(barretenberg/world_state_napi)
endif()

add_subdirectory(barretenberg/aztec_ivc)
add_subdirectory(barretenberg/client_ivc)
add_subdirectory(barretenberg/bb)
add_subdirectory(barretenberg/circuit_checker)
add_subdirectory(barretenberg/client_ivc)
add_subdirectory(barretenberg/commitment_schemes)
add_subdirectory(barretenberg/commitment_schemes_recursion)
add_subdirectory(barretenberg/common)
Expand Down Expand Up @@ -112,10 +111,9 @@ include(GNUInstallDirs)
message(STATUS "Compiling all-in-one barretenberg archive")

set(BARRETENBERG_TARGET_OBJECTS
$<TARGET_OBJECTS:aztec_ivc_objects>
$<TARGET_OBJECTS:client_ivc_objects>
$<TARGET_OBJECTS:commitment_schemes_objects>
$<TARGET_OBJECTS:common_objects>
$<TARGET_OBJECTS:client_ivc_objects>
$<TARGET_OBJECTS:crypto_aes128_objects>
$<TARGET_OBJECTS:crypto_blake2s_objects>
$<TARGET_OBJECTS:crypto_blake3s_objects>
Expand Down
1 change: 0 additions & 1 deletion barretenberg/cpp/src/barretenberg/aztec_ivc/CMakeLists.txt

This file was deleted.

272 changes: 0 additions & 272 deletions barretenberg/cpp/src/barretenberg/aztec_ivc/aztec_ivc.cpp

This file was deleted.

Loading

1 comment on commit 1c7b06d

@AztecBot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 1c7b06d Previous: e3ea298 Ratio
nativeClientIVCBench/Full/6 34453.184685999986 ms/iter 12810.924122000017 ms/iter 2.69
wasmClientIVCBench/Full/6 100513.030599 ms/iter 38350.723408 ms/iter 2.62
commit(t) 8682744319 ns/iter 3619040250 ns/iter 2.40
Goblin::merge(t) 152341570 ns/iter 135328941 ns/iter 1.13
commit(t) 6949782032 ns/iter 3619040250 ns/iter 1.92

This comment was automatically generated by workflow using github-action-benchmark.

CC: @ludamad @codygunton

Please sign in to comment.