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: unused vars cleanup + updated TODOs #4883

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 1, 2024

Just cleaning up some stale TODOs and nuking unused vars.

Copy link
Contributor Author

benesjan commented Mar 1, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @benesjan and the rest of your teammates on Graphite Graphite

@benesjan benesjan changed the title refactor: block cleanup refactor: enforcing non zero tx effects in L2Block Mar 1, 2024
@benesjan benesjan force-pushed the 03-01-refactor_block_cleanup branch 3 times, most recently from 3d9a175 to ccf3bc8 Compare March 5, 2024 11:39
@benesjan benesjan changed the title refactor: enforcing non zero tx effects in L2Block refactor: enforcing non zero-tx effects in L2Block Mar 5, 2024
@benesjan benesjan force-pushed the 03-01-refactor_block_cleanup branch from 4067ee8 to e4b9cfe Compare March 5, 2024 12:38
@@ -53,9 +53,6 @@ export class BlockStore {
});

block.getTxs().forEach((tx, i) => {
if (tx.txHash.isZero()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getTxs returns only non-empty txs so this was not necessary

@benesjan benesjan changed the title refactor: enforcing non zero-tx effects in L2Block chore: unused vars cleanup + updated TODOs Mar 5, 2024
@benesjan benesjan marked this pull request as ready for review March 5, 2024 13:02
@@ -299,7 +299,6 @@ impl BaseRollupInputs {

let new_contracts = combined.new_contracts;
calldata_hash_inputs[offset] = new_contracts[0].contract_address.to_field();
// TODO(#3938): make portal address 20 bytes here when updating the hashing
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This TODO can't really be done because we work with fields here.

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 5, 2024

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 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,144 238,808 469,688
l1_rollup_execution_gas 194,092 500,114 908,946
l2_block_processing_time_in_ms 1,195 4,518 9,027
note_successful_decrypting_time_in_ms 203 (+2%) 550 (-5%) 1,016 (+1%)
note_trial_decrypting_time_in_ms 13.5 (+24%) 68.4 (-36%) 55.1 (+60%)
l2_block_building_time_in_ms 15,826 (-1%) 63,260 126,256 (-1%)
l2_block_rollup_simulation_time_in_ms 12,042 (-1%) 48,149 96,227 (-1%)
l2_block_public_tx_process_time_in_ms 3,755 (-1%) 15,021 29,881 (-1%)

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,808 (+4%) 27,583
note_history_successful_decrypting_time_in_ms 1,242 (-9%) 2,384 (-3%)
note_history_trial_decrypting_time_in_ms 84.2 (-22%) 137 (-18%)
node_database_size_in_bytes 18,788,432 35,475,536
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 176 (-1%) 52,625 14,627
base-rollup 1,284 177,932 933
root-rollup 70.5 4,192 825
private-kernel-inner 310 (-1%) 73,715 28,001
public-kernel-app-logic 190 (-1%) 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%) 10.2 (-5%) 14.0 (+1%) 16.5 (-2%) 22.1 (+1%) 35.4 (-1%) 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.571 (-1%) 0.566 (-5%) 0.594 (+1%) 0.510 (-2%) 0.462 (+1%) 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 232 447 870 1,734
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.446 0.422 0.419 0.414 0.415
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 55.3 (+2%) 108 (+1%) 340 661 (-1%) 1,315 2,632 (-1%)
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.491 (+2%) 0.483 0.458 0.455 0.457 0.455
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 61.1 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.535 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,597 (+2%) 1,340 (-1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0312 (-9%) 465 (-1%)

@benesjan benesjan merged commit 3747619 into master Mar 5, 2024
67 checks passed
@benesjan benesjan deleted the 03-01-refactor_block_cleanup branch March 5, 2024 15:00
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.

3 participants