Skip to content

Commit

Permalink
refactor: Join-split example Part 2 (#5016)
Browse files Browse the repository at this point in the history
Flatten join_split_example/ and move inside of examples/

Follows: #4965
  • Loading branch information
codygunton authored Mar 8, 2024
1 parent 53b2381 commit 0718320
Show file tree
Hide file tree
Showing 77 changed files with 88 additions and 119 deletions.
14 changes: 0 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,18 +356,6 @@ jobs:
command: cond_spot_run_test barretenberg-x86_64-linux-clang-assert 32 ./scripts/run_tests 3 stdlib_recursion_tests --gtest_filter=-*turbo*
aztec_manifest_key: barretenberg-x86_64-linux-clang-assert

barretenberg-join-split-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_test barretenberg-x86_64-linux-clang-assert 32 ./scripts/run_tests 3 join_split_example_proofs_join_split_tests --gtest_filter=-*full_proof*
aztec_manifest_key: barretenberg-x86_64-linux-clang-assert

barretenberg-acir-tests-bb:
docker:
- image: aztecprotocol/alpine-build-image
Expand Down Expand Up @@ -1310,7 +1298,6 @@ workflows:
- barretenberg-tests: *bb_test
- barretenberg-stdlib-tests: *bb_test
- barretenberg-stdlib-recursion-ultra-tests: *bb_test
- barretenberg-join-split-tests: *bb_test
- barretenberg-acir-tests-bb: *bb_acir_tests
- barretenberg-acir-tests-bb-sol: *bb_acir_tests
- barretenberg-docs: *defaults
Expand Down Expand Up @@ -1446,7 +1433,6 @@ workflows:
- barretenberg-tests
- barretenberg-stdlib-tests
- barretenberg-stdlib-recursion-ultra-tests
- barretenberg-join-split-tests
- barretenberg-acir-tests-bb
- barretenberg-acir-tests-bb-sol
- barretenberg-docs
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/bb-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TESTS=(
goblin_tests
client_ivc_tests
dsl_tests
join_split_example_tests
crypto_aes128_tests
crypto_blake2s_tests
crypto_blake3s_tests
Expand All @@ -33,7 +34,6 @@ TESTS=(
crypto_schnorr_tests
crypto_sha256_tests
ecc_tests
join_split_example_proofs_notes_tests
numeric_tests
plonk_tests
polynomials_tests
Expand Down
3 changes: 1 addition & 2 deletions barretenberg/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ add_subdirectory(barretenberg/flavor)
add_subdirectory(barretenberg/goblin)
add_subdirectory(barretenberg/grumpkin_srs_gen)
add_subdirectory(barretenberg/honk)
add_subdirectory(barretenberg/join_split_example)
add_subdirectory(barretenberg/numeric)
add_subdirectory(barretenberg/plonk)
add_subdirectory(barretenberg/polynomials)
Expand Down Expand Up @@ -112,7 +111,7 @@ set(BARRETENBERG_TARGET_OBJECTS
$<TARGET_OBJECTS:dsl_objects>
$<TARGET_OBJECTS:ecc_objects>
$<TARGET_OBJECTS:eccvm_objects>
$<TARGET_OBJECTS:examples_objects>
$<TARGET_OBJECTS:simple_example_objects>
$<TARGET_OBJECTS:flavor_objects>
$<TARGET_OBJECTS:goblin_objects>
$<TARGET_OBJECTS:honk_objects>
Expand Down
5 changes: 2 additions & 3 deletions barretenberg/cpp/src/barretenberg/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
barretenberg_module(examples
stdlib_pedersen_commitment
)
add_subdirectory(simple)
add_subdirectory(join_split)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
barretenberg_module(
join_split_example_proofs_notes
join_split_example
crypto_schnorr
stdlib_blake2s
stdlib_sha256
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "compute_signing_data.hpp"
#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
#include "barretenberg/join_split_example/proofs/notes/native/index.hpp"
#include "barretenberg/examples/join_split/notes/native/index.hpp"

namespace bb::join_split_example::proofs::join_split {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/fixtures/user_context.hpp"
#include "barretenberg/examples/join_split/user_context.hpp"
#include "join_split.hpp"
#include "join_split_circuit.hpp"
#include "join_split_tx.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "join_split.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/plonk/proof_system/commitment_scheme/kate_commitment_scheme.hpp"
#include "join_split_circuit.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/srs/factories/crs_factory.hpp"
#include "join_split_tx.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "barretenberg/common/streams.hpp"
#include "barretenberg/common/test.hpp"
#include "barretenberg/crypto/merkle_tree/index.hpp"
#include "barretenberg/join_split_example/constants.hpp"
#include "barretenberg/join_split_example/proofs/inner_proof_data/inner_proof_data.hpp"
#include "barretenberg/join_split_example/proofs/notes/native/index.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/inner_proof_data.hpp"
#include "barretenberg/examples/join_split/notes/native/index.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/plonk/proof_system/proving_key/serialize.hpp"
#include "index.hpp"
#include "join_split_circuit.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "join_split_circuit.hpp"
#include "barretenberg/crypto/merkle_tree/membership.hpp"
#include "barretenberg/join_split_example/constants.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/account/account_note.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/claim/claim_note.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/value/compute_nullifier.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/value/value_note.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/notes/circuit/account/account_note.hpp"
#include "barretenberg/examples/join_split/notes/circuit/claim/claim_note.hpp"
#include "barretenberg/examples/join_split/notes/circuit/value/compute_nullifier.hpp"
#include "barretenberg/examples/join_split/notes/circuit/value/value_note.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "verify_signature.hpp"

namespace bb::join_split_example::proofs::join_split {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include "barretenberg/crypto/schnorr/schnorr.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/claim/witness_data.hpp"
#include "barretenberg/join_split_example/proofs/notes/circuit/value/witness_data.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/circuit/claim/witness_data.hpp"
#include "barretenberg/examples/join_split/notes/circuit/value/witness_data.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "join_split_tx.hpp"

namespace bb::join_split_example::proofs::join_split {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once
#include "barretenberg/crypto/merkle_tree/hash_path.hpp"
#include "barretenberg/crypto/schnorr/schnorr.hpp"
#include "barretenberg/join_split_example/proofs/notes/native/claim/claim_note_tx_data.hpp"
#include "barretenberg/join_split_example/proofs/notes/native/value/value_note.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/native/claim/claim_note_tx_data.hpp"
#include "barretenberg/examples/join_split/notes/native/value/value_note.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::join_split {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "commit.hpp"

namespace bb::join_split_example::proofs::notes::circuit::account {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::account {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include "../constants.hpp"
#include "../native/bridge_call_data.hpp"
#include "./asset_id.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/notes/native/bridge_call_data.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"

#include "../bridge_call_data.hpp"
#include "../value/create_partial_commitment.hpp"
#include "barretenberg/examples/join_split/notes/circuit/bridge_call_data.hpp"
#include "barretenberg/examples/join_split/notes/circuit/value/create_partial_commitment.hpp"
#include "complete_partial_commitment.hpp"
#include "create_partial_commitment.hpp"
#include "witness_data.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::claim {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::claim {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::claim {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include "../../constants.hpp"
#include "../../native/claim/claim_note.hpp"
#include "../../native/claim/claim_note_tx_data.hpp"
#include "../bridge_call_data.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/notes/circuit/bridge_call_data.hpp"
#include "barretenberg/examples/join_split/notes/native/claim/claim_note.hpp"
#include "barretenberg/examples/join_split/notes/native/claim/claim_note_tx_data.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit::claim {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::value {

inline auto complete_partial_commitment(field_ct const& value_note_partial_commitment,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "compute_nullifier.hpp"
#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "../../native/value/compute_nullifier.hpp"
#include "../../../../fixtures/user_context.hpp"
#include "../../native/value/value_note.hpp"
#include "barretenberg/examples/join_split/notes/native/value/compute_nullifier.hpp"
#include "./compute_nullifier.hpp"
#include "./value_note.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/native/value/value_note.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/examples/join_split/user_context.hpp"
#include <gtest/gtest.h>

namespace bb::join_split_example {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/stdlib/hash/pedersen/pedersen.hpp"

namespace bb::join_split_example::proofs::notes::circuit::value {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "commit.hpp"
#include "witness_data.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "../../native/value/value_note.hpp"
#include "../../../../fixtures/user_context.hpp"
#include "../../constants.hpp"
#include "barretenberg/examples/join_split/notes/native/value/value_note.hpp"
#include "barretenberg/circuit_checker/circuit_checker.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/examples/join_split/types.hpp"
#include "barretenberg/examples/join_split/user_context.hpp"
#include "value_note.hpp"
#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "../../native/value/value_note.hpp"
#include "barretenberg/join_split_example/types.hpp"
#include "barretenberg/examples/join_split/notes/native/value/value_note.hpp"
#include "barretenberg/examples/join_split/types.hpp"

namespace bb::join_split_example::proofs::notes::circuit::value {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/examples/join_split/constants.hpp"
#include "barretenberg/numeric/uint256/uint256.hpp"
#include <stddef.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "account_note.hpp"
#include "../../constants.hpp"
#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
#include "barretenberg/examples/join_split/notes/constants.hpp"

namespace bb::join_split_example::proofs::notes::native::account {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "../../constants.hpp"
#include "barretenberg/crypto/pedersen_commitment/pedersen.hpp"
#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
#include "barretenberg/examples/join_split/constants.hpp"

namespace bb::join_split_example::proofs::notes::native::account {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "../../constants.hpp"
#include "account_note.hpp"
#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
#include "barretenberg/examples/join_split/notes/constants.hpp"

namespace bb::join_split_example::proofs::notes::native::account {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "../../constants.hpp"
#include "account_note.hpp"
#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
#include "barretenberg/examples/join_split/constants.hpp"

namespace bb::join_split_example::proofs::notes::native::account {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../constants.hpp"
#include "barretenberg/examples/join_split/constants.hpp"

namespace bb::join_split_example::proofs::notes::native {

Expand Down
Loading

0 comments on commit 0718320

Please sign in to comment.