From 8ae44dd702987db524ab5e3edd6545881614f56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Thu, 16 Nov 2023 13:00:08 +0300 Subject: [PATCH] chore: typo fixes based on cspell (#3319) --- CHANGELOG.md | 4 +- barretenberg/.vscode/settings.json | 2 +- barretenberg/README.md | 2 +- barretenberg/acir_tests/sol-test/src/index.js | 2 +- barretenberg/cpp/CMakeLists.txt | 2 +- barretenberg/cpp/docs/Fuzzing.md | 2 +- barretenberg/cpp/src/CMakeLists.txt | 6 +- .../commitment_schemes/shplonk/shplonk.hpp | 2 +- .../barretenberg/common/constexpr_utils.hpp | 4 +- .../cpp/src/barretenberg/common/serialize.hpp | 16 ++--- .../barretenberg/common/slab_allocator.hpp | 2 +- .../cpp/src/barretenberg/common/zip_view.hpp | 4 +- .../dsl/acir_format/block_constraint.cpp | 2 +- .../barretenberg/ecc/curves/bn254/fq.test.cpp | 2 +- .../cpp/src/barretenberg/ecc/pippenger.md | 4 +- .../proofs/join_split/join_split.test.cpp | 2 +- .../numeric/bitop/count_leading_zeros.hpp | 2 +- .../barretenberg/numeric/random/engine.cpp | 2 +- .../plonk/composer/ultra_composer.cpp | 4 +- .../plonk/proof_system/verifier/verifier.cpp | 2 +- .../permutation_widget_impl.hpp | 6 +- .../barretenberg/polynomials/serialize.hpp | 2 +- .../eccvm/eccvm_circuit_builder.hpp | 2 +- .../circuit_builder/ultra_circuit_builder.cpp | 12 ++-- .../circuit_builder/ultra_circuit_builder.hpp | 20 +++--- .../proof_system/composer/composer_lib.hpp | 2 +- .../protogalaxy/protogalaxy_prover.cpp | 4 +- .../protogalaxy/protogalaxy_prover.hpp | 2 +- .../relations/ecc_vm/ecc_lookup_relation.hpp | 2 +- .../relations/ecc_vm/ecc_set_relation.cpp | 2 +- .../relations/ecc_vm/ecc_wnaf_relation.cpp | 2 +- .../barretenberg/smt_verification/README.md | 2 +- .../srs/factories/crs_factory.hpp | 2 +- .../cpp/src/barretenberg/srs/global_crs.cpp | 4 +- .../nullifier_tree/nullifier_leaf.hpp | 4 +- .../primitives/byte_array/byte_array.cpp | 2 +- .../stdlib/primitives/field/field.hpp | 4 +- .../stdlib/primitives/group/cycle_group.cpp | 8 +-- .../aggregation_state/aggregation_state.hpp | 2 +- .../sumcheck/instance/prover_instance.cpp | 2 +- .../sumcheck/instance/prover_instance.hpp | 4 +- .../ultra_honk/protogalaxy.test.cpp | 2 +- .../ultra_honk/relation_correctness.test.cpp | 4 +- .../barretenberg/ultra_honk/sumcheck.test.cpp | 2 +- .../barretenberg/ultra_honk/ultra_prover.cpp | 4 +- .../sol/test/base/DifferentialFuzzer.sol | 2 +- .../ts/src/barretenberg_wasm/index.ts | 2 +- bootstrap_docker.sh | 4 +- build-system/README.md | 12 ++-- build-system/scripts/init_submodules | 4 +- circuits/README.md | 8 +-- circuits/cpp/CMakeLists.txt | 4 +- .../scripts/collect_coverage_information.sh | 2 +- .../cpp/src/aztec3/circuits/abis/README.md | 2 +- .../src/aztec3/circuits/abis/c_bind.test.cpp | 4 +- .../cpp/src/aztec3/circuits/apps/.test.cpp | 14 ++-- .../cpp/src/aztec3/circuits/apps/README.md | 2 +- .../circuits/apps/function_declaration.hpp | 2 +- .../apps/function_execution_context.hpp | 2 +- .../aztec3/circuits/apps/opcodes/opcodes.hpp | 2 +- .../aztec3/circuits/apps/opcodes/opcodes.tpp | 8 +-- .../aztec3/circuits/apps/oracle_wrapper.hpp | 4 +- .../apps/state_vars/field_state_var.hpp | 2 +- .../apps/state_vars/utxo_state_var.hpp | 6 +- .../apps/state_vars/utxo_state_var.tpp | 2 +- .../function_1_1.cpp | 6 +- .../function_2_1.cpp | 10 +-- .../aztec3/circuits/kernel/private/common.cpp | 2 +- .../aztec3/circuits/kernel/private/common.hpp | 2 +- .../aztec3/circuits/kernel/private/init.hpp | 2 +- .../native_private_kernel_circuit_init.cpp | 4 +- ...ative_private_kernel_circuit_init.test.cpp | 2 +- .../native_private_kernel_circuit_inner.cpp | 8 +-- ...tive_private_kernel_circuit_inner.test.cpp | 2 +- ...native_private_kernel_circuit_ordering.cpp | 12 ++-- ...e_private_kernel_circuit_ordering.test.cpp | 6 +- .../kernel/private/private_kernel_circuit.cpp | 4 +- .../kernel/private/testing_harness.cpp | 2 +- .../aztec3/circuits/kernel/private/utils.cpp | 6 +- .../aztec3/circuits/kernel/public/common.cpp | 4 +- .../aztec3/circuits/kernel/public/common.hpp | 8 +-- .../aztec3/circuits/kernel/public/init.hpp | 2 +- ...kernel_circuit_private_previous_kernel.cpp | 6 +- ..._kernel_circuit_public_previous_kernel.cpp | 4 +- .../circuits/rollup/test_utils/utils.cpp | 2 +- circuits/cpp/src/aztec3/utils/array.hpp | 2 +- .../cpp/src/aztec3/utils/circuit_errors.hpp | 2 +- cspell.json | 70 ++++++++++++++++++- .../history/differences_to_aztec_connect.md | 2 +- docs/docs/about_aztec/history/history.mdx | 2 +- .../roadmap/engineering_roadmap.md | 4 +- .../advanced/circuits/rollup_circuits/main.md | 3 +- .../concepts/advanced/contract_creation.md | 10 +-- .../advanced/data_structures/trees.md | 2 +- docs/docs/concepts/advanced/public_vm.md | 2 +- .../concepts/advanced/sequencer_selection.md | 4 +- .../docs/concepts/foundation/accounts/main.md | 2 +- .../communication/cross_chain_calls.md | 2 +- .../communication/public_private_calls.md | 2 +- docs/docs/concepts/foundation/contracts.md | 2 +- docs/docs/dev_docs/contracts/portals/inbox.md | 2 +- docs/docs/dev_docs/contracts/portals/main.md | 2 +- docs/docs/dev_docs/contracts/setup.md | 2 +- .../docs/dev_docs/debugging/aztecnr-errors.md | 2 +- docs/docs/dev_docs/debugging/main.md | 2 +- .../docs/dev_docs/debugging/sandbox-errors.md | 6 +- .../aztecnr-getting-started.md | 2 +- docs/docs/dev_docs/limitations/main.md | 10 +-- docs/docs/dev_docs/privacy/main.md | 4 +- .../token_portal/minting_on_aztec.md | 2 +- .../wallets/creating_schnorr_accounts.md | 2 +- .../wallets/writing_an_account_contract.md | 4 +- docs/docs/misc/glossary.md | 2 +- docs/internal_notes/TUTORIAL_TEMPLATE.md | 4 +- .../dev_docs/sandbox/components.md | 4 +- l1-contracts/GUIDE_LINES.md | 4 +- l1-contracts/README.md | 2 +- l1-contracts/src/core/Rollup.sol | 2 +- l1-contracts/src/core/libraries/Decoder.sol | 2 +- l1-contracts/test/portals/TokenPortal.t.sol | 2 +- l1-contracts/test/portals/UniswapPortal.sol | 4 +- l1-contracts/test/portals/UniswapPortal.t.sol | 4 +- yarn-project/acir-simulator/README.md | 4 +- .../src/client/client_execution_context.ts | 2 +- .../archiver/src/archiver/archiver.test.ts | 14 ++-- .../archiver/src/archiver/archiver.ts | 2 +- .../archiver/l1_to_l2_message_store.test.ts | 4 +- .../aztec-node/src/aztec-node/server.ts | 2 +- yarn-project/aztec-sandbox/src/bin/index.ts | 4 +- yarn-project/aztec-sandbox/src/logging.ts | 2 +- .../aztec.js/src/contract/checker.test.ts | 10 +-- yarn-project/aztec.js/src/contract/checker.ts | 6 +- .../blank-react/src/app/components/copy.tsx | 2 +- yarn-project/boxes/run_tests | 4 +- yarn-project/boxes/token/README.md | 4 +- .../boxes/token/src/app/components/copy.tsx | 2 +- .../circuits.js/src/cbind/compiler.ts | 4 +- yarn-project/circuits.js/src/utils/jsUtils.ts | 8 +-- yarn-project/cli/aztec-cli | 6 +- yarn-project/cli/src/encoding.ts | 2 +- yarn-project/cli/src/unbox.ts | 4 +- yarn-project/deploy_npm.sh | 2 +- yarn-project/end-to-end/src/shared/cli.ts | 2 +- .../src/transport/interface/transferable.ts | 2 +- .../docs_example_contract/src/main.nr | 4 +- .../lending_contract/src/interest_math.nr | 2 +- .../pending_commitments_contract/src/main.nr | 2 +- .../src/token_interface.nr | 4 +- .../noir-contracts/src/scripts/copy_source.ts | 2 +- .../invalid-test-syntax-passing.nr | 2 +- yarn-project/types/src/stats/stats.ts | 6 +- .../addresses-and-keys/addresses-and-keys.md | 28 ++++---- yellow-paper/docs/intro.md | 12 ++-- 153 files changed, 376 insertions(+), 311 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d76536ce8..cf3c01c8813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -601,7 +601,7 @@ * Check that portal address is saved ([#2641](https://github.com/AztecProtocol/aztec-packages/issues/2641)) ([9ebef6e](https://github.com/AztecProtocol/aztec-packages/commit/9ebef6e04d8ddd25649a325f5b3692b42699629e)) * Fixes in deploy scripts ([#2659](https://github.com/AztecProtocol/aztec-packages/issues/2659)) ([f44568b](https://github.com/AztecProtocol/aztec-packages/commit/f44568b8557aac15b4accf901b1ff72efaf2a1da)) * Measure circuit simulation times and input/output sizes ([#2663](https://github.com/AztecProtocol/aztec-packages/issues/2663)) ([027f7ec](https://github.com/AztecProtocol/aztec-packages/commit/027f7ec95f9d761189166936a7c42d08dacf55b7)) -* Remove sandbox base image and force_deploy_build. Generalise in check_rebuild. ([#2645](https://github.com/AztecProtocol/aztec-packages/issues/2645)) ([805fe18](https://github.com/AztecProtocol/aztec-packages/commit/805fe18ec1bd207a713cf3438f6d241bf22317fa)) +* Remove sandbox base image and force_deploy_build. Generalize in check_rebuild. ([#2645](https://github.com/AztecProtocol/aztec-packages/issues/2645)) ([805fe18](https://github.com/AztecProtocol/aztec-packages/commit/805fe18ec1bd207a713cf3438f6d241bf22317fa)) ## [0.8.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.8.0...aztec-packages-v0.8.1) (2023-10-03) @@ -982,7 +982,7 @@ * **cli:** Inspect contract command ([#2248](https://github.com/AztecProtocol/aztec-packages/issues/2248)) ([381706e](https://github.com/AztecProtocol/aztec-packages/commit/381706eaaad7054d620855f7b986e2df3cf62a91)), closes [#2180](https://github.com/AztecProtocol/aztec-packages/issues/2180) * Define specific Sandbox version when running docker-compose up ([#2238](https://github.com/AztecProtocol/aztec-packages/issues/2238)) ([71da236](https://github.com/AztecProtocol/aztec-packages/commit/71da2360986e5b57f211ca095b95ade2617f4eb8)) * **docs:** Updated docs explaining Sandbox accounts ([#2235](https://github.com/AztecProtocol/aztec-packages/issues/2235)) ([f560066](https://github.com/AztecProtocol/aztec-packages/commit/f560066394c3fc9725be18f320597794e29dc077)) -* Optimise sandbox startup time by only initialising the BB solver once. ([#2240](https://github.com/AztecProtocol/aztec-packages/issues/2240)) ([e9cac9c](https://github.com/AztecProtocol/aztec-packages/commit/e9cac9ced3604fdef1d6b298091639fc510cb4fb)) +* Optimize sandbox startup time by only initializing the BB solver once. ([#2240](https://github.com/AztecProtocol/aztec-packages/issues/2240)) ([e9cac9c](https://github.com/AztecProtocol/aztec-packages/commit/e9cac9ced3604fdef1d6b298091639fc510cb4fb)) * Remove entrypoint collection ([#2148](https://github.com/AztecProtocol/aztec-packages/issues/2148)) ([e97c94d](https://github.com/AztecProtocol/aztec-packages/commit/e97c94d8bc0659a95f457ba63369fca0dfba47c8)) * Validate nargo version against expected one ([#2254](https://github.com/AztecProtocol/aztec-packages/issues/2254)) ([011c0b7](https://github.com/AztecProtocol/aztec-packages/commit/011c0b7c070f004fcc1c6f9ce8936830c9f496f6)) diff --git a/barretenberg/.vscode/settings.json b/barretenberg/.vscode/settings.json index cc597845c66..2016adfd2c9 100644 --- a/barretenberg/.vscode/settings.json +++ b/barretenberg/.vscode/settings.json @@ -115,7 +115,7 @@ }, "typescript.enablePromptUseWorkspaceTsdk": true, "[cpp]": { - // doesn't conflict with barratenberg.code-workspace settings. + // doesn't conflict with barretenberg.code-workspace settings. "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" }, "[terraform]": { diff --git a/barretenberg/README.md b/barretenberg/README.md index c8a3d1fab03..fd24c4fa039 100644 --- a/barretenberg/README.md +++ b/barretenberg/README.md @@ -207,7 +207,7 @@ Fuzzing build turns off building tests and benchmarks, since they are incompatib To turn on address sanitizer add `-DADDRESS_SANITIZER=ON`. Note that address sanitizer can be used to explore crashes. Sometimes you might have to specify the address of llvm-symbolizer. You have to do it with `export ASAN_SYMBOLIZER_PATH=`. -For undefined behaviour sanitizer `-DUNDEFINED_BEHAVIOUR_SANITIZER=ON`. +For undefined behavior sanitizer `-DUNDEFINED_BEHAVIOUR_SANITIZER=ON`. Note that the fuzzer can be orders of magnitude slower with ASan (2-3x slower) or UBSan on, so it is best to run a non-sanitized build first, minimize the testcase and then run it for a bit of time with sanitizers. ### Test coverage build diff --git a/barretenberg/acir_tests/sol-test/src/index.js b/barretenberg/acir_tests/sol-test/src/index.js index f59ef154505..b63921d2709 100644 --- a/barretenberg/acir_tests/sol-test/src/index.js +++ b/barretenberg/acir_tests/sol-test/src/index.js @@ -59,7 +59,7 @@ var input = { content: base } }, - settings: { // we require the optimiser + settings: { // we require the optimizer optimizer: { enabled: true, runs: 200 diff --git a/barretenberg/cpp/CMakeLists.txt b/barretenberg/cpp/CMakeLists.txt index d07d65aebe4..a96c91fdc21 100644 --- a/barretenberg/cpp/CMakeLists.txt +++ b/barretenberg/cpp/CMakeLists.txt @@ -95,7 +95,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") message(WARNING "GCC <10 is not supported") endif() else() - message(WARNING "Unsuported compiler, use Clang >14 or GCC >10") + message(WARNING "Unsupported compiler, use Clang >14 or GCC >10") endif() if(COVERAGE) diff --git a/barretenberg/cpp/docs/Fuzzing.md b/barretenberg/cpp/docs/Fuzzing.md index 7dc3a6bde9f..bbe85a62a1f 100644 --- a/barretenberg/cpp/docs/Fuzzing.md +++ b/barretenberg/cpp/docs/Fuzzing.md @@ -17,7 +17,7 @@ Fuzzing build turns off building tests and benchmarks, since they are incompatib To turn on address sanitizer add `-DADDRESS_SANITIZER=ON`. Note that address sanitizer can be used to explore crashes. Sometimes you might have to specify the address of llvm-symbolizer. You have to do it with `export ASAN_SYMBOLIZER_PATH=`. -For undefined behaviour sanitizer `-DUNDEFINED_BEHAVIOUR_SANITIZER=ON`. +For undefined behavior sanitizer `-DUNDEFINED_BEHAVIOUR_SANITIZER=ON`. Note that the fuzzer can be orders of magnitude slower with ASan (2-3x slower) or UBSan on, so it is best to run a non-sanitized build first, minimize the testcase and then run it for a bit of time with sanitizers. Building with clang 13 or later is recommended, since libfuzzer contains and by default utilizes the entropic power schedule, which is considered more efficient diff --git a/barretenberg/cpp/src/CMakeLists.txt b/barretenberg/cpp/src/CMakeLists.txt index 2637c16bb4a..9146cb3f2a4 100644 --- a/barretenberg/cpp/src/CMakeLists.txt +++ b/barretenberg/cpp/src/CMakeLists.txt @@ -28,7 +28,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") endif() # We enable -O1 level optimsations, even when compiling debug wasm, otherwise we get "local count too large" at runtime. -# We prioritise reducing size of final artifacts in release with -Oz. +# We prioritize reducing size of final artifacts in release with -Oz. if(WASM) set(CMAKE_CXX_FLAGS_DEBUG "-O1 -g") set(CMAKE_C_FLAGS_DEBUG "-O1 -g") @@ -130,8 +130,8 @@ add_library( ) if(WASM) - # With binaryen installed, it seems its wasm backend optimiser gets invoked automatically. - # Due to either a bug in the optimiser, or non-standards compliant c++ in crypto/aes, tests start failing with + # With binaryen installed, it seems its wasm backend optimizer gets invoked automatically. + # Due to either a bug in the optimizer, or non-standards compliant c++ in crypto/aes, tests start failing with # -O3 level optimizations. We force down to -O2 for current workaround. # TODO: Time has passed, check if this is still needed. # UPDATE: Uninstall binaryen and any need downstream. diff --git a/barretenberg/cpp/src/barretenberg/commitment_schemes/shplonk/shplonk.hpp b/barretenberg/cpp/src/barretenberg/commitment_schemes/shplonk/shplonk.hpp index 54fed18e988..06b258644ac 100644 --- a/barretenberg/cpp/src/barretenberg/commitment_schemes/shplonk/shplonk.hpp +++ b/barretenberg/cpp/src/barretenberg/commitment_schemes/shplonk/shplonk.hpp @@ -205,7 +205,7 @@ template class ShplonkVerifier_ { std::vector inverse_vanishing_evals; inverse_vanishing_evals.reserve(num_claims); for (const auto& claim : claims) { - // Note: no need for batch inversion; emulated inverison is cheap. (just show known inverse is valid) + // Note: no need for batch inversion; emulated inversion is cheap. (just show known inverse is valid) inverse_vanishing_evals.emplace_back((z_challenge - claim.opening_pair.challenge).invert()); } diff --git a/barretenberg/cpp/src/barretenberg/common/constexpr_utils.hpp b/barretenberg/cpp/src/barretenberg/common/constexpr_utils.hpp index d25d8a15b88..ed11246196f 100644 --- a/barretenberg/cpp/src/barretenberg/common/constexpr_utils.hpp +++ b/barretenberg/cpp/src/barretenberg/common/constexpr_utils.hpp @@ -85,11 +85,11 @@ template constexpr void constexp * The compiler has no alias `X.template (args)` for `X.template operator()(args)` so we must * write it explicitly here * - * To summarise what the next line tells the compiler... + * To summarize what the next line tells the compiler... * 1. I want to call a member of `f` that expects one or more template parameters * 2. The member of `f` that I want to call is the function operator * 3. The template parameter is `Start` - * 4. The funtion operator itself contains no arguments + * 4. The function operator itself contains no arguments */ f.template operator()(); diff --git a/barretenberg/cpp/src/barretenberg/common/serialize.hpp b/barretenberg/cpp/src/barretenberg/common/serialize.hpp index fb8360ac8b9..7142b99cb32 100644 --- a/barretenberg/cpp/src/barretenberg/common/serialize.hpp +++ b/barretenberg/cpp/src/barretenberg/common/serialize.hpp @@ -181,21 +181,21 @@ inline void write(auto& buf, std::integral auto value) serialize::write(buf, value); } -// Optimised specialisation for reading arrays of bytes from a raw buffer. +// Optimized specialisation for reading arrays of bytes from a raw buffer. template inline void read(uint8_t const*& it, std::array& value) { std::copy(it, it + N, value.data()); it += N; } -// Optimised specialisation for writing arrays of bytes to a raw buffer. +// Optimized specialisation for writing arrays of bytes to a raw buffer. template inline void write(uint8_t*& buf, std::array const& value) { std::copy(value.begin(), value.end(), buf); buf += N; } -// Optimised specialisation for reading vectors of bytes from a raw buffer. +// Optimized specialisation for reading vectors of bytes from a raw buffer. inline void read(uint8_t const*& it, std::vector& value) { uint32_t size = 0; @@ -205,7 +205,7 @@ inline void read(uint8_t const*& it, std::vector& value) it += size; } -// Optimised specialisation for writing vectors of bytes to a raw buffer. +// Optimized specialisation for writing vectors of bytes to a raw buffer. inline void write(uint8_t*& buf, std::vector const& value) { write(buf, static_cast(value.size())); @@ -213,7 +213,7 @@ inline void write(uint8_t*& buf, std::vector const& value) buf += value.size(); } -// Optimised specialisation for reading vectors of bytes from an input stream. +// Optimized specialisation for reading vectors of bytes from an input stream. inline void read(std::istream& is, std::vector& value) { uint32_t size = 0; @@ -222,14 +222,14 @@ inline void read(std::istream& is, std::vector& value) is.read(reinterpret_cast(value.data()), static_cast(size)); } -// Optimised specialisation for writing vectors of bytes to an output stream. +// Optimized specialisation for writing vectors of bytes to an output stream. inline void write(std::ostream& os, std::vector const& value) { write(os, static_cast(value.size())); os.write(reinterpret_cast(value.data()), static_cast(value.size())); } -// Optimised specialisation for writing arrays of bytes to a vector. +// Optimized specialisation for writing arrays of bytes to a vector. template inline void write(std::vector& buf, std::array const& value) { buf.resize(buf.size() + N); @@ -237,7 +237,7 @@ template inline void write(std::vector& buf, std::array inline void write(std::ostream& os, std::array const& value) { os.write(reinterpret_cast(value.data()), value.size()); diff --git a/barretenberg/cpp/src/barretenberg/common/slab_allocator.hpp b/barretenberg/cpp/src/barretenberg/common/slab_allocator.hpp index 050360d4db5..a5d5a691e7d 100644 --- a/barretenberg/cpp/src/barretenberg/common/slab_allocator.hpp +++ b/barretenberg/cpp/src/barretenberg/common/slab_allocator.hpp @@ -13,7 +13,7 @@ namespace barretenberg { /** * Allocates a bunch of memory slabs sized to serve an UltraPLONK proof construction. - * If you want normal memory allocator behaviour, just don't call this init function. + * If you want normal memory allocator behavior, just don't call this init function. * * WARNING: If client code is still holding onto slabs from previous use, when those slabs * are released they'll end up back in the allocator. That's probably not desired as presumably diff --git a/barretenberg/cpp/src/barretenberg/common/zip_view.hpp b/barretenberg/cpp/src/barretenberg/common/zip_view.hpp index a055d82dada..f4683049c35 100644 --- a/barretenberg/cpp/src/barretenberg/common/zip_view.hpp +++ b/barretenberg/cpp/src/barretenberg/common/zip_view.hpp @@ -42,10 +42,10 @@ * iterates untill the first iterator hits end. * extends ownership to the end of the for loop, or untill zip goes out of scope. * - * possibly risky behaviour on clang, gcc for fun(const zip& z) when called as fun(zip(a,b)) + * possibly risky behavior on clang, gcc for fun(const zip& z) when called as fun(zip(a,b)) * * - * Depends on the following behaviour for for loops: + * Depends on the following behavior for for loops: * * // in for(x:zip) * // equiv: diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp index 49bb94aab50..f655826386b 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp @@ -34,7 +34,7 @@ void create_block_constraints(Builder& builder, const BlockConstraint constraint ASSERT(op.access_type == 0); 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: + // For a ROM table, constant read should be optimized out: // 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: diff --git a/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.test.cpp b/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.test.cpp index 69f2065df0e..779f5c84712 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.test.cpp @@ -5,7 +5,7 @@ using namespace barretenberg; // Used to ensure variables are evaluated at runtime and not compile time. -// If EXPECT_EQ macro params are evaluated at compile-time, compiler can optimise them away. +// If EXPECT_EQ macro params are evaluated at compile-time, compiler can optimize them away. // This triggers compiler errors due to the gtest suite expecting at least one test statement in a TEST macro void shallow_copy(const fq& in, fq& out) { diff --git a/barretenberg/cpp/src/barretenberg/ecc/pippenger.md b/barretenberg/cpp/src/barretenberg/ecc/pippenger.md index fcf4adf4a27..18f8b85941f 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/pippenger.md +++ b/barretenberg/cpp/src/barretenberg/ecc/pippenger.md @@ -1,4 +1,4 @@ -# Implement cahe-optimised, parallelisable pippenger implementation +# Implement cache-optimized, parallelizable pippenger implementation ## The problem @@ -6,7 +6,7 @@ Pippenger's algorithm for batched scalar multiplications is the fastest known al We currently have pippenger implemented in barretenberg, which can process a scalar multiplication in ~4 micro-seconds (for large batches). -However, the algorithm, as it stands, is not parallelisable, due to the highly non-sequential memory access patterns. +However, the algorithm, as it stands, is not parallelizable, due to the highly non-sequential memory access patterns. ## The algorithm diff --git a/barretenberg/cpp/src/barretenberg/join_split_example/proofs/join_split/join_split.test.cpp b/barretenberg/cpp/src/barretenberg/join_split_example/proofs/join_split/join_split.test.cpp index ba978aeaf77..48a169b17bd 100644 --- a/barretenberg/cpp/src/barretenberg/join_split_example/proofs/join_split/join_split.test.cpp +++ b/barretenberg/cpp/src/barretenberg/join_split_example/proofs/join_split/join_split.test.cpp @@ -65,7 +65,7 @@ class join_split_tests : public ::testing::Test { .creator_pubkey = 0, .input_nullifier = fr::random_element() }; - // Initialise value_notes array as default: + // Initialize value_notes array as default: for (auto& value_note : value_notes) { value_note = default_value_note; value_note.input_nullifier = fr::random_element(); // to ensure uniqueness diff --git a/barretenberg/cpp/src/barretenberg/numeric/bitop/count_leading_zeros.hpp b/barretenberg/cpp/src/barretenberg/numeric/bitop/count_leading_zeros.hpp index 72aa82a60a9..c41877610c1 100644 --- a/barretenberg/cpp/src/barretenberg/numeric/bitop/count_leading_zeros.hpp +++ b/barretenberg/cpp/src/barretenberg/numeric/bitop/count_leading_zeros.hpp @@ -8,7 +8,7 @@ namespace numeric { /** * Returns the number of leading 0 bits for a given integer type. * Implemented in terms of intrinsics which will use instructions such as `bsr` or `lzcnt` for best performance. - * Undefined behaviour when input is 0. + * Undefined behavior when input is 0. */ template constexpr inline size_t count_leading_zeros(T const& u); diff --git a/barretenberg/cpp/src/barretenberg/numeric/random/engine.cpp b/barretenberg/cpp/src/barretenberg/numeric/random/engine.cpp index 200e73530be..ff31c6136d8 100644 --- a/barretenberg/cpp/src/barretenberg/numeric/random/engine.cpp +++ b/barretenberg/cpp/src/barretenberg/numeric/random/engine.cpp @@ -114,7 +114,7 @@ class DebugEngine : public Engine { }; /** - * Used by tests to ensure consistent behaviour. + * Used by tests to ensure consistent behavior. */ Engine& get_debug_engine(bool reset) { diff --git a/barretenberg/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp b/barretenberg/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp index 2bd77756555..e34787f26d3 100644 --- a/barretenberg/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp +++ b/barretenberg/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp @@ -120,7 +120,7 @@ void UltraComposer::compute_witness(CircuitBuilder& circuit_constructor) } } - // Initialise the `s_randomness` positions in the s polynomials with 0. + // Initialize the `s_randomness` positions in the s polynomials with 0. // These will be the positions where we will be adding random scalars to add zero knowledge // to plookup (search for `Blinding` in plonk/proof_system/widgets/random_widgets/plookup_widget_impl.hpp // ProverPlookupWidget::compute_sorted_list_polynomial()) @@ -414,7 +414,7 @@ std::shared_ptr UltraComposer::compute_proving_key(CircuitBuilder& } } - // Initialise the last `s_randomness` positions in table polynomials with 0. We don't need to actually randomise + // Initialize the last `s_randomness` positions in table polynomials with 0. We don't need to actually randomize // the table polynomials. for (size_t i = 0; i < s_randomness; ++i) { poly_q_table_column_1[offset] = 0; diff --git a/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.cpp b/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.cpp index fe951fbaf13..0e909d8eba4 100644 --- a/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.cpp @@ -49,7 +49,7 @@ template bool VerifierBase::verify key->program_width = program_settings::program_width; - // Add the proof data to the transcript, according to the manifest. Also initialise the transcript's hash type and + // Add the proof data to the transcript, according to the manifest. Also initialize the transcript's hash type and // challenge bytes. transcript::StandardTranscript transcript = transcript::StandardTranscript( proof.proof_data, manifest, program_settings::hash_type, program_settings::num_challenge_bytes); diff --git a/barretenberg/cpp/src/barretenberg/plonk/proof_system/widgets/random_widgets/permutation_widget_impl.hpp b/barretenberg/cpp/src/barretenberg/plonk/proof_system/widgets/random_widgets/permutation_widget_impl.hpp index 0209756a25f..2b186df01f5 100644 --- a/barretenberg/cpp/src/barretenberg/plonk/proof_system/widgets/random_widgets/permutation_widget_impl.hpp +++ b/barretenberg/cpp/src/barretenberg/plonk/proof_system/widgets/random_widgets/permutation_widget_impl.hpp @@ -346,7 +346,7 @@ barretenberg::fr ProverPermutationWidgetquotient_polynomial_parts[0][key->circuit_size] = 0; key->quotient_polynomial_parts[1][key->circuit_size] = 0; @@ -486,10 +486,10 @@ barretenberg::fr ProverPermutationWidget add linearly independent term (z(X.ω) - 1).(α^3).L{n-1}(X) into the quotient polynomial to check // this diff --git a/barretenberg/cpp/src/barretenberg/polynomials/serialize.hpp b/barretenberg/cpp/src/barretenberg/polynomials/serialize.hpp index b1c6241b573..ac6d400fc58 100644 --- a/barretenberg/cpp/src/barretenberg/polynomials/serialize.hpp +++ b/barretenberg/cpp/src/barretenberg/polynomials/serialize.hpp @@ -3,7 +3,7 @@ namespace barretenberg { -// Highly optimised read / write of polynomials in little endian montgomery form. +// Highly optimized read / write of polynomials in little endian montgomery form. template inline void read(B& buf, polynomial& p) { uint32_t size; diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp index 07175f9df70..98d9996dba1 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp @@ -568,7 +568,7 @@ template class ECCVMCircuitBuilder { [[nodiscard]] size_t get_num_gates() const { - // TODO(@zac-williamson) once we have a stable base to work off of, optimise this method! + // TODO(@zac-williamson) once we have a stable base to work off of, optimize this method! // (issue #2218) const auto msms = get_msms(); const auto flattened_muls = get_flattened_scalar_muls(msms); diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.cpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.cpp index da96bd1cf86..e51cacc67d4 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.cpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.cpp @@ -38,15 +38,15 @@ template void UltraCircuitBuilder_:: * circuit size would not be correct (resulting in the code crashing while performing FFT * operations). * - * Therefore, we introduce a boolean flag `circuit_finalised` here. Once we add the rom and range gates, - * our circuit is finalised, and we must not to execute these functions again. + * Therefore, we introduce a boolean flag `circuit_finalized` here. Once we add the rom and range gates, + * our circuit is finalized, and we must not to execute these functions again. */ - if (!circuit_finalised) { + if (!circuit_finalized) { process_non_native_field_multiplications(); process_ROM_arrays(); process_RAM_arrays(); process_range_lists(); - circuit_finalised = true; + circuit_finalized = true; } } @@ -912,7 +912,7 @@ template void UltraCircuitBuilder_:: * data structures: vector of lists, each list contains: * - the range size * - the list of variables in the range - * - a generalised permutation tag + * - a generalized permutation tag * * create range constraint parameters: variable index && range size * @@ -2139,7 +2139,7 @@ void UltraCircuitBuilder_::create_final_sorted_RAM_gate(RamReco } /** - * @brief Create a new updateable memory region + * @brief Create a new updatable memory region * * @details Creates a transcript object, where the inside memory state array is filled with "uninitialized memory" and diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp index ae3b25ab436..25c35737a12 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp @@ -280,7 +280,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBasememory_read_records; stored_state.memory_write_records = builder->memory_write_records; stored_state.range_lists = builder->range_lists; - stored_state.circuit_finalised = builder->circuit_finalised; + stored_state.circuit_finalized = builder->circuit_finalized; stored_state.num_gates = builder->num_gates; stored_state.cached_partial_non_native_field_multiplications = builder->cached_partial_non_native_field_multiplications; @@ -399,7 +399,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBasememory_read_records = memory_read_records; builder->memory_write_records = memory_write_records; builder->range_lists = range_lists; - builder->circuit_finalised = circuit_finalised; + builder->circuit_finalized = circuit_finalized; builder->num_gates = num_gates; builder->cached_partial_non_native_field_multiplications = cached_partial_non_native_field_multiplications; builder->w_l.resize(num_gates); @@ -521,7 +521,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBase cached_partial_non_native_field_multiplications; - bool circuit_finalised = false; + bool circuit_finalized = false; void process_non_native_field_multiplications(); UltraCircuitBuilder_(const size_t size_hint = 0) @@ -614,7 +614,7 @@ class UltraCircuitBuilder_ : public CircuitBuilderBasenum_gates; } size_t count = 0; diff --git a/barretenberg/cpp/src/barretenberg/proof_system/composer/composer_lib.hpp b/barretenberg/cpp/src/barretenberg/proof_system/composer/composer_lib.hpp index 8d3366f2256..93884466ba0 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/composer/composer_lib.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/composer/composer_lib.hpp @@ -7,7 +7,7 @@ namespace proof_system { /** - * @brief Construct selector polynomials from ciruit selector information and put into polynomial cache + * @brief Construct selector polynomials from circuit selector information and put into polynomial cache * * @tparam Flavor * @param circuit_constructor The object holding the circuit diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover.cpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover.cpp index 74b7ae2245b..61a64fe7906 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover.cpp @@ -7,7 +7,7 @@ template void ProtoGalaxyProver_::prepa auto idx = 0; for (auto it = instances.begin(); it != instances.end(); it++, idx++) { auto instance = *it; - instance->initialise_prover_polynomials(); + instance->initialize_prover_polynomials(); auto domain_separator = std::to_string(idx); const auto circuit_size = static_cast(instance->proving_key->circuit_size); @@ -70,7 +70,7 @@ ProverFoldingResult ProtoGalaxyProver_ class ProtoGalaxyProver_ { /** * @brief Compute the combiner quotient defined as $K$ polynomial in the paper. * - * TODO(https://github.com/AztecProtocol/barretenberg/issues/764): generalise the computation of vanishing + * TODO(https://github.com/AztecProtocol/barretenberg/issues/764): generalize the computation of vanishing * polynomials and Lagrange basis and use batch_invert. * */ diff --git a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_lookup_relation.hpp b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_lookup_relation.hpp index 68f15aa2bd4..fc04d785187 100644 --- a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_lookup_relation.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_lookup_relation.hpp @@ -137,7 +137,7 @@ template class ECCVMLookupRelationImpl { const auto positive_slice_value = -(precompute_round) + 15; const auto positive_term = precompute_pc + gamma + positive_slice_value * beta + tx * beta_sqr + ty * beta_cube; - // todo optimise this? + // todo optimize this? if constexpr (write_index == 0) { return positive_term; // degree 1 } diff --git a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_set_relation.cpp b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_set_relation.cpp index f9c9cd96cdd..48ca898a16a 100644 --- a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_set_relation.cpp +++ b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_set_relation.cpp @@ -232,7 +232,7 @@ Accumulator ECCVMSetRelationImpl::compute_permutation_denominator(const AllE using View = typename Accumulator::View; // TODO(@zac-williamson). The degree of this contribution is 17! makes overall relation degree 19. - // Can optimise by refining the algebra, once we have a stable base to iterate off of. + // Can optimize by refining the algebra, once we have a stable base to iterate off of. const auto& gamma = params.gamma; const auto& beta = params.beta; const auto& beta_sqr = params.beta_sqr; diff --git a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_wnaf_relation.cpp b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_wnaf_relation.cpp index 56f84de6a87..8a8e616533d 100644 --- a/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_wnaf_relation.cpp +++ b/barretenberg/cpp/src/barretenberg/relations/ecc_vm/ecc_wnaf_relation.cpp @@ -152,7 +152,7 @@ void ECCVMWnafRelationImpl::accumulate(ContainerOverSubrelations& accumulato * If q_transition = 1, round value at current row = 7 * If q_transition = 1, round value at next row = 0 * Question: is this sufficient? We don't actually range constrain `round` (expensive if we don't need to!). - * Let us analyse... + * Let us analyze... * 1. When `q_transition = 1`, we use a set membership check to map the tuple of (pc, scalar_sum) into a set. * We compare this set with an equivalent set generated from the transcript columns. The sets must match. * 2. Only case where, at row `i`, a Prover can set `round` to value > 7 is if `q_transition = 0` for all j > i. diff --git a/barretenberg/cpp/src/barretenberg/smt_verification/README.md b/barretenberg/cpp/src/barretenberg/smt_verification/README.md index 740b01b1479..fdb6d1c2072 100644 --- a/barretenberg/cpp/src/barretenberg/smt_verification/README.md +++ b/barretenberg/cpp/src/barretenberg/smt_verification/README.md @@ -3,7 +3,7 @@ As for now it's required to build cvc5 library manually. + ### Dependencies diff --git a/docs/internal_notes/dev_docs/sandbox/components.md b/docs/internal_notes/dev_docs/sandbox/components.md index 313eff2e1d0..509e851da71 100644 --- a/docs/internal_notes/dev_docs/sandbox/components.md +++ b/docs/internal_notes/dev_docs/sandbox/components.md @@ -239,7 +239,7 @@ Implements: Implementation notes for this milestone: -Closest analogous component in AC is the `WorldStateDb` in bb.js. We can configure the backing store (probably leveldb) to be an in-memory only store. We don't need persistence, we will rebuild the tree at startup. This will ensure we have appropriate sync-from-zero behaviour. +Closest analogous component in AC is the `WorldStateDb` in bb.js. We can configure the backing store (probably leveldb) to be an in-memory only store. We don't need persistence, we will rebuild the tree at startup. This will ensure we have appropriate sync-from-zero behavior. Responsibilities: @@ -279,7 +279,7 @@ Implements: Responsibilities: - Pulls data in from whatever sources are needed, to fully describe a rollup e.g. - - L1 calldata (`provessRollup` and `offchainData` for this milestone.) + - L1 calldata (`provesRollup` and `offchainData` for this milestone.) - ETH blobs (not before they are released). - Other sources that have archived historical ETH blobs (not before they are released). - Combines these sources of data to describe a `Rollup`. diff --git a/l1-contracts/GUIDE_LINES.md b/l1-contracts/GUIDE_LINES.md index 650c09befbf..e62096e2bab 100644 --- a/l1-contracts/GUIDE_LINES.md +++ b/l1-contracts/GUIDE_LINES.md @@ -39,7 +39,7 @@ The spec should outline the dependencies of the contract (other protocols and to ## 2. Writing a reference implementation A reference implementation is a practical instantiation of the spec that should strive to maximize readability. -It should make it very clear what the purpose is, and how it acheives its goal, meaning that no heavy optimizations should be made. The reference is simply to be used as a good way to understand the code, and to build tests for. To make assessing the coverage of the code easier, ternary operators should be avoid, e.g., instead of `a > b ? a : b` please use explicit `if-else` branching. +It should make it very clear what the purpose is, and how it achieves its goal, meaning that no heavy optimizations should be made. The reference is simply to be used as a good way to understand the code, and to build tests for. To make assessing the coverage of the code easier, ternary operators should be avoid, e.g., instead of `a > b ? a : b` please use explicit `if-else` branching. Having a reference implementation, that can later be optimized, should also make it easier for auditors and external parties to give a first look at the protocol, e.g., if there is a flaw in the business logic, it should be possible to catch at this point. ## 3. Writing tests @@ -80,7 +80,7 @@ Before writing the optimized implementation, the tests should be extended to the - Unchecked math for increment in values where it is known that it will never overflow. ### 7.2 Gas-comparison for reference / optimized -For each of the changes that are made, please add an estimate on the gas savings. If gas is saved and it don't significantly increase the code-size or heavily denegate the readability +For each of the changes that are made, please add an estimate on the gas savings. If gas is saved and it doesn't significantly increase the code-size or heavily degrades the readability ## Reviews There is a couple of different angles when reviewing smart contracts: diff --git a/l1-contracts/README.md b/l1-contracts/README.md index a664f9506e2..cacd6087454 100644 --- a/l1-contracts/README.md +++ b/l1-contracts/README.md @@ -33,7 +33,7 @@ We use `forge fmt` to format. But follow a few general guidelines beyond the sta ## Contracts: -The contracts are in a very early stage, and don't worry about gas costs right now. Instead they prioritise development velocity. +The contracts are in a very early stage, and don't worry about gas costs right now. Instead they prioritize development velocity. ### Decoder diff --git a/l1-contracts/src/core/Rollup.sol b/l1-contracts/src/core/Rollup.sol index ca03d1cf753..341fd34b3da 100644 --- a/l1-contracts/src/core/Rollup.sol +++ b/l1-contracts/src/core/Rollup.sol @@ -28,7 +28,7 @@ contract Rollup is IRollup { bytes32 public rollupStateHash; uint256 public lastBlockTs; - // Tracks the last time time was warped on L2 ("warp" is the testing cheatocde). + // Tracks the last time time was warped on L2 ("warp" is the testing cheatcode). // See https://github.com/AztecProtocol/aztec-packages/issues/1614 uint256 public lastWarpedBlockTs; diff --git a/l1-contracts/src/core/libraries/Decoder.sol b/l1-contracts/src/core/libraries/Decoder.sol index 37aa828a3a9..ccc7d0cf677 100644 --- a/l1-contracts/src/core/libraries/Decoder.sol +++ b/l1-contracts/src/core/libraries/Decoder.sol @@ -99,7 +99,7 @@ library Decoder { // The size of the block header elements uint256 private constant TREES_BLOCK_HEADER_SIZE = 0xd4; - // Where the end of trees metadata begns in the block + // Where the end of trees metadata begins in the block uint256 private constant END_TREES_BLOCK_HEADER_OFFSET = START_TREES_BLOCK_HEADER_OFFSET + TREES_BLOCK_HEADER_SIZE; diff --git a/l1-contracts/test/portals/TokenPortal.t.sol b/l1-contracts/test/portals/TokenPortal.t.sol index aeb110fb830..ae02336b3df 100644 --- a/l1-contracts/test/portals/TokenPortal.t.sol +++ b/l1-contracts/test/portals/TokenPortal.t.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.18; import "forge-std/Test.sol"; -// Rollup Proccessor +// Rollup Processor import {Rollup} from "../../src/core/Rollup.sol"; import {Inbox} from "../../src/core/messagebridge/Inbox.sol"; import {Registry} from "../../src/core/messagebridge/Registry.sol"; diff --git a/l1-contracts/test/portals/UniswapPortal.sol b/l1-contracts/test/portals/UniswapPortal.sol index 75e32f22c43..8fce7fbed67 100644 --- a/l1-contracts/test/portals/UniswapPortal.sol +++ b/l1-contracts/test/portals/UniswapPortal.sol @@ -50,7 +50,7 @@ contract UniswapPortal { * @param _amountOutMinimum - The minimum amount of output assets to receive from the swap (slippage protection) * @param _aztecRecipient - The aztec address to receive the output assets * @param _secretHashForL1ToL2Message - The hash of the secret consumable message. The hash should be 254 bits (so it can fit in a Field element) - * @param _deadlineForL1ToL2Message - deadline for when the L1 to L2 message (to mint outpiut assets in L2) must be consumed by + * @param _deadlineForL1ToL2Message - deadline for when the L1 to L2 message (to mint output assets in L2) must be consumed by * @param _canceller - The ethereum address that can cancel the deposit * @param _withCaller - When true, using `msg.sender` as the caller, otherwise address(0) * @return The entryKey of the deposit transaction in the Inbox @@ -144,7 +144,7 @@ contract UniswapPortal { * @param _amountOutMinimum - The minimum amount of output assets to receive from the swap (slippage protection) * @param _secretHashForRedeemingMintedNotes - The hash of the secret to redeem minted notes privately on Aztec. The hash should be 254 bits (so it can fit in a Field element) * @param _secretHashForL1ToL2Message - The hash of the secret consumable message. The hash should be 254 bits (so it can fit in a Field element) - * @param _deadlineForL1ToL2Message - deadline for when the L1 to L2 message (to mint outpiut assets in L2) must be consumed by + * @param _deadlineForL1ToL2Message - deadline for when the L1 to L2 message (to mint output assets in L2) must be consumed by * @param _canceller - The ethereum address that can cancel the deposit * @param _withCaller - When true, using `msg.sender` as the caller, otherwise address(0) * @return The entryKey of the deposit transaction in the Inbox diff --git a/l1-contracts/test/portals/UniswapPortal.t.sol b/l1-contracts/test/portals/UniswapPortal.t.sol index 0e769074408..3605e213d03 100644 --- a/l1-contracts/test/portals/UniswapPortal.t.sol +++ b/l1-contracts/test/portals/UniswapPortal.t.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.18; import "forge-std/Test.sol"; -// Rollup Proccessor +// Rollup Processor import {Rollup} from "../../src/core/Rollup.sol"; import {Inbox} from "../../src/core/messagebridge/Inbox.sol"; import {Registry} from "../../src/core/messagebridge/Registry.sol"; @@ -269,7 +269,7 @@ contract UniswapPortalTest is Test { assertFalse(outbox.contains(swapMsgKey)); } - function testSwapCalledbyAnyoneIfDesignatedCallerNotSet(address _caller) public { + function testSwapCalledByAnyoneIfDesignatedCallerNotSet(address _caller) public { vm.assume(_caller != address(uniswapPortal)); bytes32 daiWithdrawMsgKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); diff --git a/yarn-project/acir-simulator/README.md b/yarn-project/acir-simulator/README.md index 0885fabd147..bc61142d327 100644 --- a/yarn-project/acir-simulator/README.md +++ b/yarn-project/acir-simulator/README.md @@ -10,7 +10,7 @@ It's able to simulate three different types of functions: ### Private Functions -Private functions are simulated and proved clientside, and verified clientside in the private kernel circuit. +Private functions are simulated and proved client-side, and verified client-side in the private kernel circuit. The public inputs of private functions is defined [here](../circuits.js/src/structs/private_circuit_public_inputs.ts). @@ -30,7 +30,7 @@ Public functions can call other public function, but no private functions. ### Unconstrained (view) Functions -Unconstrained functions are used to extract useful data for users, such as the user balance. They are not proved, and are simulated clientside. +Unconstrained functions are used to extract useful data for users, such as the user balance. They are not proved, and are simulated client-side. They are run with the assistance of a DB oracle that provides any private data requested by the function. diff --git a/yarn-project/acir-simulator/src/client/client_execution_context.ts b/yarn-project/acir-simulator/src/client/client_execution_context.ts index 579771f109d..5ccbbcc2b99 100644 --- a/yarn-project/acir-simulator/src/client/client_execution_context.ts +++ b/yarn-project/acir-simulator/src/client/client_execution_context.ts @@ -38,7 +38,7 @@ import { ViewDataOracle } from './view_data_oracle.js'; export class ClientExecutionContext extends ViewDataOracle { /** * New notes created during this execution. - * It's possible that a note in this list has been nullified (in the same or other executions) and doen't exist in the ExecutionNoteCache and the final proof data. + * It's possible that a note in this list has been nullified (in the same or other executions) and doesn't exist in the ExecutionNoteCache and the final proof data. * But we still include those notes in the execution result because their commitments are still in the public inputs of this execution. * This information is only for references (currently used for tests), and is not used for any sort of constrains. * Users can also use this to get a clearer idea of what's happened during a simulation. diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index f05129af94f..1d563d098ce 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -18,7 +18,7 @@ describe('Archiver', () => { const inboxAddress = EthAddress.ZERO.toString(); const registryAddress = EthAddress.ZERO.toString(); const contractDeploymentEmitterAddress = '0x0000000000000000000000000000000000000001'; - const blockNums = [1, 2, 3]; + const blockNumbers = [1, 2, 3]; let publicClient: MockProxy>; let archiverStore: ArchiverDataStore; @@ -42,7 +42,7 @@ describe('Archiver', () => { let latestBlockNum = await archiver.getBlockNumber(); expect(latestBlockNum).toEqual(0); - const blocks = blockNums.map(x => L2Block.random(x, 4, x, x + 1, x * 2, x * 3)); + const blocks = blockNumbers.map(x => L2Block.random(x, 4, x, x + 1, x * 2, x * 3)); const rollupTxs = blocks.map(makeRollupTx); // `L2Block.random(x)` creates some l1 to l2 messages. We add those, // since it is expected by the test that these would be consumed. @@ -110,18 +110,18 @@ describe('Archiver', () => { // Expect logs to correspond to what is set by L2Block.random(...) const encryptedLogs = await archiver.getLogs(1, 100, LogType.ENCRYPTED); - expect(encryptedLogs.length).toEqual(blockNums.length); + expect(encryptedLogs.length).toEqual(blockNumbers.length); - for (const [index, x] of blockNums.entries()) { + for (const [index, x] of blockNumbers.entries()) { const expectedTotalNumEncryptedLogs = 4 * x * (x * 2); const totalNumEncryptedLogs = L2BlockL2Logs.unrollLogs([encryptedLogs[index]]).length; expect(totalNumEncryptedLogs).toEqual(expectedTotalNumEncryptedLogs); } const unencryptedLogs = await archiver.getLogs(1, 100, LogType.UNENCRYPTED); - expect(unencryptedLogs.length).toEqual(blockNums.length); + expect(unencryptedLogs.length).toEqual(blockNumbers.length); - blockNums.forEach((x, index) => { + blockNumbers.forEach((x, index) => { const expectedTotalNumUnencryptedLogs = 4 * (x + 1) * (x * 3); const totalNumUnencryptedLogs = L2BlockL2Logs.unrollLogs([unencryptedLogs[index]]).length; expect(totalNumUnencryptedLogs).toEqual(expectedTotalNumUnencryptedLogs); @@ -150,7 +150,7 @@ describe('Archiver', () => { return [Fr.random().toString(true), Fr.random().toString(true)]; }; - const blocks = blockNums.map(x => L2Block.random(x, 4, x, x + 1, x * 2, x * 3)); + const blocks = blockNumbers.map(x => L2Block.random(x, 4, x, x + 1, x * 2, x * 3)); const rollupTxs = blocks.map(makeRollupTx); // `L2Block.random(x)` creates some l1 to l2 messages. We add those, // since it is expected by the test that these would be consumed. diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 1c4b8be8816..845b2b0a5c8 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -206,7 +206,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource currentL1BlockNumber, ); - // TODO (#717): optimise this - there could be messages in confirmed that are also in pending. + // TODO (#717): optimize this - there could be messages in confirmed that are also in pending. // Or messages in pending that are also cancelled in the same block. No need to modify storage for them. // Store l1 to l2 messages this.log('Adding pending l1 to l2 messages to store'); diff --git a/yarn-project/archiver/src/archiver/l1_to_l2_message_store.test.ts b/yarn-project/archiver/src/archiver/l1_to_l2_message_store.test.ts index 095bc0eb639..0901d7a479f 100644 --- a/yarn-project/archiver/src/archiver/l1_to_l2_message_store.test.ts +++ b/yarn-project/archiver/src/archiver/l1_to_l2_message_store.test.ts @@ -91,8 +91,8 @@ describe('pending_l1_to_l2_message_store', () => { ); store.addMessage(entryKey, msg); }); - const expectedMessgeFees = [4n, 3n, 3n, 3n]; // the top 4. + const expectedMessageFees = [4n, 3n, 3n, 3n]; // the top 4. const receivedMessageFees = store.getMessageKeys(4).map(key => key.value); - expect(receivedMessageFees).toEqual(expectedMessgeFees); + expect(receivedMessageFees).toEqual(expectedMessageFees); }); }); diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index bbf42324341..cd0908cdc9f 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -104,7 +104,7 @@ export class AztecNodeService implements AztecNode { // create the tx pool and the p2p client, which will need the l2 block source const p2pClient = await createP2PClient(config, new InMemoryTxPool(), archiver); - // now create the merkle trees and the world state syncher + // now create the merkle trees and the world state synchronizer const db = await openDb(config); const merkleTrees = await MerkleTrees.new(db); const worldStateConfig: WorldStateConfig = getWorldStateConfig(); diff --git a/yarn-project/aztec-sandbox/src/bin/index.ts b/yarn-project/aztec-sandbox/src/bin/index.ts index 340a1286cfe..7ee0228b2fa 100644 --- a/yarn-project/aztec-sandbox/src/bin/index.ts +++ b/yarn-project/aztec-sandbox/src/bin/index.ts @@ -21,7 +21,7 @@ const logger = createDebugLogger('aztec:sandbox'); /** * Creates the sandbox from provided config and deploys any initial L1 and L2 contracts */ -async function createAndInitialiseSandbox() { +async function createAndInitializeSandbox() { const { aztecNodeConfig, node, pxe, stop } = await createSandbox(); if (aztecNodeConfig.p2pEnabled) { logger.info(`Not setting up test accounts as we are connecting to a network`); @@ -54,7 +54,7 @@ async function main() { logger.info(`Setting up Aztec Sandbox v${version} (noir v${NoirWasmVersion}), please stand by...`); - const { pxe, node, stop, accounts } = await createAndInitialiseSandbox(); + const { pxe, node, stop, accounts } = await createAndInitializeSandbox(); const shutdown = async () => { logger.info('Shutting down...'); diff --git a/yarn-project/aztec-sandbox/src/logging.ts b/yarn-project/aztec-sandbox/src/logging.ts index 5a592496a49..a9de4c40415 100644 --- a/yarn-project/aztec-sandbox/src/logging.ts +++ b/yarn-project/aztec-sandbox/src/logging.ts @@ -9,7 +9,7 @@ const { format } = winston; const CURRENT_LOG_FILE_NAME = 'aztec-sandbox.debug.log'; const LOG_DIR = 'log'; -/** Creates a winston logger that logs everyting to a local rotating file */ +/** Creates a winston logger that logs everything to a local rotating file */ function createWinstonLogger() { // See https://www.npmjs.com/package/winston-daily-rotate-file#user-content-options const transport: DailyRotateFile = new DailyRotateFile({ diff --git a/yarn-project/aztec.js/src/contract/checker.test.ts b/yarn-project/aztec.js/src/contract/checker.test.ts index 7214f924f86..9b4183cbba6 100644 --- a/yarn-project/aztec.js/src/contract/checker.test.ts +++ b/yarn-project/aztec.js/src/contract/checker.test.ts @@ -23,7 +23,7 @@ describe('abiChecker', () => { expect(() => abiChecker(abi)).toThrowError('ABI function has no name'); }); - it('should error if ABI function has unrecognised type', () => { + it('should error if ABI function has unrecognized type', () => { abi = { name: 'TEST_ABI', functions: [ @@ -34,7 +34,7 @@ describe('abiChecker', () => { }, ], }; - expect(() => abiChecker(abi)).toThrowError('ABI function parameter has an unrecognised type'); + expect(() => abiChecker(abi)).toThrowError('ABI function parameter has an unrecognized type'); }); it('should error if integer is incorrectly formed', () => { @@ -48,7 +48,7 @@ describe('abiChecker', () => { }, ], }; - expect(() => abiChecker(abi)).toThrowError('Unrecognised attribute on type integer'); + expect(() => abiChecker(abi)).toThrowError('Unrecognized attribute on type integer'); }); it('should error if string is incorrectly formed', () => { @@ -62,7 +62,7 @@ describe('abiChecker', () => { }, ], }; - expect(() => abiChecker(abi)).toThrowError('Unrecognised attribute on type string'); + expect(() => abiChecker(abi)).toThrowError('Unrecognized attribute on type string'); }); it('should error if struct is incorrectly formed', () => { @@ -82,7 +82,7 @@ describe('abiChecker', () => { }, ], }; - expect(() => abiChecker(abi)).toThrowError('Unrecognised attribute on type struct'); + expect(() => abiChecker(abi)).toThrowError('Unrecognized attribute on type struct'); }); it('should error if array is incorrectly formed', () => { diff --git a/yarn-project/aztec.js/src/contract/checker.ts b/yarn-project/aztec.js/src/contract/checker.ts index 616b4840ae7..77bab7b39aa 100644 --- a/yarn-project/aztec.js/src/contract/checker.ts +++ b/yarn-project/aztec.js/src/contract/checker.ts @@ -68,7 +68,7 @@ function abiParameterTypeChecker(type: ABIType): boolean { case 'struct': return checkAttributes(type, { fields: 'object', path: 'string' }) && checkStruct(type); default: - throw new Error('ABI function parameter has an unrecognised type'); + throw new Error('ABI function parameter has an unrecognized type'); } } @@ -93,7 +93,7 @@ function checkStruct(type: StructType) { * Check if a provided ABI type has the correct attributes and their associated types. * This function compares the given 'type' object's keys with the expected attribute types * specified in 'incompleteAttributes', as well as the required 'kind' property. - * Throws an error if there are any unrecognised attributes or incorrect attribute types. + * Throws an error if there are any unrecognized attributes or incorrect attribute types. * * @param type - The ABI type object to be checked for correct attributes. * @param incompleteAttributes - An object representing the expected attribute types without the 'kind' property. @@ -104,7 +104,7 @@ function checkAttributes>(type: T, incompleteAttribu const attributes = { ...incompleteAttributes, kind: 'string' }; if (typeKeys.length !== Object.keys(attributes).length) { - throw new Error(`Unrecognised attribute on type ${type.kind}`); + throw new Error(`Unrecognized attribute on type ${type.kind}`); } typeKeys.forEach(element => { diff --git a/yarn-project/boxes/blank-react/src/app/components/copy.tsx b/yarn-project/boxes/blank-react/src/app/components/copy.tsx index 6caa3312159..04c9aa0ecd6 100644 --- a/yarn-project/boxes/blank-react/src/app/components/copy.tsx +++ b/yarn-project/boxes/blank-react/src/app/components/copy.tsx @@ -17,7 +17,7 @@ export function Copy({ value }: { value: string }) { }) .catch(() => { // eslint-disable-next-line no-console - console.error('Couldnt copy address'); + console.error('Could not copy address'); }); }} src={copied ? 'check.svg' : 'copy.svg'} diff --git a/yarn-project/boxes/run_tests b/yarn-project/boxes/run_tests index 80ee1ed87e6..c645f888b67 100755 --- a/yarn-project/boxes/run_tests +++ b/yarn-project/boxes/run_tests @@ -28,7 +28,7 @@ YP_IMAGE_URI=$(calculate_image_uri $YARN_PROJECT) # Each box is suffixed with the box name, such that rebuilding of each box is independent, if one fails we don't rebuild the others ensure_repo $SANDBOX $ECR_REGION refresh_lifecycle CONTENT_HASH=$(calculate_content_hash $SANDBOX) -BASE_TAG=cache-$CONTENT_HASH-$BOX_NAME # Append the box name to seperate the tag +BASE_TAG=cache-$CONTENT_HASH-$BOX_NAME # Append the box name to separate the tag SUCCESS_TAG=$BASE_TAG echo "Content hash: $CONTENT_HASH" @@ -40,7 +40,7 @@ fi ################### PREAMBLE ################### -# Pull images from ecr and retag for the docker compsoe +# Pull images from ecr and retag for the docker compose SANDBOX_IMAGE=$SANDBOX_IMAGE_URI-x86_64 echo "pulling docker image for $SANDBOX $SANDBOX_IMAGE" retry docker pull $SANDBOX_IMAGE diff --git a/yarn-project/boxes/token/README.md b/yarn-project/boxes/token/README.md index 99b8eb3fe68..b4b38457432 100644 --- a/yarn-project/boxes/token/README.md +++ b/yarn-project/boxes/token/README.md @@ -49,11 +49,11 @@ This folder should have the following directory structure: |— private_token_contract.json |— private_token.ts |— tests - | A simple end2end test deploying and testing the PrivateToken on a local sandbox + | A simple end2end test deploying and testing the Token on a local sandbox | using the front end helper methods in app/scripts/ | The test requires the sandbox and anvil to be running (yarn start:sandbox). | You can run it via `yarn test:integration`. - |- privatetoken.test.ts + |- token.test.ts ``` Most relevant to you is likely `src/contracts/main.nr` (and the build config `src/contracts/Nargo.toml`). This contains the example PrivateToken logic that the frontend interacts with and is a good place to start writing Noir. diff --git a/yarn-project/boxes/token/src/app/components/copy.tsx b/yarn-project/boxes/token/src/app/components/copy.tsx index 6caa3312159..04c9aa0ecd6 100644 --- a/yarn-project/boxes/token/src/app/components/copy.tsx +++ b/yarn-project/boxes/token/src/app/components/copy.tsx @@ -17,7 +17,7 @@ export function Copy({ value }: { value: string }) { }) .catch(() => { // eslint-disable-next-line no-console - console.error('Couldnt copy address'); + console.error('Could not copy address'); }); }} src={copied ? 'check.svg' : 'copy.svg'} diff --git a/yarn-project/circuits.js/src/cbind/compiler.ts b/yarn-project/circuits.js/src/cbind/compiler.ts index 46dff5bec47..bcadf11ae3f 100644 --- a/yarn-project/circuits.js/src/cbind/compiler.ts +++ b/yarn-project/circuits.js/src/cbind/compiler.ts @@ -69,12 +69,12 @@ export interface TypeInfo { */ isTuple?: boolean; /** - * Indicates if the schama represents an array. + * Indicates if the schema represents an array. * If so, stores the array's subtype elements. */ arraySubtype?: TypeInfo; /** - * Indicates if the schama represents a variant. + * Indicates if the schema represents a variant. * If so, stores the variant's subtype elements. */ variantSubtypes?: TypeInfo[]; diff --git a/yarn-project/circuits.js/src/utils/jsUtils.ts b/yarn-project/circuits.js/src/utils/jsUtils.ts index c2554751728..a6a2e5b8bb1 100644 --- a/yarn-project/circuits.js/src/utils/jsUtils.ts +++ b/yarn-project/circuits.js/src/utils/jsUtils.ts @@ -77,10 +77,10 @@ export function assertItemsLength< }[]; }, >(obj: T, member: F, length: number) { - const arrs = obj[member]; - for (let i = 0; i < arrs.length; i++) { - if (arrs[i].length !== length) { - throw new Error(`Expected ${member}[${i}] to have length ${length} but was ${arrs[i].length}`); + const arrays = obj[member]; + for (let i = 0; i < arrays.length; i++) { + if (arrays[i].length !== length) { + throw new Error(`Expected ${member}[${i}] to have length ${length} but was ${arrays[i].length}`); } } } diff --git a/yarn-project/cli/aztec-cli b/yarn-project/cli/aztec-cli index 3a58b32d952..6a96c892d47 100755 --- a/yarn-project/cli/aztec-cli +++ b/yarn-project/cli/aztec-cli @@ -3,7 +3,7 @@ # Wrapper script around @aztec/cli using Docker. This is intended to be used by devs that don't have # a NodeJS environment setup locally. The script starts a Docker container passing any commands and # arguments to the CLI running inside the container. -# If this wrapper script detecs a global install of @aztec/cli it falls back on that instead of Docker. +# If this wrapper script detects a global install of @aztec/cli it falls back on that instead of Docker. set -euo pipefail @@ -117,11 +117,11 @@ if [[ "$AZTEC_CLI_COMMAND" == "update" ]]; then add_mount "$PWD" fi -# bash's builtin getops only works with single characeter flags +# bash's builtin getops only works with single character flags # GNU getopt doesn't exist on macOS # process the flags manually # -# go through each parameter (execpt the first one, which is the command) +# go through each parameter (except the first one, which is the command) # and check if it's either a filename or a directory. If it is then mount inside the container # NOTE: this won't work with assignement-style flags, e.g. --outdir=/foo for (( i=2; i <= "$#"; i++ )); do diff --git a/yarn-project/cli/src/encoding.ts b/yarn-project/cli/src/encoding.ts index da824d68ea0..05c02c39306 100644 --- a/yarn-project/cli/src/encoding.ts +++ b/yarn-project/cli/src/encoding.ts @@ -8,7 +8,7 @@ import { Fr } from '@aztec/foundation/fields'; * @returns An object in the ABI struct type's format. */ export function parseStructString(str: string, abiType: StructType) { - // Assing string bytes to struct fields. + // Assign string bytes to struct fields. const buf = Buffer.from(str.replace(/^0x/i, ''), 'hex'); const struct: any = {}; let byteIndex = 0; diff --git a/yarn-project/cli/src/unbox.ts b/yarn-project/cli/src/unbox.ts index 7cb010f3e3c..bc990d7cde1 100644 --- a/yarn-project/cli/src/unbox.ts +++ b/yarn-project/cli/src/unbox.ts @@ -100,7 +100,7 @@ async function downloadContractAndBoxFromGithub( log: LogFn, ): Promise { // small string conversion, in the ABI the contract name looks like PrivateToken - // but in the repostory it looks like private_token + // but in the repository it looks like private_token log(`Downloading @aztec/boxes/${contractName}/ to ${outputPath}...`); // Step 1: Fetch the monorepo ZIP from GitHub, matching the CLI version @@ -256,7 +256,7 @@ async function updatePackageJsonVersions(packageVersion: string, outputPath: str // modify the version of the sandbox to pull - it's set to "latest" version in the monorepo, // but we need to replace with the same tagVersion as the cli and the other aztec npm packages - // similarly, make sure we spinup the sandbox with the same version. + // similarly, make sure we spin up the sandbox with the same version. packageData.scripts['install:sandbox'] = packageData.scripts['install:sandbox'].replace( 'latest', `${packageVersion}`, diff --git a/yarn-project/deploy_npm.sh b/yarn-project/deploy_npm.sh index 9ba549ace60..a66c538e2c2 100755 --- a/yarn-project/deploy_npm.sh +++ b/yarn-project/deploy_npm.sh @@ -58,7 +58,7 @@ function deploy_package() { # Tag the existing version npm dist-tag add $PACKAGE_NAME@$VERSION $DIST_TAG else - # Publish new verison + # Publish new version npm publish $TAG_ARG --access public fi else diff --git a/yarn-project/end-to-end/src/shared/cli.ts b/yarn-project/end-to-end/src/shared/cli.ts index 59de7abe3b5..a3f22042111 100644 --- a/yarn-project/end-to-end/src/shared/cli.ts +++ b/yarn-project/end-to-end/src/shared/cli.ts @@ -91,7 +91,7 @@ export const cliTestSuite = ( const newCompleteAddress = accountsAfter[accountsAfter.length - 1]; // Test get-accounts - debug('Check that account was added to the list of accs in RPC'); + debug('Check that account was added to the list of accounts in RPC'); await run('get-accounts'); const fetchedAddresses = findMultipleInLogs(/Address:\s+(?
0x[a-fA-F0-9]+)/); const foundFetchedAddress = fetchedAddresses.find(match => match.groups?.address === newAddress.toString()); diff --git a/yarn-project/foundation/src/transport/interface/transferable.ts b/yarn-project/foundation/src/transport/interface/transferable.ts index 2d974a57e3d..767ba215219 100644 --- a/yarn-project/foundation/src/transport/interface/transferable.ts +++ b/yarn-project/foundation/src/transport/interface/transferable.ts @@ -77,7 +77,7 @@ export function Transfer(transferable: Transferable): TransferDescriptor; * Mark transferable objects within an arbitrary object or array as * being a transferable object. They will then not be serialized * and deserialized on messaging with the main thread, but ownership - * of them will be tranferred to the receiving thread. + * of them will be transferred to the receiving thread. * * Only array buffers, message ports and few more special types of * objects can be transferred, but it's much faster than serializing and diff --git a/yarn-project/noir-contracts/src/contracts/docs_example_contract/src/main.nr b/yarn-project/noir-contracts/src/contracts/docs_example_contract/src/main.nr index d1877df1834..3930ac84f2b 100644 --- a/yarn-project/noir-contracts/src/contracts/docs_example_contract/src/main.nr +++ b/yarn-project/noir-contracts/src/contracts/docs_example_contract/src/main.nr @@ -222,12 +222,12 @@ contract DocsExample { context.return_values.push(total_points as Field); } - // docs:start:functions-UncontrainedFunction + // docs:start:functions-UnconstrainedFunction unconstrained fn get_total_points(account: Field) -> u8 { actions::get_total_points(storage.cards, account, 0) } - // docs:end:functions-UncontrainedFunction + // docs:end:functions-UnconstrainedFunction /// Macro equivalence section diff --git a/yarn-project/noir-contracts/src/contracts/lending_contract/src/interest_math.nr b/yarn-project/noir-contracts/src/contracts/lending_contract/src/interest_math.nr index 735e6ce9e7a..5b089405a3f 100644 --- a/yarn-project/noir-contracts/src/contracts/lending_contract/src/interest_math.nr +++ b/yarn-project/noir-contracts/src/contracts/lending_contract/src/interest_math.nr @@ -1,7 +1,7 @@ use dep::safe_math::SafeU120; // Binomial approximation of exponential -// using lower than decired precisions for everything due to u120 limit +// using lower than desired precisions for everything due to u120 limit // (1+x)^n = 1+n*x+[n/2*(n-1)]*x^2+[n/6*(n-1)*(n-2)*x^3]... // we are loosing around almost 8 digits of precision from yearly -> daily interest // dividing with 31536000 (seconds per year). diff --git a/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/src/main.nr b/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/src/main.nr index 154e6d739b9..7ccbc640daf 100644 --- a/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/src/main.nr +++ b/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/src/main.nr @@ -98,7 +98,7 @@ contract PendingCommitments { 0 } - // Dumy nested/inner function (to pass a function which does nothing) + // Dummy nested/inner function (to pass a function which does nothing) #[aztec(private)] fn dummy( amount: Field, diff --git a/yarn-project/noir-contracts/src/contracts/token_bridge_contract/src/token_interface.nr b/yarn-project/noir-contracts/src/contracts/token_bridge_contract/src/token_interface.nr index 6c44755b8a4..6e467647059 100644 --- a/yarn-project/noir-contracts/src/contracts/token_bridge_contract/src/token_interface.nr +++ b/yarn-project/noir-contracts/src/contracts/token_bridge_contract/src/token_interface.nr @@ -1,4 +1,4 @@ -// docs:start:token_brodge_token_interface +// docs:start:token_bridge_token_interface use dep::aztec::{ context::{ PrivateContext, PublicContext, Context }, selector::compute_selector, @@ -50,4 +50,4 @@ impl Token { } // docs:end:private_burn_interface } -// docs:end:token_brodge_token_interface +// docs:end:token_bridge_token_interface diff --git a/yarn-project/noir-contracts/src/scripts/copy_source.ts b/yarn-project/noir-contracts/src/scripts/copy_source.ts index dccd72f379c..e9c58c589b2 100644 --- a/yarn-project/noir-contracts/src/scripts/copy_source.ts +++ b/yarn-project/noir-contracts/src/scripts/copy_source.ts @@ -28,7 +28,7 @@ const NOIR_SOURCE_COPIES: NoirSourceCopy[] = [ * @param contractName - UpperCamelCase contract name that we check need copying */ function copyNrFilesExceptInterface(contractName: string): void { - // stored in `noir-contracts` under snake case nameing + // stored in `noir-contracts` under snake case naming const snakeCaseContractName = `${snakeCase(contractName)}_contract`; const projectDirPath = `src/contracts/${snakeCaseContractName}`; diff --git a/yarn-project/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr b/yarn-project/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr index f5ed9d4fad5..b66e84edae5 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/bug-collecting-crate/invalid-test-syntax-passing.nr @@ -1,4 +1,4 @@ -#[test(should_fail_with("array has reached maximum capacit"))] +#[test(should_fail_with("array has reached maximum capacity"))] fn smoke_test_array_push_capacity(){ } \ No newline at end of file diff --git a/yarn-project/types/src/stats/stats.ts b/yarn-project/types/src/stats/stats.ts index a975970dd0b..22c7373389a 100644 --- a/yarn-project/types/src/stats/stats.ts +++ b/yarn-project/types/src/stats/stats.ts @@ -130,11 +130,11 @@ export type TxStats = { encryptedLogCount: number; /** Number of unencrypted logs. */ unencryptedLogCount: number; - /** Serialised size of encrypted logs. */ + /** Serialized size of encrypted logs. */ encryptedLogSize: number; - /** Serialised size of unencrypted logs. */ + /** Serialized size of unencrypted logs. */ unencryptedLogSize: number; - /** Serialised size of new contract data. */ + /** Serialized size of new contract data. */ newContractDataSize: number; /** Number of new contracts deployed in this tx. */ newContractCount: number; diff --git a/yellow-paper/docs/addresses-and-keys/addresses-and-keys.md b/yellow-paper/docs/addresses-and-keys/addresses-and-keys.md index d2e7a5fe21a..3c2948042fc 100644 --- a/yellow-paper/docs/addresses-and-keys/addresses-and-keys.md +++ b/yellow-paper/docs/addresses-and-keys/addresses-and-keys.md @@ -120,9 +120,9 @@ Much of this is heavily inspired by ZCash sapling & orchard keys. > Note: there is nothing to stop an app and wallet from implementing its own key derivation scheme. Nevertheless, we're designing a 'canonical' scheme that most developers and wallets can use. -### Authorisation keys +### Authorization keys -Aztec has native account abstraction, so tx authentication is done via an account contract, meaning tx authentication can be implemented however the user sees fit. That is, authorisation keys aren't specified at the protocol level. +Aztec has native account abstraction, so tx authentication is done via an account contract, meaning tx authentication can be implemented however the user sees fit. That is, authorization keys aren't specified at the protocol level. A tx authentication secret key is arguably the most important key to keep private, because knowledge of such a key could potentially enable an attacker to impersonate the user and execute a variety of functions on the network. @@ -155,7 +155,7 @@ A tx authentication secret key is arguably the most important key to keep privat #### Some security assumptions -- The Aztec private execution client (PXE) and the kernel circuit (a core protocol circuit) can be trusted with master secret keys (_except for_ the tx authorisation secret key, whose security assumptions are abstracted-away to wallet designers). +- The Aztec private execution client (PXE) and the kernel circuit (a core protocol circuit) can be trusted with master secret keys (_except for_ the tx authorization secret key, whose security assumptions are abstracted-away to wallet designers). ### Encryption and decryption @@ -268,7 +268,7 @@ Nice to haves: **Requirements:** - [Nice to have]: A "tagging" keypair that enables faster brute-force identification of owned notes. - - Note: this is useful for rapid handshake discovery, but it is an optimisation, and has trade-offs (such as more data to send). + - Note: this is useful for rapid handshake discovery, but it is an optimization, and has trade-offs (such as more data to send). - [Nice to have]: The ability to generate a sequence of tags between Alice and Bob, in line with our latest "Tag Hopping" ideas. Considerations: @@ -343,7 +343,7 @@ There are some more involved complications and considerations, which haven't all No. -The 'topology' of the key derivations (i.e. the way the derivations of the keys interrelate, if you were to draw a dependency graph) is not constraint-optimised. There might be a better 'layout'. +The 'topology' of the key derivations (i.e. the way the derivations of the keys interrelate, if you were to draw a dependency graph) is not constraint-optimized. There might be a better 'layout'. Domain separation hasn't been considered in-depth. @@ -398,7 +398,7 @@ The red boxes are uncertainties, which are explained later in this doc. |---|---|---|---|---| $\sk$ | $\stackrel{\$}{\leftarrow} \mathbb{F}$ | secret key | TEE/ PXE | A seed secret from which all these other keys may be derived. For future reference (in case we modify the schemes), this $\sk$ doesn't need to enter a circuit if all keys can be provably linked/tethered to some fixed public key/address. | $\nskm$ | h(0x01, $\sk$) | nullifier secret key | PXE, K | Gives developers the option of using a secret key to derive their apps' nullifiers. (Not all nullifiers require a secret key, e.g. plume nullifiers). | -$\tskm$ | h(0x02, $\sk$) | tagging secret key | PXE* | The "tagging" key pair can be used to flag "this ciphertext is for you", without requiring decryption. This key exists merely as an optimisation. We might choose to do away with it, in favour of using $\ivskm$. | +$\tskm$ | h(0x02, $\sk$) | tagging secret key | PXE* | The "tagging" key pair can be used to flag "this ciphertext is for you", without requiring decryption. This key exists merely as an optimization. We might choose to do away with it, in favour of using $\ivskm$. | $\ivskm$ | h(0x03, $\sk$) | incoming viewing secret key | PXE* | The owner of this secret key can derive ephemeral symmetric encryption keys, to decrypt ciphertexts which _have been sent to them_ (i.e. "incoming" data from the pov of the recipient). | $\ovskm$ | h(0x04, $\sk$) | outgoing viewing secret key | PXE* | The owner of this secret key can derive ephemeral symmetric encryption keys, to decrypt ciphertexts which _they have sent_ (i.e. "outgoing" data from the pov of the sender (and of the recipient, since they're the same person in this case)). This is useful if the user's DB is wiped, and they need to sync from scratch (starting with only $\sk$). | |||||| @@ -416,7 +416,7 @@ $\Ovpkm$ | $\ovskm \cdot G$ | outgoing viewing public key | | Only included so t |---|---|---|---| $\constructorhash$ | h(constructor\_args, salt) | constructor hash | A commitment to the constructor arguments used when deploying the user's account contract. | $\codehash$ | h(bytecode, $\constructorhash$) | code hash | Binds the bytecode and constructor arguments together. -$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | This isn't an optimised derivation. It's just one that works. | +$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | This isn't an optimized derivation. It's just one that works. | :::warning @@ -485,7 +485,7 @@ An app-siloed outgoing viewing keypair is derived as a hardened child keypair of | Key | Derivation | Name | Where? | Comments | |---|---|---|---|---| -$\nskapp$ | $h(\nskm, \text{app\_address})$ | app-siloed nullifier secret key | PXE, K, App | Hardened, so only derivable by the owner of the master nullifier secret key. Hardened so as to enable the $\nskapp$ to be passed into an app circuit (without the threat of $\nskm$ being reverse-derivable). Only when a public key needs to be derivable by the general public is a normal (non-hardened) key used.
Deviates from 'conventional' hardened BIP-32-style derivation significantly, to reduce complexity and as an optimisation. Such a deviation would need to be validated as secure. | +$\nskapp$ | $h(\nskm, \text{app\_address})$ | app-siloed nullifier secret key | PXE, K, App | Hardened, so only derivable by the owner of the master nullifier secret key. Hardened so as to enable the $\nskapp$ to be passed into an app circuit (without the threat of $\nskm$ being reverse-derivable). Only when a public key needs to be derivable by the general public is a normal (non-hardened) key used.
Deviates from 'conventional' hardened BIP-32-style derivation significantly, to reduce complexity and as an optimization. Such a deviation would need to be validated as secure. | $\Nkapp$ | $h(\nskapp)$ | Shareable nullifier key | PXE, K, T3P, App| If an app developer thinks some of their users might wish to have the option to enable some _trusted_ 3rd party to see when a particular user's notes are nullified, then this nullifier key might be of use. This $\Nkapp$ can be used in a nullifier's preimage, rather than $\nskapp$ in such cases, to enable said 3rd party to brute-force identify nullifications.
Note: this would not enable a 3rd party to view the contents of any notes; knowledge of the $\ivskapp$ / $\ovskapp$ would be needed for that.
Note: this is not a "public" key, since it must not be shared with the public. | See the appendix for an alternative derivation suggestion. @@ -531,7 +531,7 @@ Having derived a Shared Secret, Bob can now share it with Alice as follows: | Thing | Derivation | Name | Comments | |---|---|---|---| -$\Taghs$ | $\esk_{hs} \cdot \Tpkm$ | Handshake message identification tag | Note: the tagging public key $\Tpkm$ exists as an optimisation, seeking to make brute-force message identification as fast as possible. In many cases, handshakes can be performed offchain via traditional web2 means, but in the case of on-chain handshakes, we have no preferred alternative over simply brute-force attempting to reconcile every 'Handshake message identification tag'. Note: this optimisation reduces the recipient's work by 1 cpu-friendly hash per message (at the cost of 255-bits to broadcast a compressed encoding of $\Taghs$). We'll need to decide whether this is the right speed/communication trade-off. | +$\Taghs$ | $\esk_{hs} \cdot \Tpkm$ | Handshake message identification tag | Note: the tagging public key $\Tpkm$ exists as an optimization, seeking to make brute-force message identification as fast as possible. In many cases, handshakes can be performed offchain via traditional web2 means, but in the case of on-chain handshakes, we have no preferred alternative over simply brute-force attempting to reconcile every 'Handshake message identification tag'. Note: this optimization reduces the recipient's work by 1 cpu-friendly hash per message (at the cost of 255-bits to broadcast a compressed encoding of $\Taghs$). We'll need to decide whether this is the right speed/communication trade-off. | $\payload$ | [$\Taghs$, $\Epk_{hs}$] | Payload | This can be broadcast via L1.
Curve points can be compressed in the payload. | Alice can identify she is the indended the handshake recipient as follows: @@ -539,7 +539,7 @@ Alice can identify she is the indended the handshake recipient as follows: | Thing | Derivation | Name | Comments | |---|---|---|---| -$\Taghs$ | $\tskm \cdot \Epk_{hs}$ | Handshake message identification tag | Alice can extract $\Taghs$ and $\Epk_{hs}$ from the $\payload$ and perform this scalar multiplication on _every_ handshake message. If the computed $\Taghs$ value matches that of the $\payload$, then the message is indented for Alice.
Clearly, handshake transactions will need to be identifiable as such (to save Alice time), e.g. by revealing the contract address of some canonical handshaking contract alongside the $\payload$.
Recall: this step is merely an optimisation, to enable Alice to do a single scalar multiplication before moving on (in cases where she is not the intended recipient). | +$\Taghs$ | $\tskm \cdot \Epk_{hs}$ | Handshake message identification tag | Alice can extract $\Taghs$ and $\Epk_{hs}$ from the $\payload$ and perform this scalar multiplication on _every_ handshake message. If the computed $\Taghs$ value matches that of the $\payload$, then the message is indented for Alice.
Clearly, handshake transactions will need to be identifiable as such (to save Alice time), e.g. by revealing the contract address of some canonical handshaking contract alongside the $\payload$.
Recall: this step is merely an optimization, to enable Alice to do a single scalar multiplication before moving on (in cases where she is not the intended recipient). | If Alice successfully identifies that she is the indended the handshake recipient, she can proceed with deriving the shared secret (for tagging) as follows: @@ -579,7 +579,7 @@ Having derived a Shared Secret, Bob can now share it with Alice as follows: | Thing | Derivation | Name | Comments | |---|---|---|---| -$\Taghs$ | $\esk_{hs} \cdot \Tpkm$ | Handshake message identification tag | Note: the tagging public key $\Tpkm$ exists as an optimisation, seeking to make brute-force message identification as fast as possible. In many cases, handshakes can be performed offchain via traditional web2 means, but in the case of on-chain handshakes, we have no preferred alternative over simply brute-force attempting to reconcile every 'Handshake message identification tag'. Note: this optimisation reduces the recipient's work by 1 cpu-friendly hash per message (at the cost of 255-bits to broadcast a compressed encoding of $\Taghs$). We'll need to decide whether this is the right speed/communication trade-off.
Note also: the _master_ tagging key $\Tpkm$ is being used in this illustration, rather than some app-specific tagging key, to make this message identification process most efficient (otherwise the user would have to re-scan all handshakes for every app they use). | +$\Taghs$ | $\esk_{hs} \cdot \Tpkm$ | Handshake message identification tag | Note: the tagging public key $\Tpkm$ exists as an optimization, seeking to make brute-force message identification as fast as possible. In many cases, handshakes can be performed offchain via traditional web2 means, but in the case of on-chain handshakes, we have no preferred alternative over simply brute-force attempting to reconcile every 'Handshake message identification tag'. Note: this optimization reduces the recipient's work by 1 cpu-friendly hash per message (at the cost of 255-bits to broadcast a compressed encoding of $\Taghs$). We'll need to decide whether this is the right speed/communication trade-off.
Note also: the _master_ tagging key $\Tpkm$ is being used in this illustration, rather than some app-specific tagging key, to make this message identification process most efficient (otherwise the user would have to re-scan all handshakes for every app they use). | $\esk$ | $\stackrel{rand}{\leftarrow} \mathbb{F}$ | ephemeral secret key, for encryption | TODO: perhaps just one ephemeral keypair could be used? | $\Epk$ | $\esk \cdot G$ | Ephemeral public key, for encryption | $\sharedsecret_{m,header}$ | $\esk \cdot \Ivpkm$ | Shared secret, for encrypting the ciphertext header. | The _master_ incoming viewing key is used here, to enable Alice to more-easily discover which contract address to use, and hence which app-specific $\ivskapp$ to use to ultimately derive the app-specific tag. | @@ -592,7 +592,7 @@ Alice can identify she is the indended the handshake recipient as follows: | Thing | Derivation | Name | Comments | |---|---|---|---| -$\Taghs$ | $\tskm \cdot \Epk_{hs}$ | Handshake message identification tag | Alice can extract $\Taghs$ and $\Epk_{hs}$ from the $\payload$ and perform this scalar multiplication on _every_ handshake message. If the computed $\Taghs$ value matches that of the $\payload$, then the message is indented for Alice.
Clearly, handshake transactions will need to be identifiable as such (to save Alice time), e.g. by revealing the contract address of some canonical handshaking contract alongside the $\payload$.
Recall: this step is merely an optimisation, to enable Alice to do a single scalar multiplication before moving on (in cases where she is not the intended recipient). | +$\Taghs$ | $\tskm \cdot \Epk_{hs}$ | Handshake message identification tag | Alice can extract $\Taghs$ and $\Epk_{hs}$ from the $\payload$ and perform this scalar multiplication on _every_ handshake message. If the computed $\Taghs$ value matches that of the $\payload$, then the message is indented for Alice.
Clearly, handshake transactions will need to be identifiable as such (to save Alice time), e.g. by revealing the contract address of some canonical handshaking contract alongside the $\payload$.
Recall: this step is merely an optimization, to enable Alice to do a single scalar multiplication before moving on (in cases where she is not the intended recipient). | If Alice successfully identifies that she is the indended the handshake recipient, she can proceed with deriving the shared secret (for tagging) as follows: @@ -709,7 +709,7 @@ Here's how an app circuit could constrain the nullifier key to be correct: |---|---|---|---| $\Nkapp$ | h($\nskapp$) | App-siloed nullifier key | Recall an important point: the app circuit MUST NOT be given $\nskm$. Indeed, $\nskapp$ is derived (see earlier) as a _hardened_ child of $\nskm$, to prevent $\nskm$ from being reverse-derived by a malicious circuit. The linking of $\nskapp$ to $\nskm$ is deferred to the kernel circuit (which can be trusted moreso than an app).
Recall also: $\Nkapp$ is used (instead of $\nskapp$) solely as a way of giving the user the option of sharing $\Nkapp$ with a trusted 3rd party, to give them the ability to view when a note has been nullified (although I'm not sure how useful this is, given that it would require brute-force effort from that party to determine which note hash has been nullified, with very little additional information).
| `nullifier` | h(note_hash, $\Nkapp$) | -$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | Proof that the $\Npkm$ belongs to the note owner's $\address$.
This isn't an optimised derivation. It's just one that works. | +$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | Proof that the $\Npkm$ belongs to the note owner's $\address$.
This isn't an optimized derivation. It's just one that works. | The app circuit exposes, as public inputs, a "nullifier key validation request": @@ -895,7 +895,7 @@ $\happn$ | h(0x01, $\happL$) | normal siloing key for an app-specific nullifier $\Npkapp$ | $\happn \cdot G + \Npkm$ | normal (non-hardened) app-siloed nullifier public key | |||| `nullifier` | h(note_hash, $\Nkapp$) | | $\Nkapp$ is exposed as a public input, and linked to the $\Npkapp$ via the kernel circuit. | -$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | Proof that the $\Npkm$ belongs to the note owner's $\address$.
This isn't an optimised derivation. It's just one that works. | +$\address$ | h($\Npkm$, $\Tpkm$, $\Ivpkm$, $\Ovpkm$, $\codehash$) | address | Proof that the $\Npkm$ belongs to the note owner's $\address$.
This isn't an optimized derivation. It's just one that works. | > Recall an important point: the app circuit MUST NOT be given $\nskm$ nor $\nskapp$ in this option. Since $\nskapp$ is a normal (non-hardened) child, $\nskm$ could be reverse-derived by a malicious circuit. The linking of $\nskapp$ to $\Npkm$ is therefore deferred to the kernel circuit (which can be trusted moreso than an app).
Recall also: $\Nkapp$ is used (instead of $\nskapp$) solely as a way of giving the user the option of sharing $\Nkapp$ with a trusted 3rd party, to give them the ability to view when a note has been nullified. diff --git a/yellow-paper/docs/intro.md b/yellow-paper/docs/intro.md index b19994c7008..658ccf77014 100644 --- a/yellow-paper/docs/intro.md +++ b/yellow-paper/docs/intro.md @@ -69,7 +69,7 @@ The draft subsections are mere suggestions (and serve as a helpful reminder of t --> - Keys - Master keys - - Authorisation key abstraction + - Authorization key abstraction - Nullifier keys - Incoming viewing keys - Outgoing viewing keys @@ -131,7 +131,7 @@ The draft subsections are mere suggestions (and serve as a helpful reminder of t - Logs [Jan?] - Unencrypted - Encrypted - - Optimisation considerations + - Optimization considerations - Private Message Delivery [Phil] - To constrain or not to constrain? @@ -159,7 +159,7 @@ The draft subsections are mere suggestions (and serve as a helpful reminder of t - Paying fees, and receiving rebates - Paying fees privately - Etc. -- Decentralisation [Cooper] +- Decentralization [Cooper] - P2P network [Phil] - Data that is sent between parties - Users to the tx pool @@ -175,7 +175,7 @@ The draft subsections are mere suggestions (and serve as a helpful reminder of t - Protocol Statements [Mike] - Describe the logic of the protocol. - Describe the assertions that must be in place. - - The constraints (assertions) of the system are spread across many circuits and L1 contracts, but they should be described as a whole, in one place. _Where_ the assertions are located (i.e. in which circuit/contract) is a matter of optimisation, which might change over time. This can then serve as a checklist, to ensure those assertions are included in at least one of the circuits/contracts. + - The constraints (assertions) of the system are spread across many circuits and L1 contracts, but they should be described as a whole, in one place. _Where_ the assertions are located (i.e. in which circuit/contract) is a matter of optimization, which might change over time. This can then serve as a checklist, to ensure those assertions are included in at least one of the circuits/contracts. - In particular, exhaustively explain what _shouldn't_ be possible. - Sub-protocols