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

chore: fixed call nesting, tests and docs #4932

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Mar 4, 2024

Added missing tests and fixed context propagation for nested static calls.

Also included docs and migration notes! @AztecProtocol/devrel

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 4, 2024

Docs Preview

Hey there! 👋 You can check your preview at https://65e71a8bc2449c0426b2d38a--aztec-docs-dev.netlify.app

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 4, 2024

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (8): 105 (+866%)
  • note_trial_decrypting_time_in_ms (64): 114 (+230%)
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 be5855cd 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 64 txs
l1_rollup_calldata_size_in_bytes 5,700 18,884 36,452
l1_rollup_calldata_gas 66,204 239,204 469,724
l1_rollup_execution_gas 194,152 500,510 908,982
l2_block_processing_time_in_ms 1,175 (-2%) 4,485 8,906 (-1%)
note_successful_decrypting_time_in_ms 200 544 (-7%) 981 (-2%)
note_trial_decrypting_time_in_ms ⚠️ 105 (+866%) 64.6 (-39%) ⚠️ 114 (+230%)
l2_block_building_time_in_ms 15,810 (-1%) 64,190 (+2%) 126,777
l2_block_rollup_simulation_time_in_ms 12,032 (-1%) 48,910 (+2%) 96,678
l2_block_public_tx_process_time_in_ms 3,748 (-1%) 15,209 (+1%) 29,957

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 14,636 (+3%) 29,336 (+7%)
note_history_successful_decrypting_time_in_ms 1,231 (-10%) 2,371 (-4%)
note_history_trial_decrypting_time_in_ms 88.8 (-18%) 132 (-21%)
node_database_size_in_bytes 18,804,816 35,541,072
pxe_database_size_in_bytes 29,923 59,478

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 245 44,736 28,001
private-kernel-ordering 177 52,625 14,627
base-rollup 1,285 177,932 933
root-rollup 71.5 (+2%) 4,192 825
private-kernel-inner 312 73,715 28,001
public-kernel-app-logic 191 32,254 25,379
merge-rollup 5.71 (-2%) 2,712 933

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 4096 leaves
batch_insert_into_append_only_tree_16_depth_ms 9.85 (-1%) 11.2 (+5%) 12.4 (-10%) 16.4 (-3%) 22.4 (+2%) 35.3 (-2%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 79.0 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.572 0.624 (+5%) 0.529 (-10%) 0.509 (-3%) 0.470 (+3%) 0.441 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 45.8 72.4 (+1%) 229 (-1%) 447 864 1,714 (-1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 96.0 159 543 1,055 2,079 4,127
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.470 0.447 (+1%) 0.419 0.419 0.412 0.412 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 53.9 107 337 (-1%) 666 1,319 2,608 (-2%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 104 207 691 1,363 2,707 5,395
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.480 0.483 0.457 0.458 0.457 0.454
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 61.2 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A 109 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A 0.536 N/A N/A N/A N/A N/A N/A

Miscellaneous

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

Metric 0 deployed contracts
tx_size_in_bytes 19,179

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 2,554 1,340 (-1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0309 (-10%) 467

@LeilaWang
Copy link
Contributor

We also need to check it in the kernel circuit. Can do it in another PR :)

@Thunkar Thunkar enabled auto-merge (squash) March 5, 2024 13:01
@Thunkar Thunkar merged commit bd5c879 into master Mar 5, 2024
63 of 64 checks passed
@Thunkar Thunkar deleted the gj/static_call_docs_and_fixes branch March 5, 2024 13:22
TomAFrench added a commit that referenced this pull request Mar 5, 2024
* master:
  chore: unused vars cleanup + updated TODOs (#4883)
  feat!: Internal as a macro (#4898)
  chore: update escrow to use PrivateImmutable (#4942)
  chore: fixed call nesting, tests and docs (#4932)
  chore(master): Release 0.25.0 (#4569)
  docs: add prelude note to migration (#4949)
rahul-kothari pushed a commit that referenced this pull request Mar 5, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.26.0</summary>

##
[0.26.0](aztec-package-v0.25.0...aztec-package-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* move noir out of yarn-project
([#4479](#4479))
* note type ids
([#4500](#4500))
* aztec binary
([#3927](#3927))

### Features

* Aztec binary
([#3927](#3927))
([12356d9](12356d9))
* Note type ids
([#4500](#4500))
([e1da2fd](e1da2fd))
* Parallel native/wasm bb builds. Better messaging around using ci
cache.
([#4766](#4766))
([a924e55](a924e55))


### Bug Fixes

* Add new oracle contract to devnet in CI
([#4687](#4687))
([920fa10](920fa10))
* Add registry contract to list
([#4694](#4694))
([3675e1d](3675e1d))
* Aztec binary fixes
([#4273](#4273))
([84e1f7d](84e1f7d))
* L1 contract address config
([#4684](#4684))
([20e7605](20e7605))
* P2p-bootstrap ECS command + /status route
([#4682](#4682))
([21ec23d](21ec23d))
* Relative LogFn import
([#4328](#4328))
([1faead5](1faead5))


### Miscellaneous

* Lift rollup address check & deplot kv-store to npm
([#4483](#4483))
([92d0aa4](92d0aa4))
* Move noir out of yarn-project
([#4479](#4479))
([1fe674b](1fe674b)),
closes
[#4107](#4107)
* Squash yp ypb + other build improvements.
([#4901](#4901))
([be5855c](be5855c))
* Updating viem
([#4783](#4783))
([23bc26a](23bc26a))
</details>

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

##
[0.26.0](barretenberg.js-v0.25.0...barretenberg.js-v0.26.0)
(2024-03-05)


### Miscellaneous

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

<details><summary>aztec-cli: 0.26.0</summary>

##
[0.26.0](aztec-cli-v0.25.0...aztec-cli-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* Use new deployment flow in ContractDeployer
([#4497](#4497))
* move noir out of yarn-project
([#4479](#4479))
* note type ids
([#4500](#4500))
* Include contract class id in deployment info
([#4223](#4223))
* aztec binary
([#3927](#3927))

### Features

* **avm-transpiler:** Brillig to AVM transpiler
([#4227](#4227))
([c366c6e](c366c6e))
* Aztec binary
([#3927](#3927))
([12356d9](12356d9))
* Aztec.js API for registering a contract class
([#4469](#4469))
([d566c74](d566c74))
* Include contract class id in deployment info
([#4223](#4223))
([0ed4126](0ed4126)),
closes
[#4054](#4054)
* Moving the unbox option to npx command
([#4718](#4718))
([4c3bb92](4c3bb92))
* Note type ids
([#4500](#4500))
([e1da2fd](e1da2fd))
* Parallel native/wasm bb builds. Better messaging around using ci
cache.
([#4766](#4766))
([a924e55](a924e55))
* Use new deployment flow in ContractDeployer
([#4497](#4497))
([0702dc6](0702dc6))


### Bug Fixes

* Add new oracle contract to devnet in CI
([#4687](#4687))
([920fa10](920fa10))
* Load contract artifact from json
([#4352](#4352))
([47a0a79](47a0a79))


### Miscellaneous

* **docs:** Fix a few links to docs
([#4260](#4260))
([1c8ea49](1c8ea49))
* Move noir out of yarn-project
([#4479](#4479))
([1fe674b](1fe674b)),
closes
[#4107](#4107)
* Remove stubbed docs
([#4196](#4196))
([25a4bc4](25a4bc4))
* Squash yp ypb + other build improvements.
([#4901](#4901))
([be5855c](be5855c))
* Updating viem
([#4783](#4783))
([23bc26a](23bc26a))
</details>

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

##
[0.26.0](aztec-packages-v0.25.0...aztec-packages-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* Internal as a macro
([#4898](#4898))

### Features

* Add init check by default to public fns
([#4897](#4897))
([4550f25](4550f25))
* Enable public constructor functions
([#4896](#4896))
([7b06895](7b06895))
* Internal as a macro
([#4898](#4898))
([73d640a](73d640a))
* We no longer update version packages via scripts
([#4962](#4962))
([31d470b](31d470b))


### Miscellaneous

* Disable failing test temporarily
([ec61974](ec61974))
* Fixed call nesting, tests and docs
([#4932](#4932))
([bd5c879](bd5c879))
* Specify packages individually for release-please
([#4960](#4960))
([dddc35f](dddc35f))
* Sync noir repo
([#4947](#4947))
([7ff9b71](7ff9b71))
* Unused vars cleanup + updated TODOs
([#4883](#4883))
([3747619](3747619))
* Update escrow to use PrivateImmutable
([#4942](#4942))
([245d801](245d801))
</details>

<details><summary>barretenberg: 0.26.0</summary>

##
[0.26.0](barretenberg-v0.25.0...barretenberg-v0.26.0)
(2024-03-05)


### 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 added a commit to AztecProtocol/barretenberg that referenced this pull request Mar 6, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.26.0</summary>

##
[0.26.0](AztecProtocol/aztec-packages@aztec-package-v0.25.0...aztec-package-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* move noir out of yarn-project
([#4479](AztecProtocol/aztec-packages#4479))
* note type ids
([#4500](AztecProtocol/aztec-packages#4500))
* aztec binary
([#3927](AztecProtocol/aztec-packages#3927))

### Features

* Aztec binary
([#3927](AztecProtocol/aztec-packages#3927))
([12356d9](AztecProtocol/aztec-packages@12356d9))
* Note type ids
([#4500](AztecProtocol/aztec-packages#4500))
([e1da2fd](AztecProtocol/aztec-packages@e1da2fd))
* Parallel native/wasm bb builds. Better messaging around using ci
cache.
([#4766](AztecProtocol/aztec-packages#4766))
([a924e55](AztecProtocol/aztec-packages@a924e55))


### Bug Fixes

* Add new oracle contract to devnet in CI
([#4687](AztecProtocol/aztec-packages#4687))
([920fa10](AztecProtocol/aztec-packages@920fa10))
* Add registry contract to list
([#4694](AztecProtocol/aztec-packages#4694))
([3675e1d](AztecProtocol/aztec-packages@3675e1d))
* Aztec binary fixes
([#4273](AztecProtocol/aztec-packages#4273))
([84e1f7d](AztecProtocol/aztec-packages@84e1f7d))
* L1 contract address config
([#4684](AztecProtocol/aztec-packages#4684))
([20e7605](AztecProtocol/aztec-packages@20e7605))
* P2p-bootstrap ECS command + /status route
([#4682](AztecProtocol/aztec-packages#4682))
([21ec23d](AztecProtocol/aztec-packages@21ec23d))
* Relative LogFn import
([#4328](AztecProtocol/aztec-packages#4328))
([1faead5](AztecProtocol/aztec-packages@1faead5))


### Miscellaneous

* Lift rollup address check & deplot kv-store to npm
([#4483](AztecProtocol/aztec-packages#4483))
([92d0aa4](AztecProtocol/aztec-packages@92d0aa4))
* Move noir out of yarn-project
([#4479](AztecProtocol/aztec-packages#4479))
([1fe674b](AztecProtocol/aztec-packages@1fe674b)),
closes
[#4107](AztecProtocol/aztec-packages#4107)
* Squash yp ypb + other build improvements.
([#4901](AztecProtocol/aztec-packages#4901))
([be5855c](AztecProtocol/aztec-packages@be5855c))
* Updating viem
([#4783](AztecProtocol/aztec-packages#4783))
([23bc26a](AztecProtocol/aztec-packages@23bc26a))
</details>

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

##
[0.26.0](AztecProtocol/aztec-packages@barretenberg.js-v0.25.0...barretenberg.js-v0.26.0)
(2024-03-05)


### Miscellaneous

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

<details><summary>aztec-cli: 0.26.0</summary>

##
[0.26.0](AztecProtocol/aztec-packages@aztec-cli-v0.25.0...aztec-cli-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* Use new deployment flow in ContractDeployer
([#4497](AztecProtocol/aztec-packages#4497))
* move noir out of yarn-project
([#4479](AztecProtocol/aztec-packages#4479))
* note type ids
([#4500](AztecProtocol/aztec-packages#4500))
* Include contract class id in deployment info
([#4223](AztecProtocol/aztec-packages#4223))
* aztec binary
([#3927](AztecProtocol/aztec-packages#3927))

### Features

* **avm-transpiler:** Brillig to AVM transpiler
([#4227](AztecProtocol/aztec-packages#4227))
([c366c6e](AztecProtocol/aztec-packages@c366c6e))
* Aztec binary
([#3927](AztecProtocol/aztec-packages#3927))
([12356d9](AztecProtocol/aztec-packages@12356d9))
* Aztec.js API for registering a contract class
([#4469](AztecProtocol/aztec-packages#4469))
([d566c74](AztecProtocol/aztec-packages@d566c74))
* Include contract class id in deployment info
([#4223](AztecProtocol/aztec-packages#4223))
([0ed4126](AztecProtocol/aztec-packages@0ed4126)),
closes
[#4054](AztecProtocol/aztec-packages#4054)
* Moving the unbox option to npx command
([#4718](AztecProtocol/aztec-packages#4718))
([4c3bb92](AztecProtocol/aztec-packages@4c3bb92))
* Note type ids
([#4500](AztecProtocol/aztec-packages#4500))
([e1da2fd](AztecProtocol/aztec-packages@e1da2fd))
* Parallel native/wasm bb builds. Better messaging around using ci
cache.
([#4766](AztecProtocol/aztec-packages#4766))
([a924e55](AztecProtocol/aztec-packages@a924e55))
* Use new deployment flow in ContractDeployer
([#4497](AztecProtocol/aztec-packages#4497))
([0702dc6](AztecProtocol/aztec-packages@0702dc6))


### Bug Fixes

* Add new oracle contract to devnet in CI
([#4687](AztecProtocol/aztec-packages#4687))
([920fa10](AztecProtocol/aztec-packages@920fa10))
* Load contract artifact from json
([#4352](AztecProtocol/aztec-packages#4352))
([47a0a79](AztecProtocol/aztec-packages@47a0a79))


### Miscellaneous

* **docs:** Fix a few links to docs
([#4260](AztecProtocol/aztec-packages#4260))
([1c8ea49](AztecProtocol/aztec-packages@1c8ea49))
* Move noir out of yarn-project
([#4479](AztecProtocol/aztec-packages#4479))
([1fe674b](AztecProtocol/aztec-packages@1fe674b)),
closes
[#4107](AztecProtocol/aztec-packages#4107)
* Remove stubbed docs
([#4196](AztecProtocol/aztec-packages#4196))
([25a4bc4](AztecProtocol/aztec-packages@25a4bc4))
* Squash yp ypb + other build improvements.
([#4901](AztecProtocol/aztec-packages#4901))
([be5855c](AztecProtocol/aztec-packages@be5855c))
* Updating viem
([#4783](AztecProtocol/aztec-packages#4783))
([23bc26a](AztecProtocol/aztec-packages@23bc26a))
</details>

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

##
[0.26.0](AztecProtocol/aztec-packages@aztec-packages-v0.25.0...aztec-packages-v0.26.0)
(2024-03-05)


### ⚠ BREAKING CHANGES

* Internal as a macro
([#4898](AztecProtocol/aztec-packages#4898))

### Features

* Add init check by default to public fns
([#4897](AztecProtocol/aztec-packages#4897))
([4550f25](AztecProtocol/aztec-packages@4550f25))
* Enable public constructor functions
([#4896](AztecProtocol/aztec-packages#4896))
([7b06895](AztecProtocol/aztec-packages@7b06895))
* Internal as a macro
([#4898](AztecProtocol/aztec-packages#4898))
([73d640a](AztecProtocol/aztec-packages@73d640a))
* We no longer update version packages via scripts
([#4962](AztecProtocol/aztec-packages#4962))
([31d470b](AztecProtocol/aztec-packages@31d470b))


### Miscellaneous

* Disable failing test temporarily
([ec61974](AztecProtocol/aztec-packages@ec61974))
* Fixed call nesting, tests and docs
([#4932](AztecProtocol/aztec-packages#4932))
([bd5c879](AztecProtocol/aztec-packages@bd5c879))
* Specify packages individually for release-please
([#4960](AztecProtocol/aztec-packages#4960))
([dddc35f](AztecProtocol/aztec-packages@dddc35f))
* Sync noir repo
([#4947](AztecProtocol/aztec-packages#4947))
([7ff9b71](AztecProtocol/aztec-packages@7ff9b71))
* Unused vars cleanup + updated TODOs
([#4883](AztecProtocol/aztec-packages#4883))
([3747619](AztecProtocol/aztec-packages@3747619))
* Update escrow to use PrivateImmutable
([#4942](AztecProtocol/aztec-packages#4942))
([245d801](AztecProtocol/aztec-packages@245d801))
</details>

<details><summary>barretenberg: 0.26.0</summary>

##
[0.26.0](AztecProtocol/aztec-packages@barretenberg-v0.25.0...barretenberg-v0.26.0)
(2024-03-05)


### 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants