From 51ff116bed05bb500aae189286eb476aa2ce5f21 Mon Sep 17 00:00:00 2001 From: ludamad Date: Tue, 26 Sep 2023 10:53:35 +0100 Subject: [PATCH] fix: revert bb history --- barretenberg/.gitrepo | 6 +- barretenberg/CHANGELOG.md | 70 ++ barretenberg/VERSION | 2 +- barretenberg/acir_tests/Dockerfile.bb.js | 4 +- .../acir_tests/run_acir_tests_browser.sh | 4 +- barretenberg/cpp/.rebuild_patterns | 3 +- barretenberg/cpp/CMakeLists.txt | 10 +- barretenberg/cpp/CMakePresets.json | 27 +- .../dockerfiles/Dockerfile.wasm-linux-clang | 5 +- barretenberg/cpp/docs/Fuzzing.md | 40 +- barretenberg/cpp/scripts/run_tests | 6 +- .../cpp/src/barretenberg/barretenberg.hpp | 1 - barretenberg/cpp/src/barretenberg/bb/main.cpp | 11 +- .../benchmark/honk_bench/CMakeLists.txt | 3 +- .../honk_bench/benchmark_utilities.hpp | 20 +- .../benchmark/relations_bench/CMakeLists.txt | 2 +- .../relations_bench/relations.bench.cpp | 14 +- .../cpp/src/barretenberg/common/fuzzer.hpp | 10 +- .../barretenberg/common/fuzzer_constants.hpp | 5 +- .../src/barretenberg/common/thread_utils.cpp | 40 + .../src/barretenberg/common/thread_utils.hpp | 29 + .../cpp/src/barretenberg/dsl/types.hpp | 14 +- .../honk/composer/eccvm_composer.cpp | 121 +++ .../honk/composer/eccvm_composer.hpp | 83 ++ .../honk/composer/eccvm_composer.test.cpp | 105 +++ .../goblin/full_goblin_composer.test.cpp | 197 ++++ .../composer/goblin_ultra_composer.test.cpp | 125 ++- .../honk/composer/ultra_composer.cpp | 341 +------ .../honk/composer/ultra_composer.hpp | 58 +- .../honk/composer/ultra_composer.test.cpp | 794 ++++++++-------- .../src/barretenberg/honk/flavor/ecc_vm.hpp | 851 ++++++++++++++++++ .../barretenberg/honk/flavor/flavor.test.cpp | 21 +- .../barretenberg/honk/flavor/goblin_ultra.hpp | 16 +- .../honk/flavor/goblin_ultra_recursive.hpp | 442 +++++++++ .../src/barretenberg/honk/flavor/ultra.hpp | 10 +- .../honk/flavor/ultra_grumpkin.hpp | 5 + .../honk/flavor/ultra_recursive.hpp | 187 ++-- .../barretenberg/honk/instance/instances.hpp | 48 + .../honk/instance/prover_instance.cpp | 483 ++++++++++ .../honk/instance/prover_instance.hpp | 102 +++ .../honk/instance/prover_instance.test.cpp | 99 ++ .../honk/instance/verifier_instance.hpp | 19 + .../barretenberg/honk/pcs/gemini/gemini.cpp | 43 +- .../barretenberg/honk/pcs/gemini/gemini.hpp | 14 +- .../honk/pcs/gemini/gemini.test.cpp | 6 +- .../barretenberg/honk/pcs/ipa/ipa.test.cpp | 8 +- .../cpp/src/barretenberg/honk/pcs/kzg/kzg.hpp | 4 +- .../barretenberg/honk/pcs/kzg/kzg.test.cpp | 8 +- .../barretenberg/honk/pcs/shplonk/shplonk.hpp | 4 +- .../honk/proof_system/eccvm_prover.cpp | 384 ++++++++ .../honk/proof_system/eccvm_prover.hpp | 85 ++ .../honk/proof_system/eccvm_verifier.cpp | 264 ++++++ .../honk/proof_system/eccvm_verifier.hpp | 47 + .../honk/proof_system/folding_result.hpp | 38 + .../grand_product_library.test.cpp | 380 ++++++++ .../honk/proof_system/lookup_library.hpp | 62 ++ .../honk/proof_system/permutation_library.hpp | 169 ++++ .../honk/proof_system/protogalaxy_prover.cpp | 52 ++ .../honk/proof_system/protogalaxy_prover.hpp | 31 + .../proof_system/protogalaxy_verifier.cpp | 41 + .../proof_system/protogalaxy_verifier.hpp | 30 + .../honk/proof_system/ultra_prover.cpp | 281 +++--- .../honk/proof_system/ultra_prover.hpp | 26 +- .../honk/proof_system/ultra_verifier.cpp | 70 +- .../honk/proof_system/ultra_verifier.hpp | 1 - .../honk/sumcheck/partial_evaluation.test.cpp | 14 +- .../sumcheck/relation_correctness.test.cpp | 341 ++----- .../sumcheck/relation_definitions_fwd.hpp | 53 ++ .../barretenberg/honk/sumcheck/sumcheck.hpp | 2 +- .../honk/sumcheck/sumcheck.test.cpp | 688 ++++---------- .../honk/sumcheck/sumcheck_round.hpp | 11 +- .../honk/sumcheck/sumcheck_round.test.cpp | 276 +----- .../honk/transcript/transcript.hpp | 30 +- .../honk/transcript/transcript.test.cpp | 231 ++--- .../barretenberg/join_split_example/types.hpp | 12 +- .../plonk/composer/composer_lib.cpp | 2 +- .../plonk/composer/ultra_composer.test.cpp | 73 +- .../src/barretenberg/plonk/flavor/flavor.hpp | 13 - .../commitment_scheme.test.cpp | 4 +- .../kate_commitment_scheme.cpp | 5 +- .../kate_commitment_scheme.hpp | 1 - .../plonk/proof_system/prover/prover.cpp | 7 +- .../plonk/proof_system/prover/prover.hpp | 2 - .../types/polynomial_manifest.hpp | 30 - .../proof_system/types/program_settings.hpp | 65 +- .../proof_system/types/prover_settings.hpp | 13 - .../proof_system/utils/kate_verification.hpp | 41 - .../proof_system/verification_key/sol_gen.hpp | 4 - .../plonk/proof_system/verifier/verifier.cpp | 1 - .../plonk/proof_system/verifier/verifier.hpp | 2 - .../permutation_widget_impl.hpp | 2 +- .../transition_widgets/fixed_base_widget.hpp | 48 +- .../transition_widgets/logic_widget.hpp | 236 +++++ .../plookup_arithmetic_widget.hpp | 2 +- .../barretenberg/polynomials/polynomial.cpp | 101 ++- .../barretenberg/polynomials/polynomial.hpp | 14 +- .../polynomial_arithmetic.test.cpp | 52 ++ .../barretenberg/polynomials/univariate.hpp | 18 + .../arithmetization/arithmetization.hpp | 44 - .../circuit_builder/circuit_builder_base.cpp | 1 - .../eccvm/eccvm_builder_types.hpp | 36 + .../eccvm/eccvm_circuit_builder.hpp | 610 +++++++++++++ .../eccvm/eccvm_circuit_builder.test.cpp | 273 ++++++ .../circuit_builder/eccvm/msm_builder.hpp | 282 ++++++ .../eccvm/precomputed_tables_builder.hpp | 111 +++ .../eccvm/transcript_builder.hpp | 187 ++++ .../goblin_ultra_circuit_builder.cpp | 165 ++++ .../goblin_ultra_circuit_builder.hpp | 114 +++ .../goblin_ultra_circuit_builder.test.cpp | 38 +- .../circuit_builder/ultra_circuit_builder.cpp | 122 --- .../circuit_builder/ultra_circuit_builder.hpp | 168 +--- .../composer/composer_lib.test.cpp | 139 +-- .../proof_system/composer/permutation_lib.hpp | 53 +- .../composer/permutation_lib.test.cpp | 6 +- .../proof_system/flavor/flavor.hpp | 25 +- .../proof_system/op_queue/ecc_op_queue.hpp | 159 ++-- .../relations/ecc_vm/ecc_lookup_relation.cpp | 94 ++ .../relations/ecc_vm/ecc_lookup_relation.hpp | 265 ++++++ .../relations/ecc_vm/ecc_msm_relation.cpp | 399 ++++++++ .../relations/ecc_vm/ecc_msm_relation.hpp | 92 ++ .../ecc_vm/ecc_point_table_relation.cpp | 178 ++++ .../ecc_vm/ecc_point_table_relation.hpp | 38 + .../relations/ecc_vm/ecc_set_relation.cpp | 423 +++++++++ .../relations/ecc_vm/ecc_set_relation.hpp | 58 ++ .../ecc_vm/ecc_transcript_relation.cpp | 263 ++++++ .../ecc_vm/ecc_transcript_relation.hpp | 93 ++ .../relations/ecc_vm/ecc_wnaf_relation.cpp | 224 +++++ .../relations/ecc_vm/ecc_wnaf_relation.hpp | 73 ++ .../relations/permutation_relation.hpp | 107 --- .../relations/relation_parameters.hpp | 10 + .../proof_system/relations/relation_types.hpp | 46 +- .../proof_system/types/circuit_type.hpp | 3 +- .../circuits/recursive_circuit.hpp | 2 +- .../commitment/pedersen/pedersen.bench.cpp | 10 +- .../stdlib/commitment/pedersen/pedersen.hpp | 10 +- .../commitment/pedersen/pedersen.test.cpp | 82 +- .../commitment/pedersen/pedersen_plookup.hpp | 10 +- .../pedersen/pedersen_plookup.test.cpp | 48 +- .../stdlib/encryption/aes128/aes128.cpp | 76 +- .../stdlib/encryption/aes128/aes128.hpp | 8 +- .../stdlib/encryption/aes128/aes128.test.cpp | 18 +- .../stdlib/encryption/ecdsa/ecdsa.hpp | 43 +- .../stdlib/encryption/ecdsa/ecdsa.test.cpp | 90 +- .../stdlib/encryption/ecdsa/ecdsa_impl.hpp | 66 +- .../stdlib/encryption/schnorr/schnorr.cpp | 3 - .../encryption/schnorr/schnorr.test.cpp | 96 +- .../benchmarks/external/external.bench.cpp | 4 +- .../hash/benchmarks/sha256/sha256.bench.cpp | 1 - .../stdlib/hash/blake2s/blake2s.cpp | 56 +- .../stdlib/hash/blake2s/blake2s.hpp | 2 +- .../stdlib/hash/blake2s/blake2s.test.cpp | 16 +- .../stdlib/hash/blake2s/blake2s_plookup.cpp | 70 +- .../stdlib/hash/blake2s/blake2s_plookup.hpp | 2 +- .../stdlib/hash/blake2s/blake_util.hpp | 83 +- .../stdlib/hash/blake3s/blake3s.cpp | 161 ++-- .../stdlib/hash/blake3s/blake3s.hpp | 2 +- .../stdlib/hash/blake3s/blake3s.test.cpp | 45 +- .../stdlib/hash/blake3s/blake3s_plookup.cpp | 124 +-- .../stdlib/hash/blake3s/blake3s_plookup.hpp | 2 +- .../stdlib/hash/keccak/keccak.cpp | 86 +- .../stdlib/hash/keccak/keccak.hpp | 24 +- .../stdlib/hash/keccak/keccak.test.cpp | 124 +-- .../stdlib/hash/pedersen/pedersen.cpp | 11 +- .../stdlib/hash/pedersen/pedersen.hpp | 10 +- .../stdlib/hash/pedersen/pedersen_gates.hpp | 496 +++++----- .../stdlib/hash/pedersen/pedersen_plookup.hpp | 10 +- .../stdlib/hash/sha256/sha256.cpp | 38 +- .../stdlib/hash/sha256/sha256.hpp | 16 +- .../stdlib/hash/sha256/sha256.test.cpp | 98 +- .../stdlib/hash/sha256/sha256_plookup.cpp | 81 +- .../stdlib/hash/sha256/sha256_plookup.hpp | 66 +- .../stdlib/merkle_tree/hash.test.cpp | 18 +- .../stdlib/merkle_tree/membership.hpp | 162 ++-- .../stdlib/merkle_tree/membership.test.cpp | 132 +-- .../stdlib/merkle_tree/merkle_tree.test.cpp | 6 +- .../stdlib/primitives/address/address.hpp | 34 +- .../primitives/bigfield/bigfield.fuzzer.hpp | 165 ++-- .../stdlib/primitives/bigfield/bigfield.hpp | 74 +- .../primitives/bigfield/bigfield.test.cpp | 394 ++++---- .../bigfield/bigfield_all.fuzzer.cpp | 2 +- .../primitives/bigfield/bigfield_impl.hpp | 643 ++++++------- .../stdlib/primitives/biggroup/biggroup.hpp | 108 ++- .../primitives/biggroup/biggroup.test.cpp | 266 +++--- .../primitives/biggroup/biggroup_bn254.hpp | 2 +- .../primitives/biggroup/biggroup_goblin.hpp | 2 +- .../biggroup/biggroup_goblin.test.cpp | 5 +- .../primitives/biggroup/biggroup_impl.hpp | 10 +- .../primitives/biggroup/biggroup_nafs.hpp | 2 +- .../stdlib/primitives/bit_array/bit_array.cpp | 49 +- .../primitives/bit_array/bit_array.fuzzer.hpp | 88 +- .../stdlib/primitives/bit_array/bit_array.hpp | 65 +- .../primitives/bit_array/bit_array.test.cpp | 59 +- .../bit_array/bit_array_all.fuzzer.cpp | 2 +- .../stdlib/primitives/bool/bool.cpp | 126 ++- .../stdlib/primitives/bool/bool.fuzzer.hpp | 84 +- .../stdlib/primitives/bool/bool.hpp | 16 +- .../stdlib/primitives/bool/bool.test.cpp | 233 +++-- .../primitives/bool/bool_all.fuzzer.cpp | 2 +- .../primitives/byte_array/byte_array.cpp | 120 +-- .../byte_array/byte_array.fuzzer.hpp | 90 +- .../primitives/byte_array/byte_array.hpp | 47 +- .../primitives/byte_array/byte_array.test.cpp | 59 +- .../byte_array/byte_array_all.fuzzer.cpp | 2 +- .../circuit_builders/circuit_builders.hpp | 42 +- .../circuit_builders/circuit_builders_fwd.hpp | 36 +- .../stdlib/primitives/curves/bn254.hpp | 1 - .../stdlib/primitives/curves/secp256k1.hpp | 22 +- .../stdlib/primitives/curves/secp256r1.hpp | 22 +- .../stdlib/primitives/field/array.hpp | 70 +- .../stdlib/primitives/field/array.test.cpp | 216 +++-- .../stdlib/primitives/field/field.cpp | 276 +++--- .../stdlib/primitives/field/field.fuzzer.hpp | 198 ++-- .../stdlib/primitives/field/field.hpp | 80 +- .../stdlib/primitives/field/field.test.cpp | 444 +++++---- .../primitives/field/field_all.fuzzer.cpp | 2 +- .../stdlib/primitives/group/group.hpp | 71 +- .../stdlib/primitives/group/group.test.cpp | 41 +- .../stdlib/primitives/logic/logic.cpp | 30 +- .../stdlib/primitives/logic/logic.hpp | 6 +- .../stdlib/primitives/logic/logic.test.cpp | 76 +- .../primitives/memory/dynamic_array.cpp | 75 +- .../primitives/memory/dynamic_array.hpp | 18 +- .../primitives/memory/dynamic_array.test.cpp | 18 +- .../stdlib/primitives/memory/ram_table.cpp | 84 +- .../stdlib/primitives/memory/ram_table.hpp | 16 +- .../primitives/memory/ram_table.test.cpp | 26 +- .../stdlib/primitives/memory/rom_table.cpp | 30 +- .../stdlib/primitives/memory/rom_table.hpp | 12 +- .../primitives/memory/rom_table.test.cpp | 24 +- .../primitives/memory/twin_rom_table.cpp | 36 +- .../primitives/memory/twin_rom_table.hpp | 12 +- .../packed_byte_array/packed_byte_array.cpp | 54 +- .../packed_byte_array/packed_byte_array.hpp | 22 +- .../packed_byte_array.test.cpp | 47 +- .../stdlib/primitives/plookup/plookup.cpp | 46 +- .../stdlib/primitives/plookup/plookup.hpp | 4 +- .../primitives/plookup/plookup.test.cpp | 84 +- .../stdlib/primitives/point/point.hpp | 50 +- .../stdlib/primitives/safe_uint/safe_uint.cpp | 30 +- .../primitives/safe_uint/safe_uint.fuzzer.hpp | 92 +- .../stdlib/primitives/safe_uint/safe_uint.hpp | 38 +- .../primitives/safe_uint/safe_uint.test.cpp | 221 +++-- .../safe_uint/safe_uint_all.fuzzer.cpp | 2 +- .../stdlib/primitives/uint/arithmetic.cpp | 88 +- .../stdlib/primitives/uint/comparison.cpp | 39 +- .../stdlib/primitives/uint/logic.cpp | 124 +-- .../primitives/uint/plookup/arithmetic.cpp | 58 +- .../primitives/uint/plookup/comparison.cpp | 44 +- .../stdlib/primitives/uint/plookup/logic.cpp | 109 ++- .../stdlib/primitives/uint/plookup/uint.cpp | 82 +- .../stdlib/primitives/uint/plookup/uint.hpp | 42 +- .../stdlib/primitives/uint/uint.cpp | 161 ++-- .../stdlib/primitives/uint/uint.fuzzer.hpp | 186 ++-- .../stdlib/primitives/uint/uint.hpp | 74 +- .../stdlib/primitives/uint/uint.test.cpp | 611 +++++++------ .../primitives/uint/uint_all.fuzzer.cpp | 2 +- .../stdlib/primitives/witness/witness.hpp | 26 +- .../honk/transcript/transcript.test.cpp | 2 +- .../honk/verifier/goblin_verifier.test.cpp | 221 +++++ .../verifier/ultra_recursive_verifier.cpp | 96 +- .../verifier/ultra_recursive_verifier.hpp | 18 +- .../recursion/honk/verifier/verifier.test.cpp | 200 ++-- .../recursion/transcript/transcript.hpp | 44 +- .../verification_key/verification_key.hpp | 124 +-- .../verification_key.test.cpp | 14 +- .../recursion/verifier/program_settings.hpp | 70 +- .../recursion/verifier/verifier.test.cpp | 5 +- .../barretenberg/transcript/transcript.cpp | 2 +- barretenberg/sol/README.md | 13 +- .../sol/test/base/DifferentialFuzzer.sol | 3 - barretenberg/ts/CHANGELOG.md | 70 ++ barretenberg/ts/package.json | 2 +- 272 files changed, 15699 insertions(+), 8536 deletions(-) create mode 100644 barretenberg/cpp/src/barretenberg/common/thread_utils.cpp create mode 100644 barretenberg/cpp/src/barretenberg/common/thread_utils.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.test.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/composer/goblin/full_goblin_composer.test.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/flavor/ecc_vm.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/flavor/goblin_ultra_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/instance/instances.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/instance/prover_instance.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/instance/prover_instance.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/instance/prover_instance.test.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/instance/verifier_instance.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/eccvm_prover.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/eccvm_prover.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/eccvm_verifier.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/eccvm_verifier.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/folding_result.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/grand_product_library.test.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/lookup_library.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/permutation_library.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.cpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.hpp create mode 100644 barretenberg/cpp/src/barretenberg/honk/sumcheck/relation_definitions_fwd.hpp create mode 100644 barretenberg/cpp/src/barretenberg/plonk/proof_system/widgets/transition_widgets/logic_widget.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_builder_types.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.test.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/msm_builder.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/precomputed_tables_builder.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/transcript_builder.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_lookup_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_lookup_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_msm_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_msm_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_point_table_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_point_table_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_set_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_set_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_transcript_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_transcript_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_wnaf_relation.cpp create mode 100644 barretenberg/cpp/src/barretenberg/proof_system/relations/ecc_vm/ecc_wnaf_relation.hpp create mode 100644 barretenberg/cpp/src/barretenberg/stdlib/recursion/honk/verifier/goblin_verifier.test.cpp diff --git a/barretenberg/.gitrepo b/barretenberg/.gitrepo index d2fd94c9aa4d..875ba73837d4 100644 --- a/barretenberg/.gitrepo +++ b/barretenberg/.gitrepo @@ -5,8 +5,8 @@ ; [subrepo] remote = https://github.com/AztecProtocol/barretenberg - branch = master - commit = 7edb1644d0ae472a70fc3554b7d2cfc6c5496168 - parent = 8465ff6253d597e114b9bf08d5090cf17474aa6e + branch = main + commit = ae9f99c3caf0213882d843577374b03871cc7092 + parent = c8a5cfb375b498475503c12cc83fcdba39f2ec5f method = merge cmdver = 0.4.6 diff --git a/barretenberg/CHANGELOG.md b/barretenberg/CHANGELOG.md index 8291740c03b2..d4ec842c71f4 100644 --- a/barretenberg/CHANGELOG.md +++ b/barretenberg/CHANGELOG.md @@ -1,5 +1,75 @@ # Changelog +## [0.7.10](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.9...barretenberg-v0.7.10) (2023-09-20) + + +### Miscellaneous + +* **barretenberg:** Synchronize aztec-packages versions + +## [0.7.9](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.8...barretenberg-v0.7.9) (2023-09-19) + + +### Miscellaneous + +* **barretenberg:** Synchronize aztec-packages versions + +## [0.7.8](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.7...barretenberg-v0.7.8) (2023-09-19) + + +### Features + +* Allow tracing build system with [debug ci] ([#2389](https://github.com/AztecProtocol/aztec-packages/issues/2389)) ([ce311a9](https://github.com/AztecProtocol/aztec-packages/commit/ce311a9b44a8f0327235ccd3bb8f9a8fca97443e)) + +## [0.7.7](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.6...barretenberg-v0.7.7) (2023-09-18) + + +### Miscellaneous + +* **barretenberg:** Synchronize aztec-packages versions + +## [0.7.6](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.5...barretenberg-v0.7.6) (2023-09-18) + + +### Miscellaneous + +* **barretenberg:** Synchronize aztec-packages versions + +## [0.7.5](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.4...barretenberg-v0.7.5) (2023-09-15) + + +### Features + +* Protogalaxy interfaces ([#2125](https://github.com/AztecProtocol/aztec-packages/issues/2125)) ([b45dd26](https://github.com/AztecProtocol/aztec-packages/commit/b45dd26214119f0c52c2c4f48ff11f650912fef9)) + +## [0.7.4](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.3...barretenberg-v0.7.4) (2023-09-15) + + +### Features + +* Elliptic Curve Virtual Machine Circuit ([#1268](https://github.com/AztecProtocol/aztec-packages/issues/1268)) ([f85ecd9](https://github.com/AztecProtocol/aztec-packages/commit/f85ecd921271ec94b551992bcfe16c2b56f72d2e)) + +## [0.7.3](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.2...barretenberg-v0.7.3) (2023-09-15) + + +### Miscellaneous + +* **barretenberg:** Synchronize aztec-packages versions + +## [0.7.2](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.1...barretenberg-v0.7.2) (2023-09-14) + + +### Features + +* ASAN build ([#2307](https://github.com/AztecProtocol/aztec-packages/issues/2307)) ([274c89f](https://github.com/AztecProtocol/aztec-packages/commit/274c89f1916d8af2054d9773dc632f87bb3bf2fc)) + +## [0.7.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.7.0...barretenberg-v0.7.1) (2023-09-14) + + +### Miscellaneous + +* Move barretenberg to top of repo. Make circuits build off barretenberg build. ([#2221](https://github.com/AztecProtocol/aztec-packages/issues/2221)) ([404ec34](https://github.com/AztecProtocol/aztec-packages/commit/404ec34d38e1a9c3fbe7a3cdb6e88c28f62f72e4)) + ## [0.7.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.6.7...barretenberg-v0.7.0) (2023-09-13) diff --git a/barretenberg/VERSION b/barretenberg/VERSION index f34b958bcd42..40489966a881 100644 --- a/barretenberg/VERSION +++ b/barretenberg/VERSION @@ -1 +1 @@ -v0.7.0 x-release-please-version +v0.7.10 x-release-please-version diff --git a/barretenberg/acir_tests/Dockerfile.bb.js b/barretenberg/acir_tests/Dockerfile.bb.js index 161a7166ffb0..3fc58e353cdd 100644 --- a/barretenberg/acir_tests/Dockerfile.bb.js +++ b/barretenberg/acir_tests/Dockerfile.bb.js @@ -19,4 +19,6 @@ RUN BIN=../ts/dest/node/main.js FLOW=all_cmds ./run_acir_tests.sh 1_mul RUN BROWSER=chrome THREAD_MODEL=mt ./run_acir_tests_browser.sh double_verify_proof # Run 1_mul through bb.js on chrome/webkit testing single threaded browser support. RUN BROWSER=chrome THREAD_MODEL=st ./run_acir_tests_browser.sh 1_mul -RUN BROWSER=webkit THREAD_MODEL=st ./run_acir_tests_browser.sh 1_mul \ No newline at end of file +# Commenting for now as fails intermittently. Unreproducable on mainframe. +# See https://github.com/AztecProtocol/aztec-packages/issues/2104 +#RUN BROWSER=webkit THREAD_MODEL=st ./run_acir_tests_browser.sh 1_mul diff --git a/barretenberg/acir_tests/run_acir_tests_browser.sh b/barretenberg/acir_tests/run_acir_tests_browser.sh index da81b9e1f698..22830656250e 100755 --- a/barretenberg/acir_tests/run_acir_tests_browser.sh +++ b/barretenberg/acir_tests/run_acir_tests_browser.sh @@ -9,9 +9,7 @@ cleanup() { trap cleanup SIGINT SIGTERM # Skipping firefox because this headless firefox is so slow. -# Skipping webkit as well due to intermittent errors, see https://github.com/AztecProtocol/aztec-packages/issues/2104 -#export BROWSER=${BROWSER:-chrome,webkit} -export BROWSER=${BROWSER:-chrome} +export BROWSER=${BROWSER:-chrome,webkit} # Can be "mt" or "st". THREAD_MODEL=${THREAD_MODEL:-mt} diff --git a/barretenberg/cpp/.rebuild_patterns b/barretenberg/cpp/.rebuild_patterns index 0c13870647a0..24dc32bd6de9 100644 --- a/barretenberg/cpp/.rebuild_patterns +++ b/barretenberg/cpp/.rebuild_patterns @@ -1,3 +1,4 @@ ^barretenberg/.*\\.(cpp|cc|cxx|c\\+\\+|h|hpp|hxx|h\\+\\+|c|h|inl|inc|ipp|tpp|cmake)$ ^barretenberg/.*CMakeLists\\.txt$ -^barretenberg/.*Dockerfile.*$ \ No newline at end of file +^barretenberg/.*Dockerfile.*$ +^barretenberg/cpp/scripts/ diff --git a/barretenberg/cpp/CMakeLists.txt b/barretenberg/cpp/CMakeLists.txt index 515ccee5241c..cca88d9a4427 100644 --- a/barretenberg/cpp/CMakeLists.txt +++ b/barretenberg/cpp/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24) project( Barretenberg DESCRIPTION "BN254 elliptic curve library, and PLONK SNARK prover" - VERSION 0.7.0 # x-release-please-version + VERSION 0.7.10 # x-release-please-version LANGUAGES CXX C ) @@ -135,3 +135,11 @@ include(cmake/gtest.cmake) include(cmake/benchmark.cmake) include(cmake/module.cmake) add_subdirectory(src) +if (ENABLE_ASAN AND NOT(FUZZING)) + find_program(LLVM_SYMBOLIZER_PATH NAMES llvm-symbolizer-16) + if (NOT(LLVM_SYMBOLIZER_PATH)) + message(WARNING "LLVM symbolizer not found, so ASAN output will be limited") + else() + message(AUTHOR_WARNING "Run `export ASAN_SYMBOLIZER_PATH=\"${LLVM_SYMBOLIZER_PATH}\"` before running tests for better ASAN output (at which lines the bugs are).") + endif() +endif() diff --git a/barretenberg/cpp/CMakePresets.json b/barretenberg/cpp/CMakePresets.json index 6ac7fd933f6c..0b50ba0871c0 100644 --- a/barretenberg/cpp/CMakePresets.json +++ b/barretenberg/cpp/CMakePresets.json @@ -51,6 +51,20 @@ "DISABLE_ASM": "ON" } }, + {"name":"asan", + "displayName": "Debugging build with address sanitizer on Clang-16", + "description": "Build with address sanitizer on clang16 with debugging information", + "inherits":"clang16-dbg", + "binaryDir": "build-asan", +"environment": { + "CMAKE_BUILD_TYPE": "Debug" + }, + "cacheVariables": { + "ENABLE_ASAN": "ON", + "DISABLE_ASM": "ON" + } + +}, { "name": "gcc", "displayName": "Build with GCC", @@ -82,7 +96,7 @@ "name": "fuzzing", "displayName": "Build with fuzzing", "description": "Build default preset but with fuzzing enabled", - "inherits": "default", + "inherits": "clang16", "binaryDir": "build-fuzzing", "cacheVariables": { "FUZZING": "ON" @@ -179,6 +193,10 @@ "name": "clang16-dbg", "inherits": "default", "configurePreset": "clang16-dbg" + },{ + "name": "asan", + "inherits": "default", + "configurePreset": "asan" }, { "name": "gcc", @@ -197,7 +215,7 @@ }, { "name": "fuzzing", - "inherits": "default", + "inherits": "clang16", "configurePreset": "fuzzing" }, { @@ -260,6 +278,11 @@ "inherits": "default", "configurePreset": "clang16-dbg" }, + { + "name": "asan", + "inherits": "default", + "configurePreset": "asan" + }, { "name": "gcc", "inherits": "default", diff --git a/barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang b/barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang index c642b4a9a66c..bdcd6d3edc77 100644 --- a/barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang +++ b/barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang @@ -1,6 +1,5 @@ FROM ubuntu:lunar AS builder -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential wget git libssl-dev cmake ninja-build curl -RUN curl https://wasmtime.dev/install.sh -sSf | bash /dev/stdin --version v3.0.1 +RUN apt-get update && apt-get install -y build-essential git cmake ninja-build curl WORKDIR /usr/src/barretenberg/cpp COPY ./scripts/install-wasi-sdk.sh ./scripts/install-wasi-sdk.sh RUN ./scripts/install-wasi-sdk.sh @@ -18,4 +17,4 @@ COPY --from=builder /usr/src/barretenberg/cpp/build-wasm/lib/libbarretenberg.a / COPY --from=builder /usr/src/barretenberg/cpp/build-wasm/lib/libwasi.a /usr/src/barretenberg/cpp/build-wasm/lib/libwasi.a COPY --from=builder /usr/src/barretenberg/cpp/build-wasm/lib/libenv.a /usr/src/barretenberg/cpp/build-wasm/lib/libenv.a # Copy wasi-sdk so that consuming projects have the toolchain available. -COPY --from=builder /usr/src/barretenberg/cpp/src/wasi-sdk-20.0 /usr/src/barretenberg/cpp/src/wasi-sdk-20.0 \ No newline at end of file +COPY --from=builder /usr/src/barretenberg/cpp/src/wasi-sdk-20.0 /usr/src/barretenberg/cpp/src/wasi-sdk-20.0 diff --git a/barretenberg/cpp/docs/Fuzzing.md b/barretenberg/cpp/docs/Fuzzing.md index 7efc814e84cb..7dc3a6bde9f2 100644 --- a/barretenberg/cpp/docs/Fuzzing.md +++ b/barretenberg/cpp/docs/Fuzzing.md @@ -1,14 +1,18 @@ # Fuzzing barretenberg + ## Intro + We are gradually introducing fuzzing of various primitives into barretenberg, focusing first and foremost on in-cicruit types. If you are developing / patching a primitive and there is a fuzzer available for it, please take the time to update the fuzzer (if you've added new functionality) and run it for at least a few hours to increase security. ## Build To build with standard clang: + ```bash cmake --preset fuzzing cmake --build --preset fuzzing ``` + Fuzzing build turns off building tests and benchmarks, since they are incompatible with libfuzzer interface. To turn on address sanitizer add `-DADDRESS_SANITIZER=ON`. Note that address sanitizer can be used to explore crashes. @@ -27,35 +31,43 @@ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER= -DCMA ``` ## Currently supported -Currently we have fuzzers for bigfield, bit_array, bool, byte_array, field, safe_uint and uint. Each of them is available in 3 versions: StandardPlonk, TurboPlonk, ALL (differential fuzzing of 2 versions). + +Currently we have fuzzers for bigfield, bit_array, bool, byte_array, field, safe_uint and uint. Each of them is available in 2 versions: StandardPlonk, ALL (differential fuzzing of 2 versions). To compile all fuzzers just type `make`. + ## Running the fuzzer + TODO: add information about saved testcases You can simply run a fuzzer by executing the built executable, for example, + ```bash -./bin/stdlib_primitives_bigfield_turbo_fuzzer +./bin/stdlib_primitives_bigfield_standard_fuzzer ``` + This is useful if you added a feature/instruction or changed some logic and want to quickly test if there are any really bad bugs. To run the fuzzer seriously, I'd recommend: + ```bash mkdir ../../../_testcases; mkdir crashes; ./bin/ -timeout=1 -len_control=500 -workers=8 -jobs=8 -entropic=1 -shrink=1 -artifact_prefix=crashes/ -use_value_profile=1 ../../../_testcases ``` + You can watch the progress of the fuzzer in one of the generated logs fuzz-.log The purpose of each parameter: -+ -timeout=1 - If a testcase takes more than 1 second to execute, it will be treated as a crash -+ -len_control=500 - Slows down the increase of testcase size. Especially important for heavy classes like bigfield, keeps the number of executions per second at a decent rate -+ -worker=8 - The number of threads that can simultaneously execute testcases. Should be less or equal to the number of jobs -+ -jobs=8 - After how many crashes the fuzzer will stop fuzzing. If a crash is executed and the number of jobs is more than workers then the fuzzer will proceed to give the worker a new job. The 8/8 worker/job configuration ensures that the fuzzer will quit after 8 crashes and until the first crash all the workers are busy. -+ -entropic=1 - Entropic should be enabled by default, but in case it isn't, enable it. A better power schedule than the old one. -+ -shrink=1 - If a new testcase is encountered that has the same coverage as some previous one in the corpus and the testcase is smaller, replace the one in the corpus with the new one. Helps keep exec/s higher. -+ -artifact_prefix=crashes/ - Where to save crashes/timeouts/ooms. -+ -use_value_profile=1 - Leverage libfuzzer internal CMP analysis. Very useful, but blows the corpus up. -+ (../../../_testcases) - The path to the folder, where corpus testcases are going to be saved and loaded from (also loads testcases from there at the start of fuzzing). - -Log structure is described here https://llvm.org/docs/LibFuzzer.html + +- -timeout=1 - If a testcase takes more than 1 second to execute, it will be treated as a crash +- -len_control=500 - Slows down the increase of testcase size. Especially important for heavy classes like bigfield, keeps the number of executions per second at a decent rate +- -worker=8 - The number of threads that can simultaneously execute testcases. Should be less or equal to the number of jobs +- -jobs=8 - After how many crashes the fuzzer will stop fuzzing. If a crash is executed and the number of jobs is more than workers then the fuzzer will proceed to give the worker a new job. The 8/8 worker/job configuration ensures that the fuzzer will quit after 8 crashes and until the first crash all the workers are busy. +- -entropic=1 - Entropic should be enabled by default, but in case it isn't, enable it. A better power schedule than the old one. +- -shrink=1 - If a new testcase is encountered that has the same coverage as some previous one in the corpus and the testcase is smaller, replace the one in the corpus with the new one. Helps keep exec/s higher. +- -artifact_prefix=crashes/ - Where to save crashes/timeouts/ooms. +- -use_value_profile=1 - Leverage libfuzzer internal CMP analysis. Very useful, but blows the corpus up. +- (../../../\_testcases) - The path to the folder, where corpus testcases are going to be saved and loaded from (also loads testcases from there at the start of fuzzing). + +Log structure is described here https://llvm.org/docs/LibFuzzer.html If you've found an issue, stopped the fuzzer, you can minimize the corpus to get rid of repetitions and then start from a minimized corpus @@ -67,10 +79,12 @@ cp ../../../_testcases_minimized/* ../../../_testcases ``` If you've found a crash, you can minimize the crash to make the root cause more obvious: + ```bash mkdir minimized_crashes ./bin/ -minimize_crash=1 -artifact_prefix=minimized_crashes ``` + Also, both bigfield and safeuint fuzzer containt the SHOW_INFORMATION preprocessor cases, which enable the printing of instructions and values to make debugging the crash easier. # Coverage reports diff --git a/barretenberg/cpp/scripts/run_tests b/barretenberg/cpp/scripts/run_tests index 427a34531b09..28d9f8cc4f8c 100755 --- a/barretenberg/cpp/scripts/run_tests +++ b/barretenberg/cpp/scripts/run_tests @@ -3,7 +3,8 @@ # 1. The number of ignition transcripts to download. # 2. The set of gtest binary names to run. # 3-n. The arguments to pass to the gtest binaries. -set -exu +[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace +set -eu NUM_TRANSCRIPTS=$1 TESTS=$2 @@ -19,7 +20,8 @@ IMAGE_URI=$(calculate_image_uri $REPOSITORY) retry docker pull $IMAGE_URI # If there is a file in the scripts directory named $TESTS, those are the tests to run. -if [ -f "$(query_manifest projectDir $REPOSITORY)/scripts/$TESTS" ]; then +cd $(query_manifest projectDir $REPOSITORY)/scripts +if [ -f "$TESTS" ]; then TESTS=$(cat $TESTS | tr '\n' ' ') fi diff --git a/barretenberg/cpp/src/barretenberg/barretenberg.hpp b/barretenberg/cpp/src/barretenberg/barretenberg.hpp index 329f31bb1ca4..9ee9413e151a 100644 --- a/barretenberg/cpp/src/barretenberg/barretenberg.hpp +++ b/barretenberg/cpp/src/barretenberg/barretenberg.hpp @@ -24,7 +24,6 @@ #include "numeric/uint256/uint256.hpp" #include "plonk/proof_system/types/proof.hpp" #include "plonk/proof_system/verification_key/verification_key.hpp" -#include "proof_system/circuit_builder/turbo_circuit_builder.hpp" #include "proof_system/circuit_builder/ultra_circuit_builder.hpp" #include "proof_system/types/circuit_type.hpp" // TODO(https://github.com/AztecProtocol/barretenberg/issues/491): diff --git a/barretenberg/cpp/src/barretenberg/bb/main.cpp b/barretenberg/cpp/src/barretenberg/bb/main.cpp index 2eae122b471f..72f0a95990c7 100644 --- a/barretenberg/cpp/src/barretenberg/bb/main.cpp +++ b/barretenberg/cpp/src/barretenberg/bb/main.cpp @@ -332,6 +332,14 @@ int main(int argc, char* argv[]) std::string vk_path = getOption(args, "-k", "./target/vk"); CRS_PATH = getOption(args, "-c", "./crs"); bool recursive = flagPresent(args, "-r") || flagPresent(args, "--recursive"); + + // Skip CRS initialization for any command which doesn't require the CRS. + if (command == "info") { + std::string output_path = getOption(args, "-o", "info.json"); + acvmInfo(output_path); + return 0; + } + init(); if (command == "prove_and_verify") { @@ -355,9 +363,6 @@ int main(int argc, char* argv[]) } else if (command == "vk_as_fields") { std::string output_path = getOption(args, "-o", vk_path + "_fields.json"); vkAsFields(vk_path, output_path); - } else if (command == "info") { - std::string output_path = getOption(args, "-o", "info.json"); - acvmInfo(output_path); } else { std::cerr << "Unknown command: " << command << "\n"; return 1; diff --git a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/CMakeLists.txt index d9a995e7cfb8..3234668be52c 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/CMakeLists.txt @@ -1,6 +1,5 @@ # Each source represents a separate benchmark suite set(BENCHMARK_SOURCES -standard_honk.bench.cpp standard_plonk.bench.cpp ultra_honk.bench.cpp ultra_plonk.bench.cpp @@ -14,7 +13,7 @@ set(LINKED_LIBRARIES benchmark::benchmark ) -# Add executable and custom target for each suite, e.g. standard_honk_bench +# Add executable and custom target for each suite, e.g. ultra_honk_bench foreach(BENCHMARK_SOURCE ${BENCHMARK_SOURCES}) get_filename_component(BENCHMARK_NAME ${BENCHMARK_SOURCE} NAME_WE) # extract name without extension add_executable(${BENCHMARK_NAME}_bench main.bench.cpp ${BENCHMARK_SOURCE} benchmark_utilities.hpp) diff --git a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/benchmark_utilities.hpp b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/benchmark_utilities.hpp index e3c7cf7fadf5..21e3513fd84c 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/benchmark_utilities.hpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/benchmark_utilities.hpp @@ -1,5 +1,7 @@ #include +#include "barretenberg/honk/composer/ultra_composer.hpp" +#include "barretenberg/proof_system/types/circuit_type.hpp" #include "barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp" #include "barretenberg/stdlib/hash/keccak/keccak.hpp" #include "barretenberg/stdlib/hash/sha256/sha256.hpp" @@ -224,11 +226,21 @@ void construct_proof_with_specified_num_iterations(State& state, test_circuit_function(builder, num_iterations); auto composer = Composer(); - auto ext_prover = composer.create_prover(builder); - state.ResumeTiming(); + if constexpr (proof_system::IsAnyOf) { + auto instance = composer.create_instance(builder); + auto ext_prover = composer.create_prover(instance); + state.ResumeTiming(); - // Construct proof - auto proof = ext_prover.construct_proof(); + // Construct proof + auto proof = ext_prover.construct_proof(); + + } else { + auto ext_prover = composer.create_prover(builder); + state.ResumeTiming(); + + // Construct proof + auto proof = ext_prover.construct_proof(); + } } } diff --git a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/CMakeLists.txt index 7fd8082895c0..57f0eea70ee1 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/CMakeLists.txt @@ -10,7 +10,7 @@ set(LINKED_LIBRARIES benchmark::benchmark ) -# Add executable and custom target for each suite, e.g. standard_honk_bench +# Add executable and custom target for each suite, e.g. ultra_honk_bench foreach(BENCHMARK_SOURCE ${BENCHMARK_SOURCES}) get_filename_component(BENCHMARK_NAME ${BENCHMARK_SOURCE} NAME_WE) # extract name without extension add_executable(${BENCHMARK_NAME}_bench main.bench.cpp ${BENCHMARK_SOURCE}) diff --git a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp index 362d5b15b6ca..df0be6fe25a2 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp @@ -1,7 +1,5 @@ #include "barretenberg/honk/flavor/goblin_ultra.hpp" -#include "barretenberg/honk/flavor/standard.hpp" #include "barretenberg/honk/flavor/ultra.hpp" -#include "barretenberg/proof_system/relations/arithmetic_relation.hpp" #include "barretenberg/proof_system/relations/auxiliary_relation.hpp" #include "barretenberg/proof_system/relations/ecc_op_queue_relation.hpp" #include "barretenberg/proof_system/relations/elliptic_relation.hpp" @@ -47,12 +45,6 @@ template void execute_relation(::benchmark: } } -void arithmetic_relation(::benchmark::State& state) noexcept -{ - execute_relation>(state); -} -BENCHMARK(arithmetic_relation); - void auxiliary_relation(::benchmark::State& state) noexcept { execute_relation>(state); @@ -83,11 +75,11 @@ void lookup_relation(::benchmark::State& state) noexcept } BENCHMARK(lookup_relation); -void permutation_relation(::benchmark::State& state) noexcept +void ultra_permutation_relation(::benchmark::State& state) noexcept { - execute_relation>(state); + execute_relation>(state); } -BENCHMARK(permutation_relation); +BENCHMARK(ultra_permutation_relation); void ultra_arithmetic_relation(::benchmark::State& state) noexcept { diff --git a/barretenberg/cpp/src/barretenberg/common/fuzzer.hpp b/barretenberg/cpp/src/barretenberg/common/fuzzer.hpp index 59cb3631f280..66f6fc01d248 100644 --- a/barretenberg/cpp/src/barretenberg/common/fuzzer.hpp +++ b/barretenberg/cpp/src/barretenberg/common/fuzzer.hpp @@ -1,7 +1,6 @@ #pragma once #include "barretenberg/numeric/uint256/uint256.hpp" #include "barretenberg/proof_system/circuit_builder/standard_circuit_builder.hpp" -#include "barretenberg/proof_system/circuit_builder/turbo_circuit_builder.hpp" #include // NOLINTBEGIN(cppcoreguidelines-macro-usage, google-runtime-int) @@ -679,7 +678,7 @@ class ArithmeticFuzzHelper { }; template