From 15c5399a10719a8916ed82fe0ea510a8c6e8c6c7 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Thu, 29 Feb 2024 19:22:44 +0000 Subject: [PATCH] chore: Remove TypeScript tooling from noir-projects. (#4867) As title. --- .github/workflows/mirror_repos.yml | 4 +- .../workflows/protocol-circuits-gate-diff.yml | 8 +- build-system/scripts/build | 2 + .../contracts/references/globals.md | 2 +- .../references/storage/private_state.md | 8 +- .../references/storage/public_state.md | 4 +- .../contracts/resources/dependencies.md | 4 +- .../writing_contracts/functions/context.md | 8 +- .../developers/debugging/sandbox-errors.md | 2 +- docs/docs/developers/limitations/main.md | 2 +- docs/docs/misc/migration_notes.md | 12 +- noir-projects/Dockerfile | 6 +- noir-projects/aztec-nr/aztec/Nargo.toml | 2 +- noir-projects/bootstrap_cache.sh | 2 +- noir-projects/noir-contracts/.gitignore | 3 +- noir-projects/noir-contracts/README.md | 145 +----------------- noir-projects/noir-contracts/bootstrap.sh | 10 +- noir-projects/noir-contracts/package.json | 36 ----- .../noir-contracts/scripts/compile.sh | 5 - .../noir-contracts/scripts/transpile.sh | 8 - .../noir-protocol-circuits/.gitignore | 2 +- .../{src => }/Nargo.toml | 0 .../noir-protocol-circuits/bootstrap.sh | 4 +- .../bug-collecting-crate/add-is-zero.nr | 0 .../crates/bug-collecting-crate/array_len.nr | 0 .../bug-collecting-crate/compile-lib.nr | 0 .../devex-bug-catching.nr | 0 .../devex-document-to_le_bits.nr | 0 .../bug-collecting-crate/devex-integers.nr | 0 .../bug-collecting-crate/devex-maxim.nr | 0 .../devex-return-pattern-match.nr | 0 .../devex-santiago-automatic-deref.nr | 0 .../devex-slice-to-array.nr | 0 .../bug-collecting-crate/devex-test-ignore.nr | 0 .../bug-collecting-crate/devex-turbo-fish.nr | 0 .../bug-collecting-crate/devex-type-alias.nr | 0 .../crates/bug-collecting-crate/export.nr | 0 .../index-on-mutable-array-jake.nr | 0 .../invalid-test-syntax-passing.nr | 0 .../iterate-mutable-array.nr | 0 .../local-dep-does-not-exist | 0 .../non-global-type-as-array-size.nr | 0 .../re-exports-not-working.nr | 0 .../crates/bug-collecting-crate/reexports.nr | 0 .../should-compile-different-namespace.nr | 0 .../should-not-compile.nr | 0 .../test-error-msg-format.nr | 0 .../bug-collecting-crate/test-println.nr | 0 .../type-alias-shorthand.nr | 0 .../typechain-type-alias.nr | 0 .../crates/bug-collecting-crate/workspace.nr | 0 .../private-kernel-init-simulated/Nargo.toml | 0 .../private-kernel-init-simulated/src/main.nr | 0 .../crates/private-kernel-init/Nargo.toml | 0 .../crates/private-kernel-init/src/main.nr | 0 .../private-kernel-inner-simulated/Nargo.toml | 0 .../src/main.nr | 0 .../crates/private-kernel-inner/Nargo.toml | 0 .../crates/private-kernel-inner/src/main.nr | 0 .../crates/private-kernel-lib/Nargo.toml | 0 .../crates/private-kernel-lib/src/common.nr | 0 .../crates/private-kernel-lib/src/lib.nr | 0 .../src/nullifier_read_request_reset.nr | 0 .../src/private_kernel_init.nr | 0 .../src/private_kernel_inner.nr | 0 .../src/private_kernel_tail.nr | 0 .../src/read_request_reset.nr | 0 .../private-kernel-tail-simulated/Nargo.toml | 0 .../private-kernel-tail-simulated/src/main.nr | 0 .../crates/private-kernel-tail/Nargo.toml | 0 .../crates/private-kernel-tail/src/main.nr | 0 .../Nargo.toml | 0 .../src/main.nr | 0 .../crates/public-kernel-app-logic/Nargo.toml | 0 .../public-kernel-app-logic/src/main.nr | 0 .../crates/public-kernel-lib/Nargo.toml | 0 .../crates/public-kernel-lib/src/common.nr | 0 .../crates/public-kernel-lib/src/hash.nr | 0 .../crates/public-kernel-lib/src/lib.nr | 0 .../src/public_kernel_app_logic.nr | 0 .../src/public_kernel_setup.nr | 0 .../src/public_kernel_teardown.nr | 0 .../crates/public-kernel-lib/src/utils.nr | 0 .../public-kernel-setup-simulated/Nargo.toml | 0 .../public-kernel-setup-simulated/src/main.nr | 0 .../crates/public-kernel-setup/Nargo.toml | 0 .../crates/public-kernel-setup/src/main.nr | 0 .../Nargo.toml | 0 .../src/main.nr | 0 .../crates/public-kernel-teardown/Nargo.toml | 0 .../crates/public-kernel-teardown/src/main.nr | 0 .../crates/rollup-base-simulated/Nargo.toml | 0 .../crates/rollup-base-simulated/src/main.nr | 0 .../{src => }/crates/rollup-base/Nargo.toml | 0 .../{src => }/crates/rollup-base/src/main.nr | 0 .../{src => }/crates/rollup-lib/Nargo.toml | 0 .../{src => }/crates/rollup-lib/src/abis.nr | 0 .../base_or_merge_rollup_public_inputs.nr | 0 .../src/abis/constant_rollup_data.nr | 0 .../src/abis/previous_rollup_data.nr | 0 .../{src => }/crates/rollup-lib/src/base.nr | 0 .../rollup-lib/src/base/base_rollup_inputs.nr | 0 .../rollup-lib/src/base/state_diff_hints.nr | 0 .../crates/rollup-lib/src/components.nr | 0 .../{src => }/crates/rollup-lib/src/lib.nr | 0 .../{src => }/crates/rollup-lib/src/merge.nr | 0 .../src/merge/merge_rollup_inputs.nr | 0 .../{src => }/crates/rollup-lib/src/root.nr | 0 .../rollup-lib/src/root/root_rollup_inputs.nr | 0 .../src/root/root_rollup_public_inputs.nr | 0 .../{src => }/crates/rollup-lib/src/tests.nr | 0 .../src/tests/merge_rollup_inputs.nr | 0 .../src/tests/previous_rollup_data.nr | 0 .../src/tests/root_rollup_inputs.nr | 0 .../{src => }/crates/rollup-merge/Nargo.toml | 0 .../{src => }/crates/rollup-merge/src/main.nr | 0 .../{src => }/crates/rollup-root/Nargo.toml | 0 .../{src => }/crates/rollup-root/src/main.nr | 0 .../{src => }/crates/types/Nargo.toml | 0 .../{src => }/crates/types/src/abis.nr | 0 .../crates/types/src/abis/accumulated_data.nr | 0 ...accumulated_non_revertible_data_builder.nr | 0 .../accumulated_revertible_data_builder.nr | 0 .../combined_accumulated_data.nr | 0 .../combined_accumulated_data_builder.nr | 0 ...private_accumulated_non_revertible_data.nr | 0 .../private_accumulated_revertible_data.nr | 0 .../public_accumulated_non_revertible_data.nr | 0 .../public_accumulated_revertible_data.nr | 0 .../src/abis/append_only_tree_snapshot.nr | 0 .../crates/types/src/abis/call_context.nr | 0 .../crates/types/src/abis/call_request.nr | 0 .../crates/types/src/abis/caller_context.nr | 0 .../types/src/abis/combined_constant_data.nr | 0 .../contract_class_function_leaf_preimage.nr | 0 .../types/src/abis/contract_leaf_preimage.nr | 0 .../crates/types/src/abis/function_data.nr | 0 .../types/src/abis/function_leaf_preimage.nr | 0 .../types/src/abis/function_selector.nr | 0 .../crates/types/src/abis/global_variables.nr | 0 .../src/abis/kernel_circuit_public_inputs.nr | 0 ...te_kernel_circuit_public_inputs_builder.nr | 0 ...vate_kernel_inner_circuit_public_inputs.nr | 0 ...ivate_kernel_tail_circuit_public_inputs.nr | 0 .../public_kernel_circuit_public_inputs.nr | 0 ...ic_kernel_circuit_public_inputs_builder.nr | 0 .../rollup_kernel_circuit_public_inputs.nr | 0 ...up_kernel_circuit_public_inputs_builder.nr | 0 .../crates/types/src/abis/kernel_data.nr | 0 .../types/src/abis/membership_witness.nr | 0 .../types/src/abis/new_contract_data.nr | 0 .../abis/nullifier_key_validation_request.nr | 0 .../types/src/abis/nullifier_leaf_preimage.nr | 0 .../types/src/abis/private_call_stack_item.nr | 0 .../src/abis/private_circuit_public_inputs.nr | 0 .../crates/types/src/abis/private_kernel.nr | 0 .../abis/private_kernel/private_call_data.nr | 0 .../crates/types/src/abis/public_call_data.nr | 0 .../types/src/abis/public_call_stack_item.nr | 0 .../src/abis/public_circuit_public_inputs.nr | 0 .../crates/types/src/abis/public_data_read.nr | 0 .../src/abis/public_data_update_request.nr | 0 .../crates/types/src/abis/read_request.nr | 0 .../crates/types/src/abis/side_effect.nr | 0 .../{src => }/crates/types/src/address.nr | 0 .../crates/types/src/address/aztec_address.nr | 0 .../crates/types/src/address/eth_address.nr | 0 .../types/src/address/partial_address.nr | 0 .../types/src/address/public_keys_hash.nr | 0 .../src/address/salted_initialization_hash.nr | 0 .../{src => }/crates/types/src/constants.nr | 0 .../crates/types/src/content_commitment.nr | 0 .../crates/types/src/contract_class_id.nr | 0 .../crates/types/src/contract_instance.nr | 0 .../{src => }/crates/types/src/contrakt.nr | 0 .../src/contrakt/contract_deployment_data.nr | 0 .../crates/types/src/contrakt/storage_read.nr | 0 .../src/contrakt/storage_update_request.nr | 0 .../crates/types/src/grumpkin_point.nr | 0 .../crates/types/src/grumpkin_private_key.nr | 0 .../{src => }/crates/types/src/hash.nr | 0 .../{src => }/crates/types/src/header.nr | 0 .../{src => }/crates/types/src/lib.nr | 0 .../{src => }/crates/types/src/merkle_tree.nr | 0 .../types/src/merkle_tree/append_only_tree.nr | 0 .../types/src/merkle_tree/indexed_tree.nr | 0 .../types/src/merkle_tree/leaf_preimage.nr | 0 .../{src => }/crates/types/src/messaging.nr | 0 .../types/src/messaging/l2_to_l1_message.nr | 0 .../{src => }/crates/types/src/mocked.nr | 0 .../types/src/partial_state_reference.nr | 0 .../crates/types/src/public_data_tree_leaf.nr | 0 .../src/public_data_tree_leaf_preimage.nr | 0 .../crates/types/src/state_reference.nr | 0 .../{src => }/crates/types/src/tests.nr | 0 .../crates/types/src/tests/fixtures.nr | 0 .../src/tests/fixtures/contract_functions.nr | 0 .../types/src/tests/fixtures/contract_tree.nr | 0 .../types/src/tests/fixtures/contracts.nr | 0 .../src/tests/fixtures/note_hash_tree.nr | 0 .../types/src/tests/fixtures/read_requests.nr | 0 .../types/src/tests/kernel_data_builder.nr | 0 .../types/src/tests/merkle_tree_utils.nr | 0 .../src/tests/private_call_data_builder.nr | 0 .../private_circuit_public_inputs_builder.nr | 0 .../src/tests/public_call_data_builder.nr | 0 .../public_circuit_public_inputs_builder.nr | 0 .../crates/types/src/tests/testing_harness.nr | 0 .../{src => }/crates/types/src/traits.nr | 0 .../{src => }/crates/types/src/transaction.nr | 0 .../types/src/transaction/tx_context.nr | 0 .../types/src/transaction/tx_request.nr | 0 .../crates/types/src/type_serialization.nr | 0 .../{src => }/crates/types/src/utils.nr | 0 .../crates/types/src/utils/arrays.nr | 0 .../{src => }/crates/types/src/utils/field.nr | 0 .../crates/types/src/utils/reader.nr | 0 .../crates/types/src/utils/uint256.nr | 0 .../noir-protocol-circuits/package.json | 21 --- .../fixtures/Benchmarking.test.json | 14 +- yarn-project/circuits.js/src/keys/index.ts | 2 +- .../circuits.js/src/scripts/constants.in.ts | 2 +- .../.prettierignore | 2 +- .../noir-protocol-circuits-types/package.json | 2 +- 224 files changed, 60 insertions(+), 262 deletions(-) delete mode 100644 noir-projects/noir-contracts/package.json delete mode 100755 noir-projects/noir-contracts/scripts/compile.sh delete mode 100755 noir-projects/noir-contracts/scripts/transpile.sh rename noir-projects/noir-protocol-circuits/{src => }/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/add-is-zero.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/array_len.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/compile-lib.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-bug-catching.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-document-to_le_bits.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-integers.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-maxim.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-return-pattern-match.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-santiago-automatic-deref.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-slice-to-array.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-test-ignore.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-turbo-fish.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/devex-type-alias.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/export.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/index-on-mutable-array-jake.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/invalid-test-syntax-passing.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/iterate-mutable-array.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/local-dep-does-not-exist (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/non-global-type-as-array-size.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/re-exports-not-working.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/reexports.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/should-compile-different-namespace.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/should-not-compile.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/test-error-msg-format.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/test-println.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/type-alias-shorthand.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/typechain-type-alias.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/bug-collecting-crate/workspace.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-init-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-init-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-init/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-init/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-inner-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-inner-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-inner/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-inner/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/common.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/lib.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/nullifier_read_request_reset.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/private_kernel_init.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/private_kernel_inner.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/private_kernel_tail.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-lib/src/read_request_reset.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-tail-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-tail-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-tail/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/private-kernel-tail/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-app-logic-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-app-logic-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-app-logic/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-app-logic/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/common.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/hash.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/lib.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/public_kernel_app_logic.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/public_kernel_setup.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/public_kernel_teardown.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-lib/src/utils.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-setup-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-setup-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-setup/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-setup/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-teardown-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-teardown-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-teardown/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/public-kernel-teardown/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-base-simulated/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-base-simulated/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-base/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-base/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/abis.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/abis/base_or_merge_rollup_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/abis/constant_rollup_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/abis/previous_rollup_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/base.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/base/base_rollup_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/base/state_diff_hints.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/components.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/lib.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/merge.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/merge/merge_rollup_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/root.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/root/root_rollup_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/root/root_rollup_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/tests.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/tests/merge_rollup_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/tests/previous_rollup_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-lib/src/tests/root_rollup_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-merge/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-merge/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-root/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/rollup-root/src/main.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/Nargo.toml (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/accumulated_non_revertible_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/accumulated_revertible_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/combined_accumulated_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/private_accumulated_non_revertible_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/private_accumulated_revertible_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/public_accumulated_non_revertible_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/accumulated_data/public_accumulated_revertible_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/append_only_tree_snapshot.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/call_context.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/call_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/caller_context.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/combined_constant_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/contract_class_function_leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/contract_leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/function_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/function_leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/function_selector.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/global_variables.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_circuit_public_inputs_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_inner_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_tail_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/kernel_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/membership_witness.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/new_contract_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/nullifier_key_validation_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/nullifier_leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/private_call_stack_item.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/private_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/private_kernel.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/private_kernel/private_call_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/public_call_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/public_call_stack_item.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/public_circuit_public_inputs.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/public_data_read.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/public_data_update_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/read_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/abis/side_effect.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address/aztec_address.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address/eth_address.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address/partial_address.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address/public_keys_hash.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/address/salted_initialization_hash.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/constants.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/content_commitment.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contract_class_id.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contract_instance.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contrakt.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contrakt/contract_deployment_data.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contrakt/storage_read.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/contrakt/storage_update_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/grumpkin_point.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/grumpkin_private_key.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/hash.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/header.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/lib.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/merkle_tree.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/merkle_tree/append_only_tree.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/merkle_tree/indexed_tree.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/merkle_tree/leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/messaging.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/messaging/l2_to_l1_message.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/mocked.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/partial_state_reference.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/public_data_tree_leaf.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/public_data_tree_leaf_preimage.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/state_reference.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures/contract_functions.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures/contract_tree.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures/contracts.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures/note_hash_tree.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/fixtures/read_requests.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/kernel_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/merkle_tree_utils.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/private_call_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/private_circuit_public_inputs_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/public_call_data_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/public_circuit_public_inputs_builder.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/tests/testing_harness.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/traits.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/transaction.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/transaction/tx_context.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/transaction/tx_request.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/type_serialization.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/utils.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/utils/arrays.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/utils/field.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/utils/reader.nr (100%) rename noir-projects/noir-protocol-circuits/{src => }/crates/types/src/utils/uint256.nr (100%) delete mode 100644 noir-projects/noir-protocol-circuits/package.json diff --git a/.github/workflows/mirror_repos.yml b/.github/workflows/mirror_repos.yml index e71a40e7ff8..3a98ffff0bd 100644 --- a/.github/workflows/mirror_repos.yml +++ b/.github/workflows/mirror_repos.yml @@ -58,9 +58,9 @@ jobs: nargo_files="$(find $SUBREPO_PATH -name 'Nargo.toml' | xargs grep --files-with-matches 'noir-protocol-circuits')" # match lines like this: - # protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } + # protocol_types = { path = "../../noir-protocol-circuits/crates/types" } # and replace with - # protocol_types = { git="https://github.com/aztecprotocol/aztec-packages", tag="aztec-packages-v0.16.9", directory="noir-projects/noir-protocol-circuits/src/crates/types" } + # protocol_types = { git="https://github.com/aztecprotocol/aztec-packages", tag="aztec-packages-v0.16.9", directory="noir-projects/noir-protocol-circuits/crates/types" } for nargo_file in $nargo_files; do sed --regexp-extended --in-place \ "s;path\s*=\s*\".*noir-protocol-circuits(.*)\";git=\"$monorepo_url\", tag=\"$monorepo_tag\", directory=\"$monorepo_protocol_circuits_path\1\";" \ diff --git a/.github/workflows/protocol-circuits-gate-diff.yml b/.github/workflows/protocol-circuits-gate-diff.yml index 89ef41e4d63..f4db02bbcce 100644 --- a/.github/workflows/protocol-circuits-gate-diff.yml +++ b/.github/workflows/protocol-circuits-gate-diff.yml @@ -78,12 +78,12 @@ jobs: run: nargo --version - name: Generate gates report - working-directory: ./noir-projects/noir-protocol-circuits/src + working-directory: ./noir-projects/noir-protocol-circuits run: | - nargo info --json > protocol_circuits_report.json - mv protocol_circuits_report.json ../../../protocol_circuits_report.json + nargo info --json --silence-warnings > protocol_circuits_report.json + mv protocol_circuits_report.json ../../protocol_circuits_report.json env: - NARGO_BACKEND_PATH: ../../../barretenberg/cpp/build/bin/bb + NARGO_BACKEND_PATH: ../../barretenberg/cpp/build/bin/bb - name: Compare gates reports id: gates_diff diff --git a/build-system/scripts/build b/build-system/scripts/build index 7a594248e9a..8b6ae7beb19 100755 --- a/build-system/scripts/build +++ b/build-system/scripts/build @@ -51,6 +51,8 @@ function try_fetch_image() { return 0 } +NOREPO=$(query_manifest noRepo $REPOSITORY) + # Login to ECR and ensure repository exists. retry ensure_repo $REPOSITORY $ECR_REGION refresh_lifecycle # Login to dockerhub. diff --git a/docs/docs/developers/contracts/references/globals.md b/docs/docs/developers/contracts/references/globals.md index 283660d2c47..987d194c15e 100644 --- a/docs/docs/developers/contracts/references/globals.md +++ b/docs/docs/developers/contracts/references/globals.md @@ -33,7 +33,7 @@ context.version(); ## Public Global Variables -#include_code global-variables /noir-projects/noir-protocol-circuits/src/crates/types/src/abis/global_variables.nr rust +#include_code global-variables /noir-projects/noir-protocol-circuits/crates/types/src/abis/global_variables.nr rust The public global variables contain the values present in the `private global variables` described above, with the addition of: diff --git a/docs/docs/developers/contracts/references/storage/private_state.md b/docs/docs/developers/contracts/references/storage/private_state.md index ce9770ee2af..12219128489 100644 --- a/docs/docs/developers/contracts/references/storage/private_state.md +++ b/docs/docs/developers/contracts/references/storage/private_state.md @@ -36,9 +36,9 @@ A note should implement the following traits: #include_code note_interface /noir-projects/aztec-nr/aztec/src/note/note_interface.nr rust -#include_code serialize /noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr rust +#include_code serialize /noir-projects/noir-protocol-circuits/crates/types/src/traits.nr rust -#include_code deserialize /noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr rust +#include_code deserialize /noir-projects/noir-protocol-circuits/crates/types/src/traits.nr rust The interplay between a private state variable and its notes can be confusing. Here's a summary to aid intuition: @@ -226,7 +226,7 @@ An example of how to use this operation is visible in the `easy_private_state`: This function returns the notes the account has access to. -The kernel circuits are constrained to a maximum number of notes this function can return at a time. Check [here](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr) and look for `MAX_READ_REQUESTS_PER_CALL` for the up-to-date number. +The kernel circuits are constrained to a maximum number of notes this function can return at a time. Check [here](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr) and look for `MAX_READ_REQUESTS_PER_CALL` for the up-to-date number. Because of this limit, we should always consider using the second argument `NoteGetterOptions` to limit the number of notes we need to read and constrain in our programs. This is quite important as every extra call increases the time used to prove the program and we don't want to spend more time than necessary. @@ -240,7 +240,7 @@ Functionally similar to [`get_notes`](#get_notes), but executed unconstrained an #include_code view_notes /noir-projects/aztec-nr/value-note/src/balance_utils.nr rust -There's also a limit on the maximum number of notes that can be returned in one go. To find the current limit, refer to [this file](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr) and look for `MAX_NOTES_PER_PAGE`. +There's also a limit on the maximum number of notes that can be returned in one go. To find the current limit, refer to [this file](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr) and look for `MAX_NOTES_PER_PAGE`. The key distinction is that this method is unconstrained. It does not perform a check to verify if the notes actually exist, which is something the [`get_notes`](#get_notes) method does under the hood. Therefore, it should only be used in an unconstrained contract function. diff --git a/docs/docs/developers/contracts/references/storage/public_state.md b/docs/docs/developers/contracts/references/storage/public_state.md index 8a17b03842e..1959ebe9596 100644 --- a/docs/docs/developers/contracts/references/storage/public_state.md +++ b/docs/docs/developers/contracts/references/storage/public_state.md @@ -10,8 +10,8 @@ For a higher level overview of the state model in Aztec, see the [state model](. The `PublicMutable` (formerly known as `PublicState`) struct is generic over the variable type `T`. The type _must_ implement Serialize and Deserialize traits, as specified here: -#include_code serialize /noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr rust -#include_code deserialize /noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr rust +#include_code serialize /noir-projects/noir-protocol-circuits/crates/types/src/traits.nr rust +#include_code deserialize /noir-projects/noir-protocol-circuits/crates/types/src/traits.nr rust The struct contains a `storage_slot` which, similar to Ethereum, is used to figure out _where_ in storage the variable is located. Notice that while we don't have the exact same [state model](../../../../learn/concepts/hybrid_state/main.md) as EVM chains it will look similar from the contract developers point of view. diff --git a/docs/docs/developers/contracts/resources/dependencies.md b/docs/docs/developers/contracts/resources/dependencies.md index 02debb3a898..da769934a1a 100644 --- a/docs/docs/developers/contracts/resources/dependencies.md +++ b/docs/docs/developers/contracts/resources/dependencies.md @@ -39,10 +39,10 @@ This is an abstraction library for using private variables like [`EasyPrivateUin ## Protocol Types ```toml -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="noir-projects/noir-protocol-circuits/src/crates/types"} +protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="noir-projects/noir-protocol-circuits/crates/types"} ``` -This library contains types that are used in the Aztec protocol. Find it on [GitHub](https://github.com/AztecProtocol/aztec-packages/tree/master/noir-projects/noir-protocol-circuits/src/crates/types/src). +This library contains types that are used in the Aztec protocol. Find it on [GitHub](https://github.com/AztecProtocol/aztec-packages/tree/master/noir-projects/noir-protocol-circuits/crates/types/src). ## Value note diff --git a/docs/docs/developers/contracts/writing_contracts/functions/context.md b/docs/docs/developers/contracts/writing_contracts/functions/context.md index e1a18f4f0f5..8f4455fc3cd 100644 --- a/docs/docs/developers/contracts/writing_contracts/functions/context.md +++ b/docs/docs/developers/contracts/writing_contracts/functions/context.md @@ -46,7 +46,7 @@ As shown in the snippet, the application context is made up of 4 main structures First of all, the call context. -#include_code call-context /noir-projects/noir-protocol-circuits/src/crates/types/src/abis/call_context.nr rust +#include_code call-context /noir-projects/noir-protocol-circuits/crates/types/src/abis/call_context.nr rust The call context contains information about the current call being made: @@ -75,13 +75,13 @@ Another structure that is contained within the context is the Header object. In the private context this is a header of a block which used to generate proofs against. In the public context this header is set by sequencer (sequencer executes public calls) and it is set to 1 block before the block in which the transaction is included. -#include_code header /noir-projects/noir-protocol-circuits/src/crates/types/src/header.nr rust +#include_code header /noir-projects/noir-protocol-circuits/crates/types/src/header.nr rust ### Contract Deployment Data Just like with the `is_contract_deployment` flag mentioned earlier. This data will only be set to true when the current transaction is one in which a contract is being deployed. -#include_code contract-deployment-data /noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/contract_deployment_data.nr rust +#include_code contract-deployment-data /noir-projects/noir-protocol-circuits/crates/types/src/contrakt/contract_deployment_data.nr rust ### Private Global Variables @@ -145,4 +145,4 @@ In the current version of the system, the public context is almost a clone of th The public global variables are provided by the rollup sequencer and consequently contain some more values than the private global variables. -#include_code global-variables /noir-projects/noir-protocol-circuits/src/crates/types/src/abis/global_variables.nr rust +#include_code global-variables /noir-projects/noir-protocol-circuits/crates/types/src/abis/global_variables.nr rust diff --git a/docs/docs/developers/debugging/sandbox-errors.md b/docs/docs/developers/debugging/sandbox-errors.md index 9fc8f60cd0e..1eaca0957ba 100644 --- a/docs/docs/developers/debugging/sandbox-errors.md +++ b/docs/docs/developers/debugging/sandbox-errors.md @@ -160,7 +160,7 @@ Circuits work by having a fixed size array. As such, we have limits on how many - too many transient read requests in one tx - too many transient read request membership witnesses in one tx -You can have a look at our current constants/limitations in [constants.nr](https://github.com/AztecProtocol/aztec-packages/blob/master/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr) +You can have a look at our current constants/limitations in [constants.nr](https://github.com/AztecProtocol/aztec-packages/blob/master/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr) #### 7008 - MEMBERSHIP_CHECK_FAILED diff --git a/docs/docs/developers/limitations/main.md b/docs/docs/developers/limitations/main.md index 1c0854c06ed..1e6619333e3 100644 --- a/docs/docs/developers/limitations/main.md +++ b/docs/docs/developers/limitations/main.md @@ -189,7 +189,7 @@ Due to the rigidity of zk-SNARK circuits, there are upper bounds on the amount o Here are the current constants: -#include_code constants /noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr rust +#include_code constants /noir-projects/noir-protocol-circuits/crates/types/src/constants.nr rust #### What are the consequences? diff --git a/docs/docs/misc/migration_notes.md b/docs/docs/misc/migration_notes.md index 0a95e994b1d..ff1ca742cd1 100644 --- a/docs/docs/misc/migration_notes.md +++ b/docs/docs/misc/migration_notes.md @@ -15,12 +15,14 @@ Historically developers have been required to include a `compute_note_hash_and_n It is possible to provide a user-defined implementation, in which case auto-generation will be skipped (though there are no known use cases for this). ### Updated naming of state variable wrappers + We have decided to change the naming of our state variable wrappers because the naming was not clear. The changes are as follows: + 1. `Singleton` -> `PrivateMutable` 2. `ImmutableSingleton` -> `PrivateImmutable` 3. `StablePublicState` -> `SharedImmutable` -5. `PublicState` -> `PublicMutable` +4. `PublicState` -> `PublicMutable` This is the meaning of "private", "public" and "shared": Private: read (R) and write (W) from private, not accessible from public @@ -112,7 +114,7 @@ Aztec contracts are now moved outside of the `yarn-project` folder and into `noi Before: ```rust -easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.23.0", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"} +easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.23.0", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"} ``` Now, update the `yarn-project` folder for `noir-projects`: @@ -649,7 +651,7 @@ const tokenBigInt = (await bridge.methods.token().view()).inner; ```toml aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} +protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/crates/types"} ``` ### [Aztec.nr] moving compute_address func to AztecAddress @@ -703,11 +705,11 @@ Aztec contracts are now moved outside of the `src` folder, so you need to update Before: ```rust -easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.16.9", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"} +easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.16.9", directory = "noir-projects/noir-contracts/contracts/easy_private_token_contract"} ``` Now, just remove the `src` folder,: ```rust -easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.17.0", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"} +easy_private_token_contract = {git = "https://github.com/AztecProtocol/aztec-packages/", tag ="v0.17.0", directory = "noir-projects/noir-contracts/contracts/easy_private_token_contract"} ``` diff --git a/noir-projects/Dockerfile b/noir-projects/Dockerfile index 4d2c3ed1ffa..616eaf6bfef 100644 --- a/noir-projects/Dockerfile +++ b/noir-projects/Dockerfile @@ -13,11 +13,11 @@ WORKDIR /usr/src/noir-projects COPY . . # Build WORKDIR /usr/src/noir-projects/noir-contracts -RUN ./scripts/compile.sh && ./scripts/transpile.sh && nargo test --silence-warnings +RUN ./bootstrap.sh && nargo test --silence-warnings WORKDIR /usr/src/noir-projects/noir-protocol-circuits -RUN cd src && nargo compile --silence-warnings && nargo test --silence-warnings +RUN ./bootstrap.sh && nargo test --silence-warnings WORKDIR /usr/src/noir-projects/aztec-nr -RUN nargo compile --silence-warnings && nargo test --silence-warnings +RUN nargo test --silence-warnings FROM scratch COPY --from=builder /usr/src/noir-projects /usr/src/noir-projects \ No newline at end of file diff --git a/noir-projects/aztec-nr/aztec/Nargo.toml b/noir-projects/aztec-nr/aztec/Nargo.toml index fb8ba9b6fd4..7a1f1af5863 100644 --- a/noir-projects/aztec-nr/aztec/Nargo.toml +++ b/noir-projects/aztec-nr/aztec/Nargo.toml @@ -5,4 +5,4 @@ compiler_version = ">=0.18.0" type = "lib" [dependencies] -protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } +protocol_types = { path = "../../noir-protocol-circuits/crates/types" } diff --git a/noir-projects/bootstrap_cache.sh b/noir-projects/bootstrap_cache.sh index 898fbdbea17..6e1a35cbdee 100755 --- a/noir-projects/bootstrap_cache.sh +++ b/noir-projects/bootstrap_cache.sh @@ -7,6 +7,6 @@ source ../build-system/scripts/setup_env '' '' mainframe_$USER > /dev/null echo -e "\033[1mRetrieving noir projects from remote cache...\033[0m" extract_repo noir-projects \ /usr/src/noir-projects/noir-contracts/target ./noir-contracts \ - /usr/src/noir-projects/noir-protocol-circuits/src/target ./noir-protocol-circuits/src + /usr/src/noir-projects/noir-protocol-circuits/target ./noir-protocol-circuits remove_old_images noir-projects diff --git a/noir-projects/noir-contracts/.gitignore b/noir-projects/noir-contracts/.gitignore index 104562d8a94..1de565933b0 100644 --- a/noir-projects/noir-contracts/.gitignore +++ b/noir-projects/noir-contracts/.gitignore @@ -1,2 +1 @@ -target/ -/src +target \ No newline at end of file diff --git a/noir-projects/noir-contracts/README.md b/noir-projects/noir-contracts/README.md index a7c3aac97be..d7476fcebae 100644 --- a/noir-projects/noir-contracts/README.md +++ b/noir-projects/noir-contracts/README.md @@ -1,144 +1,3 @@ -# Aztec.nr contracts +# Aztec Example Contracts -This package contains the source code and the Aztec ABIs for the example contracts used in tests. - -## Disclaimer - -Please note that any example contract set out herein is provided solely for informational purposes only and does not constitute any inducement to use or deploy. Any implementation of any such contract with an interface or any other infrastructure should be used in accordance with applicable laws and regulations. - -## Setup - -### Installing Noir - -An essential tool for managing noir versions is noirup. - -- Install [noirup](https://github.com/noir-lang/noirup) - ``` - curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash - ``` - -### Happy Path - -Currently we all work from a single `aztec` tagged noir release. This release updates independently from noir's regular cadence to allow us to rapidly prototype new features. -It has prebuilt binaries and is super easy to install using `noirup` - -- Install [noirup](https://github.com/noir-lang/noirup) - ``` - curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash - ``` -- Install `aztec` tagged nargo - ``` - noirup -v aztec - ``` - -> Pinning Aztec flavoured noir releases -> Aztec noir is released with semver alongside noir. If you would like to pin to a specific version you can run: -> -> ```bash -> noirup -v -aztec. -> ``` -> -> e.g `noirup -v 0.11.1-aztec.0` - -### Building from source (If working with custom features) - -- Install [noirup](https://github.com/noir-lang/noirup) - ``` - curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash - ``` -- Nix is already globally installed but path to this installation needs to be added in $HOME/.zshenv so correct configuration can be found by VSCode, do so with: - ``` - echo -e '\n# Nix path set globally\nexport PATH="$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"' >> $HOME/.zshenv - ``` -- Enable nix flake command in ~/.config/nix/nix.conf with commands: - ``` - mkdir -p $HOME/.config/nix && echo -e '\nexperimental-features = nix-command\nextra-experimental-features = flakes' >> $HOME/.config/nix/nix.conf - ``` -- Install direnv into your Nix profile by running: - ``` - nix profile install nixpkgs#direnv - ``` -- Add direnv to your shell following their guide - ``` - echo -e '\n# Adds direnv initialization\neval "$(direnv hook zsh)"' >> $HOME/.zshenv - ``` -- VSCode needs to be restarted so direnv plugin can notice env changes with: - ``` - kill -9 ps aux | grep $(whoami)/.vscode-server | awk '{print $2}' - ``` -- Restart shell - -- Clone noir repo: - - ``` - git clone https://github.com/noir-lang/noir.git - ``` - -- Checkout your target noir branch - - ``` - cd noir - git checkout - ``` - -- Enable direnv - - ``` - direnv allow - ``` - -- Restart shell - -- Go to the noir dir and install Noir: - ``` - cd noir - noirup -p ./ - ``` - -### Building the contracts - -- In the aztec-packages repository, go to the directory noir-contracts - -- Use the `noir:build:all` script to compile the contracts you want and prepare the ABI for consumption - - ``` - yarn noir:build:all - ``` - - Alternatively you can run `yarn noir:build CONTRACT1 CONTRACT2...` to build a subset of contracts: - - ``` - yarn noir:build private_token public_token - ``` - - To view compilation output, including errors, run with the `VERBOSE=1` flag: - - ``` - VERBOSE=1 yarn noir:build private_token public_token - ``` - -## Creating a new contract package - -1. Go to `src/contracts` folder. -2. Create a new package whose name has to end with **\_contract**. E.g.: - ``` - nargo new --contract example_contract - ``` -3. Add the aztec dependency to `nargo.toml`: - - ``` - [package] - authors = [""] - compiler_version = "0>=.18.0" - - [dependencies] - aztec = { path = "../../../../aztec-nr/aztec" } - ``` - -4. Replace the content of the generated `example_contract/src/main.nr` file with your contract code. -5. Go to `noir-contracts` root folder and run `yarn noir:build example` to compile the contract. -6. Export the abi in `src/artifacts/index.ts` to be able to use the contract in the rest of the project: - ``` - import ExampleContractJson from './example_contract.json' assert { type: 'json' }; - export const ExampleContractArtifact = ExampleContractJson as ContractArtifact; - ``` +You're smart enough to figure it out. diff --git a/noir-projects/noir-contracts/bootstrap.sh b/noir-projects/noir-contracts/bootstrap.sh index f05aac67315..06c1df51bfb 100755 --- a/noir-projects/noir-contracts/bootstrap.sh +++ b/noir-projects/noir-contracts/bootstrap.sh @@ -15,5 +15,11 @@ if [ -n "$CMD" ]; then fi fi -# Build the contracts. `yarn build` handles cleaning as well -yarn build +echo "Compiling contracts..." +../../noir/noir-repo/target/release/nargo compile --silence-warnings + +echo "Transpiling avm contracts..." +for contract_json in target/avm_test_*.json; do + echo Transpiling $contract_json... + ../../avm-transpiler/target/release/avm-transpiler $contract_json $contract_json +done \ No newline at end of file diff --git a/noir-projects/noir-contracts/package.json b/noir-projects/noir-contracts/package.json deleted file mode 100644 index a0d93fa1c74..00000000000 --- a/noir-projects/noir-contracts/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@aztec/noir-contracts", - "version": "0.1.0", - "type": "module", - "license": "MIT", - "exports": { - "./target/*": "./target/*.json" - }, - "scripts": { - "build": "yarn clean && yarn build:contracts", - "clean": "rm -rf .tsbuildinfo ./target", - "formatting": "run -T prettier --check ./src && run -T eslint ./src", - "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", - "build:contracts": "./scripts/compile.sh && ./scripts/transpile.sh" - }, - "inherits": [ - "../package.common.json", - "./package.local.json" - ], - "jest": { - "preset": "ts-jest/presets/default-esm", - "moduleNameMapper": { - "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" - }, - "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" - }, - "files": [ - "contracts" - ], - "types": "./dest/types/index.d.ts", - "engines": { - "node": ">=18" - } -} \ No newline at end of file diff --git a/noir-projects/noir-contracts/scripts/compile.sh b/noir-projects/noir-contracts/scripts/compile.sh deleted file mode 100755 index ed9fc13dac6..00000000000 --- a/noir-projects/noir-contracts/scripts/compile.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "Compiling contracts..." -../../noir/noir-repo/target/release/nargo compile --silence-warnings diff --git a/noir-projects/noir-contracts/scripts/transpile.sh b/noir-projects/noir-contracts/scripts/transpile.sh deleted file mode 100755 index f10bb4524da..00000000000 --- a/noir-projects/noir-contracts/scripts/transpile.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "Transpiling contracts..." -for contract_json in target/avm_test_*.json; do - echo Transpiling $contract_json... - ../../avm-transpiler/target/release/avm-transpiler $contract_json $contract_json -done diff --git a/noir-projects/noir-protocol-circuits/.gitignore b/noir-projects/noir-protocol-circuits/.gitignore index 3f2fde943db..b8a74c10108 100644 --- a/noir-projects/noir-protocol-circuits/.gitignore +++ b/noir-projects/noir-protocol-circuits/.gitignore @@ -1,3 +1,3 @@ Prover.toml Verifier.toml -src/target +target diff --git a/noir-projects/noir-protocol-circuits/src/Nargo.toml b/noir-projects/noir-protocol-circuits/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/Nargo.toml rename to noir-projects/noir-protocol-circuits/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/bootstrap.sh b/noir-projects/noir-protocol-circuits/bootstrap.sh index c8b53c6578d..b7af2ad14f6 100755 --- a/noir-projects/noir-protocol-circuits/bootstrap.sh +++ b/noir-projects/noir-protocol-circuits/bootstrap.sh @@ -15,5 +15,5 @@ if [ -n "$CMD" ]; then fi fi -# Build the circuits. `yarn build` handles cleaning as well -yarn build +echo "Compiling protocol circuits..." +../../noir/noir-repo/target/release/nargo compile --silence-warnings \ No newline at end of file diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/add-is-zero.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/add-is-zero.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/add-is-zero.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/add-is-zero.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/array_len.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/array_len.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/array_len.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/array_len.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/compile-lib.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/compile-lib.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/compile-lib.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/compile-lib.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-bug-catching.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-bug-catching.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-bug-catching.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-bug-catching.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-document-to_le_bits.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-document-to_le_bits.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-document-to_le_bits.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-document-to_le_bits.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-integers.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-integers.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-integers.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-integers.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-maxim.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-maxim.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-maxim.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-maxim.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-return-pattern-match.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-return-pattern-match.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-return-pattern-match.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-return-pattern-match.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-santiago-automatic-deref.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-santiago-automatic-deref.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-santiago-automatic-deref.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-santiago-automatic-deref.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-slice-to-array.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-slice-to-array.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-slice-to-array.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-slice-to-array.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-test-ignore.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-test-ignore.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-test-ignore.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-test-ignore.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-turbo-fish.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-turbo-fish.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-turbo-fish.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-turbo-fish.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-type-alias.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-type-alias.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/devex-type-alias.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/devex-type-alias.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/export.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/export.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/export.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/export.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/index-on-mutable-array-jake.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/index-on-mutable-array-jake.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/index-on-mutable-array-jake.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/index-on-mutable-array-jake.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/invalid-test-syntax-passing.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/invalid-test-syntax-passing.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/iterate-mutable-array.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/iterate-mutable-array.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/iterate-mutable-array.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/iterate-mutable-array.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/local-dep-does-not-exist b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/local-dep-does-not-exist similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/local-dep-does-not-exist rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/local-dep-does-not-exist diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/non-global-type-as-array-size.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/non-global-type-as-array-size.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/non-global-type-as-array-size.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/non-global-type-as-array-size.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/re-exports-not-working.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/re-exports-not-working.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/re-exports-not-working.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/re-exports-not-working.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/reexports.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/reexports.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/reexports.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/reexports.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/should-compile-different-namespace.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/should-compile-different-namespace.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/should-compile-different-namespace.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/should-compile-different-namespace.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/should-not-compile.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/should-not-compile.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/should-not-compile.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/should-not-compile.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/test-error-msg-format.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/test-error-msg-format.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/test-error-msg-format.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/test-error-msg-format.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/test-println.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/test-println.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/test-println.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/test-println.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/type-alias-shorthand.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/type-alias-shorthand.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/type-alias-shorthand.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/type-alias-shorthand.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/typechain-type-alias.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/typechain-type-alias.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/typechain-type-alias.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/typechain-type-alias.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/workspace.nr b/noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/workspace.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/bug-collecting-crate/workspace.nr rename to noir-projects/noir-protocol-circuits/crates/bug-collecting-crate/workspace.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-init-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-init-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-init-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-init-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-init-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-init-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-init/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-init/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-init/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-init/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-init/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-init/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-inner-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-inner-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-inner/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-inner/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/common.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/common.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/common.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/common.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/lib.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/lib.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/lib.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/nullifier_read_request_reset.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/nullifier_read_request_reset.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/nullifier_read_request_reset.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/nullifier_read_request_reset.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_init.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_init.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_inner.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_inner.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_inner.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_inner.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_tail.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/private_kernel_tail.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/read_request_reset.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/read_request_reset.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-lib/src/read_request_reset.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/read_request_reset.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/private-kernel-tail/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/private-kernel-tail/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-app-logic/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-app-logic/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/common.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/common.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/hash.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/hash.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/hash.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/hash.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/lib.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/lib.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/lib.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_app_logic.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_app_logic.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_app_logic.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_setup.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_setup.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_teardown.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/public_kernel_teardown.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_teardown.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/utils.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/utils.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-lib/src/utils.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/utils.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-setup-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-setup-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-setup-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-setup-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-setup/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-setup/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-setup/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-setup/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-setup/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-teardown-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-teardown-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-teardown-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-teardown-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/public-kernel-teardown/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/public-kernel-teardown/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown/src/main.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-teardown/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/public-kernel-teardown/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/public-kernel-teardown/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/rollup-base-simulated/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/rollup-base-simulated/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/rollup-base-simulated/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-base-simulated/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-base/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/rollup-base/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-base/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/rollup-base/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-base/src/main.nr b/noir-projects/noir-protocol-circuits/crates/rollup-base/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-base/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-base/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/rollup-lib/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/base_or_merge_rollup_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/base_or_merge_rollup_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/base_or_merge_rollup_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/base_or_merge_rollup_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/constant_rollup_data.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/constant_rollup_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/constant_rollup_data.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/constant_rollup_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/previous_rollup_data.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/previous_rollup_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/abis/previous_rollup_data.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/previous_rollup_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base/state_diff_hints.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/state_diff_hints.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/base/state_diff_hints.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/state_diff_hints.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/lib.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/merge.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/merge.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/merge/merge_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/merge/merge_rollup_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/merge/merge_rollup_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root/root_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root/root_rollup_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root/root_rollup_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root/root_rollup_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root/root_rollup_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root/root_rollup_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/root/root_rollup_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root/root_rollup_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/merge_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/merge_rollup_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/merge_rollup_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/merge_rollup_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/previous_rollup_data.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/previous_rollup_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/previous_rollup_data.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/previous_rollup_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/root_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/root_rollup_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-lib/src/tests/root_rollup_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-lib/src/tests/root_rollup_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-merge/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/rollup-merge/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-merge/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/rollup-merge/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-merge/src/main.nr b/noir-projects/noir-protocol-circuits/crates/rollup-merge/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-merge/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-merge/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-root/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/rollup-root/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-root/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/rollup-root/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/rollup-root/src/main.nr b/noir-projects/noir-protocol-circuits/crates/rollup-root/src/main.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/rollup-root/src/main.nr rename to noir-projects/noir-protocol-circuits/crates/rollup-root/src/main.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/Nargo.toml b/noir-projects/noir-protocol-circuits/crates/types/Nargo.toml similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/Nargo.toml rename to noir-projects/noir-protocol-circuits/crates/types/Nargo.toml diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/accumulated_non_revertible_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/accumulated_non_revertible_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/accumulated_non_revertible_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/accumulated_non_revertible_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/accumulated_revertible_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/accumulated_revertible_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/accumulated_revertible_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/accumulated_revertible_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/combined_accumulated_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/combined_accumulated_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/private_accumulated_non_revertible_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_accumulated_non_revertible_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/private_accumulated_non_revertible_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_accumulated_non_revertible_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/private_accumulated_revertible_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_accumulated_revertible_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/private_accumulated_revertible_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_accumulated_revertible_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/public_accumulated_non_revertible_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/public_accumulated_non_revertible_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/public_accumulated_non_revertible_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/public_accumulated_non_revertible_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/public_accumulated_revertible_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/public_accumulated_revertible_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/accumulated_data/public_accumulated_revertible_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/public_accumulated_revertible_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/append_only_tree_snapshot.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/append_only_tree_snapshot.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/append_only_tree_snapshot.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/append_only_tree_snapshot.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/call_context.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/call_context.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/call_context.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/call_context.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/call_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/call_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/call_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/call_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/caller_context.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/caller_context.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/caller_context.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/caller_context.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/combined_constant_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/combined_constant_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/combined_constant_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/combined_constant_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/contract_class_function_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/contract_class_function_leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/contract_class_function_leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/contract_class_function_leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/contract_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/contract_leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/contract_leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/contract_leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/function_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/function_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/function_leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/function_leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_selector.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/function_selector.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/function_selector.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/function_selector.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/global_variables.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/global_variables.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/global_variables.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/global_variables.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_circuit_public_inputs_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_circuit_public_inputs_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_circuit_public_inputs_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_circuit_public_inputs_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_inner_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_inner_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_inner_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_inner_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_tail_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_tail_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_tail_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_kernel_tail_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/public_kernel_circuit_public_inputs_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/rollup_kernel_circuit_public_inputs_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/kernel_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/membership_witness.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/membership_witness.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/membership_witness.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/membership_witness.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/new_contract_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/new_contract_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/new_contract_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/new_contract_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/nullifier_key_validation_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/nullifier_key_validation_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/nullifier_key_validation_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/nullifier_key_validation_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/nullifier_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/nullifier_leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/nullifier_leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/nullifier_leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_call_stack_item.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_call_stack_item.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_kernel.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_kernel.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_kernel/private_call_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/private_kernel/private_call_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_call_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_call_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_call_stack_item.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_call_stack_item.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_circuit_public_inputs.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_data_read.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_data_read.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_data_read.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/public_data_read.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_data_update_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_data_update_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/public_data_update_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/public_data_update_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/read_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/read_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/read_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/read_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/abis/side_effect.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/side_effect.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/abis/side_effect.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/side_effect.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address/aztec_address.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address/aztec_address.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address/eth_address.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address/eth_address.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address/eth_address.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address/eth_address.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address/partial_address.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address/partial_address.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address/partial_address.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address/partial_address.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address/public_keys_hash.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address/public_keys_hash.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address/public_keys_hash.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address/public_keys_hash.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/address/salted_initialization_hash.nr b/noir-projects/noir-protocol-circuits/crates/types/src/address/salted_initialization_hash.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/address/salted_initialization_hash.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/address/salted_initialization_hash.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/constants.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/content_commitment.nr b/noir-projects/noir-protocol-circuits/crates/types/src/content_commitment.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/content_commitment.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/content_commitment.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contract_class_id.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contract_class_id.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contract_class_id.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contract_class_id.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contract_instance.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contract_instance.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contract_instance.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contract_instance.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contrakt.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contrakt.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/contract_deployment_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contrakt/contract_deployment_data.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/contract_deployment_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contrakt/contract_deployment_data.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/storage_read.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contrakt/storage_read.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/storage_read.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contrakt/storage_read.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/storage_update_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/contrakt/storage_update_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/contrakt/storage_update_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/contrakt/storage_update_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/grumpkin_point.nr b/noir-projects/noir-protocol-circuits/crates/types/src/grumpkin_point.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/grumpkin_point.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/grumpkin_point.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/grumpkin_private_key.nr b/noir-projects/noir-protocol-circuits/crates/types/src/grumpkin_private_key.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/grumpkin_private_key.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/grumpkin_private_key.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/hash.nr b/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/hash.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/hash.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/header.nr b/noir-projects/noir-protocol-circuits/crates/types/src/header.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/header.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/header.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/lib.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/lib.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/append_only_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/append_only_tree.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/append_only_tree.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/append_only_tree.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/indexed_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/indexed_tree.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/indexed_tree.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/merkle_tree/leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/merkle_tree/leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/messaging.nr b/noir-projects/noir-protocol-circuits/crates/types/src/messaging.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/messaging.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/messaging.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/messaging/l2_to_l1_message.nr b/noir-projects/noir-protocol-circuits/crates/types/src/messaging/l2_to_l1_message.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/messaging/l2_to_l1_message.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/messaging/l2_to_l1_message.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/mocked.nr b/noir-projects/noir-protocol-circuits/crates/types/src/mocked.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/mocked.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/mocked.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/partial_state_reference.nr b/noir-projects/noir-protocol-circuits/crates/types/src/partial_state_reference.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/partial_state_reference.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/partial_state_reference.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/public_data_tree_leaf.nr b/noir-projects/noir-protocol-circuits/crates/types/src/public_data_tree_leaf.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/public_data_tree_leaf.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/public_data_tree_leaf.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/public_data_tree_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/public_data_tree_leaf_preimage.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/public_data_tree_leaf_preimage.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/public_data_tree_leaf_preimage.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/state_reference.nr b/noir-projects/noir-protocol-circuits/crates/types/src/state_reference.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/state_reference.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/state_reference.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contract_functions.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contract_functions.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contract_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_tree.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contract_tree.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_tree.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contracts.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/contracts.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/note_hash_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/note_hash_tree.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/note_hash_tree.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/note_hash_tree.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/read_requests.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/read_requests.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/fixtures/read_requests.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/read_requests.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/kernel_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/kernel_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/kernel_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/kernel_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/merkle_tree_utils.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/merkle_tree_utils.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/private_call_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/private_call_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/private_call_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/private_call_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/private_circuit_public_inputs_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/private_circuit_public_inputs_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/private_circuit_public_inputs_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/private_circuit_public_inputs_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/public_call_data_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/public_call_data_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/public_call_data_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/public_call_data_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/public_circuit_public_inputs_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/public_circuit_public_inputs_builder.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/public_circuit_public_inputs_builder.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/public_circuit_public_inputs_builder.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/tests/testing_harness.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/testing_harness.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/tests/testing_harness.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/tests/testing_harness.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr b/noir-projects/noir-protocol-circuits/crates/types/src/traits.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/traits.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/traits.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/transaction.nr b/noir-projects/noir-protocol-circuits/crates/types/src/transaction.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/transaction.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/transaction.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/transaction/tx_context.nr b/noir-projects/noir-protocol-circuits/crates/types/src/transaction/tx_context.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/transaction/tx_context.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/transaction/tx_context.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/transaction/tx_request.nr b/noir-projects/noir-protocol-circuits/crates/types/src/transaction/tx_request.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/transaction/tx_request.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/transaction/tx_request.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/type_serialization.nr b/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/type_serialization.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/utils.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/utils.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/utils.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/utils/arrays.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/utils/arrays.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/utils/field.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/field.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/utils/field.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/utils/field.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/utils/reader.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/utils/reader.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/utils/uint256.nr b/noir-projects/noir-protocol-circuits/crates/types/src/utils/uint256.nr similarity index 100% rename from noir-projects/noir-protocol-circuits/src/crates/types/src/utils/uint256.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/utils/uint256.nr diff --git a/noir-projects/noir-protocol-circuits/package.json b/noir-projects/noir-protocol-circuits/package.json deleted file mode 100644 index 4844ffd281a..00000000000 --- a/noir-projects/noir-protocol-circuits/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@aztec/noir-protocol-circuits", - "version": "0.1.0", - "type": "module", - "license": "MIT", - "exports": { - ".": "./dest/index.js", - "./types": "./dest/types/index.js" - }, - "scripts": { - "build": "yarn clean && yarn noir:build", - "clean": "rm -rf ./dest src/target", - "noir:build": "cd src && ../../../noir/noir-repo/target/release/nargo compile --silence-warnings", - "noir:format": "cd src && ../../../noir/noir-repo/target/release/nargo fmt", - "test": "cd src && ../../../noir/noir-repo/target/release/nargo test --silence-warnings" - }, - "files": [ - "dest", - "src" - ] -} diff --git a/yarn-project/circuits.js/fixtures/Benchmarking.test.json b/yarn-project/circuits.js/fixtures/Benchmarking.test.json index cc99240365a..4682f2b2111 100644 --- a/yarn-project/circuits.js/fixtures/Benchmarking.test.json +++ b/yarn-project/circuits.js/fixtures/Benchmarking.test.json @@ -3440,7 +3440,7 @@ "path": "/home/santiago/Projects/aztec3-packages/aztec-nr/aztec/src/oracle/nullifier_key.nr" }, "76": { - "source": "pub fn arr_copy_slice(src: [T; N], mut dst: [T; M], offset: Field) -> [T; M] {\n for i in 0..dst.len() {\n dst[i] = src[i + offset];\n }\n dst\n}\n\n// TODO(#3470): Copied over from https://github.com/AztecProtocol/aztec-packages/blob/a07c4bd47313be6aa604a63f37857eb0136b41ba/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr#L599\n// move to a shared place?\n\n// TODO to radix returns u8, so we cannot use bigger radixes. It'd be ideal to use a radix of the maximum range-constrained integer noir supports\npub fn full_field_less_than(lhs: Field, rhs: Field) -> bool {\n lhs.lt(rhs)\n}\n\npub fn full_field_greater_than(lhs: Field, rhs: Field) -> bool {\n rhs.lt(lhs)\n}\n\nstruct Reader {\n data: [Field; N],\n offset: Field,\n}\n\nimpl Reader {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_array(&mut self, mut result: [Field; K]) -> [Field; K] {\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array([0; K]));\n result\n }\n\n pub fn read_struct_array(&mut self, deserialise: fn([Field; K]) -> T, mut result: [T; C]) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n } \n}\n", + "source": "pub fn arr_copy_slice(src: [T; N], mut dst: [T; M], offset: Field) -> [T; M] {\n for i in 0..dst.len() {\n dst[i] = src[i + offset];\n }\n dst\n}\n\n// TODO(#3470): Copied over from https://github.com/AztecProtocol/aztec-packages/blob/a07c4bd47313be6aa604a63f37857eb0136b41ba/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr#L599\n// move to a shared place?\n\n// TODO to radix returns u8, so we cannot use bigger radixes. It'd be ideal to use a radix of the maximum range-constrained integer noir supports\npub fn full_field_less_than(lhs: Field, rhs: Field) -> bool {\n lhs.lt(rhs)\n}\n\npub fn full_field_greater_than(lhs: Field, rhs: Field) -> bool {\n rhs.lt(lhs)\n}\n\nstruct Reader {\n data: [Field; N],\n offset: Field,\n}\n\nimpl Reader {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_array(&mut self, mut result: [Field; K]) -> [Field; K] {\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array([0; K]));\n result\n }\n\n pub fn read_struct_array(&mut self, deserialise: fn([Field; K]) -> T, mut result: [T; C]) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n } \n}\n", "path": "/home/santiago/Projects/aztec3-packages/aztec-nr/aztec/src/utils.nr" }, "77": { @@ -3477,27 +3477,27 @@ }, "105": { "source": "global ARGS_LENGTH: Field = 16;\nglobal RETURN_VALUES_LENGTH: Field = 4;\n\n/**\n * Convention for constant array lengths are mainly divided in 2 classes:\n * - FUNCTION CALL\n * - TRANSACTION\n *\n * Agreed convention is to use MAX_XXX_PER_CALL resp. MAX_XXX_PER_TX, where XXX denotes a type of element such as\n * commitment, or nullifier, e.g.,:\n * - MAX_NEW_NULLIFIERS_PER_CALL\n * - MAX_NEW_NOTE_HASHES_PER_TX\n *\n * In the kernel circuits, we accumulate elements such as commitments and the nullifiers from all functions calls in a\n * transaction. Therefore, we always must have:\n * MAX_XXX_PER_TX ≥ MAX_XXX_PER_CALL\n *\n * For instance:\n * MAX_NEW_NOTE_HASHES_PER_TX ≥ MAX_NEW_NOTE_HASHES_PER_CALL\n * MAX_NEW_NULLIFIERS_PER_TX ≥ MAX_NEW_NULLIFIERS_PER_CALL\n *\n */\n\n// docs:start:constants\n// \"PER CALL\" CONSTANTS\nglobal MAX_NEW_NOTE_HASHES_PER_CALL: Field = 16;\nglobal MAX_NEW_NULLIFIERS_PER_CALL: Field = 16;\nglobal MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL: Field = 4;\nglobal MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL: Field = 4;\nglobal MAX_NEW_L2_TO_L1_MSGS_PER_CALL: Field = 2;\nglobal MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL: Field = 16;\nglobal MAX_PUBLIC_DATA_READS_PER_CALL: Field = 16;\nglobal MAX_READ_REQUESTS_PER_CALL: Field = 32;\n\n// \"PER TRANSACTION\" CONSTANTS\nglobal MAX_NEW_NOTE_HASHES_PER_TX: Field = 64;\nglobal MAX_NEW_NULLIFIERS_PER_TX: Field = 64;\nglobal MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX: Field = 8;\nglobal MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX: Field = 8;\nglobal MAX_NEW_L2_TO_L1_MSGS_PER_TX: Field = 2;\nglobal MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: Field = 16;\nglobal MAX_PUBLIC_DATA_READS_PER_TX: Field = 16;\nglobal MAX_NEW_CONTRACTS_PER_TX: Field = 1;\nglobal MAX_OPTIONALLY_REVEALED_DATA_LENGTH_PER_TX: Field = 4;\nglobal MAX_READ_REQUESTS_PER_TX: Field = 128;\nglobal NUM_ENCRYPTED_LOGS_HASHES_PER_TX: Field = 1;\nglobal NUM_UNENCRYPTED_LOGS_HASHES_PER_TX: Field = 1;\n// docs:end:constants\n\n// ROLLUP CONTRACT CONSTANTS - constants used only in l1-contracts\nglobal NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP: Field = 16;\n\n// TREES RELATED CONSTANTS\nglobal VK_TREE_HEIGHT: Field = 3;\nglobal FUNCTION_TREE_HEIGHT: Field = 5;\nglobal CONTRACT_TREE_HEIGHT: Field = 16;\nglobal NOTE_HASH_TREE_HEIGHT: Field = 32;\nglobal PUBLIC_DATA_TREE_HEIGHT: Field = 40;\nglobal NULLIFIER_TREE_HEIGHT: Field = 20;\nglobal L1_TO_L2_MSG_TREE_HEIGHT: Field = 16;\nglobal ROLLUP_VK_TREE_HEIGHT: Field = 8;\n\n// SUB-TREES RELATED CONSTANTS\nglobal CONTRACT_SUBTREE_HEIGHT: Field = 0;\nglobal CONTRACT_SUBTREE_SIBLING_PATH_LENGTH: Field = 16;\nglobal NOTE_HASH_SUBTREE_HEIGHT: Field = 6;\nglobal NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH: Field = 26;\nglobal NULLIFIER_SUBTREE_HEIGHT: Field = 6;\nglobal PUBLIC_DATA_SUBTREE_HEIGHT: Field = 4;\nglobal ARCHIVE_HEIGHT: Field = 16;\nglobal NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH: Field = 14;\nglobal PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH: Field = 36;\nglobal L1_TO_L2_MSG_SUBTREE_HEIGHT: Field = 4;\nglobal L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH: Field = 12;\n\n// MISC CONSTANTS\nglobal FUNCTION_SELECTOR_NUM_BYTES: Field = 4;\nglobal MAPPING_SLOT_PEDERSEN_SEPARATOR: Field = 4;\n// sha256 hash is stored in two fields to accommodate all 256-bits of the hash\nglobal NUM_FIELDS_PER_SHA256: Field = 2;\nglobal ARGS_HASH_CHUNK_LENGTH: u32 = 32;\nglobal ARGS_HASH_CHUNK_COUNT: u32 = 16;\n\n// NOIR CONSTANTS - constants used only in yarn-packages/noir-contracts\n// Some are defined here because Noir doesn't yet support globals referencing other globals yet.\n// Move these constants to a noir file once the issue bellow is resolved:\n// https://github.com/noir-lang/noir/issues/1734\nglobal L1_TO_L2_MESSAGE_LENGTH: Field = 8;\nglobal L1_TO_L2_MESSAGE_ORACLE_CALL_LENGTH: Field = 25;\nglobal MAX_NOTE_FIELDS_LENGTH: Field = 20;\n// GET_NOTE_ORACLE_RETURN_LENGT = MAX_NOTE_FIELDS_LENGTH + 1 + 2\n// The plus 1 is 1 extra field for nonce.\n// + 2 for EXTRA_DATA: [number_of_return_notes, contract_address]\nglobal GET_NOTE_ORACLE_RETURN_LENGTH: Field = 23;\nglobal MAX_NOTES_PER_PAGE: Field = 10;\n// VIEW_NOTE_ORACLE_RETURN_LENGTH = MAX_NOTES_PER_PAGE * (MAX_NOTE_FIELDS_LENGTH + 1) + 2;\nglobal VIEW_NOTE_ORACLE_RETURN_LENGTH: Field = 212;\nglobal CALL_CONTEXT_LENGTH: Field = 8;\nglobal BLOCK_HEADER_LENGTH: Field = 7;\nglobal FUNCTION_DATA_LENGTH: Field = 4;\nglobal CONTRACT_DEPLOYMENT_DATA_LENGTH: Field = 6;\n// Change this ONLY if you have changed the PrivateCircuitPublicInputs structure.\n// In other words, if the structure/size of the public inputs of a function call changes then we\n// should change this constant as well as the offsets in private_call_stack_item.nr\nglobal PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH: Field = 189;\nglobal CONTRACT_STORAGE_UPDATE_REQUEST_LENGTH: Field = 3;\nglobal CONTRACT_STORAGE_READ_LENGTH: Field = 2;\n// Change this ONLY if you have changed the PublicCircuitPublicInputs structure.\nglobal PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH: Field = 190;\nglobal GET_NOTES_ORACLE_RETURN_LENGTH: Field = 674;\nglobal CALL_PRIVATE_FUNCTION_RETURN_SIZE: Field = 195;\nglobal PUBLIC_CIRCUIT_PUBLIC_INPUTS_HASH_INPUT_LENGTH: Field = 87;\nglobal PRIVATE_CIRCUIT_PUBLIC_INPUTS_HASH_INPUT_LENGTH: Field = 177;\nglobal NOTE_HASHES_NUM_BYTES_PER_BASE_ROLLUP: Field = 2048;\nglobal NULLIFIERS_NUM_BYTES_PER_BASE_ROLLUP: Field = 2048;\nglobal PUBLIC_DATA_WRITES_NUM_BYTES_PER_BASE_ROLLUP: Field = 1024;\nglobal CONTRACTS_NUM_BYTES_PER_BASE_ROLLUP: Field = 32;\nglobal CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP: Field = 64;\nglobal CONTRACT_DATA_NUM_BYTES_PER_BASE_ROLLUP_UNPADDED: Field = 52;\nglobal L2_TO_L1_MSGS_NUM_BYTES_PER_BASE_ROLLUP: Field = 64;\nglobal LOGS_HASHES_NUM_BYTES_PER_BASE_ROLLUP: Field = 64;\n\n/**\n * Enumerate the hash_indices which are used for pedersen hashing.\n * We start from 1 to avoid the default generators. The generator indices are listed\n * based on the number of elements each index hashes. The following conditions must be met:\n *\n * +-----------+-------------------------------+----------------------+\n * | Hash size | Number of elements hashed (n) | Condition to use |\n * |-----------+-------------------------------+----------------------|\n * | LOW | n ≤ 8 | 0 < hash_index ≤ 32 |\n * | MID | 8 < n ≤ 16 | 32 < hash_index ≤ 40 |\n * | HIGH | 16 < n ≤ 48 | 40 < hash_index ≤ 48 |\n * +-----------+-------------------------------+----------------------+\n *\n * Note: When modifying, modify `GeneratorIndexPacker` in packer.hpp accordingly.\n */\n// Indices with size ≤ 8\nglobal GENERATOR_INDEX__COMMITMENT = 1;\nglobal GENERATOR_INDEX__NOTE_HASH_NONCE = 2;\nglobal GENERATOR_INDEX__UNIQUE_NOTE_HASH = 3;\nglobal GENERATOR_INDEX__SILOED_NOTE_HASH = 4;\nglobal GENERATOR_INDEX__NULLIFIER = 5;\nglobal GENERATOR_INDEX__INITIALIZATION_NULLIFIER = 6;\nglobal GENERATOR_INDEX__OUTER_NULLIFIER = 7;\nglobal GENERATOR_INDEX__PUBLIC_DATA_READ = 8;\nglobal GENERATOR_INDEX__PUBLIC_DATA_UPDATE_REQUEST = 9;\nglobal GENERATOR_INDEX__FUNCTION_DATA = 10;\nglobal GENERATOR_INDEX__FUNCTION_LEAF = 11;\nglobal GENERATOR_INDEX__CONTRACT_DEPLOYMENT_DATA = 12;\nglobal GENERATOR_INDEX__CONSTRUCTOR = 13;\nglobal GENERATOR_INDEX__CONSTRUCTOR_ARGS = 14;\nglobal GENERATOR_INDEX__CONTRACT_ADDRESS = 15;\nglobal GENERATOR_INDEX__CONTRACT_LEAF = 16;\nglobal GENERATOR_INDEX__CALL_CONTEXT = 17;\nglobal GENERATOR_INDEX__CALL_STACK_ITEM = 18;\nglobal GENERATOR_INDEX__CALL_STACK_ITEM_2 = 19;\nglobal GENERATOR_INDEX__L1_TO_L2_MESSAGE_SECRET = 20;\nglobal GENERATOR_INDEX__L2_TO_L1_MSG = 21;\nglobal GENERATOR_INDEX__TX_CONTEXT = 22;\nglobal GENERATOR_INDEX__PUBLIC_LEAF_INDEX = 23;\nglobal GENERATOR_INDEX__PUBLIC_DATA_LEAF = 24;\nglobal GENERATOR_INDEX__SIGNED_TX_REQUEST = 25;\nglobal GENERATOR_INDEX__GLOBAL_VARIABLES = 26;\nglobal GENERATOR_INDEX__PARTIAL_ADDRESS = 27;\nglobal GENERATOR_INDEX__BLOCK_HASH = 28;\nglobal GENERATOR_INDEX__SIDE_EFFECT = 29;\n// Indices with size ≤ 16\nglobal GENERATOR_INDEX__TX_REQUEST = 33;\nglobal GENERATOR_INDEX__SIGNATURE_PAYLOAD = 34;\n// Indices with size ≤ 44\nglobal GENERATOR_INDEX__VK = 41;\nglobal GENERATOR_INDEX__PRIVATE_CIRCUIT_PUBLIC_INPUTS = 42;\nglobal GENERATOR_INDEX__PUBLIC_CIRCUIT_PUBLIC_INPUTS = 43;\nglobal GENERATOR_INDEX__FUNCTION_ARGS = 44;\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/constants.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/constants.nr" }, "111": { "source": "use crate::address::{AztecAddress, EthAddress};\nuse crate::mocked::VerificationKey;\nuse crate::abis::function_selector::FunctionSelector;\nuse crate::abis::function_leaf_preimage::FunctionLeafPreimage;\nuse crate::abis::new_contract_data::NewContractData as ContractLeafPreimage;\nuse crate::abis::function_data::FunctionData;\nuse crate::abis::side_effect::{SideEffect};\nuse crate::utils::uint256::U256;\nuse crate::utils::bounded_vec::BoundedVec;\nuse crate::constants::{\n ARGS_HASH_CHUNK_COUNT,\n ARGS_HASH_CHUNK_LENGTH,\n CONTRACT_TREE_HEIGHT, \n FUNCTION_TREE_HEIGHT, \n NOTE_HASH_TREE_HEIGHT,\n NUM_FIELDS_PER_SHA256,\n GENERATOR_INDEX__SILOED_NOTE_HASH,\n GENERATOR_INDEX__OUTER_NULLIFIER,\n GENERATOR_INDEX__VK,\n GENERATOR_INDEX__CONSTRUCTOR,\n GENERATOR_INDEX__PARTIAL_ADDRESS,\n GENERATOR_INDEX__CONTRACT_ADDRESS,\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n GENERATOR_INDEX__UNIQUE_NOTE_HASH,\n GENERATOR_INDEX__FUNCTION_ARGS,\n};\n\nuse dep::std::hash::{pedersen_hash_with_separator, sha256};\n\npub fn sha256_to_field(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = sha256(bytes_to_hash);\n\n // Convert it to a field element\n let mut v = 1;\n let mut high = 0 as Field;\n let mut low = 0 as Field;\n\n for i in 0..16 {\n high = high + (sha256_hashed[15 - i] as Field) * v;\n low = low + (sha256_hashed[16 + 15 - i] as Field) * v;\n v = v * 256;\n }\n\n // Abuse that a % p + b % p = (a + b) % p and that low < p\n let hash_in_a_field = low + high * v;\n\n hash_in_a_field\n}\n\npub fn hash_args(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n let mut chunks_hashes = [0; ARGS_HASH_CHUNK_COUNT];\n for i in 0..ARGS_HASH_CHUNK_COUNT {\n let mut chunk_hash = 0;\n let start_chunk_index = i * ARGS_HASH_CHUNK_LENGTH;\n if start_chunk_index < (args.len() as u32) {\n let mut chunk_args = [0; ARGS_HASH_CHUNK_LENGTH];\n for j in 0..ARGS_HASH_CHUNK_LENGTH {\n let item_index = i * ARGS_HASH_CHUNK_LENGTH + j;\n if item_index < (args.len() as u32) {\n chunk_args[j] = args[item_index];\n }\n }\n chunk_hash = pedersen_hash(chunk_args, GENERATOR_INDEX__FUNCTION_ARGS);\n }\n chunks_hashes[i] = chunk_hash;\n }\n pedersen_hash(chunks_hashes, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\n// Checks that `value` is a member of a merkle tree with root `root` at position `index`\n// The witness being the `sibling_path`\npub fn assert_check_membership(value: Field, index: Field, sibling_path: [Field; N], root: Field) {\n let calculated_root = root_from_sibling_path(value, index, sibling_path);\n assert(calculated_root == root, \"membership check failed\");\n}\n\n// Calculate the Merkle tree root from the sibling path and leaf.\n//\n// The leaf is hashed with its sibling, and then the result is hashed\n// with the next sibling etc in the path. The last hash is the root.\n//\n// TODO(David/Someone): The cpp code is using a uint256, whereas its\n// TODO a bit simpler in Noir to just have a bit array.\n// TODO: I'd generally like to avoid u256 for algorithms like \n// this because it means we never even need to consider cases where \n// the index is greater than p.\npub fn root_from_sibling_path(leaf: Field, leaf_index: Field, sibling_path: [Field; N]) -> Field {\n let mut node = leaf;\n let indices = leaf_index.to_le_bits(N);\n\n for i in 0..N {\n let (hash_left, hash_right) = if indices[i] == 1 {\n (sibling_path[i], node)\n } else {\n (node, sibling_path[i])\n };\n node = merkle_hash(hash_left, hash_right);\n }\n node\n}\n\n// Calculate the function tree root from the sibling path and leaf preimage.\n//\n// TODO: The cpp code passes in components of the FunctionLeafPreimage and then \n// builds it up. We should build it up and then pass the leaf preimage as a parameter.\n// We can then choose to have a general method that takes in anything hashable\n// and deduplicate the logic in `contract_tree_root_from_siblings`\npub fn function_tree_root_from_siblings(\n selector: FunctionSelector,\n is_internal: bool,\n is_private: bool,\n vk_hash: Field,\n acir_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT]\n) -> Field {\n let function_leaf_preimage = FunctionLeafPreimage { selector, is_internal, is_private, vk_hash, acir_hash };\n\n let function_leaf = function_leaf_preimage.hash();\n\n let function_tree_root = root_from_sibling_path(function_leaf, function_leaf_index, function_leaf_sibling_path);\n\n function_tree_root\n}\n\n// Calculate the contract tree root from the sibling path and leaf preimage.\npub fn contract_tree_root_from_siblings(\n function_tree_root: Field,\n storage_contract_address: AztecAddress,\n portal_contract_address: EthAddress,\n contract_leaf_index: Field,\n contract_leaf_sibling_path: [Field; CONTRACT_TREE_HEIGHT]\n) -> Field {\n //TODO(Kev): if we use shorthand syntax here, we get an error as expected,\n // since variable name is `storage_contract_address` but the span is incorrect.\n let contract_leaf_preimage = ContractLeafPreimage { contract_address: storage_contract_address, portal_contract_address, function_tree_root };\n\n let contract_leaf = contract_leaf_preimage.hash();\n\n let computed_contract_tree_root = root_from_sibling_path(contract_leaf, contract_leaf_index, contract_leaf_sibling_path);\n\n computed_contract_tree_root\n}\n\npub fn read_request_root_from_siblings(\n read_request: Field,\n leaf_index: Field,\n sibling_path: [Field; NOTE_HASH_TREE_HEIGHT]\n) -> Field {\n root_from_sibling_path(read_request, leaf_index, sibling_path)\n}\n\npub fn silo_note_hash(address: AztecAddress, inner_commitment: Field) -> Field {\n pedersen_hash(\n [\n address.to_field(),\n inner_commitment\n ],\n GENERATOR_INDEX__SILOED_NOTE_HASH\n )\n}\n\npub fn silo_nullifier(address: AztecAddress, nullifier: Field) -> Field {\n pedersen_hash(\n [\n address.to_field(),\n nullifier\n ],\n GENERATOR_INDEX__OUTER_NULLIFIER\n )\n}\n\nfn merkle_hash(left: Field, right: Field) -> Field {\n pedersen_hash([left, right], 0)\n}\n\npub fn stdlib_recursion_verification_key_compress_native_vk(_vk: VerificationKey) -> Field {\n // Original cpp code\n // stdlib::recursion::verification_key::compress_native(private_call.vk, GeneratorIndex::VK);\n // The above cpp method is only ever called on verification key, so it has been special cased here\n let _hash_index = GENERATOR_INDEX__VK;\n 0\n}\n\n// TODO CPP uses blake2s for this\npub fn compute_new_contract_address_hash(new_contract_address: AztecAddress) -> Field {\n dep::std::hash::pedersen_hash([new_contract_address.to_field()])\n}\n\npub fn compute_l2_to_l1_hash(\n contract_address: AztecAddress,\n rollup_version_id: Field,\n portal_contract_address: EthAddress,\n chain_id: Field,\n content: Field\n) -> Field {\n let mut bytes: BoundedVec = BoundedVec::new();\n unique_siloed_note_hashes[i] = SideEffect {\n value: compute_unique_siloed_note_hash(nonce, siloed_note_hash.value),\n counter: siloed_note_hash.counter\n };\n }\n }\n unique_siloed_note_hashes\n}\n\npub fn pedersen_hash(inputs: [Field; N], hash_index: u32) -> Field {\n dep::std::hash::pedersen_hash_with_separator(inputs, hash_index)\n}\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/hash.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/hash.nr" }, "126": { "source": "pub fn field_from_bytes(bytes: [u8; N], big_endian: bool) -> Field {\n assert(bytes.len() as u32 < 32, \"field_from_bytes: N must be less than 32\");\n let mut as_field = 0;\n let mut offset = 1;\n for i in 0..N {\n let mut index = i;\n if big_endian {\n index = N - i - 1;\n }\n as_field += (bytes[index] as Field) * offset;\n offset *= 256;\n }\n\n as_field\n}\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/utils/field.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/utils/field.nr" }, "150": { "source": "use crate::utils::field::field_from_bytes;\nuse dep::std::cmp::Eq;\n\nglobal SELECTOR_SIZE = 4;\n\nstruct FunctionSelector {\n // 1st 4-bytes of abi-encoding of function.\n inner: u32,\n}\n\nimpl Eq for FunctionSelector {\n fn eq(self, function_selector: FunctionSelector) -> bool {\n function_selector.inner == self.inner\n }\n}\n\nimpl FunctionSelector {\n fn to_field(self) -> Field {\n self.inner as Field\n }\n\n pub fn from_u32(value: u32) -> Self {\n Self {\n inner : value,\n }\n }\n\n pub fn from_field(value : Field) -> Self {\n Self {\n inner : value as u32,\n }\n }\n\n pub fn from_signature(signature: str) -> Self {\n let bytes = signature.as_bytes();\n let hash = dep::std::hash::keccak256(bytes, bytes.len() as u32);\n\n let mut selector_be_bytes = [0; SELECTOR_SIZE];\n for i in 0..SELECTOR_SIZE {\n selector_be_bytes[i] = hash[i];\n }\n\n FunctionSelector::from_field(field_from_bytes(selector_be_bytes, true))\n }\n\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n\n pub fn serialize(self: Self) -> [Field; 1] {\n [self.inner as Field]\n }\n\n pub fn deserialize(fields: [Field; 1]) -> Self {\n Self {\n inner: fields[0] as u32\n }\n }\n}\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/abis/function_selector.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/abis/function_selector.nr" }, "160": { "source": "use crate::{\n constants::{\n GENERATOR_INDEX__CONTRACT_ADDRESS,\n GENERATOR_INDEX__PARTIAL_ADDRESS,\n },\n hash::pedersen_hash,\n utils,\n grumpkin_point::GrumpkinPoint,\n};\nuse dep::std::cmp::Eq;\nuse crate::traits::{Empty, ToField};\n\n// Aztec address\nstruct AztecAddress {\n inner : Field\n}\n\nimpl Eq for AztecAddress {\n fn eq(self, other : Self) -> bool {\n self.to_field() == other.to_field()\n }\n}\n\nimpl Empty for AztecAddress {\n fn empty() -> Self {\n Self {\n inner : 0\n }\n }\n}\n\nimpl ToField for AztecAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl AztecAddress {\n pub fn zero() -> Self {\n Self {\n inner: 0\n }\n }\n\n pub fn from_field(field : Field) -> Self {\n Self {\n inner : field\n }\n }\n\n pub fn compute(pub_key: GrumpkinPoint, partial_address: PartialAddress) -> AztecAddress {\n AztecAddress::from_field(\n pedersen_hash(\n [pub_key.x, pub_key.y, partial_address.to_field()],\n GENERATOR_INDEX__CONTRACT_ADDRESS\n )\n )\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n \n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n\n pub fn conditional_assign(predicate: bool, lhs : Self, rhs : Self) -> Self{\n let result = utils::conditional_assign(predicate, rhs.to_field(), lhs.to_field());\n Self {\n inner : result\n }\n }\n\n pub fn serialize(self: Self) -> [Field; 1] {\n [self.inner]\n }\n\n pub fn deserialize(fields: [Field; 1]) -> Self {\n Self {\n inner: fields[0]\n }\n }\n}\n\nstruct EthAddress{\n inner : Field\n}\n\nimpl Eq for EthAddress {\n fn eq(self, other : Self) -> bool {\n self.to_field() == other.to_field()\n }\n}\n\nimpl Empty for EthAddress {\n fn empty() -> Self {\n Self {\n inner : 0\n }\n }\n}\n\nimpl ToField for EthAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl EthAddress{\n pub fn zero() -> Self {\n Self {\n inner: 0\n }\n }\n\n pub fn from_field(field : Field) -> Self {\n Self {\n inner : field\n }\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n\n pub fn conditional_assign(predicate: bool, lhs : Self, rhs : Self) -> Self{\n let result = utils::conditional_assign(predicate, rhs.to_field(), lhs.to_field());\n Self {\n inner : result\n }\n }\n\n pub fn serialize(self: Self) -> [Field; 1] {\n [self.inner]\n }\n\n pub fn deserialize(fields: [Field; 1]) -> Self {\n Self {\n inner: fields[0]\n }\n }\n}\n\n// Partial address\nstruct PartialAddress {\n inner : Field\n}\n\nimpl ToField for PartialAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl PartialAddress {\n pub fn from_field(field : Field) -> Self {\n Self {\n inner : field\n }\n }\n\n pub fn compute(contract_address_salt : Field, function_tree_root : Field, constructor_hash : Field) -> Self {\n PartialAddress::from_field(\n pedersen_hash([\n // TODO why the zeroes?\n 0,\n 0,\n contract_address_salt,\n function_tree_root,\n constructor_hash\n ], GENERATOR_INDEX__PARTIAL_ADDRESS)\n )\n }\n\n pub fn to_field(self) -> Field {\n self.inner\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n}\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/address.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/address.nr" }, "163": { "source": "use crate::{\n constants::{\n CONTRACT_STORAGE_READ_LENGTH,\n GENERATOR_INDEX__PUBLIC_DATA_READ,\n },\n hash::pedersen_hash,\n};\nuse crate::traits::Empty;\n\nstruct StorageRead {\n storage_slot: Field,\n current_value: Field,\n}\n\nimpl Empty for StorageRead { \n fn empty() -> Self {\n Self {\n storage_slot: 0,\n current_value: 0,\n }\n }\n}\n\nimpl StorageRead {\n\n pub fn serialize(self) -> [Field; CONTRACT_STORAGE_READ_LENGTH] {\n [self.storage_slot, self.current_value]\n }\n\n pub fn hash(self) -> Field {\n pedersen_hash(self.serialize(), GENERATOR_INDEX__PUBLIC_DATA_READ)\n }\n\n pub fn is_empty(self) -> bool {\n self.storage_slot == 0\n }\n}\n", - "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/src/crates/types/src/contrakt/storage_read.nr" + "path": "/home/santiago/Projects/aztec3-packages/noir-protocol-circuits/crates/types/src/contrakt/storage_read.nr" }, "167": { "source": "use dep::std::option::Option;\nuse dep::aztec::context::PrivateContext;\nuse dep::aztec::note::note_getter_options::{NoteGetterOptions, SortOrder};\nuse dep::aztec::oracle::get_public_key::get_public_key;\nuse dep::aztec::state_vars::set::Set;\nuse crate::{\n filter::filter_notes_min_sum,\n value_note::{ValueNote, VALUE_NOTE_LEN},\n};\nuse dep::aztec::protocol_types::address::AztecAddress;\n\n// Sort the note values (0th field) in descending order.\n// Pick the fewest notes whose sum is equal to or greater than `amount`.\npub fn create_note_getter_options_for_decreasing_balance(amount: Field) -> NoteGetterOptions {\n NoteGetterOptions::with_filter(filter_notes_min_sum, amount).sort(0, SortOrder.DESC)\n}\n\n// Creates a new note for the recipient.\n// Inserts it to the recipient's set of notes.\npub fn increment(balance: Set, amount: Field, recipient: AztecAddress) {\n let mut note = ValueNote::new(amount, recipient);\n // Insert the new note to the owner's set of notes and emit the log if value is non-zero.\n balance.insert(&mut note, amount != 0);\n}\n\n// Find some of the `owner`'s notes whose values add up to the `amount`.\n// Remove those notes.\n// If the value of the removed notes exceeds the requested `amount`, create a new note containing the excess value, so that exactly `amount` is removed.\n// Fail if the sum of the selected notes is less than the amount.\npub fn decrement(balance: Set, amount: Field, owner: AztecAddress) {\n let sum = decrement_by_at_most(balance, amount, owner);\n assert(sum == amount, \"Balance too low\");\n}\n\n// Similar to `decrement`, except that it doesn't fail if the decremented amount is less than max_amount.\n// The motivation behind this function is that there is an upper-bound on the number of notes a function may\n// read and nullify. The requested decrementation `amount` might be spread across too many of the `owner`'s\n// notes to 'fit' within this upper-bound, so we might have to remove an amount less than `amount`. A common\n// pattern is to repeatedly call this function across many function calls, until enough notes have been nullified to\n// equal `amount`.\n//\n// It returns the decremented amount, which should be less than or equal to max_amount.\npub fn decrement_by_at_most(\n balance: Set,\n max_amount: Field,\n owner: AztecAddress\n) -> Field {\n let options = create_note_getter_options_for_decreasing_balance(max_amount);\n let opt_notes = balance.get_notes(options);\n\n let mut decremented = 0;\n for i in 0..opt_notes.len() {\n if opt_notes[i].is_some() {\n decremented += destroy_note(balance, owner, opt_notes[i].unwrap_unchecked());\n }\n }\n\n // Add the change value back to the owner's balance.\n let mut change_value = 0;\n if decremented as u120 > max_amount as u120 {\n change_value = decremented - max_amount;\n decremented -= change_value;\n }\n increment(balance, change_value, owner);\n\n decremented\n}\n\n// Removes the note from the owner's set of notes.\n// Returns the value of the destroyed note.\npub fn destroy_note(\n balance: Set,\n owner: AztecAddress,\n note: ValueNote\n) -> Field {\n // Ensure the note is actually owned by the owner (to prevent user from generating a valid proof while\n // spending someone else's notes).\n assert(note.owner.eq(owner));\n\n balance.remove(note);\n\n note.value\n}\n", diff --git a/yarn-project/circuits.js/src/keys/index.ts b/yarn-project/circuits.js/src/keys/index.ts index dee7623db74..17f63615870 100644 --- a/yarn-project/circuits.js/src/keys/index.ts +++ b/yarn-project/circuits.js/src/keys/index.ts @@ -18,7 +18,7 @@ export function derivePublicKey(secretKey: GrumpkinPrivateKey) { */ function deriveSecretKey(secretKey: GrumpkinPrivateKey, index: Fr): GrumpkinPrivateKey { // TODO: Temporary hack. Should replace it with a secure way to derive the secret key. - // Match the way keys are derived in noir-protocol-circuits/src/crates/private_kernel_lib/src/common.nr + // Match the way keys are derived in noir-protocol-circuits/crates/private_kernel_lib/src/common.nr const hash = pedersenHash([secretKey.high, secretKey.low, index].map(v => v.toBuffer())); return new GrumpkinScalar(hash.toBuffer()); } diff --git a/yarn-project/circuits.js/src/scripts/constants.in.ts b/yarn-project/circuits.js/src/scripts/constants.in.ts index 2cf57116abf..c9f29ef4d7e 100644 --- a/yarn-project/circuits.js/src/scripts/constants.in.ts +++ b/yarn-project/circuits.js/src/scripts/constants.in.ts @@ -3,7 +3,7 @@ import { fileURLToPath } from '@aztec/foundation/url'; import * as fs from 'fs'; import { dirname, join } from 'path'; -const NOIR_CONSTANTS_FILE = '../../../../noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr'; +const NOIR_CONSTANTS_FILE = '../../../../noir-projects/noir-protocol-circuits/crates/types/src/constants.nr'; const TS_CONSTANTS_FILE = '../constants.gen.ts'; const SOLIDITY_CONSTANTS_FILE = '../../../../l1-contracts/src/core/libraries/ConstantsGen.sol'; diff --git a/yarn-project/noir-protocol-circuits-types/.prettierignore b/yarn-project/noir-protocol-circuits-types/.prettierignore index 0ccd05ca06e..595a24e0611 100644 --- a/yarn-project/noir-protocol-circuits-types/.prettierignore +++ b/yarn-project/noir-protocol-circuits-types/.prettierignore @@ -1,2 +1,2 @@ -src/crates +crates src/target diff --git a/yarn-project/noir-protocol-circuits-types/package.json b/yarn-project/noir-protocol-circuits-types/package.json index 8302caa60ae..d1b7b757046 100644 --- a/yarn-project/noir-protocol-circuits-types/package.json +++ b/yarn-project/noir-protocol-circuits-types/package.json @@ -12,7 +12,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "NODE_OPTIONS='--max-old-space-size=8096' run -T eslint --fix ./src && run -T prettier -w ./src", "formatting:fix:types": "NODE_OPTIONS='--max-old-space-size=8096' run -T eslint --fix ./src/types && run -T prettier -w ./src/types", - "noir:types": "cp -r ../../noir-projects/noir-protocol-circuits/src/target ./src/target && node --loader ts-node/esm src/scripts/generate_ts_from_abi.ts && yarn formatting:fix:types", + "noir:types": "cp -r ../../noir-projects/noir-protocol-circuits/target ./src/target && node --loader ts-node/esm src/scripts/generate_ts_from_abi.ts && yarn formatting:fix:types", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "jest": {