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

refactor: the origins of the oink #5067

Closed
wants to merge 6 commits into from
Closed

Conversation

lucasxia01
Copy link
Contributor

The OinkProver, or the presumcheck Prover is a prover that executes the rounds before sumcheck, which include committing to witness polynomials and deriving some other stuff.

Please read contributing guidelines and remove this line.

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 7, 2024

Benchmark results

Metrics with a significant change:

  • note_successful_decrypting_time_in_ms (32): 580 (+21%)
  • note_trial_decrypting_time_in_ms (8): 54.9 (+103%)
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 7f216eb0 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,668 18,820 36,356
l1_rollup_calldata_gas 65,896 238,708 468,932
l1_rollup_execution_gas 666,376 953,417 1,336,088
l2_block_processing_time_in_ms 1,350 (+2%) 4,736 (-1%) 9,462
note_successful_decrypting_time_in_ms 248 (+11%) ⚠️ 580 (+21%) 1,054 (+5%)
note_trial_decrypting_time_in_ms ⚠️ 54.9 (+103%) 97.4 58.9 (+68%)
l2_block_building_time_in_ms 12,801 (+4%) 51,116 (+5%) 101,130 (+4%)
l2_block_rollup_simulation_time_in_ms 7,389 (+1%) 30,296 (+4%) 59,888 (+3%)
l2_block_public_tx_process_time_in_ms 5,379 (+9%) 20,755 (+7%) 41,063 (+5%)

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,031 (-2%) 26,831 (-4%)
note_history_successful_decrypting_time_in_ms 1,279 2,486 (+1%)
note_history_trial_decrypting_time_in_ms 119 (+4%) 206 (+8%)
node_database_size_in_bytes 18,681,936 35,295,312
pxe_database_size_in_bytes 29,859 59,414

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 280 (+3%) 44,338 27,700
private-kernel-ordering 213 (+3%) 52,324 14,326
base-rollup 674 (+2%) 177,083 925
root-rollup 68.4 4,176 789
private-kernel-inner 375 (+4%) 73,197 27,700
public-kernel-app-logic 185 (+3%) 34,582 27,671
public-kernel-tail 97.3 (+6%) 34,206 27,671
merge-rollup 8.33 2,696 925

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 16 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.0 (+1%) 15.9 (-1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.6 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.584 (+1%) 0.493 (-1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 46.9 (+3%) 72.0 (-2%) 230 444 (-1%) 874 (+1%) 1,742 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 96.0 159 543 1,055 2,079 4,127 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.481 (+2%) 0.444 (-2%) 0.420 0.416 (-1%) 0.416 (+1%) 0.416 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.3 (+1%) 106 334 659 1,313 2,620 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.483 (+1%) 0.479 0.455 0.454 0.454 0.455 (+1%) N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A N/A 61.6 (+1%)
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A N/A 109
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A N/A 0.538 (+1%)

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes
tx_size_in_bytes 19,191

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 2,868 (+1%) 1,483 (+3%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 8.76 (+14%) 633 (+4%)

@lucasxia01 lucasxia01 self-assigned this Mar 7, 2024
@lucasxia01 lucasxia01 marked this pull request as draft March 7, 2024 21:49
inst->verification_key->log_circuit_size =
static_cast<size_t>(numeric::get_msb(inst->verification_key->circuit_size));
inst->verification_key->num_public_inputs =
transcript->template receive_from_prover<uint32_t>(domain_separator + "_public_input_size");
inst->verification_key->pub_inputs_offset =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reordering to keep consistent with oink prover

@lucasxia01
Copy link
Contributor Author

replaced by #4655

@lucasxia01 lucasxia01 closed this Mar 25, 2024
@ludamad ludamad deleted the lx/prover-sharing-take-2 branch August 22, 2024 14:28
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.

2 participants