diff --git a/CHANGELOG.md b/CHANGELOG.md index 533598f79b1e..78f957daf26a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1396,7 +1396,7 @@ * Confusing "Unknown complete address" error ([#2967](https://github.com/AztecProtocol/aztec-packages/issues/2967)) ([3a8f54a](https://github.com/AztecProtocol/aztec-packages/commit/3a8f54a8330620669380cbd1b06551aa10703ec3)) * Force jest to quit, otherwise CI can rack up to 3hrs of credits per job. ([#2899](https://github.com/AztecProtocol/aztec-packages/issues/2899)) ([ba2f671](https://github.com/AztecProtocol/aztec-packages/commit/ba2f671c79ac3c2aa19c769c3db56a27a7e0854f)) * Honk sumcheck performance ([#2925](https://github.com/AztecProtocol/aztec-packages/issues/2925)) ([5fbfe6e](https://github.com/AztecProtocol/aztec-packages/commit/5fbfe6eeccdb23f734fb36f30d1e33340f9fb07a)) -* pending note hashes contract using the wrong number of arguments ([#2959](https://github.com/AztecProtocol/aztec-packages/issues/2959)) ([655c322](https://github.com/AztecProtocol/aztec-packages/commit/655c322ab0e71074b3f747c95bfafbd6b7008217)) +* Pending commitments contract using the wrong number of arguments ([#2959](https://github.com/AztecProtocol/aztec-packages/issues/2959)) ([655c322](https://github.com/AztecProtocol/aztec-packages/commit/655c322ab0e71074b3f747c95bfafbd6b7008217)) * Prettierignore in boxes ([#2902](https://github.com/AztecProtocol/aztec-packages/issues/2902)) ([8f7a200](https://github.com/AztecProtocol/aztec-packages/commit/8f7a200e809a9dc6ac8e1beaf3bbf1fd83e5a1fb)) * Randomness in `AddressNote` ([#2965](https://github.com/AztecProtocol/aztec-packages/issues/2965)) ([4dc49a9](https://github.com/AztecProtocol/aztec-packages/commit/4dc49a92428216928d918d893c40745957e5b983)) * Yarn lock ([#2923](https://github.com/AztecProtocol/aztec-packages/issues/2923)) ([7042bc6](https://github.com/AztecProtocol/aztec-packages/commit/7042bc6130f8473b6c59bf9a0146ea8b2c3c7483)) diff --git a/docs/docs/developers/contracts/writing_contracts/functions/context.md b/docs/docs/developers/contracts/writing_contracts/functions/context.md index 93c14bbc1714..c6a0587d0ec5 100644 --- a/docs/docs/developers/contracts/writing_contracts/functions/context.md +++ b/docs/docs/developers/contracts/writing_contracts/functions/context.md @@ -105,18 +105,18 @@ The return values are a set of values that are returned from an applications exe -### New note hashes +### New Note Hashes -New note hashes contains an array of all of the commitments created in the current execution context. +New note hashes contains an array of all of the note hashes created in the current execution context. ### New Nullifiers New nullifiers contains an array of the new nullifiers emitted from the current execution context. -### Nullified Commitments +### Nullified Note Hashes -Nullified commitments is an optimization for introduced to help reduce state growth. There are often cases where commitments are created and nullified within the same transaction. -In these cases there is no reason that these commitments should take up space on the node's commitment/nullifier trees. Keeping track of nullified commitments allows us to "cancel out" and prove these cases. +Nullified note hashes is an optimization for introduced to help reduce state growth. There are often cases where note hashes are created and nullified within the same transaction. +In these cases there is no reason that these note hashes should take up space on the node's commitment/nullifier trees. Keeping track of nullified note hashes allows us to "cancel out" and prove these cases. ### Private Call Stack diff --git a/docs/docs/developers/contracts/writing_contracts/historical_data/slow_updates_tree/main.md b/docs/docs/developers/contracts/writing_contracts/historical_data/slow_updates_tree/main.md index 235f450ac3cd..170981942d9a 100644 --- a/docs/docs/developers/contracts/writing_contracts/historical_data/slow_updates_tree/main.md +++ b/docs/docs/developers/contracts/writing_contracts/historical_data/slow_updates_tree/main.md @@ -69,7 +69,7 @@ graph TD CurrentM --> Value1[Current Value 1] CurrentM --> Value2[Current Value 2] CurrentM --> ValueN[Current Value N] - Pending --> PendingM[pending note hash 1] + Pending --> PendingM[Pending Commitment 1] PendingM --> PValue1[Pending Value 1] PendingM --> PValue2[Pending Value 2] PendingM --> PValueN[Pending Value N] diff --git a/docs/docs/developers/debugging/sandbox-errors.md b/docs/docs/developers/debugging/sandbox-errors.md index c321da860481..9fc8f60cd0e9 100644 --- a/docs/docs/developers/debugging/sandbox-errors.md +++ b/docs/docs/developers/debugging/sandbox-errors.md @@ -22,7 +22,7 @@ Remember that for each function call (i.e. each item in the call stack), there i Cannot call contract at address(0x0) privately. This error may also happen when you deploy a new contract and the contract data hash is inconsistent to the expected contract address. -#### 2005 - PRIVATE_KERNEL\_\_NEW_COMMITMENTS_PROHIBITED_IN_STATIC_CALL +#### 2005 - PRIVATE_KERNEL\_\_NEW_NOTE_HASHES_PROHIBITED_IN_STATIC_CALL For static calls, new note hashes aren't allowed @@ -120,7 +120,7 @@ For static calls, no contract storage change requests are allowed. Same as [3022](#3022---public_kernel__public_call_stack_contract_storage_updates_prohibited_for_static_call), no contract changes are allowed for static calls. -#### 3026 - PUBLIC_KERNEL\_\_NEW_COMMITMENTS_PROHIBITED_IN_STATIC_CALL +#### 3026 - PUBLIC_KERNEL\_\_NOTE_HASHES_PROHIBITED_IN_STATIC_CALL For static calls, no new note hashes or nullifiers can be added to the state. diff --git a/docs/docs/learn/concepts/storage/storage_slots.md b/docs/docs/learn/concepts/storage/storage_slots.md index 55901f6dc7e1..9afb68ae05da 100644 --- a/docs/docs/learn/concepts/storage/storage_slots.md +++ b/docs/docs/learn/concepts/storage/storage_slots.md @@ -39,8 +39,7 @@ If we include the storage slot, as part of the note whose commitment is stored i Similarly to how we siloed the public storage slots, we can silo our private storage by hashing the logical storage slot together with the note content. ```rust -note_hash = H(...note_content); -commitment = H(logical_storage_slot, note_hash); +note_hash = H(logical_storage_slot, note_content_hash); ``` This siloing (there will be more) is done in the application circuit, since it is not necessary for security of the network (but only the application). @@ -53,7 +52,7 @@ When reading the values for these notes, the application circuit can then constr To ensure that one contract cannot insert storage that other contracts would believe is theirs, we do a second siloing by hashing the `commitment` with the contract address. ```rust -siloed_note_hash = H(contract_address, commitment); +siloed_note_hash = H(contract_address, note_hash); ``` By doing this address-siloing at the kernel circuit we *force* the inserted commitments to include and not lie about the `contract_address`.