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: refactor pg #4477

Closed
wants to merge 9 commits into from
Closed

feat: refactor pg #4477

wants to merge 9 commits into from

Conversation

maramihali
Copy link
Contributor

@maramihali maramihali commented Feb 7, 2024

@maramihali maramihali added the crypto cryptography label Feb 7, 2024
@maramihali maramihali self-assigned this Feb 7, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Feb 8, 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 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,700 180,580 720,100
l1_rollup_calldata_gas 222,784 871,360 3,465,976
l1_rollup_execution_gas 315,975 989,808 3,686,354
l2_block_processing_time_in_ms 1,149 (-1%) 4,343 17,191
note_successful_decrypting_time_in_ms 314 (+3%) 983 (+2%) 3,669 (+2%)
note_trial_decrypting_time_in_ms 24.0 (+19%) 115 (+24%) 139 (-1%)
l2_block_building_time_in_ms 17,908 70,878 284,393
l2_block_rollup_simulation_time_in_ms 13,190 (+1%) 52,154 (+1%) 209,644 (+1%)
l2_block_public_tx_process_time_in_ms 4,691 (-2%) 18,647 (-2%) 74,492 (-2%)

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,775 (-10%) 26,981 (-8%)
note_history_successful_decrypting_time_in_ms 2,403 4,673 (+3%)
note_history_trial_decrypting_time_in_ms 92.1 (+8%) 173 (-14%)
node_database_size_in_bytes 17,313,872 33,009,744
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 308 (-1%) 44,528 25,825 (-1%)
private-kernel-ordering 195 (-2%) 44,145 (-1%) 16,225 (-2%)
base-rollup 1,420 (+1%) 128,654 933 (+6%)
root-rollup 82.3 4,192 (+3%) 729 (+8%)
private-kernel-inner 438 (-1%) 71,331 25,825 (-1%)
public-kernel-private-input 242 (-2%) 32,287 (-1%) 25,825 (-1%)
public-kernel-non-first-iteration 239 (-2%) 32,329 (-1%) 25,825 (-1%)
merge-rollup 7.82 (+3%) 2,712 (+4%) 933 (+6%)

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.6 (+6%) 12.6 17.6 (+3%) 22.8 63.8 (-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.591 0.647 (+6%) 0.538 0.544 (+3%) 0.479 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 74.3 (-1%) 47.4 239 463 898 3,547
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.460 (-1%) 0.487 0.436 0.434 0.428 0.427
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 103 56.4 350 (+1%) 690 (+1%) 1,373 (+1%) 5,413
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.495 0.475 0.474 0.477 (+1%) 0.472
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.5 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 16,859 (-2%) 40,311 (+1%)

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 553 1,308 (-1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.494 (-17%) 579 (-2%)

@maramihali maramihali closed this Feb 16, 2024
@ludamad ludamad deleted the mm/pg-refactor branch August 22, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto cryptography
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add relation parameters to the transcript together when folding
2 participants