-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(perf): speed up construction of bbjs Frs & cache zero hashes in ephemeral trees #11851
Merged
+81
−56
Conversation
This file contains 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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Feb 8, 2025
fcarreiro
reviewed
Feb 8, 2025
91194bb
to
8c2bb0b
Compare
6e7102d
to
68027e9
Compare
68027e9
to
18151df
Compare
Cache zero-hashes in static member of ephemeral tree class. Brings Ephemeral forest construction from 20ms down to 10ms.
ludamad
approved these changes
Feb 10, 2025
sklppy88
pushed a commit
that referenced
this pull request
Feb 10, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.76.1</summary> ## [0.76.1](aztec-package-v0.76.0...aztec-package-v0.76.1) (2025-02-10) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.76.1</summary> ## [0.76.1](barretenberg.js-v0.76.0...barretenberg.js-v0.76.1) (2025-02-10) ### Features * **perf:** Speed up construction of bbjs Frs & cache zero hashes in ephemeral trees ([#11851](#11851)) ([2b5afe3](2b5afe3)) ### Bug Fixes * Revert "feat(perf): speed up construction of bbjs Frs & cache zero hashes in ephemeral trees" ([#11893](#11893)) ([99fdab9](99fdab9)) </details> <details><summary>aztec-packages: 0.76.1</summary> ## [0.76.1](aztec-packages-v0.76.0...aztec-packages-v0.76.1) (2025-02-10) ### Features * **perf:** Speed up construction of bbjs Frs & cache zero hashes in ephemeral trees ([#11851](#11851)) ([2b5afe3](2b5afe3)) ### Bug Fixes * Actually fix pxe releases ([#11890](#11890)) ([b22c9b9](b22c9b9)) * Bb pattern ([9fcff50](9fcff50)) * Revert "feat(perf): speed up construction of bbjs Frs & cache zero hashes in ephemeral trees" ([#11893](#11893)) ([99fdab9](99fdab9)) ### Miscellaneous * Add blob lib to npm deploy ([#11891](#11891)) ([bc10f17](bc10f17)) </details> <details><summary>barretenberg: 0.76.1</summary> ## [0.76.1](barretenberg-v0.76.0...barretenberg-v0.76.1) (2025-02-10) ### Miscellaneous * **barretenberg:** Synchronize aztec-packages versions </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
pushed a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Feb 11, 2025
…ro hashes in ephemeral trees" (#11893) Reverts AztecProtocol/aztec-packages#11851 It broke bb.js tests, which never ran
AztecBot
added a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Feb 11, 2025
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.76.1</summary> ## [0.76.1](AztecProtocol/aztec-packages@aztec-package-v0.76.0...aztec-package-v0.76.1) (2025-02-10) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.76.1</summary> ## [0.76.1](AztecProtocol/aztec-packages@barretenberg.js-v0.76.0...barretenberg.js-v0.76.1) (2025-02-10) ### Features * **perf:** Speed up construction of bbjs Frs & cache zero hashes in ephemeral trees ([#11851](AztecProtocol/aztec-packages#11851)) ([2b5afe3](AztecProtocol/aztec-packages@2b5afe3)) ### Bug Fixes * Revert "feat(perf): speed up construction of bbjs Frs & cache zero hashes in ephemeral trees" ([#11893](AztecProtocol/aztec-packages#11893)) ([99fdab9](AztecProtocol/aztec-packages@99fdab9)) </details> <details><summary>aztec-packages: 0.76.1</summary> ## [0.76.1](AztecProtocol/aztec-packages@aztec-packages-v0.76.0...aztec-packages-v0.76.1) (2025-02-10) ### Features * **perf:** Speed up construction of bbjs Frs & cache zero hashes in ephemeral trees ([#11851](AztecProtocol/aztec-packages#11851)) ([2b5afe3](AztecProtocol/aztec-packages@2b5afe3)) ### Bug Fixes * Actually fix pxe releases ([#11890](AztecProtocol/aztec-packages#11890)) ([b22c9b9](AztecProtocol/aztec-packages@b22c9b9)) * Bb pattern ([9fcff50](AztecProtocol/aztec-packages@9fcff50)) * Revert "feat(perf): speed up construction of bbjs Frs & cache zero hashes in ephemeral trees" ([#11893](AztecProtocol/aztec-packages#11893)) ([99fdab9](AztecProtocol/aztec-packages@99fdab9)) ### Miscellaneous * Add blob lib to npm deploy ([#11891](AztecProtocol/aztec-packages#11891)) ([bc10f17](AztecProtocol/aztec-packages@bc10f17)) </details> <details><summary>barretenberg: 0.76.1</summary> ## [0.76.1](AztecProtocol/aztec-packages@barretenberg-v0.76.0...barretenberg-v0.76.1) (2025-02-10) ### Miscellaneous * **barretenberg:** Synchronize aztec-packages versions </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
pushed a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Feb 12, 2025
…ephemeral trees (redo) (#11894) Redo of AztecProtocol/aztec-packages#11851 --------- Co-authored-by: dbanks12 <david@aztecprotocol.com> Co-authored-by: David Banks <47112877+dbanks12@users.noreply.github.com>
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.
Improves time for tx-hash computation from ~26-35ms down to ~20-23ms. This is because we were doing slower conversion of 1800+ Uint8Arrays to Frs. Allowing them to be actual Buffers lets us use
read/writeBigUint64
functions which are faster than the per-byte shifting we were doing.Cache zero-hashes in static member of ephemeral tree class. Brings Ephemeral forest construction from 20ms down to 10ms.