Skip to content

feat: Allow nested arrays and vectors in Brillig foreign calls#4478

Merged
sirasistant merged 7 commits into
masterfrom
nested-arrays-to-foreign-calls
Feb 7, 2024
Merged

feat: Allow nested arrays and vectors in Brillig foreign calls#4478
sirasistant merged 7 commits into
masterfrom
nested-arrays-to-foreign-calls

Conversation

@sirasistant

Copy link
Copy Markdown
Contributor

This PR mirrors the changes of #4404 to make them easier to merge

@AztecBot

AztecBot commented Feb 7, 2024

Copy link
Copy Markdown
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 545b3341 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,636 180,516 720,036
l1_rollup_calldata_gas 222,552 871,116 3,465,732
l1_rollup_execution_gas 315,039 988,856 3,685,389
l2_block_processing_time_in_ms 1,160 4,386 (+1%) 17,310 (+1%)
note_successful_decrypting_time_in_ms 307 979 (+2%) 3,619 (+1%)
note_trial_decrypting_time_in_ms 15.7 (-22%) 109 (+18%) 148 (+5%)
l2_block_building_time_in_ms 17,925 70,802 285,563 (+1%)
l2_block_rollup_simulation_time_in_ms 13,088 51,693 208,845 (+1%)
l2_block_public_tx_process_time_in_ms 4,807 19,026 76,453 (+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 13,766 (-10%) 26,836 (-8%)
note_history_successful_decrypting_time_in_ms 2,444 (+1%) 4,561 (+1%)
note_history_trial_decrypting_time_in_ms 86.6 (+1%) 205 (+2%)
node_database_size_in_bytes 17,313,872 33,050,704
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 312 44,476 26,153
private-kernel-ordering 198 44,473 16,553
base-rollup 1,408 128,930 881
root-rollup 82.6 4,088 677
private-kernel-inner 445 71,607 26,153
public-kernel-private-input 247 32,563 26,153
public-kernel-non-first-iteration 246 32,605 26,153
merge-rollup 7.63 (+1%) 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 10.2 11.3 (+3%) 12.7 (+1%) 17.6 (+3%) 22.8 63.9 (-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 143 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.595 0.630 (+3%) 0.542 (+1%) 0.545 (+3%) 0.478 0.440 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 76.7 (+3%) 47.5 239 464 901 3,552
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 159 96.0 543 1,055 2,079 8,223
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.474 (+3%) 0.488 0.436 0.434 0.429 0.426
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 103 56.6 351 (+1%) 701 (+2%) 1,371 (+1%) 5,422
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 197 104 691 1,363 2,707 10,771
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.491 0.496 0.475 0.481 (+2%) 0.476 (+1%) 0.471
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.6 N/A 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 94.1 N/A 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 0.578 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 17,187 40,012

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 554 1,319
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.522 (-13%) 591 (+1%)

@sirasistant sirasistant enabled auto-merge (squash) February 7, 2024 13:29
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.

4 participants