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

feat: new Inbox #4880

Merged
merged 48 commits into from
Mar 6, 2024
Merged

feat: new Inbox #4880

merged 48 commits into from
Mar 6, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 1, 2024

Fixes #4825

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 force-pushed the 03-01-feat_new_Inbox branch 4 times, most recently from a91bc52 to c220521 Compare March 4, 2024 09:58
@benesjan benesjan requested a review from LHerskind March 4, 2024 11:28
@benesjan benesjan marked this pull request as ready for review March 4, 2024 11:28
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Show resolved Hide resolved
@benesjan benesjan force-pushed the 03-01-feat_new_Inbox branch 3 times, most recently from d4aa584 to 9afb5f4 Compare March 4, 2024 15:41
@benesjan benesjan changed the base branch from master to 03-04-refactor_mocing_types_consts_to_constants.nr March 4, 2024 15:48
@benesjan benesjan force-pushed the 03-01-feat_new_Inbox branch from b5285de to ed53ba3 Compare March 4, 2024 15:48
@benesjan benesjan force-pushed the 03-04-refactor_mocing_types_consts_to_constants.nr branch 3 times, most recently from 5c36e06 to 37a3d05 Compare March 4, 2024 18:17
Base automatically changed from 03-04-refactor_mocing_types_consts_to_constants.nr to master March 4, 2024 19:21
@benesjan benesjan force-pushed the 03-01-feat_new_Inbox branch 4 times, most recently from fdf9827 to 9dc69d0 Compare March 5, 2024 10:46
@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 959158b9 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,120 239,036 468,044
l1_rollup_execution_gas 194,068 500,342 907,302
l2_block_processing_time_in_ms 1,190 4,479 (-1%) 8,906
note_successful_decrypting_time_in_ms 204 (+1%) 555 999 (+1%)
note_trial_decrypting_time_in_ms 9.10 (+10%) 79.1 (+16%) 129 (+1%)
l2_block_building_time_in_ms 16,183 64,632 128,962
l2_block_rollup_simulation_time_in_ms 12,298 48,854 (-1%) 98,187
l2_block_public_tx_process_time_in_ms 3,855 15,710 (+2%) 30,612

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,667 27,960
note_history_successful_decrypting_time_in_ms 1,240 (-6%) 2,410 (-2%)
note_history_trial_decrypting_time_in_ms 88.1 (+4%) 142 (-2%)
node_database_size_in_bytes 18,792,528 35,524,688
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 254 (+1%) 44,736 28,001
private-kernel-ordering 194 (+1%) 52,625 14,627
base-rollup 1,319 177,932 933
root-rollup 70.3 (-1%) 4,192 825
private-kernel-inner 323 (+2%) 73,715 28,001
public-kernel-app-logic 197 (+1%) 32,254 25,379
merge-rollup 5.77 (+1%) 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.88 (+1%) 10.4 13.8 (-6%) 16.1 22.0 35.7 (+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.573 0.580 0.587 (-7%) 0.499 0.461 0.443 (+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 46.0 71.9 231 447 865 1,720
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.471 0.444 0.420 0.418 0.412 0.412
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 54.4 (-2%) 107 (+1%) 339 663 1,309 (-1%) 2,610
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.483 (-2%) 0.481 0.458 0.456 0.455 0.453
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 61.3 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,641 (+1%) 1,385 (+1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0305 (-4%) 482 (+1%)

@benesjan benesjan requested a review from LHerskind March 5, 2024 11:37
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/src/core/messagebridge/NewInbox.sol Outdated Show resolved Hide resolved
l1-contracts/test/harnesses/NewInboxHarness.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
l1-contracts/test/NewInbox.t.sol Outdated Show resolved Hide resolved
@benesjan benesjan force-pushed the 03-01-feat_new_Inbox branch 3 times, most recently from bc18975 to 5c2e537 Compare March 6, 2024 08:00
@benesjan benesjan requested a review from LHerskind March 6, 2024 09:13
@benesjan benesjan force-pushed the 03-01-feat_new_Inbox branch from a3e4cf4 to 66e219c Compare March 6, 2024 12:00
@benesjan benesjan enabled auto-merge (squash) March 6, 2024 12:15
@benesjan benesjan merged commit c5e8014 into master Mar 6, 2024
95 of 96 checks passed
@benesjan benesjan deleted the 03-01-feat_new_Inbox branch March 6, 2024 12:29
PhilWindle pushed a commit that referenced this pull request Mar 6, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.26.3](aztec-package-v0.26.2...aztec-package-v0.26.3)
(2024-03-06)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

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

##
[0.26.3](barretenberg.js-v0.26.2...barretenberg.js-v0.26.3)
(2024-03-06)


### Miscellaneous

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

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

##
[0.26.3](aztec-cli-v0.26.2...aztec-cli-v0.26.3)
(2024-03-06)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

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

##
[0.26.3](aztec-packages-v0.26.2...aztec-packages-v0.26.3)
(2024-03-06)


### Features

* New Inbox
([#4880](#4880))
([c5e8014](c5e8014)),
closes
[#4825](#4825)


### Bug Fixes

* Remove l1 contracts publishing
([#4985](#4985))
([fb6552c](fb6552c))


### Miscellaneous

* Update bootstrap instructions in the readme
([#4968](#4968))
([959158b](959158b))
</details>

<details><summary>barretenberg: 0.26.3</summary>

##
[0.26.3](barretenberg-v0.26.2...barretenberg-v0.26.3)
(2024-03-06)


### 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 7, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.26.3](AztecProtocol/aztec-packages@aztec-package-v0.26.2...aztec-package-v0.26.3)
(2024-03-06)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

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

##
[0.26.3](AztecProtocol/aztec-packages@barretenberg.js-v0.26.2...barretenberg.js-v0.26.3)
(2024-03-06)


### Miscellaneous

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

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

##
[0.26.3](AztecProtocol/aztec-packages@aztec-cli-v0.26.2...aztec-cli-v0.26.3)
(2024-03-06)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

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

##
[0.26.3](AztecProtocol/aztec-packages@aztec-packages-v0.26.2...aztec-packages-v0.26.3)
(2024-03-06)


### Features

* New Inbox
([#4880](AztecProtocol/aztec-packages#4880))
([c5e8014](AztecProtocol/aztec-packages@c5e8014)),
closes
[#4825](AztecProtocol/aztec-packages#4825)


### Bug Fixes

* Remove l1 contracts publishing
([#4985](AztecProtocol/aztec-packages#4985))
([fb6552c](AztecProtocol/aztec-packages@fb6552c))


### Miscellaneous

* Update bootstrap instructions in the readme
([#4968](AztecProtocol/aztec-packages#4968))
([959158b](AztecProtocol/aztec-packages@959158b))
</details>

<details><summary>barretenberg: 0.26.3</summary>

##
[0.26.3](AztecProtocol/aztec-packages@barretenberg-v0.26.2...barretenberg-v0.26.3)
(2024-03-06)


### 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.

feat: Implement the new inbox that build trees
3 participants