Skip to content
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

refactor: noir circuit tests #3229

Merged
merged 6 commits into from
Nov 6, 2023
Merged

refactor: noir circuit tests #3229

merged 6 commits into from
Nov 6, 2023

Conversation

LeilaWang
Copy link
Collaborator

Please provide a paragraph or two giving a summary of the change, including relevant motivation and context.

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@LeilaWang LeilaWang marked this pull request as draft November 3, 2023 20:21
@LeilaWang LeilaWang marked this pull request as ready for review November 6, 2023 09:34
@AztecBot
Copy link
Collaborator

AztecBot commented Nov 6, 2023

Benchmark results

No metrics with a significant change found.

Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Values are compared against data from master at commit d707d4e3 and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 222,876 868,160 3,449,420
l1_rollup_execution_gas 841,963 3,595,268 22,204,789
l2_block_processing_time_in_ms 1,993 7,624 29,689 (-1%)
note_successful_decrypting_time_in_ms 294 (-1%) 862 (-3%) 3,136 (-3%)
note_trial_decrypting_time_in_ms 95.0 (-5%) 70.0 (-28%) 134
l2_block_building_time_in_ms 13,187 (-1%) 52,647 209,676
l2_block_rollup_simulation_time_in_ms 11,858 (-1%) 47,328 188,567
l2_block_public_tx_process_time_in_ms 1,290 (-1%) 5,179 (-1%) 20,617 (-2%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 21,645 (-1%) 43,668 (+3%)
note_history_successful_decrypting_time_in_ms 2,037 (+1%) 4,265 (+8%)
note_history_trial_decrypting_time_in_ms 121 (+1%) 158 (+10%)
node_database_size_in_bytes 1,631,955 1,100,919
pxe_database_size_in_bytes 29,748 59,307

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 780 (+1%) 61,697 18,905
private-kernel-ordering 123 24,297 8,153
base-rollup 1,776 656,311 814
root-rollup 79.2 (+2%) 4,072 1,097
private-kernel-inner 786 81,568 18,905
public-kernel-private-input 41.8 41,519 18,841
public-kernel-non-first-iteration 26.6 41,497 18,841
merge-rollup 0.913 (-2%) 2,592 873

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 8,787 27,547

Copy link
Collaborator

@sirasistant sirasistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner now!

@sirasistant sirasistant merged commit dbfb086 into master Nov 6, 2023
2 checks passed
@sirasistant sirasistant deleted the lw/noir_tests_refactor branch November 6, 2023 15:38
rahul-kothari pushed a commit that referenced this pull request Nov 7, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.14.0</summary>

##
[0.14.0](aztec-packages-v0.13.1...aztec-packages-v0.14.0)
(2023-11-07)


### ⚠ BREAKING CHANGES

* make noir_wasm the default compiler
([#3090](#3090))
* adding all the (note, nonce) pairs in `PXE.addNote` and hiding
`PXE.getNoteNonces`
([#3196](#3196))
* API inconsistency fix
([#3190](#3190))
* tree leaf value as `Fr` everywhere in our public API
([#3173](#3173))

### Features

* Add cli command update aztec dependencies
([#3128](#3128))
([0c05d8b](0c05d8b))
* Add root rollup circuit
([#3217](#3217))
([fb4f7af](fb4f7af))
* Adding all the (note, nonce) pairs in `PXE.addNote` and hiding
`PXE.getNoteNonces`
([#3196](#3196))
([8c41664](8c41664))
* API inconsistency fix
([#3190](#3190))
([272eda1](272eda1))
* **docs:** Aztec.nr errors in docs
([#3113](#3113))
([fb1e80b](fb1e80b))
* **docs:** New getting started flow
([#2957](#2957))
([f23f868](f23f868))
* Enable pkc in noir
([#3194](#3194))
([1ef892b](1ef892b))
* Extract types to a types crate
([#3203](#3203))
([4161be9](4161be9))
* Gperftools
([#3096](#3096))
([ea2f9a7](ea2f9a7))
* Initial storage slots docs
([#2842](#2842))
([e8bcd03](e8bcd03))
* Make noir_wasm the default compiler
([#3090](#3090))
([ca52a3e](ca52a3e))
* Migrate cpp private kernel tests to noir
([#3165](#3165))
([daee2f9](daee2f9))
* More test info in tx receipt
([#3221](#3221))
([a7354dc](a7354dc)),
closes
[#3218](#3218)
* Tag artifacts with the compiler version
([#3220](#3220))
([c7490c5](c7490c5))
* Tree leaf value as `Fr` everywhere in our public API
([#3173](#3173))
([09464ca](09464ca))


### Bug Fixes

* Attempt to fix spot request hangs.
([#3241](#3241))
([a062026](a062026))
* Better update steps for dockerized sandbox
([#3204](#3204))
([3ef0bee](3ef0bee))
* Build cli image before releasing
([#3140](#3140))
([09c3b75](09c3b75))
* Cleanup gen_inner_proof_files.sh script.
([#3242](#3242))
([ee57e00](ee57e00))
* Corrects typo in repo readme
([#3236](#3236))
([0ed8c79](0ed8c79))
* Remove noirup from noir-contract's bootstrap
([#3252](#3252))
([d10342e](d10342e))
* Remove unused import
([#3200](#3200))
([520bba4](520bba4))
* Temporary fix for bb prove w/ ram rom blocks
([#3215](#3215))
([af93a33](af93a33))
* Update noir-contracts path to types
([#3247](#3247))
([c5fc95d](c5fc95d))
* Wasm-compiler `bin` package type
([#3254](#3254))
([2d50f11](2d50f11))
* Yarn prepare
([#3251](#3251))
([d02726f](d02726f))


### Miscellaneous

* Add initial skeleton code for root/merge/mase rollups for Noir
([#3178](#3178))
([7b0d076](7b0d076))
* Bump noir
([#3197](#3197))
([aa2042d](aa2042d))
* Clean up and refactor arithmetization
([#3164](#3164))
([0370b13](0370b13))
* Continuation of note naming update
([#3137](#3137))
([582150f](582150f))
* Disable canary.
([#3244](#3244))
([1a56173](1a56173))
* Docs: fix broken link in functions.md
([#3183](#3183))
([fb53f7a](fb53f7a))
* **docs:** Fix docs build
([#3249](#3249))
([ec2c0cf](ec2c0cf))
* Fix typo in aztec sandbox
([#3191](#3191))
([ed144b1](ed144b1))
* More boiler plate code for merge rollup
([#3182](#3182))
([ffafcef](ffafcef))
* Move flavors
([#3188](#3188))
([f1ff849](f1ff849))
* Move honk/pcs
([#3187](#3187))
([3870ff8](3870ff8))
* Move log deriv lookup accum to library
([#3226](#3226))
([189d1bb](189d1bb))
* Move sumcheck
([#3189](#3189))
([410cae3](410cae3))
* Move transcripts
([#3176](#3176))
([7372d19](7372d19))
* Noir circuit tests
([#3229](#3229))
([dbfb086](dbfb086))
* Private kernel circuits
([#3240](#3240))
([b7fbe19](b7fbe19))
* Prune 0 values from L2Tx
([#3224](#3224))
([2de206d](2de206d))
* Refactor e2e to not use @aztec/types
([#3175](#3175))
([006a07a](006a07a)),
closes
[#3157](#3157)
* Remove extra println in noir protoco circuit
([#3219](#3219))
([3295fdd](3295fdd))
* Split out relations, PG, Honk variants
([#3238](#3238))
([8abd39f](8abd39f))
* Update Noir version
([#3082](#3082))
([59eb6af](59eb6af))


### Documentation

* Fix bad shareable key crypto. better explanations
([#3228](#3228))
([e4a0c4a](e4a0c4a))
* Fix in nullifier secrets doc
([#3167](#3167))
([8c70845](8c70845))
* Move Updating.md file, add aztec tag to nargo update instruction
([#3213](#3213))
([9f71c5d](9f71c5d))
* Update docs
([#3223](#3223))
([7977064](7977064))
* Update storage doc
([#3212](#3212))
([d707d4e](d707d4e))
* Updated stale tree docs
([#3166](#3166))
([3d5c98c](3d5c98c))
</details>

<details><summary>barretenberg.js: 0.14.0</summary>

##
[0.14.0](barretenberg.js-v0.13.1...barretenberg.js-v0.14.0)
(2023-11-07)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.14.0</summary>

##
[0.14.0](barretenberg-v0.13.1...barretenberg-v0.14.0)
(2023-11-07)


### Features

* Gperftools
([#3096](#3096))
([ea2f9a7](ea2f9a7))


### Bug Fixes

* Cleanup gen_inner_proof_files.sh script.
([#3242](#3242))
([ee57e00](ee57e00))
* Temporary fix for bb prove w/ ram rom blocks
([#3215](#3215))
([af93a33](af93a33))


### Miscellaneous

* Clean up and refactor arithmetization
([#3164](#3164))
([0370b13](0370b13))
* Move flavors
([#3188](#3188))
([f1ff849](f1ff849))
* Move honk/pcs
([#3187](#3187))
([3870ff8](3870ff8))
* Move log deriv lookup accum to library
([#3226](#3226))
([189d1bb](189d1bb))
* Move sumcheck
([#3189](#3189))
([410cae3](410cae3))
* Move transcripts
([#3176](#3176))
([7372d19](7372d19))
* Split out relations, PG, Honk variants
([#3238](#3238))
([8abd39f](8abd39f))


### Documentation

* Updated stale tree docs
([#3166](#3166))
([3d5c98c](3d5c98c))
</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 Nov 8, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.14.0</summary>

##
[0.14.0](AztecProtocol/aztec-packages@aztec-packages-v0.13.1...aztec-packages-v0.14.0)
(2023-11-07)


### ⚠ BREAKING CHANGES

* make noir_wasm the default compiler
([#3090](AztecProtocol/aztec-packages#3090))
* adding all the (note, nonce) pairs in `PXE.addNote` and hiding
`PXE.getNoteNonces`
([#3196](AztecProtocol/aztec-packages#3196))
* API inconsistency fix
([#3190](AztecProtocol/aztec-packages#3190))
* tree leaf value as `Fr` everywhere in our public API
([#3173](AztecProtocol/aztec-packages#3173))

### Features

* Add cli command update aztec dependencies
([#3128](AztecProtocol/aztec-packages#3128))
([0c05d8b](AztecProtocol/aztec-packages@0c05d8b))
* Add root rollup circuit
([#3217](AztecProtocol/aztec-packages#3217))
([fb4f7af](AztecProtocol/aztec-packages@fb4f7af))
* Adding all the (note, nonce) pairs in `PXE.addNote` and hiding
`PXE.getNoteNonces`
([#3196](AztecProtocol/aztec-packages#3196))
([8c41664](AztecProtocol/aztec-packages@8c41664))
* API inconsistency fix
([#3190](AztecProtocol/aztec-packages#3190))
([272eda1](AztecProtocol/aztec-packages@272eda1))
* **docs:** Aztec.nr errors in docs
([#3113](AztecProtocol/aztec-packages#3113))
([fb1e80b](AztecProtocol/aztec-packages@fb1e80b))
* **docs:** New getting started flow
([#2957](AztecProtocol/aztec-packages#2957))
([f23f868](AztecProtocol/aztec-packages@f23f868))
* Enable pkc in noir
([#3194](AztecProtocol/aztec-packages#3194))
([1ef892b](AztecProtocol/aztec-packages@1ef892b))
* Extract types to a types crate
([#3203](AztecProtocol/aztec-packages#3203))
([4161be9](AztecProtocol/aztec-packages@4161be9))
* Gperftools
([#3096](AztecProtocol/aztec-packages#3096))
([ea2f9a7](AztecProtocol/aztec-packages@ea2f9a7))
* Initial storage slots docs
([#2842](AztecProtocol/aztec-packages#2842))
([e8bcd03](AztecProtocol/aztec-packages@e8bcd03))
* Make noir_wasm the default compiler
([#3090](AztecProtocol/aztec-packages#3090))
([ca52a3e](AztecProtocol/aztec-packages@ca52a3e))
* Migrate cpp private kernel tests to noir
([#3165](AztecProtocol/aztec-packages#3165))
([daee2f9](AztecProtocol/aztec-packages@daee2f9))
* More test info in tx receipt
([#3221](AztecProtocol/aztec-packages#3221))
([a7354dc](AztecProtocol/aztec-packages@a7354dc)),
closes
[#3218](AztecProtocol/aztec-packages#3218)
* Tag artifacts with the compiler version
([#3220](AztecProtocol/aztec-packages#3220))
([c7490c5](AztecProtocol/aztec-packages@c7490c5))
* Tree leaf value as `Fr` everywhere in our public API
([#3173](AztecProtocol/aztec-packages#3173))
([09464ca](AztecProtocol/aztec-packages@09464ca))


### Bug Fixes

* Attempt to fix spot request hangs.
([#3241](AztecProtocol/aztec-packages#3241))
([a062026](AztecProtocol/aztec-packages@a062026))
* Better update steps for dockerized sandbox
([#3204](AztecProtocol/aztec-packages#3204))
([3ef0bee](AztecProtocol/aztec-packages@3ef0bee))
* Build cli image before releasing
([#3140](AztecProtocol/aztec-packages#3140))
([09c3b75](AztecProtocol/aztec-packages@09c3b75))
* Cleanup gen_inner_proof_files.sh script.
([#3242](AztecProtocol/aztec-packages#3242))
([ee57e00](AztecProtocol/aztec-packages@ee57e00))
* Corrects typo in repo readme
([#3236](AztecProtocol/aztec-packages#3236))
([0ed8c79](AztecProtocol/aztec-packages@0ed8c79))
* Remove noirup from noir-contract's bootstrap
([#3252](AztecProtocol/aztec-packages#3252))
([d10342e](AztecProtocol/aztec-packages@d10342e))
* Remove unused import
([#3200](AztecProtocol/aztec-packages#3200))
([520bba4](AztecProtocol/aztec-packages@520bba4))
* Temporary fix for bb prove w/ ram rom blocks
([#3215](AztecProtocol/aztec-packages#3215))
([af93a33](AztecProtocol/aztec-packages@af93a33))
* Update noir-contracts path to types
([#3247](AztecProtocol/aztec-packages#3247))
([c5fc95d](AztecProtocol/aztec-packages@c5fc95d))
* Wasm-compiler `bin` package type
([#3254](AztecProtocol/aztec-packages#3254))
([2d50f11](AztecProtocol/aztec-packages@2d50f11))
* Yarn prepare
([#3251](AztecProtocol/aztec-packages#3251))
([d02726f](AztecProtocol/aztec-packages@d02726f))


### Miscellaneous

* Add initial skeleton code for root/merge/mase rollups for Noir
([#3178](AztecProtocol/aztec-packages#3178))
([7b0d076](AztecProtocol/aztec-packages@7b0d076))
* Bump noir
([#3197](AztecProtocol/aztec-packages#3197))
([aa2042d](AztecProtocol/aztec-packages@aa2042d))
* Clean up and refactor arithmetization
([#3164](AztecProtocol/aztec-packages#3164))
([0370b13](AztecProtocol/aztec-packages@0370b13))
* Continuation of note naming update
([#3137](AztecProtocol/aztec-packages#3137))
([582150f](AztecProtocol/aztec-packages@582150f))
* Disable canary.
([#3244](AztecProtocol/aztec-packages#3244))
([1a56173](AztecProtocol/aztec-packages@1a56173))
* Docs: fix broken link in functions.md
([#3183](AztecProtocol/aztec-packages#3183))
([fb53f7a](AztecProtocol/aztec-packages@fb53f7a))
* **docs:** Fix docs build
([#3249](AztecProtocol/aztec-packages#3249))
([ec2c0cf](AztecProtocol/aztec-packages@ec2c0cf))
* Fix typo in aztec sandbox
([#3191](AztecProtocol/aztec-packages#3191))
([ed144b1](AztecProtocol/aztec-packages@ed144b1))
* More boiler plate code for merge rollup
([#3182](AztecProtocol/aztec-packages#3182))
([ffafcef](AztecProtocol/aztec-packages@ffafcef))
* Move flavors
([#3188](AztecProtocol/aztec-packages#3188))
([f1ff849](AztecProtocol/aztec-packages@f1ff849))
* Move honk/pcs
([#3187](AztecProtocol/aztec-packages#3187))
([3870ff8](AztecProtocol/aztec-packages@3870ff8))
* Move log deriv lookup accum to library
([#3226](AztecProtocol/aztec-packages#3226))
([189d1bb](AztecProtocol/aztec-packages@189d1bb))
* Move sumcheck
([#3189](AztecProtocol/aztec-packages#3189))
([410cae3](AztecProtocol/aztec-packages@410cae3))
* Move transcripts
([#3176](AztecProtocol/aztec-packages#3176))
([7372d19](AztecProtocol/aztec-packages@7372d19))
* Noir circuit tests
([#3229](AztecProtocol/aztec-packages#3229))
([dbfb086](AztecProtocol/aztec-packages@dbfb086))
* Private kernel circuits
([#3240](AztecProtocol/aztec-packages#3240))
([b7fbe19](AztecProtocol/aztec-packages@b7fbe19))
* Prune 0 values from L2Tx
([#3224](AztecProtocol/aztec-packages#3224))
([2de206d](AztecProtocol/aztec-packages@2de206d))
* Refactor e2e to not use @aztec/types
([#3175](AztecProtocol/aztec-packages#3175))
([006a07a](AztecProtocol/aztec-packages@006a07a)),
closes
[#3157](AztecProtocol/aztec-packages#3157)
* Remove extra println in noir protoco circuit
([#3219](AztecProtocol/aztec-packages#3219))
([3295fdd](AztecProtocol/aztec-packages@3295fdd))
* Split out relations, PG, Honk variants
([#3238](AztecProtocol/aztec-packages#3238))
([8abd39f](AztecProtocol/aztec-packages@8abd39f))
* Update Noir version
([#3082](AztecProtocol/aztec-packages#3082))
([59eb6af](AztecProtocol/aztec-packages@59eb6af))


### Documentation

* Fix bad shareable key crypto. better explanations
([#3228](AztecProtocol/aztec-packages#3228))
([e4a0c4a](AztecProtocol/aztec-packages@e4a0c4a))
* Fix in nullifier secrets doc
([#3167](AztecProtocol/aztec-packages#3167))
([8c70845](AztecProtocol/aztec-packages@8c70845))
* Move Updating.md file, add aztec tag to nargo update instruction
([#3213](AztecProtocol/aztec-packages#3213))
([9f71c5d](AztecProtocol/aztec-packages@9f71c5d))
* Update docs
([#3223](AztecProtocol/aztec-packages#3223))
([7977064](AztecProtocol/aztec-packages@7977064))
* Update storage doc
([#3212](AztecProtocol/aztec-packages#3212))
([d707d4e](AztecProtocol/aztec-packages@d707d4e))
* Updated stale tree docs
([#3166](AztecProtocol/aztec-packages#3166))
([3d5c98c](AztecProtocol/aztec-packages@3d5c98c))
</details>

<details><summary>barretenberg.js: 0.14.0</summary>

##
[0.14.0](AztecProtocol/aztec-packages@barretenberg.js-v0.13.1...barretenberg.js-v0.14.0)
(2023-11-07)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.14.0</summary>

##
[0.14.0](AztecProtocol/aztec-packages@barretenberg-v0.13.1...barretenberg-v0.14.0)
(2023-11-07)


### Features

* Gperftools
([#3096](AztecProtocol/aztec-packages#3096))
([ea2f9a7](AztecProtocol/aztec-packages@ea2f9a7))


### Bug Fixes

* Cleanup gen_inner_proof_files.sh script.
([#3242](AztecProtocol/aztec-packages#3242))
([ee57e00](AztecProtocol/aztec-packages@ee57e00))
* Temporary fix for bb prove w/ ram rom blocks
([#3215](AztecProtocol/aztec-packages#3215))
([af93a33](AztecProtocol/aztec-packages@af93a33))


### Miscellaneous

* Clean up and refactor arithmetization
([#3164](AztecProtocol/aztec-packages#3164))
([0370b13](AztecProtocol/aztec-packages@0370b13))
* Move flavors
([#3188](AztecProtocol/aztec-packages#3188))
([f1ff849](AztecProtocol/aztec-packages@f1ff849))
* Move honk/pcs
([#3187](AztecProtocol/aztec-packages#3187))
([3870ff8](AztecProtocol/aztec-packages@3870ff8))
* Move log deriv lookup accum to library
([#3226](AztecProtocol/aztec-packages#3226))
([189d1bb](AztecProtocol/aztec-packages@189d1bb))
* Move sumcheck
([#3189](AztecProtocol/aztec-packages#3189))
([410cae3](AztecProtocol/aztec-packages@410cae3))
* Move transcripts
([#3176](AztecProtocol/aztec-packages#3176))
([7372d19](AztecProtocol/aztec-packages@7372d19))
* Split out relations, PG, Honk variants
([#3238](AztecProtocol/aztec-packages#3238))
([8abd39f](AztecProtocol/aztec-packages@8abd39f))


### Documentation

* Updated stale tree docs
([#3166](AztecProtocol/aztec-packages#3166))
([3d5c98c](AztecProtocol/aztec-packages@3d5c98c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants