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

fix: pxe notes crashing spuriously #4049

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Conversation

alexghr
Copy link
Contributor

@alexghr alexghr commented Jan 16, 2024

This PR refactors how the PXE stores notes. They're now stored by their index in the note hash tree which should provide both uniqueness and a sorted order for notes.

This gets rid of the "nullifiedNotes" set so reading and removing notes should be cleaner and more efficient.

@AztecBot
Copy link
Collaborator

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 e28a6bf1 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 220,932 865,892 3,444,776
l1_rollup_execution_gas 934,076 3,968,366 24,788,312
l2_block_processing_time_in_ms 1,390 (-8%) 5,109 21,112 (-1%)
l2_block_building_time_in_ms 15,158 (+2%) 59,396 237,379
l2_block_rollup_simulation_time_in_ms 10,778 (+3%) 42,000 168,305
l2_block_public_tx_process_time_in_ms 4,349 17,305 (+1%) 68,802

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,916 (-1%) 28,531
node_database_size_in_bytes 3,624,087 3,728,775

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 212 (-1%) 44,681 25,561
private-kernel-ordering 166 (+1%) 43,753 14,809
base-rollup 1,067 128,338 881
root-rollup 78.8 (-2%) 4,088 677
private-kernel-inner 292 (+1%) 71,208 25,561
public-kernel-private-input 205 31,863 25,561
public-kernel-non-first-iteration 203 31,905 25,561
merge-rollup 7.59 (-9%) 2,608 881

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 128 leaves 64 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_16_depth_ms 11.1 16.3 13.8 17.9 23.8 65.0 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 78.2 49.9 241 473 914 3,562
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 110 59.5 363 731 1,403 5,555
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 64.2 N/A 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 1 deployed contracts
tx_size_in_bytes 15,455 32,224

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 377 1,083
Metric 1 public data writes
tx_sequencer_processing_time_ms 534

@spypsy spypsy merged commit 859743b into spy/aztec-package Jan 16, 2024
45 of 78 checks passed
@spypsy spypsy deleted the alexg/fix/pxe_notes branch January 16, 2024 19:02
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