Conversation
Rumata888
reviewed
Feb 3, 2025
| auto scaling_factor = uint256_t(1) << (32 * i); | ||
| a_accumulator += a_chunk * scaling_factor; | ||
| b_accumulator += b_chunk * scaling_factor; | ||
|
|
Contributor
There was a problem hiding this comment.
Could you add the lines back so this file is not in the PR?
Rumata888
approved these changes
Feb 3, 2025
Contributor
Rumata888
left a comment
There was a problem hiding this comment.
Nice work, LGTM. Just merge the master in
ludamad
added a commit
that referenced
this pull request
Feb 3, 2025
Original PR: #11651 --------- Co-authored-by: defkit <jewelofchaos9@gmail.com>
AztecBot
pushed a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Feb 4, 2025
Original PR: AztecProtocol/aztec-packages#11651 --------- Co-authored-by: defkit <jewelofchaos9@gmail.com>
sklppy88
pushed a commit
that referenced
this pull request
Feb 4, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.74.0</summary> ## [0.74.0](aztec-package-v0.73.0...aztec-package-v0.74.0) (2025-02-04) ### Miscellaneous * Ensure new kv-store is used on the server ([#11662](#11662)) ([aee1420](aee1420)) </details> <details><summary>barretenberg.js: 0.74.0</summary> ## [0.74.0](barretenberg.js-v0.73.0...barretenberg.js-v0.74.0) (2025-02-04) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.74.0</summary> ## [0.74.0](aztec-packages-v0.73.0...aztec-packages-v0.74.0) (2025-02-04) ### ⚠ BREAKING CHANGES * time library ([#11542](#11542)) ### Features * `u128.ts` accepting string on input ([#11664](#11664)) ([bb25992](bb25992)) * Add network, better drawer performance ([#11694](#11694)) ([1f61822](1f61822)) * Skip calculation of partial sums when simulating blobs ([#11257](#11257)) ([aca66f7](aca66f7)) * Time library ([#11542](#11542)) ([3b463f9](3b463f9)), closes [#11520](#11520) * UltraHonkZK contract ([#11553](#11553)) ([a68369f](a68369f)) ### Bug Fixes * Add bootstrap.sh to rebuild_patterns ([#11683](#11683)) ([e84a81a](e84a81a)) * **archiver:** Do not attempt to decode blob before filtering ([#11668](#11668)) ([961cbdd](961cbdd)) * Barretenber/stdlib/logic bugs ([#11651](#11651)) ([dddab22](dddab22)) * Barretenberg/stdlib/logic bugs (redo) ([#11691](#11691)) ([6d0bad7](6d0bad7)) * **docs:** Keys docs update ([#11665](#11665)) ([ce3d92c](ce3d92c)) * Revert "barretenberg/stdlib/logic bugs" ([#11689](#11689)) ([b99570d](b99570d)) * Solidity verifier caching ([#11712](#11712)) ([2ba1e71](2ba1e71)) * Use eth-execution label ([#11713](#11713)) ([d3c31d8](d3c31d8)) ### Miscellaneous * Add tests for gov proposer ([#11633](#11633)) ([5c6a48a](5c6a48a)), closes [#11681](#11681) * **bb-prover:** Avm test skip and split ([#11717](#11717)) ([1778867](1778867)) * Benchmark sha256 number of instructions executed in AVM ([#11253](#11253)) ([aaf0d8c](aaf0d8c)) * Delete MerkleTrees implementation in JS ([#11697](#11697)) ([1db7b78](1db7b78)) * Ensure new kv-store is used on the server ([#11662](#11662)) ([aee1420](aee1420)) * Field encoding should use `fromString` instead of `fromHexString` ([#11585](#11585)) ([43fdbb1](43fdbb1)), closes [#10331](#10331) * Improve boxes ([#11656](#11656)) ([46a3e85](46a3e85)) * Increase node pool count and don't use a release channel ([#11687](#11687)) ([65a3f11](65a3f11)) * Mark contracts as pub ([#11241](#11241)) ([b168601](b168601)) * Reduce memory requests on prover node ([#11678](#11678)) ([a720151](a720151)) * Remove profiler cache fallback ([#11680](#11680)) ([a305aef](a305aef)) * Remove some templates in templates ([#11698](#11698)) ([61614b1](61614b1)) * Remove unused functions from public side effect trace ([#11600](#11600)) ([54e9602](54e9602)) * Replace relative paths to noir-protocol-circuits ([739151e](739151e)) * Replace relative paths to noir-protocol-circuits ([bbd526c](bbd526c)) * **sequencer:** Add InvalidArchive to canProposeAtNextEthBlock ignored errors ([#11682](#11682)) ([eea4bd3](eea4bd3)) * **spartan:** Remove hardcoded keys and addresses - derive all from mnemonic ([#11672](#11672)) ([65f0e48](65f0e48)) * Turn off auto-upgrade in node-pools ([#11679](#11679)) ([09f98a9](09f98a9)) * Turn on masking in ultra and mega zk + oink clean-up ([#11693](#11693)) ([08e96fe](08e96fe)) ### Documentation * Update mig notes release version ([#11685](#11685)) ([46a30b5](46a30b5)) </details> <details><summary>barretenberg: 0.74.0</summary> ## [0.74.0](barretenberg-v0.73.0...barretenberg-v0.74.0) (2025-02-04) ### Features * UltraHonkZK contract ([#11553](#11553)) ([a68369f](a68369f)) ### Bug Fixes * Barretenber/stdlib/logic bugs ([#11651](#11651)) ([dddab22](dddab22)) * Barretenberg/stdlib/logic bugs (redo) ([#11691](#11691)) ([6d0bad7](6d0bad7)) * Revert "barretenberg/stdlib/logic bugs" ([#11689](#11689)) ([b99570d](b99570d)) ### Miscellaneous * Ensure new kv-store is used on the server ([#11662](#11662)) ([aee1420](aee1420)) * Remove some templates in templates ([#11698](#11698)) ([61614b1](61614b1)) * Turn on masking in ultra and mega zk + oink clean-up ([#11693](#11693)) ([08e96fe](08e96fe)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
AztecBot
added a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Feb 5, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.74.0</summary> ## [0.74.0](AztecProtocol/aztec-packages@aztec-package-v0.73.0...aztec-package-v0.74.0) (2025-02-04) ### Miscellaneous * Ensure new kv-store is used on the server ([#11662](AztecProtocol/aztec-packages#11662)) ([aee1420](AztecProtocol/aztec-packages@aee1420)) </details> <details><summary>barretenberg.js: 0.74.0</summary> ## [0.74.0](AztecProtocol/aztec-packages@barretenberg.js-v0.73.0...barretenberg.js-v0.74.0) (2025-02-04) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.74.0</summary> ## [0.74.0](AztecProtocol/aztec-packages@aztec-packages-v0.73.0...aztec-packages-v0.74.0) (2025-02-04) ### ⚠ BREAKING CHANGES * time library ([#11542](AztecProtocol/aztec-packages#11542)) ### Features * `u128.ts` accepting string on input ([#11664](AztecProtocol/aztec-packages#11664)) ([bb25992](AztecProtocol/aztec-packages@bb25992)) * Add network, better drawer performance ([#11694](AztecProtocol/aztec-packages#11694)) ([1f61822](AztecProtocol/aztec-packages@1f61822)) * Skip calculation of partial sums when simulating blobs ([#11257](AztecProtocol/aztec-packages#11257)) ([aca66f7](AztecProtocol/aztec-packages@aca66f7)) * Time library ([#11542](AztecProtocol/aztec-packages#11542)) ([3b463f9](AztecProtocol/aztec-packages@3b463f9)), closes [#11520](AztecProtocol/aztec-packages#11520) * UltraHonkZK contract ([#11553](AztecProtocol/aztec-packages#11553)) ([a68369f](AztecProtocol/aztec-packages@a68369f)) ### Bug Fixes * Add bootstrap.sh to rebuild_patterns ([#11683](AztecProtocol/aztec-packages#11683)) ([e84a81a](AztecProtocol/aztec-packages@e84a81a)) * **archiver:** Do not attempt to decode blob before filtering ([#11668](AztecProtocol/aztec-packages#11668)) ([961cbdd](AztecProtocol/aztec-packages@961cbdd)) * Barretenber/stdlib/logic bugs ([#11651](AztecProtocol/aztec-packages#11651)) ([dddab22](AztecProtocol/aztec-packages@dddab22)) * Barretenberg/stdlib/logic bugs (redo) ([#11691](AztecProtocol/aztec-packages#11691)) ([6d0bad7](AztecProtocol/aztec-packages@6d0bad7)) * **docs:** Keys docs update ([#11665](AztecProtocol/aztec-packages#11665)) ([ce3d92c](AztecProtocol/aztec-packages@ce3d92c)) * Revert "barretenberg/stdlib/logic bugs" ([#11689](AztecProtocol/aztec-packages#11689)) ([b99570d](AztecProtocol/aztec-packages@b99570d)) * Solidity verifier caching ([#11712](AztecProtocol/aztec-packages#11712)) ([2ba1e71](AztecProtocol/aztec-packages@2ba1e71)) * Use eth-execution label ([#11713](AztecProtocol/aztec-packages#11713)) ([d3c31d8](AztecProtocol/aztec-packages@d3c31d8)) ### Miscellaneous * Add tests for gov proposer ([#11633](AztecProtocol/aztec-packages#11633)) ([5c6a48a](AztecProtocol/aztec-packages@5c6a48a)), closes [#11681](AztecProtocol/aztec-packages#11681) * **bb-prover:** Avm test skip and split ([#11717](AztecProtocol/aztec-packages#11717)) ([1778867](AztecProtocol/aztec-packages@1778867)) * Benchmark sha256 number of instructions executed in AVM ([#11253](AztecProtocol/aztec-packages#11253)) ([aaf0d8c](AztecProtocol/aztec-packages@aaf0d8c)) * Delete MerkleTrees implementation in JS ([#11697](AztecProtocol/aztec-packages#11697)) ([1db7b78](AztecProtocol/aztec-packages@1db7b78)) * Ensure new kv-store is used on the server ([#11662](AztecProtocol/aztec-packages#11662)) ([aee1420](AztecProtocol/aztec-packages@aee1420)) * Field encoding should use `fromString` instead of `fromHexString` ([#11585](AztecProtocol/aztec-packages#11585)) ([43fdbb1](AztecProtocol/aztec-packages@43fdbb1)), closes [#10331](AztecProtocol/aztec-packages#10331) * Improve boxes ([#11656](AztecProtocol/aztec-packages#11656)) ([46a3e85](AztecProtocol/aztec-packages@46a3e85)) * Increase node pool count and don't use a release channel ([#11687](AztecProtocol/aztec-packages#11687)) ([65a3f11](AztecProtocol/aztec-packages@65a3f11)) * Mark contracts as pub ([#11241](AztecProtocol/aztec-packages#11241)) ([b168601](AztecProtocol/aztec-packages@b168601)) * Reduce memory requests on prover node ([#11678](AztecProtocol/aztec-packages#11678)) ([a720151](AztecProtocol/aztec-packages@a720151)) * Remove profiler cache fallback ([#11680](AztecProtocol/aztec-packages#11680)) ([a305aef](AztecProtocol/aztec-packages@a305aef)) * Remove some templates in templates ([#11698](AztecProtocol/aztec-packages#11698)) ([61614b1](AztecProtocol/aztec-packages@61614b1)) * Remove unused functions from public side effect trace ([#11600](AztecProtocol/aztec-packages#11600)) ([54e9602](AztecProtocol/aztec-packages@54e9602)) * Replace relative paths to noir-protocol-circuits ([739151e](AztecProtocol/aztec-packages@739151e)) * Replace relative paths to noir-protocol-circuits ([bbd526c](AztecProtocol/aztec-packages@bbd526c)) * **sequencer:** Add InvalidArchive to canProposeAtNextEthBlock ignored errors ([#11682](AztecProtocol/aztec-packages#11682)) ([eea4bd3](AztecProtocol/aztec-packages@eea4bd3)) * **spartan:** Remove hardcoded keys and addresses - derive all from mnemonic ([#11672](AztecProtocol/aztec-packages#11672)) ([65f0e48](AztecProtocol/aztec-packages@65f0e48)) * Turn off auto-upgrade in node-pools ([#11679](AztecProtocol/aztec-packages#11679)) ([09f98a9](AztecProtocol/aztec-packages@09f98a9)) * Turn on masking in ultra and mega zk + oink clean-up ([#11693](AztecProtocol/aztec-packages#11693)) ([08e96fe](AztecProtocol/aztec-packages@08e96fe)) ### Documentation * Update mig notes release version ([#11685](AztecProtocol/aztec-packages#11685)) ([46a30b5](AztecProtocol/aztec-packages@46a30b5)) </details> <details><summary>barretenberg: 0.74.0</summary> ## [0.74.0](AztecProtocol/aztec-packages@barretenberg-v0.73.0...barretenberg-v0.74.0) (2025-02-04) ### Features * UltraHonkZK contract ([#11553](AztecProtocol/aztec-packages#11553)) ([a68369f](AztecProtocol/aztec-packages@a68369f)) ### Bug Fixes * Barretenber/stdlib/logic bugs ([#11651](AztecProtocol/aztec-packages#11651)) ([dddab22](AztecProtocol/aztec-packages@dddab22)) * Barretenberg/stdlib/logic bugs (redo) ([#11691](AztecProtocol/aztec-packages#11691)) ([6d0bad7](AztecProtocol/aztec-packages@6d0bad7)) * Revert "barretenberg/stdlib/logic bugs" ([#11689](AztecProtocol/aztec-packages#11689)) ([b99570d](AztecProtocol/aztec-packages@b99570d)) ### Miscellaneous * Ensure new kv-store is used on the server ([#11662](AztecProtocol/aztec-packages#11662)) ([aee1420](AztecProtocol/aztec-packages@aee1420)) * Remove some templates in templates ([#11698](AztecProtocol/aztec-packages#11698)) ([61614b1](AztecProtocol/aztec-packages@61614b1)) * Turn on masking in ultra and mega zk + oink clean-up ([#11693](AztecProtocol/aztec-packages#11693)) ([08e96fe](AztecProtocol/aztec-packages@08e96fe)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suyash67
added a commit
that referenced
this pull request
Jul 24, 2025
The `stdlib::uint` module was only being tested for `uint32_ct`. This PR makes the tests also run for `uint8_ct, uint16_ct, uint64_ct`. The tests were failing for `uint64_ct` because the XOR and AND lookup tables only supported 32-bit inputs. If we attempted to input more than 32-bits, it naturally led to the error message[^1]: ```bash 'C++ exception with description "Last key slice greater than 4" thrown in the test body."' ``` We slice the 64-bit number in 6-bit slices, starting from the least significant slice: <img width="704" alt="image" src="https://github.com/user-attachments/assets/85b8feac-8913-44a8-bb3d-9538513c762a" /> such that the most-significant slice is 4 bits. Since we allowed only 32-bit XOR and AND lookup tables, it read the first 5 slices $(a_0, \dots, a_4)$, i.e., 30 bits, and when it needs to read $a_5$ slice, obviously the remainder $r = (a \gg 30)$ is greater than the allowed value of the last slice (i.e., $r > 4$). [^1]: Side note: the comment in the code noted the error message as `C++ exception with description "Last key slice greater than 64" thrown in the test body` because it was referring to an error before the bug in uint32 table was [fixed](#11651). Solution: simply added a 64-bit multi-table for XOR and AND operation of two 64-bit numbers. Note that we still use the 6-bit basic table repeated 10-times and a new 4-bit table for the last slice. Hence, one 64-bit XOR and AND operation would cost 11 lookup gates. resolves AztecProtocol/barretenberg#1229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chunks are underconstrained if chunk_size != 32
a == a_chunk[0] + a_chunk[1] * 2**32 + a_chunk[2] * 2**64...Taking
a_chunk[0] == a & (2 ** 33 - 1)a_chunk[1] == (a >> 33) & (2 ** 31 - 1)We receive valid witness