Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 12, 2023
1 parent 86e67d8 commit bf6dbfa
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions barretenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
* Multithreaded Sumcheck ([#556](https://github.com/AztecProtocol/barretenberg/issues/556)) ([c4094b1](https://github.com/AztecProtocol/barretenberg/commit/c4094b155ba9d8e914c3e6a5b0d7808945b1eeed))
* **nullifier_tree:** make empty nullifier tree leaves hash be 0 ([#360](https://github.com/AztecProtocol/barretenberg/issues/360)) ([#382](https://github.com/AztecProtocol/barretenberg/issues/382)) ([b85ab8d](https://github.com/AztecProtocol/barretenberg/commit/b85ab8d587b3e93db2aa0f1c4f012e58e5d97915))
* Optimize memory consumption of pedersen generators ([#413](https://github.com/AztecProtocol/barretenberg/issues/413)) ([d60b16a](https://github.com/AztecProtocol/barretenberg/commit/d60b16a14219fd4bd130ce4537c3e94bfa10128f))
* Parallelised folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8))
* Parallelized folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8))
* **pkg-config:** Add a bindir variable ([#239](https://github.com/AztecProtocol/barretenberg/issues/239)) ([611bf34](https://github.com/AztecProtocol/barretenberg/commit/611bf34bcc6f82969a6fe546bf0a7cbecda6d36d))
* Remove TOOLCHAIN logic and replace with CMake presets ([#162](https://github.com/AztecProtocol/barretenberg/issues/162)) ([09db0be](https://github.com/AztecProtocol/barretenberg/commit/09db0be3d09ee12b4b73b03abe8fa4565cdb6660))
* replace `MerkleMembershipConstraint` with`ComputeMerkleRootConstraint` ([#385](https://github.com/AztecProtocol/barretenberg/issues/385)) ([74dbce5](https://github.com/AztecProtocol/barretenberg/commit/74dbce5dfa126ecd6dbda7b758581752f7b6a389))
Expand Down Expand Up @@ -584,7 +584,7 @@
* Make the circuit constructors field agnostic so we can check circuits on grumpkin ([#534](https://github.com/AztecProtocol/barretenberg/issues/534)) ([656d794](https://github.com/AztecProtocol/barretenberg/commit/656d7944f94f3da88250f3140838f3e32e9d0174))
* Multithreaded Sumcheck ([#556](https://github.com/AztecProtocol/barretenberg/issues/556)) ([c4094b1](https://github.com/AztecProtocol/barretenberg/commit/c4094b155ba9d8e914c3e6a5b0d7808945b1eeed))
* Optimize memory consumption of pedersen generators ([#413](https://github.com/AztecProtocol/barretenberg/issues/413)) ([d60b16a](https://github.com/AztecProtocol/barretenberg/commit/d60b16a14219fd4bd130ce4537c3e94bfa10128f))
* Parallelised folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8))
* Parallelized folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8))
* Sort includes ([#571](https://github.com/AztecProtocol/barretenberg/issues/571)) ([dfa8736](https://github.com/AztecProtocol/barretenberg/commit/dfa8736136323e62a705066d25bef962a6a0b82d))
* Split plonk and honk tests ([#529](https://github.com/AztecProtocol/barretenberg/issues/529)) ([ba583ff](https://github.com/AztecProtocol/barretenberg/commit/ba583ff00509f636feae7b78304b115e34fc2357))

Expand Down
4 changes: 2 additions & 2 deletions barretenberg/cpp/cmake/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# Scans for all .test.cpp files in a subdirectory, and creates a gtest binary named <module name>_tests.
# Scans for all .bench.cpp files in a subdirectory, and creates a benchmark binary named <module name>_bench.
#
# We have to get a bit complicated here, due to the fact CMake will not parallelise the building of object files
# We have to get a bit complicated here, due to the fact CMake will not parallelize the building of object files
# between dependent targets, due to the potential of post-build code generation steps etc.
# To work around this, we create "object libraries" containing the object files.
# Then we declare executables/libraries that are to be built from these object files.
# These assets will only be linked as their dependencies complete, but we can parallelise the compilation at least.
# These assets will only be linked as their dependencies complete, but we can parallelize the compilation at least.

# This is an interface library that can be used as an install target to include all header files
# encountered by the `barretenberg_module` function. There is probably a better way to do this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void create_block_constraints(Builder& builder, const BlockConstraint constraint
field_ct value = poly_to_field_ct(op.value, builder);
field_ct index = poly_to_field_ct(op.index, builder);
// For a ROM table, constant read should be optimised out:
// The rom_table won't work with a constant read because the table may not be initialised
// The rom_table won't work with a constant read because the table may not be initialized
ASSERT(op.index.q_l != 0);
// We create a new witness w to avoid issues with non-valid witness assignements:
// if witness are not assigned, then w will be zero and table[w] will work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace test_eccvm_composer {

template <typename Flavor> class ECCVMComposerTests : public ::testing::Test {
protected:
// TODO(640): The Standard Honk on Grumpkin test suite fails unless the SRS is initialised for every test.
// TODO(640): The Standard Honk on Grumpkin test suite fails unless the SRS is initialized for every test.
void SetUp() override
{
if constexpr (std::is_same<Flavor, flavor::ECCVMGrumpkin>::value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class join_split_tests : public ::testing::Test {
uint32_t account_note_index = 0,
bool account_required = false)
{
// The tree, user and notes are initialised in SetUp().
// The tree, user and notes are initialized in SetUp().
preload_value_notes();
preload_account_notes(); // indices: [ACCOUNT_INDEX, ACCOUNT_INDEX + 1]
return create_join_split_tx(input_indices,
Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/cmake/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# Scans for all .test.cpp files in a subdirectory, and creates a gtest binary named <module name>_tests.
# Scans for all .bench.cpp files in a subdirectory, and creates a benchmark binary named <module name>_bench.
#
# We have to get a bit complicated here, due to the fact CMake will not parallelise the building of object files
# We have to get a bit complicated here, due to the fact CMake will not parallelize the building of object files
# between dependent targets, due to the potential of post-build code generation steps etc.
# To work around this, we create "object libraries" containing the object files.
# Then we declare executables/libraries that are to be built from these object files.
# These assets will only be linked as their dependencies complete, but we can parallelise the compilation at least.
# These assets will only be linked as their dependencies complete, but we can parallelize the compilation at least.

function(circuits_cmake_module MODULE_NAME)
file(GLOB_RECURSE SOURCE_FILES *.cpp)
Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/src/aztec3/circuits/apps/.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ TEST_F(state_var_tests, circuit_initialise_utxo_of_default_singleton_private_not
// The person who may initialise the note might be different from the person who's actually given the note to own.
// (E.g. the caller of this function might be the deployer of the contract, who is initialising notes on behalf of
// other users)
CT::address owner_of_initialised_note = 888888;
CT::address owner_of_initialized_note = 888888;

my_utxo.initialise({ .value = 100, .owner = owner_of_initialised_note });
my_utxo.initialise({ .value = 100, .owner = owner_of_initialized_note });

exec_ctx.finalize();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ typename CircuitTypes<Builder>::fr DefaultSingletonPrivateNote<Builder, V>::get_

const fr& owner_private_key = oracle.get_msg_sender_private_key();

// We prevent this storage slot from even being initialised again:
// We prevent this storage slot from even being initialized again:
auto& storage_slot_point = state_var->storage_slot_point;

const std::vector<fr> hash_inputs{
Expand Down Expand Up @@ -233,7 +233,7 @@ typename CircuitTypes<Builder>::fr DefaultSingletonPrivateNote<Builder, V>::get_

const fr& owner_private_key = oracle.get_msg_sender_private_key();

// We prevent this storage slot from even being initialised again:
// We prevent this storage slot from even being initialized again:
auto& storage_slot_point = state_var->storage_slot_point;

const std::vector<fr> hash_inputs{
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ template <typename Builder> class Opcodes {

/**
* @brief Compute and push a new commitment to the public inputs of this exec_ctx, BUT ALSO compute and produce an
* initialization nullifier, to prevent this note from being initialised again in the future.
* initialization nullifier, to prevent this note from being initialized again in the future.
*/
template <typename Note> static void UTXO_INIT(StateVar<Builder>* state_var, Note& note_to_initialise);

Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void common_update_public_end_values(Builder& builder,
/**
* @brief Initialises the circuit output end state from provided inputs
* @param public_kernel_inputs The inputs to this iteration of the kernel circuit
* @param circuit_outputs The circuit outputs to be initialised
* @param circuit_outputs The circuit outputs to be initialized
*/
void common_initialise_end_values(PublicKernelInputs<NT> const& public_kernel_inputs,
KernelCircuitPublicInputs<NT>& circuit_outputs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The way we 'squish' all this data is in a 'binary tree of proofs' topology.

> Example: If there were 16 txs in a rollup, we'd arrange the 16 kernel proofs into 8 pairs and merge each pair into a single proof (using zk-snark recursion techniques), resulting in 8 output proofs. We'd then arrange those 8 proofs into pairs and again merge each pair into a single proof, resulting in 4 output proofs. And so on until we'd be left with a single proof, which represents the correctness of the original 16 txs.
This 'binary tree of proofs' topology allows proof generation to be greatly parallelised across prover instances. Each layer of the tree can be computed in parallel. Or alternatively, subtrees can be coordinated to be computed in parallel.
This 'binary tree of proofs' topology allows proof generation to be greatly parallelized across prover instances. Each layer of the tree can be computed in parallel. Or alternatively, subtrees can be coordinated to be computed in parallel.

> Note: 'binary tree of proofs' is actually an over simlification. The Rollup Circuits are designed so that a Sequencer can actually deviate from a neat, symmetrical tree, for the purposes of efficiency, and instead sometimes create wonky trees.
Expand Down

0 comments on commit bf6dbfa

Please sign in to comment.