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: Protogalaxy constructor from a verification key #4111

Closed
wants to merge 8 commits into from

Conversation

codygunton
Copy link
Contributor

@codygunton codygunton commented Jan 17, 2024

We implement a method to initialize a folding argument with precomputed polynomials commitments (currently these are computed on the fly, a significant runtime expense).

@codygunton codygunton changed the title Cg/pg vk constructor feat: Protogalaxy constructor from a verification key Jan 17, 2024
@codygunton codygunton self-assigned this Jan 17, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 17, 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 04f8e0df 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,380 179,492 716,036
l1_rollup_calldata_gas 221,156 865,952 3,447,884
l1_rollup_execution_gas 934,683 3,969,545 24,795,487
l2_block_processing_time_in_ms 1,433 (+2%) 5,303 21,848
note_successful_decrypting_time_in_ms 310 922 3,356 (+1%)
note_trial_decrypting_time_in_ms 19.1 (+4%) 51.7 (+13%) 141 (-3%)
l2_block_building_time_in_ms 16,104 63,925 256,363
l2_block_rollup_simulation_time_in_ms 11,715 46,554 187,122
l2_block_public_tx_process_time_in_ms 4,352 17,279 68,953

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 16,350 (+1%) 30,846 (+2%)
note_history_successful_decrypting_time_in_ms 2,203 (+3%) 4,359 (+3%)
note_history_trial_decrypting_time_in_ms 138 (+22%) 240 (+26%)
node_database_size_in_bytes 3,582,954 3,647,003
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 214 44,681 25,561
private-kernel-ordering 166 (+1%) 43,753 14,809
base-rollup 1,192 128,338 881
root-rollup 79.1 4,088 677
private-kernel-inner 293 71,208 25,561
public-kernel-private-input 206 31,863 25,561
public-kernel-non-first-iteration 203 31,905 25,561
merge-rollup 7.66 (+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 13.0 (+4%) 17.7 (-7%) 15.9 (+17%) 19.5 25.6 (-4%) 65.4 (-4%) 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.645 (+2%) 0.632 (+1%) 0.639 (+17%) 0.535 (-1%) 0.487 (-1%) 0.443 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 83.8 52.9 (+2%) 262 (+5%) 479 921 3,590
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.472 (-2%) 0.503 (+1%) 0.461 (+5%) 0.435 0.431 0.428
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 121 (+3%) 62.9 (+1%) 380 791 (+3%) 1,455 (+1%) 5,949
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.508 0.505 0.485 (+1%) 0.487 (+1%) 0.481 (+1%) 0.487
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 68.8 (+1%) 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.598 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,219

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 375 1,090
Metric 1 public data writes
tx_sequencer_processing_time_ms 536

@codygunton
Copy link
Contributor Author

Replaced by #4477

@codygunton codygunton closed this Feb 12, 2024
@codygunton codygunton deleted the cg/pg-vk-constructor branch June 2, 2024 02:22
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