From 9a9fe6218e763f76dccea93060987f01c1f6d0ed Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 09:42:03 +0000 Subject: [PATCH 01/20] spell check --- .vscode/extensions.json | 2 ++ cspell.json | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 cspell.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 1d9e5d4870b..988ff79b475 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -36,6 +36,8 @@ "IBM.output-colorizer", // Displays code coverage report information within vscode "ryanluker.vscode-coverage-gutters", + // Spell checking + "streetsidesoftware.code-spell-checker", // End C++/Circuits extensions /////////////////////////////////////// ], diff --git a/cspell.json b/cspell.json new file mode 100644 index 00000000000..0f018c7ac45 --- /dev/null +++ b/cspell.json @@ -0,0 +1,40 @@ +{ + "words": [ + "tparam", + "abitype", + "acir", + "acvm", + "barretenberg", + "Brillig", + "Bufferable", + "camelcase", + "cbind", + "cbinds", + "composability", + "Daos", + "decrementation", + "delegatecall", + "entrypoints", + "grumpkin", + "hasher", + "keccak", + "keypairs", + "Merkle", + "msgpack", + "Nargo", + "Pedersen", + "Plookup", + "Pokeable", + "preimage", + "preimages", + "pxes", + "rethrown", + "rollup", + "rollups", + "schnorr", + "Signerless", + "struct", + "structs", + "viem" + ] +} From 228054b2d12dba012efa01ab08accd9d26c6d881 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 12:36:57 +0200 Subject: [PATCH 02/20] ignore paths --- cspell.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cspell.json b/cspell.json index 0f018c7ac45..b3d200c82d4 100644 --- a/cspell.json +++ b/cspell.json @@ -36,5 +36,21 @@ "struct", "structs", "viem" + ], + "ignorePaths": [ + "node_modules/", + "dist/", + "build/", + "dest/", + "barretenberg", + "dest", + "node_modules", + ".cache", + ".pnp.cjs", + ".pnp.loader.mjs", + "cmake-build-debug", + ".terraform*", + ".bootstrapped", + "*.svg" ] } From 3f76fa859563a8b9dda56bf0fd14748d429a6179 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 12:37:05 +0200 Subject: [PATCH 03/20] nuking british spelling --- CHANGELOG.md | 2 +- .../src/barretenberg/crypto/ecdsa/signature.ts | 4 ++-- .../src/barretenberg/crypto/schnorr/signature.ts | 2 +- .../circuits.js/src/structs/call_context.ts | 6 +++--- .../structs/kernel/historic_block_data.test.ts | 16 ++++++++-------- .../src/structs/kernel/historic_block_data.ts | 2 +- .../src/structs/public_call_request.ts | 6 +++--- yarn-project/circuits.js/src/structs/shared.ts | 2 +- .../circuits.js/src/structs/tx_request.ts | 2 +- yarn-project/cli/src/utils.ts | 6 +++--- yarn-project/types/src/l2_block.test.ts | 4 ++-- yarn-project/types/src/public_data_write.ts | 4 ++-- yarn-project/types/src/stats/stats.ts | 4 ++-- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c5fc75f4d..d42452e2ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -227,7 +227,7 @@ * Log topic and contract address in unencrypted logs ([#2595](https://github.com/AztecProtocol/aztec-packages/issues/2595)) ([a5b763f](https://github.com/AztecProtocol/aztec-packages/commit/a5b763fb077b967f592ad4de9e391acf2790a094)), closes [#2580](https://github.com/AztecProtocol/aztec-packages/issues/2580) [#2581](https://github.com/AztecProtocol/aztec-packages/issues/2581) [#2586](https://github.com/AztecProtocol/aztec-packages/issues/2586) [#2587](https://github.com/AztecProtocol/aztec-packages/issues/2587) * Parallelization update for polynomials ([#2311](https://github.com/AztecProtocol/aztec-packages/issues/2311)) ([922fc99](https://github.com/AztecProtocol/aztec-packages/commit/922fc9912a4a88a41eef42fe64ca2b59d859b5b1)) * Restore latest block number ([#2474](https://github.com/AztecProtocol/aztec-packages/issues/2474)) ([6dc2da7](https://github.com/AztecProtocol/aztec-packages/commit/6dc2da70584ed1f1f0f00b3dfeca11610e80cc5a)) -* Serialise L2Block to JSON ([#2496](https://github.com/AztecProtocol/aztec-packages/issues/2496)) ([714c727](https://github.com/AztecProtocol/aztec-packages/commit/714c727a88d4c07b76e456e462ab1cf43bcaea75)) +* Serialize L2Block to JSON ([#2496](https://github.com/AztecProtocol/aztec-packages/issues/2496)) ([714c727](https://github.com/AztecProtocol/aztec-packages/commit/714c727a88d4c07b76e456e462ab1cf43bcaea75)) * Standalone Aztec Node and RPC Server ([#2522](https://github.com/AztecProtocol/aztec-packages/issues/2522)) ([8e355bc](https://github.com/AztecProtocol/aztec-packages/commit/8e355bc8c905d2992678d4a2a3b49d354dfa5bf6)) * Unbox empty box ([#2387](https://github.com/AztecProtocol/aztec-packages/issues/2387)) ([3e3930c](https://github.com/AztecProtocol/aztec-packages/commit/3e3930c6487c3b2a264c7a93bccb25473baf0b22)) * Uniswap private flow ([#2559](https://github.com/AztecProtocol/aztec-packages/issues/2559)) ([39f3a91](https://github.com/AztecProtocol/aztec-packages/commit/39f3a917a3bb88f29d8d17ee6c9e1b2294a45937)) diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts index 80c334f07f2..5a18f988c40 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts @@ -45,8 +45,8 @@ export class EcdsaSignature implements Signature { } /** - * Deserialises the signature from a buffer. - * @param buffer - The buffer from which to deserialise the signature. + * Deserializes the signature from a buffer. + * @param buffer - The buffer from which to deserialize the signature. * @returns The ECDSA signature */ public static fromBuffer(buffer: Buffer) { diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts index 4c7564357c2..c753a847051 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts @@ -79,7 +79,7 @@ export class SchnorrSignature implements Signature { } /** - * Deserialises from a buffer. + * Deserializes from a buffer. * @param buffer - The buffer representation of the object. * @returns The new object. */ diff --git a/yarn-project/circuits.js/src/structs/call_context.ts b/yarn-project/circuits.js/src/structs/call_context.ts index 676c0370d51..ad45890458f 100644 --- a/yarn-project/circuits.js/src/structs/call_context.ts +++ b/yarn-project/circuits.js/src/structs/call_context.ts @@ -102,9 +102,9 @@ export class CallContext { } /** - * Deserialise this from a buffer. - * @param buffer - The bufferable type from which to deserialise. - * @returns The deserialised instance of PublicCallRequest. + * Deserialize this from a buffer. + * @param buffer - The bufferable type from which to deserialize. + * @returns The deserialized instance of PublicCallRequest. */ static fromBuffer(buffer: Buffer | BufferReader) { const reader = BufferReader.asReader(buffer); diff --git a/yarn-project/circuits.js/src/structs/kernel/historic_block_data.test.ts b/yarn-project/circuits.js/src/structs/kernel/historic_block_data.test.ts index 0d95c9ad138..9179c979ca4 100644 --- a/yarn-project/circuits.js/src/structs/kernel/historic_block_data.test.ts +++ b/yarn-project/circuits.js/src/structs/kernel/historic_block_data.test.ts @@ -1,17 +1,17 @@ import { HistoricBlockData } from './historic_block_data.js'; describe('HistoricBlockData', () => { - it('serialises to buffer and back', () => { + it('serializes to buffer and back', () => { const historicBlockData = HistoricBlockData.random(); - const serialised = historicBlockData.toBuffer(); - const deserialised = HistoricBlockData.fromBuffer(serialised); - expect(deserialised).toEqual(historicBlockData); + const serialized = historicBlockData.toBuffer(); + const deserialized = HistoricBlockData.fromBuffer(serialized); + expect(deserialized).toEqual(historicBlockData); }); - it('serialises to string and back', () => { + it('serializes to string and back', () => { const historicBlockData = HistoricBlockData.random(); - const serialised = historicBlockData.toString(); - const deserialised = HistoricBlockData.fromString(serialised); - expect(deserialised).toEqual(historicBlockData); + const serialized = historicBlockData.toString(); + const deserialized = HistoricBlockData.fromString(serialized); + expect(deserialized).toEqual(historicBlockData); }); }); diff --git a/yarn-project/circuits.js/src/structs/kernel/historic_block_data.ts b/yarn-project/circuits.js/src/structs/kernel/historic_block_data.ts index 1423bee43e5..f3315f8c005 100644 --- a/yarn-project/circuits.js/src/structs/kernel/historic_block_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/historic_block_data.ts @@ -88,7 +88,7 @@ export class HistoricBlockData { } /** - * Return the historic block data as an array of items in the order they are serialised in noir. + * Return the historic block data as an array of items in the order they are serialized in noir. * @returns Array of items in the order they are stored in the contract */ toArray(): Fr[] { diff --git a/yarn-project/circuits.js/src/structs/public_call_request.ts b/yarn-project/circuits.js/src/structs/public_call_request.ts index b4ba51f8c58..e32e045fc9c 100644 --- a/yarn-project/circuits.js/src/structs/public_call_request.ts +++ b/yarn-project/circuits.js/src/structs/public_call_request.ts @@ -50,9 +50,9 @@ export class PublicCallRequest { } /** - * Deserialise this from a buffer. - * @param buffer - The bufferable type from which to deserialise. - * @returns The deserialised instance of PublicCallRequest. + * Deserialize this from a buffer. + * @param buffer - The bufferable type from which to deserialize. + * @returns The deserialized instance of PublicCallRequest. */ static fromBuffer(buffer: Buffer | BufferReader) { const reader = BufferReader.asReader(buffer); diff --git a/yarn-project/circuits.js/src/structs/shared.ts b/yarn-project/circuits.js/src/structs/shared.ts index 50375a8a58b..449e1189a04 100644 --- a/yarn-project/circuits.js/src/structs/shared.ts +++ b/yarn-project/circuits.js/src/structs/shared.ts @@ -45,6 +45,6 @@ export enum RollupTypes { } /** - * String encoding of serialised buffer data + * String encoding of serialized buffer data */ export const STRING_ENCODING: BufferEncoding = 'hex'; diff --git a/yarn-project/circuits.js/src/structs/tx_request.ts b/yarn-project/circuits.js/src/structs/tx_request.ts index 6f30046cc9e..32fb13a82d9 100644 --- a/yarn-project/circuits.js/src/structs/tx_request.ts +++ b/yarn-project/circuits.js/src/structs/tx_request.ts @@ -51,7 +51,7 @@ export class TxRequest { /** * Deserializes from a buffer or reader, corresponding to a write in cpp. * @param buffer - Buffer to read from. - * @returns The deserialised TxRequest object. + * @returns The deserialized TxRequest object. */ static fromBuffer(buffer: Buffer | BufferReader): TxRequest { const reader = BufferReader.asReader(buffer); diff --git a/yarn-project/cli/src/utils.ts b/yarn-project/cli/src/utils.ts index 66b6012e54f..708212b212c 100644 --- a/yarn-project/cli/src/utils.ts +++ b/yarn-project/cli/src/utils.ts @@ -199,7 +199,7 @@ export function parseSaltFromHexString(str: string): Fr { /** * Parses an AztecAddress from a string. - * @param address - A serialised Aztec address + * @param address - A serialized Aztec address * @returns An Aztec address * @throws InvalidArgumentError if the input string is not valid. */ @@ -213,7 +213,7 @@ export function parseAztecAddress(address: string): AztecAddress { /** * Parses an AztecAddress from a string. - * @param address - A serialised Aztec address + * @param address - A serialized Aztec address * @returns An Aztec address * @throws InvalidArgumentError if the input string is not valid. */ @@ -239,7 +239,7 @@ export function parseOptionalLogId(logId: string): LogId | undefined { /** * Parses a selector from a string. - * @param selector - A serialised selector. + * @param selector - A serialized selector. * @returns A selector. * @throws InvalidArgumentError if the input string is not valid. */ diff --git a/yarn-project/types/src/l2_block.test.ts b/yarn-project/types/src/l2_block.test.ts index fb5c9a76e57..29ce3d05d75 100644 --- a/yarn-project/types/src/l2_block.test.ts +++ b/yarn-project/types/src/l2_block.test.ts @@ -16,8 +16,8 @@ describe('L2Block', () => { block.newEncryptedLogs = undefined; block.newUnencryptedLogs = undefined; - const serialised = block.toString(); - const recovered = L2Block.fromString(serialised); + const serialized = block.toString(); + const recovered = L2Block.fromString(serialized); expect(recovered).toEqual(block); }); diff --git a/yarn-project/types/src/public_data_write.ts b/yarn-project/types/src/public_data_write.ts index 844a7ce1805..13ec9e0b855 100644 --- a/yarn-project/types/src/public_data_write.ts +++ b/yarn-project/types/src/public_data_write.ts @@ -45,7 +45,7 @@ export class PublicDataWrite { } /** - * Serialises the operation to a string. + * Serializes the operation to a string. * @returns A string representation of the operation. */ toString(): string { @@ -72,7 +72,7 @@ export class PublicDataWrite { /** * Creates a new public data write operation from the given string. - * @param str - The serialised string + * @param str - The serialized string * @returns A new public data write operation instance. */ static fromString(str: string): PublicDataWrite { diff --git a/yarn-project/types/src/stats/stats.ts b/yarn-project/types/src/stats/stats.ts index 476f54ce09b..a975970dd0b 100644 --- a/yarn-project/types/src/stats/stats.ts +++ b/yarn-project/types/src/stats/stats.ts @@ -8,9 +8,9 @@ export type L2BlockStats = { 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; }; From e51e8df40a1793dc06a6862dedfd9ea53dfe7b83 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 12:42:36 +0200 Subject: [PATCH 04/20] typo fix --- .../src/synchronizer/server_world_state_synchronizer.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts index 2d750c066f9..d0ae108e6e0 100644 --- a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts +++ b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts @@ -210,7 +210,7 @@ describe('server_world_state_synchronizer', () => { nextBlocks = [getMockBlock(currentBlockNumber + 1)]; } - // check the status agian, should be fully synced + // check the status again, should be fully synced status = await server.status(); expect(status.state).toEqual(WorldStateRunningState.RUNNING); expect(status.syncedToL2Block).toEqual(LATEST_BLOCK_NUMBER); From 79f248c9ce2dc2aec986f05243a6413df7a5a039 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 12:42:48 +0200 Subject: [PATCH 05/20] more words in cspell --- cspell.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cspell.json b/cspell.json index b3d200c82d4..1c6ea4db010 100644 --- a/cspell.json +++ b/cspell.json @@ -35,7 +35,13 @@ "Signerless", "struct", "structs", - "viem" + "viem", + "fullpath", + "unexclude", + "hardlinks", + "yarnrc", + "memdown", + "tsbuildinfo" ], "ignorePaths": [ "node_modules/", From 0e4942f743d45892b15246a91be12907b07d7d33 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 12:44:07 +0200 Subject: [PATCH 06/20] nuking british spelling 2 --- CHANGELOG.md | 2 +- docs/internal_notes/dev_docs/sandbox/components.md | 6 +++--- docs/static/img/sandbox_sending_a_tx.svg | 8 ++++---- docs/static/img/sandbox_unconstrained_function.svg | 4 ++-- yarn-project/aztec.js/src/contract/index.ts | 2 +- yarn-project/types/src/stats/metrics.ts | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d42452e2ef5..4e77add497c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -877,7 +877,7 @@ * Set correct version of RPC & Sandbox when deploying tagged commit ([#1914](https://github.com/AztecProtocol/aztec-packages/issues/1914)) ([898c50d](https://github.com/AztecProtocol/aztec-packages/commit/898c50d594b7515f6ca3b904d31ccf724b683ade)) * Set side effect counter on contract reads ([#1870](https://github.com/AztecProtocol/aztec-packages/issues/1870)) ([1d8881e](https://github.com/AztecProtocol/aztec-packages/commit/1d8881e4872b39195ace523432c0e34bc9081f8d)), closes [#1588](https://github.com/AztecProtocol/aztec-packages/issues/1588) * **simulator:** Use nullifier.value in client's `pendingNullifier` set so `set.has()` works ([#1534](https://github.com/AztecProtocol/aztec-packages/issues/1534)) ([a78daf7](https://github.com/AztecProtocol/aztec-packages/commit/a78daf75e3171d9cfafecba5507d5ae215fdd0ef)) -* **synchroniser:** Store most recent globals hash in the synchroniser, rather than fetching from the latest block ([#1539](https://github.com/AztecProtocol/aztec-packages/issues/1539)) ([1dd6225](https://github.com/AztecProtocol/aztec-packages/commit/1dd62256cc323831418808689496f0506d402fc4)) +* **synchronizer:** Store most recent globals hash in the synchronizer, rather than fetching from the latest block ([#1539](https://github.com/AztecProtocol/aztec-packages/issues/1539)) ([1dd6225](https://github.com/AztecProtocol/aztec-packages/commit/1dd62256cc323831418808689496f0506d402fc4)) * **sync:** Sync latest globals within merkle tree ops ([#1612](https://github.com/AztecProtocol/aztec-packages/issues/1612)) ([03b4cf6](https://github.com/AztecProtocol/aztec-packages/commit/03b4cf67cbd4c1629c2937dfae1ea714248d6d3b)) * Truncate SRS size to the amount of points that we have downloaded ([#1862](https://github.com/AztecProtocol/aztec-packages/issues/1862)) ([0a7058c](https://github.com/AztecProtocol/aztec-packages/commit/0a7058cbda228c9baf378d69c906596e204d804f)) * Try to catch last undefined safety issues ([#2027](https://github.com/AztecProtocol/aztec-packages/issues/2027)) ([12e7486](https://github.com/AztecProtocol/aztec-packages/commit/12e7486c0750f648f51d2b43317df843a3c52bec)) diff --git a/docs/internal_notes/dev_docs/sandbox/components.md b/docs/internal_notes/dev_docs/sandbox/components.md index 58ba7718f20..313eff2e1d0 100644 --- a/docs/internal_notes/dev_docs/sandbox/components.md +++ b/docs/internal_notes/dev_docs/sandbox/components.md @@ -56,7 +56,7 @@ Responsibilities: Responsibilities: - Returns the sibling path for the given `tree_id` at the given leaf `index`. -- Can be injected into any context that requires path queries for a particular tree. Might be backed by implementations that call out to a server (where privacy doesn't matter, or during early development), or leverages some privacy tech (query via Nym), or could just point to a local `WorldStateSynchroniser`. +- Can be injected into any context that requires path queries for a particular tree. Might be backed by implementations that call out to a server (where privacy doesn't matter, or during early development), or leverages some privacy tech (query via Nym), or could just point to a local `WorldStateSynchronizer`. ### RollupSource @@ -182,7 +182,7 @@ Injected: Implementation notes for this milestone: - Mostly acting as a facade for other components, forwards requests as necessary. -- A `WorldStateSynchroniser` will ingest rollups from the `RollupSource` and maintain an up-to-date `MerkleTreeDb`. +- A `WorldStateSynchronizer` will ingest rollups from the `RollupSource` and maintain an up-to-date `MerkleTreeDb`. -We've found that such notes require an 'Initialisation Nullifier'; a nullifier which, when emitted, signals the initialisation of this state variable. I.e. the very first time the state variable has been written-to. +We've found that such notes require an 'Initialisation Nullifier'; a nullifier which, when emitted, signals the initialization of this state variable. I.e. the very first time the state variable has been written-to. > There's more on this topic in [the Aztec forum](https://discourse.aztec.network/t/utxo-syntax-2-initialising-singleton-utxos/47). diff --git a/docs/docs/dev_docs/wallets/main.md b/docs/docs/dev_docs/wallets/main.md index b346c8976e4..66da29e8824 100644 --- a/docs/docs/dev_docs/wallets/main.md +++ b/docs/docs/dev_docs/wallets/main.md @@ -14,7 +14,7 @@ The first step for any wallet is to let the user set up their [accounts](../../c A wallet must support at least one specific [account contract implementation](./writing_an_account_contract.md), which means being able to deploy such a contract, as well as interacting with it when sending transactions. Code-wise, this requires [implementing the `AccountContract` interface](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec.js/src/account/contract/index.ts). -Note that users must be able to receive funds in Aztec before deploying their account. A wallet should let a user generate a [deterministic complete address](../../concepts/foundation/accounts/keys.md#addresses-partial-addresses-and-public-keys) without having to interact with the network, so they can share it with others to receive funds. This requires that the wallet pins a specific contract implementation, its initialisation arguments, a deployment salt, and a privacy key. These values yield a deterministic address, so when the account contract is actually deployed, it is available at the precalculated address. Once the account contract is deployed, the user can start sending transactions using it as the transaction origin. +Note that users must be able to receive funds in Aztec before deploying their account. A wallet should let a user generate a [deterministic complete address](../../concepts/foundation/accounts/keys.md#addresses-partial-addresses-and-public-keys) without having to interact with the network, so they can share it with others to receive funds. This requires that the wallet pins a specific contract implementation, its initialization arguments, a deployment salt, and a privacy key. These values yield a deterministic address, so when the account contract is actually deployed, it is available at the precalculated address. Once the account contract is deployed, the user can start sending transactions using it as the transaction origin. ## Transaction lifecycle diff --git a/yarn-project/aztec-nr/aztec/src/constants_gen.nr b/yarn-project/aztec-nr/aztec/src/constants_gen.nr index c0680c8b2c6..bafa6e36b35 100644 --- a/yarn-project/aztec-nr/aztec/src/constants_gen.nr +++ b/yarn-project/aztec-nr/aztec/src/constants_gen.nr @@ -78,7 +78,7 @@ global GENERATOR_INDEX__COMMITMENT_NONCE = 2; global GENERATOR_INDEX__UNIQUE_COMMITMENT = 3; global GENERATOR_INDEX__SILOED_COMMITMENT = 4; global GENERATOR_INDEX__NULLIFIER = 5; -global GENERATOR_INDEX__INITIALISATION_NULLIFIER = 6; +global GENERATOR_INDEX__INITIALIZATION_NULLIFIER = 6; global GENERATOR_INDEX__OUTER_NULLIFIER = 7; global GENERATOR_INDEX__PUBLIC_DATA_READ = 8; global GENERATOR_INDEX__PUBLIC_DATA_UPDATE_REQUEST = 9; diff --git a/yarn-project/aztec-nr/aztec/src/state_vars/singleton.nr b/yarn-project/aztec-nr/aztec/src/state_vars/singleton.nr index 965e4e5f47f..d1ce9e44593 100644 --- a/yarn-project/aztec-nr/aztec/src/state_vars/singleton.nr +++ b/yarn-project/aztec-nr/aztec/src/state_vars/singleton.nr @@ -1,5 +1,5 @@ use dep::std::option::Option; -use crate::constants_gen::{EMPTY_NULLIFIED_COMMITMENT, GENERATOR_INDEX__INITIALISATION_NULLIFIER}; +use crate::constants_gen::{EMPTY_NULLIFIED_COMMITMENT, GENERATOR_INDEX__INITIALIZATION_NULLIFIER}; use crate::context::{PrivateContext, PublicContext, Context}; use crate::note::{ lifecycle::{create_note, destroy_note}, @@ -18,12 +18,12 @@ pub fn compute_singleton_initialization_nullifier(storage_slot: Field, owner: Op let secret = get_secret_key(owner.unwrap_unchecked()); pedersen_with_separator( [storage_slot, secret.low, secret.high], - GENERATOR_INDEX__INITIALISATION_NULLIFIER, + GENERATOR_INDEX__INITIALIZATION_NULLIFIER, )[0] } else { pedersen_with_separator( [storage_slot], - GENERATOR_INDEX__INITIALISATION_NULLIFIER, + GENERATOR_INDEX__INITIALIZATION_NULLIFIER, )[0] } } diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/aes128/index.ts b/yarn-project/circuits.js/src/barretenberg/crypto/aes128/index.ts index 47e8b7c90da..8d92a2779ab 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/aes128/index.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/aes128/index.ts @@ -11,7 +11,7 @@ export class Aes128 { /** * Encrypt a buffer using AES-128-CBC. * @param data - Data to encrypt. - * @param iv - AES initialisation vector. + * @param iv - AES initialization vector. * @param key - Key to encrypt with. * @returns Encrypted data. */ @@ -50,7 +50,7 @@ export class Aes128 { /** * Decrypt a buffer using AES-128-CBC. * @param data - Data to decrypt. - * @param iv - AES initialisation vector. + * @param iv - AES initialization vector. * @param key - Key to decrypt with. * @returns Decrypted data. */ diff --git a/yarn-project/circuits.js/src/cbind/constants.gen.ts b/yarn-project/circuits.js/src/cbind/constants.gen.ts index 13b9bd3515f..1817cbedd8f 100644 --- a/yarn-project/circuits.js/src/cbind/constants.gen.ts +++ b/yarn-project/circuits.js/src/cbind/constants.gen.ts @@ -80,7 +80,7 @@ export enum GeneratorIndex { UNIQUE_COMMITMENT = 3, SILOED_COMMITMENT = 4, NULLIFIER = 5, - INITIALISATION_NULLIFIER = 6, + INITIALIZATION_NULLIFIER = 6, OUTER_NULLIFIER = 7, PUBLIC_DATA_READ = 8, PUBLIC_DATA_UPDATE_REQUEST = 9, diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index 48c5179190b..9da49131e13 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -248,7 +248,7 @@ export type EndToEndContext = { /** * Sets up the environment for the end-to-end tests. * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated. - * @param opts - Options to pass to the node initialisation and to the setup script. + * @param opts - Options to pass to the node initialization and to the setup script. */ export async function setup(numberOfAccounts = 1, opts: SetupOptions = {}): Promise { const config = { ...getConfigEnvVars(), ...opts }; diff --git a/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr b/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr index e7df3dcb1bc..99e27616bed 100644 --- a/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr +++ b/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr @@ -36,10 +36,10 @@ impl EcdsaPublicKeyNote { let mut mul: Field = 1; for i in 1..32 { - let bytex: Field = self.x[31 - i] as Field; - x = x + (bytex * mul); - let bytey: Field = self.y[31 - i] as Field; - y = y + (bytey * mul); + let byte_x: Field = self.x[31 - i] as Field; + x = x + (byte_x * mul); + let byte_y: Field = self.y[31 - i] as Field; + y = y + (byte_y * mul); mul *= 256; } From 1136735690fab68a9d17a33bda13e7ee2403845a Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 13:56:14 +0200 Subject: [PATCH 16/20] more words --- cspell.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cspell.json b/cspell.json index cf7e19bb423..62cccfc0846 100644 --- a/cspell.json +++ b/cspell.json @@ -64,6 +64,7 @@ "aztecprotocol", "dbanks", "rahul", + "herskind", "diffie", "bootnode", "fargate", @@ -110,7 +111,10 @@ "autonat", "muxers", "Kademlia", - "mimc" + "mimc", + "gitrepo", + "subrepo", + "typecheck" ], "ignorePaths": [ "node_modules/", @@ -126,6 +130,8 @@ "cmake-build-debug", ".terraform*", ".bootstrapped", - "*.svg" + "*.svg", + "*.otf", + "git-subrepo/" ] } From 86e67d87723299bdfc50ea5bc53dcdeb2b67f79d Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 14:04:33 +0200 Subject: [PATCH 17/20] more words --- cspell.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/cspell.json b/cspell.json index 62cccfc0846..cb607491c23 100644 --- a/cspell.json +++ b/cspell.json @@ -65,6 +65,7 @@ "dbanks", "rahul", "herskind", + "suyash", "diffie", "bootnode", "fargate", @@ -114,7 +115,32 @@ "mimc", "gitrepo", "subrepo", - "typecheck" + "typecheck", + "fuzzer", + "fuzzers", + "gtest", + "dockerfiles", + "gitmodules", + "dockerhub", + "utxo", + "sload", + "quickstart", + "otterscan", + "cheatcodes", + "permissionless", + "parallelizable", + "solhint", + "foundryup", + "concat", + "mload", + "calldatacopy", + "ierc", + "erc", + "bbmalloc", + "bbfree", + "archiver", + "sigchld", + "pids" ], "ignorePaths": [ "node_modules/", From bf6dbfab1e410829ae6a4d569b672b5e315300e9 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 14:04:38 +0200 Subject: [PATCH 18/20] WIP --- barretenberg/CHANGELOG.md | 4 ++-- barretenberg/cpp/cmake/module.cmake | 4 ++-- .../cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp | 2 +- .../src/barretenberg/honk/composer/eccvm_composer.test.cpp | 2 +- .../join_split_example/proofs/join_split/join_split.test.cpp | 2 +- circuits/cpp/cmake/module.cmake | 4 ++-- circuits/cpp/src/aztec3/circuits/apps/.test.cpp | 4 ++-- .../apps/notes/default_singleton_private_note/note.tpp | 4 ++-- circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp | 2 +- circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp | 2 +- docs/docs/concepts/advanced/circuits/rollup_circuits/main.md | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/barretenberg/CHANGELOG.md b/barretenberg/CHANGELOG.md index 74c9063bc69..bfa54beb109 100644 --- a/barretenberg/CHANGELOG.md +++ b/barretenberg/CHANGELOG.md @@ -508,7 +508,7 @@ * Multithreaded Sumcheck ([#556](https://github.com/AztecProtocol/barretenberg/issues/556)) ([c4094b1](https://github.com/AztecProtocol/barretenberg/commit/c4094b155ba9d8e914c3e6a5b0d7808945b1eeed)) * **nullifier_tree:** make empty nullifier tree leaves hash be 0 ([#360](https://github.com/AztecProtocol/barretenberg/issues/360)) ([#382](https://github.com/AztecProtocol/barretenberg/issues/382)) ([b85ab8d](https://github.com/AztecProtocol/barretenberg/commit/b85ab8d587b3e93db2aa0f1c4f012e58e5d97915)) * Optimize memory consumption of pedersen generators ([#413](https://github.com/AztecProtocol/barretenberg/issues/413)) ([d60b16a](https://github.com/AztecProtocol/barretenberg/commit/d60b16a14219fd4bd130ce4537c3e94bfa10128f)) -* Parallelised folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8)) +* Parallelized folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8)) * **pkg-config:** Add a bindir variable ([#239](https://github.com/AztecProtocol/barretenberg/issues/239)) ([611bf34](https://github.com/AztecProtocol/barretenberg/commit/611bf34bcc6f82969a6fe546bf0a7cbecda6d36d)) * Remove TOOLCHAIN logic and replace with CMake presets ([#162](https://github.com/AztecProtocol/barretenberg/issues/162)) ([09db0be](https://github.com/AztecProtocol/barretenberg/commit/09db0be3d09ee12b4b73b03abe8fa4565cdb6660)) * replace `MerkleMembershipConstraint` with`ComputeMerkleRootConstraint` ([#385](https://github.com/AztecProtocol/barretenberg/issues/385)) ([74dbce5](https://github.com/AztecProtocol/barretenberg/commit/74dbce5dfa126ecd6dbda7b758581752f7b6a389)) @@ -584,7 +584,7 @@ * Make the circuit constructors field agnostic so we can check circuits on grumpkin ([#534](https://github.com/AztecProtocol/barretenberg/issues/534)) ([656d794](https://github.com/AztecProtocol/barretenberg/commit/656d7944f94f3da88250f3140838f3e32e9d0174)) * Multithreaded Sumcheck ([#556](https://github.com/AztecProtocol/barretenberg/issues/556)) ([c4094b1](https://github.com/AztecProtocol/barretenberg/commit/c4094b155ba9d8e914c3e6a5b0d7808945b1eeed)) * Optimize memory consumption of pedersen generators ([#413](https://github.com/AztecProtocol/barretenberg/issues/413)) ([d60b16a](https://github.com/AztecProtocol/barretenberg/commit/d60b16a14219fd4bd130ce4537c3e94bfa10128f)) -* Parallelised folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8)) +* Parallelized folding in Gemini ([#550](https://github.com/AztecProtocol/barretenberg/issues/550)) ([3b962d3](https://github.com/AztecProtocol/barretenberg/commit/3b962d372491430871443fd1b95fd9e049e233c8)) * Sort includes ([#571](https://github.com/AztecProtocol/barretenberg/issues/571)) ([dfa8736](https://github.com/AztecProtocol/barretenberg/commit/dfa8736136323e62a705066d25bef962a6a0b82d)) * Split plonk and honk tests ([#529](https://github.com/AztecProtocol/barretenberg/issues/529)) ([ba583ff](https://github.com/AztecProtocol/barretenberg/commit/ba583ff00509f636feae7b78304b115e34fc2357)) diff --git a/barretenberg/cpp/cmake/module.cmake b/barretenberg/cpp/cmake/module.cmake index 27b94b9adc7..996e645e091 100644 --- a/barretenberg/cpp/cmake/module.cmake +++ b/barretenberg/cpp/cmake/module.cmake @@ -6,11 +6,11 @@ # Scans for all .test.cpp files in a subdirectory, and creates a gtest binary named _tests. # Scans for all .bench.cpp files in a subdirectory, and creates a benchmark binary named _bench. # -# We have to get a bit complicated here, due to the fact CMake will not parallelise the building of object files +# We have to get a bit complicated here, due to the fact CMake will not parallelize the building of object files # between dependent targets, due to the potential of post-build code generation steps etc. # To work around this, we create "object libraries" containing the object files. # Then we declare executables/libraries that are to be built from these object files. -# These assets will only be linked as their dependencies complete, but we can parallelise the compilation at least. +# These assets will only be linked as their dependencies complete, but we can parallelize the compilation at least. # This is an interface library that can be used as an install target to include all header files # encountered by the `barretenberg_module` function. There is probably a better way to do this, 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 882d1ac14ed..ff10f339f4b 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/block_constraint.cpp @@ -35,7 +35,7 @@ void create_block_constraints(Builder& builder, const BlockConstraint constraint field_ct value = poly_to_field_ct(op.value, builder); field_ct index = poly_to_field_ct(op.index, builder); // For a ROM table, constant read should be optimised out: - // The rom_table won't work with a constant read because the table may not be initialised + // The rom_table won't work with a constant read because the table may not be initialized ASSERT(op.index.q_l != 0); // We create a new witness w to avoid issues with non-valid witness assignements: // if witness are not assigned, then w will be zero and table[w] will work diff --git a/barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.test.cpp b/barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.test.cpp index 5fb5daafb66..70af8587b2e 100644 --- a/barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.test.cpp +++ b/barretenberg/cpp/src/barretenberg/honk/composer/eccvm_composer.test.cpp @@ -18,7 +18,7 @@ namespace test_eccvm_composer { template class ECCVMComposerTests : public ::testing::Test { protected: - // TODO(640): The Standard Honk on Grumpkin test suite fails unless the SRS is initialised for every test. + // TODO(640): The Standard Honk on Grumpkin test suite fails unless the SRS is initialized for every test. void SetUp() override { if constexpr (std::is_same::value) { 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 ef41bcfbf67..b018a9cd7b8 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 @@ -212,7 +212,7 @@ class join_split_tests : public ::testing::Test { uint32_t account_note_index = 0, bool account_required = false) { - // The tree, user and notes are initialised in SetUp(). + // The tree, user and notes are initialized in SetUp(). preload_value_notes(); preload_account_notes(); // indices: [ACCOUNT_INDEX, ACCOUNT_INDEX + 1] return create_join_split_tx(input_indices, diff --git a/circuits/cpp/cmake/module.cmake b/circuits/cpp/cmake/module.cmake index 60b265c1d9c..aaa9655c344 100644 --- a/circuits/cpp/cmake/module.cmake +++ b/circuits/cpp/cmake/module.cmake @@ -6,11 +6,11 @@ # Scans for all .test.cpp files in a subdirectory, and creates a gtest binary named _tests. # Scans for all .bench.cpp files in a subdirectory, and creates a benchmark binary named _bench. # -# We have to get a bit complicated here, due to the fact CMake will not parallelise the building of object files +# We have to get a bit complicated here, due to the fact CMake will not parallelize the building of object files # between dependent targets, due to the potential of post-build code generation steps etc. # To work around this, we create "object libraries" containing the object files. # Then we declare executables/libraries that are to be built from these object files. -# These assets will only be linked as their dependencies complete, but we can parallelise the compilation at least. +# These assets will only be linked as their dependencies complete, but we can parallelize the compilation at least. function(circuits_cmake_module MODULE_NAME) file(GLOB_RECURSE SOURCE_FILES *.cpp) diff --git a/circuits/cpp/src/aztec3/circuits/apps/.test.cpp b/circuits/cpp/src/aztec3/circuits/apps/.test.cpp index 3e35f82b9cc..9fd343b1366 100644 --- a/circuits/cpp/src/aztec3/circuits/apps/.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/apps/.test.cpp @@ -315,9 +315,9 @@ TEST_F(state_var_tests, circuit_initialise_utxo_of_default_singleton_private_not // The person who may initialise the note might be different from the person who's actually given the note to own. // (E.g. the caller of this function might be the deployer of the contract, who is initialising notes on behalf of // other users) - CT::address owner_of_initialised_note = 888888; + CT::address owner_of_initialized_note = 888888; - my_utxo.initialise({ .value = 100, .owner = owner_of_initialised_note }); + my_utxo.initialise({ .value = 100, .owner = owner_of_initialized_note }); exec_ctx.finalize(); diff --git a/circuits/cpp/src/aztec3/circuits/apps/notes/default_singleton_private_note/note.tpp b/circuits/cpp/src/aztec3/circuits/apps/notes/default_singleton_private_note/note.tpp index 18bc2b54a7d..ee976b4eba4 100644 --- a/circuits/cpp/src/aztec3/circuits/apps/notes/default_singleton_private_note/note.tpp +++ b/circuits/cpp/src/aztec3/circuits/apps/notes/default_singleton_private_note/note.tpp @@ -194,7 +194,7 @@ typename CircuitTypes::fr DefaultSingletonPrivateNote::get_ const fr& owner_private_key = oracle.get_msg_sender_private_key(); - // We prevent this storage slot from even being initialised again: + // We prevent this storage slot from even being initialized again: auto& storage_slot_point = state_var->storage_slot_point; const std::vector hash_inputs{ @@ -233,7 +233,7 @@ typename CircuitTypes::fr DefaultSingletonPrivateNote::get_ const fr& owner_private_key = oracle.get_msg_sender_private_key(); - // We prevent this storage slot from even being initialised again: + // We prevent this storage slot from even being initialized again: auto& storage_slot_point = state_var->storage_slot_point; const std::vector hash_inputs{ diff --git a/circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp b/circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp index 15595b63fa1..bf6b7630f77 100644 --- a/circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp +++ b/circuits/cpp/src/aztec3/circuits/apps/opcodes/opcodes.hpp @@ -62,7 +62,7 @@ template class Opcodes { /** * @brief Compute and push a new commitment to the public inputs of this exec_ctx, BUT ALSO compute and produce an - * initialization nullifier, to prevent this note from being initialised again in the future. + * initialization nullifier, to prevent this note from being initialized again in the future. */ template static void UTXO_INIT(StateVar* state_var, Note& note_to_initialise); diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp index 7ee34f3d614..a252b5970e0 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp @@ -442,7 +442,7 @@ void common_update_public_end_values(Builder& builder, /** * @brief Initialises the circuit output end state from provided inputs * @param public_kernel_inputs The inputs to this iteration of the kernel circuit - * @param circuit_outputs The circuit outputs to be initialised + * @param circuit_outputs The circuit outputs to be initialized */ void common_initialise_end_values(PublicKernelInputs const& public_kernel_inputs, KernelCircuitPublicInputs& circuit_outputs); diff --git a/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md b/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md index 6f76754b97d..b1a4f99be70 100644 --- a/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md +++ b/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md @@ -10,7 +10,7 @@ The way we 'squish' all this data is in a 'binary tree of proofs' topology. > Example: If there were 16 txs in a rollup, we'd arrange the 16 kernel proofs into 8 pairs and merge each pair into a single proof (using zk-snark recursion techniques), resulting in 8 output proofs. We'd then arrange those 8 proofs into pairs and again merge each pair into a single proof, resulting in 4 output proofs. And so on until we'd be left with a single proof, which represents the correctness of the original 16 txs. -This 'binary tree of proofs' topology allows proof generation to be greatly parallelised across prover instances. Each layer of the tree can be computed in parallel. Or alternatively, subtrees can be coordinated to be computed in parallel. +This 'binary tree of proofs' topology allows proof generation to be greatly parallelized across prover instances. Each layer of the tree can be computed in parallel. Or alternatively, subtrees can be coordinated to be computed in parallel. > Note: 'binary tree of proofs' is actually an over simlification. The Rollup Circuits are designed so that a Sequencer can actually deviate from a neat, symmetrical tree, for the purposes of efficiency, and instead sometimes create wonky trees. From 8c8c0bf2f9b1450ab2f5b584c404f7ddf5caa07e Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 14:55:46 +0200 Subject: [PATCH 19/20] more words --- cspell.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cspell.json b/cspell.json index cb607491c23..78b0a83f371 100644 --- a/cspell.json +++ b/cspell.json @@ -65,6 +65,7 @@ "dbanks", "rahul", "herskind", + "danlee", "suyash", "diffie", "bootnode", @@ -140,7 +141,18 @@ "bbfree", "archiver", "sigchld", - "pids" + "pids", + "comlink", + "checksummed", + "tsdoc", + "muldiv", + "clonedeepwith", + "bodyparser", + "pkgs", + "mktemp", + "unshielding", + "workdir", + "leveldb" ], "ignorePaths": [ "node_modules/", @@ -158,6 +170,8 @@ ".bootstrapped", "*.svg", "*.otf", - "git-subrepo/" + "git-subrepo/", + "*.snap", + "package.json" ] } From 50fc0e4ebddab13189aec447994fc9eeaf6a0c33 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 12 Oct 2023 14:56:06 +0200 Subject: [PATCH 20/20] WIP --- .../circuits.js/src/structs/kernel/public_inputs_final.ts | 2 +- yarn-project/end-to-end/src/benchmarks/utils.ts | 2 +- yarn-project/end-to-end/src/canary/browser.ts | 2 +- yarn-project/end-to-end/src/e2e_card_game.test.ts | 6 +++--- yarn-project/end-to-end/src/e2e_multi_transfer.test.ts | 4 ++-- yarn-project/ethereum/src/deploy_l1_contracts.ts | 2 +- yarn-project/foundation/src/eth-address/index.ts | 4 ++-- yarn-project/foundation/src/fields/coordinate.ts | 2 +- yarn-project/foundation/src/fields/point.ts | 2 +- yarn-project/foundation/src/fifo/bounded_serial_queue.ts | 2 +- yarn-project/foundation/src/json-rpc/README.md | 2 +- yarn-project/foundation/src/json-rpc/convert.ts | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/yarn-project/circuits.js/src/structs/kernel/public_inputs_final.ts b/yarn-project/circuits.js/src/structs/kernel/public_inputs_final.ts index 6962edb9bbd..dd1a1339e23 100644 --- a/yarn-project/circuits.js/src/structs/kernel/public_inputs_final.ts +++ b/yarn-project/circuits.js/src/structs/kernel/public_inputs_final.ts @@ -11,7 +11,7 @@ import { CombinedConstantData } from './combined_constant_data.js'; export class KernelCircuitPublicInputsFinal { constructor( /** - * Final data accumulated for ordering privated kernel circuit. + * Final data accumulated for ordering private kernel circuit. */ public end: FinalAccumulatedData, /** diff --git a/yarn-project/end-to-end/src/benchmarks/utils.ts b/yarn-project/end-to-end/src/benchmarks/utils.ts index b88366c41c0..bb09e27a10b 100644 --- a/yarn-project/end-to-end/src/benchmarks/utils.ts +++ b/yarn-project/end-to-end/src/benchmarks/utils.ts @@ -111,7 +111,7 @@ export async function waitNewPXESynced( } /** - * Retisters a new account in a pxe and waits until it's synced all its notes. + * Registers a new account in a pxe and waits until it's synced all its notes. * @param pxe - PXE where to register the account. * @param privateKey - Private key of the account to register. * @param partialAddress - Partial address of the account to register. diff --git a/yarn-project/end-to-end/src/canary/browser.ts b/yarn-project/end-to-end/src/canary/browser.ts index dc6cf05e0f8..e876272feb7 100644 --- a/yarn-project/end-to-end/src/canary/browser.ts +++ b/yarn-project/end-to-end/src/canary/browser.ts @@ -117,7 +117,7 @@ export const browserTestSuite = (setup: () => Server, pageLogger: AztecJs.DebugL const completeAddress = window.AztecJs.CompleteAddress.fromString( '0x115f123bbc6cc6af9890055821cfba23a7c4e8832377a32ccb719a1ba3a86483', ); - // NOTE: browser doesnt know how to serialize CompleteAddress for return, so return a string + // NOTE: browser does not know how to serialize CompleteAddress for return, so return a string // otherwise returning a CompleteAddress makes result undefined. return completeAddress.toString(); }); diff --git a/yarn-project/end-to-end/src/e2e_card_game.test.ts b/yarn-project/end-to-end/src/e2e_card_game.test.ts index 5ff8b15c591..5fdb0a4e1ee 100644 --- a/yarn-project/end-to-end/src/e2e_card_game.test.ts +++ b/yarn-project/end-to-end/src/e2e_card_game.test.ts @@ -267,9 +267,9 @@ describe('e2e_card_game', () => { { address: secondPlayer, deck: secondPlayerGameDeck }, ]); - const sotedByPoints = game.players.sort((a, b) => Number(b.points - a.points)); - const winner = AztecAddress.fromBigInt(sotedByPoints[0].address); - const loser = AztecAddress.fromBigInt(sotedByPoints[1].address); + const sortedByPoints = game.players.sort((a, b) => Number(b.points - a.points)); + const winner = AztecAddress.fromBigInt(sortedByPoints[0].address); + const loser = AztecAddress.fromBigInt(sortedByPoints[1].address); await expect( contractFor(loser).methods.claim_cards(GAME_ID, game.rounds_cards.map(cardToField)).send().wait(), diff --git a/yarn-project/end-to-end/src/e2e_multi_transfer.test.ts b/yarn-project/end-to-end/src/e2e_multi_transfer.test.ts index 81aa130aba0..80b7259a356 100644 --- a/yarn-project/end-to-end/src/e2e_multi_transfer.test.ts +++ b/yarn-project/end-to-end/src/e2e_multi_transfer.test.ts @@ -160,10 +160,10 @@ describe('multi-transfer payments', () => { { const amounts: bigint[] = [50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n]; const noteOffsets: bigint[] = [0n, 0n, 3n, 6n]; - const repeatedSelfAdddress: AztecAddress[] = Array(12).fill(ownerAddress); + const repeatedSelfAddress: AztecAddress[] = Array(12).fill(ownerAddress); await multiTransferContract.methods - .multiTransfer(zkTokenContract.address.toField(), repeatedSelfAdddress, amounts, ownerAddress, noteOffsets) + .multiTransfer(zkTokenContract.address.toField(), repeatedSelfAddress, amounts, ownerAddress, noteOffsets) .send() .wait({ timeout: 100 }); // mining timeout ≥ time needed for the test to finish. diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index 49933e2477c..8b1a24cc022 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -43,7 +43,7 @@ export type DeployL1Contracts = { */ export interface ContractArtifacts { /** - * The conttract abi. + * The contract abi. */ contractAbi: Narrow; /** diff --git a/yarn-project/foundation/src/eth-address/index.ts b/yarn-project/foundation/src/eth-address/index.ts index 8c1a741e945..2571f09790c 100644 --- a/yarn-project/foundation/src/eth-address/index.ts +++ b/yarn-project/foundation/src/eth-address/index.ts @@ -70,7 +70,7 @@ export class EthAddress { // Does not have the basic requirements of an address. return false; } else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) { - // It's ALL lowercase or ALL upppercase. + // It's ALL lowercase or ALL uppercase. return true; } else { return EthAddress.checkAddressChecksum(address); @@ -227,7 +227,7 @@ export class EthAddress { /** * Deserializes from a buffer or reader, corresponding to a write in cpp. * @param buffer - Buffer to read from. - * @returns The EthAdress. + * @returns The EthAddress. */ static fromBuffer(buffer: Buffer | BufferReader): EthAddress { const reader = BufferReader.asReader(buffer); diff --git a/yarn-project/foundation/src/fields/coordinate.ts b/yarn-project/foundation/src/fields/coordinate.ts index aada6d1ff80..be9d4ec39b9 100644 --- a/yarn-project/foundation/src/fields/coordinate.ts +++ b/yarn-project/foundation/src/fields/coordinate.ts @@ -37,7 +37,7 @@ export class Coordinate { } /** - * serializes the oblect to buffer of 2 fields. + * serializes the object to buffer of 2 fields. * @returns A buffer serialization of the object. */ toFieldsBuffer(): Buffer { diff --git a/yarn-project/foundation/src/fields/point.ts b/yarn-project/foundation/src/fields/point.ts index 7302c02eb07..4c94afa883a 100644 --- a/yarn-project/foundation/src/fields/point.ts +++ b/yarn-project/foundation/src/fields/point.ts @@ -78,7 +78,7 @@ export class Point { } /** - * Converts the Point instance to a Buffer representaion of the coordinates. + * Converts the Point instance to a Buffer representation of the coordinates. * The outputs buffer length will be 64, the length of both coordinates not represented as fields. * @returns A Buffer representation of the Point instance. */ diff --git a/yarn-project/foundation/src/fifo/bounded_serial_queue.ts b/yarn-project/foundation/src/fifo/bounded_serial_queue.ts index 3072cc7d1fb..afecfd9b30b 100644 --- a/yarn-project/foundation/src/fifo/bounded_serial_queue.ts +++ b/yarn-project/foundation/src/fifo/bounded_serial_queue.ts @@ -56,7 +56,7 @@ export class BoundedSerialQueue { /** * The caller will block until fn is successfully enqueued. - * The fn itself is execute asyncronously and its result discarded. + * The fn itself is execute asynchronously and its result discarded. * TODO(AD) do we need this if we have exec()? * @param fn - The function to call once unblocked. */ diff --git a/yarn-project/foundation/src/json-rpc/README.md b/yarn-project/foundation/src/json-rpc/README.md index 8abcc99adda..2a2c159af97 100644 --- a/yarn-project/foundation/src/json-rpc/README.md +++ b/yarn-project/foundation/src/json-rpc/README.md @@ -12,7 +12,7 @@ json-rpc ``` Each createJsonRpcClient and JsonRpcServer call needs a map of classes that will be translated in input and output values. -By default, Buffer is handled, but other usermade classes need to define toString() and static fromString() like so: +By default, Buffer is handled, but other user-made classes need to define toString() and static fromString() like so: ``` class PublicKey { diff --git a/yarn-project/foundation/src/json-rpc/convert.ts b/yarn-project/foundation/src/json-rpc/convert.ts index af378fa4cc1..6de58f4fee8 100644 --- a/yarn-project/foundation/src/json-rpc/convert.ts +++ b/yarn-project/foundation/src/json-rpc/convert.ts @@ -117,7 +117,7 @@ export function convertFromJsonObj(cc: ClassConverter, obj: any): any { * @returns The encoded object. */ export function convertToJsonObj(cc: ClassConverter, obj: any): any { - // Bigint is a primitive type that needs special handling since it's not serialisable + // Bigint is a primitive type that needs special handling since it's not serializable if (typeof obj === 'bigint') { return { type: 'bigint',