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: Integrate Client IVC #6835

Closed
wants to merge 20 commits into from
Closed

Conversation

codygunton
Copy link
Contributor

Please read contributing guidelines and remove this line.

@codygunton codygunton self-assigned this Jun 3, 2024
@codygunton codygunton requested a review from ledwards2225 June 3, 2024 15:49
@AztecBot
Copy link
Collaborator

AztecBot commented Jun 3, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail): 583 (+58%)
  • protocol_circuit_simulation_time_in_ms (base-rollup): 12,026 (+105%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-inner): 1,090 (+16%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-reset-small): 2,336 (+22%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-tail-to-public): 8,420 (+24%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-tail): 2,703 (+38%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 1,670 (+98%)
  • protocol_circuit_proving_time_in_ms (private-kernel-tail): 52,937 (+20%)
  • protocol_circuit_proving_time_in_ms (private-kernel-tail-to-public): 98,868 (+84%)
  • protocol_circuit_size_in_gates (private-kernel-tail-to-public): 4,194,304 (+100%)
  • node_history_sync_time_in_ms (3): 9,410 (+59%)
  • node_history_sync_time_in_ms (5): 14,413 (+71%)
  • node_database_size_in_bytes (3): 14,483,536 (+53%)
  • node_database_size_in_bytes (5): 21,401,680 (+68%)
  • pxe_database_size_in_bytes (3): 18,071 (+132%)
  • pxe_database_size_in_bytes (5): 29,868 (+97%)
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.

Proof generation

Each column represents the number of threads used in proof generation.

Metric 1 threads 4 threads 16 threads 32 threads 64 threads
proof_construction_time_sha256_ms 5,691 (-1%) 1,545 707 (-1%) 766 (+1%) 779 (+1%)
proof_construction_time_sha256_30_ms 11,701 (-2%) 3,130 1,402 1,415 (-1%) 1,470 (+1%)
proof_construction_time_sha256_100_ms 44,573 (-2%) 12,009 (-1%) 5,636 5,526 (-1%) 5,472
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (+2%) 89.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,517 417 202 (+1%) 228 (+3%) 267
proof_construction_time_poseidon_hash_100_ms 5,734 1,557 (-1%) 720 (-1%) 763 (-3%) 796

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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,440 9,464 9,476
l1_rollup_execution_gas 607,976 608,000 608,012
l2_block_processing_time_in_ms 1,285 4,780 9,591
l2_block_building_time_in_ms 44,232 (-3%) 175,946 349,160
l2_block_rollup_simulation_time_in_ms 44,036 (-2%) 175,182 347,658
l2_block_public_tx_process_time_in_ms 40,801 (-2%) 171,847 344,323

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms ⚠️ 9,410 (+59%) ⚠️ 14,413 (+71%)
node_database_size_in_bytes ⚠️ 14,483,536 (+53%) ⚠️ 21,401,680 (+68%)
pxe_database_size_in_bytes ⚠️ 18,071 (+132%) ⚠️ 29,868 (+97%)

Circuits stats

Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit simulation_time_in_ms witness_generation_time_in_ms proving_time_in_ms input_size_in_bytes output_size_in_bytes proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 135 (+1%) 472 (+3%) 12,836 (-1%) 20,634 64,614 89,536 2,731 524,288
private-kernel-inner 407 ⚠️ 1,090 (+16%) 49,468 (+2%) 92,326 64,614 89,536 2,731 2,097,152
private-kernel-tail ⚠️ 583 (+58%) ⚠️ 2,703 (+38%) ⚠️ 52,937 (+20%) 96,545 77,732 (+14%) 11,648 297 2,097,152
base-parity 6.43 ⚠️ 1,670 (+98%) 2,697 (+2%) 128 64.0 2,208 2.00 131,072
root-parity 50.6 (+3%) 64.2 41,482 (+6%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup ⚠️ 12,026 (+105%) 2,472 (+6%) 77,169 (-6%) 119,738 756 3,648 47.0 4,194,304
root-rollup 109 (-1%) 75.2 (-2%) 23,053 (+5%) 25,309 620 3,456 41.0 1,048,576
public-kernel-app-logic 571 (+1%) 3,538 (+2%) 46,088 108,073 86,550 116,768 3,582 2,097,152
public-kernel-tail 1,125 24,391 181,209 (+3%) 403,238 7,646 11,648 297 8,388,608
private-kernel-reset-small 589 (+1%) ⚠️ 2,336 (+22%) 47,146 (+2%) 120,737 64,614 89,536 2,731 2,097,152
public-kernel-setup 656 (-2%) 2,774 (+2%) 44,851 (+4%) 108,073 86,550 116,768 3,582 2,097,152
public-kernel-teardown 563 (-1%) 3,586 (+2%) 46,262 108,073 86,550 116,768 3,582 2,097,152
merge-rollup 28.8 (-2%) N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A ⚠️ 8,420 (+24%) ⚠️ 98,868 (+84%) N/A N/A 116,768 3,582 ⚠️ 4,194,304 (+100%)

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms proof_size_in_bytes proving_time_in_ms size_in_gates num_public_inputs
ContractClassRegisterer:register 1,344 9,944 472 (+2%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 41.0 N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,760 N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,421 N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,737 (-3%) 16,768 53,505 (-1%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,557 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 1,031 (+1%) 16,768 11,136 (+3%) 524,288 457
Token:transfer 1,376 9,944 5,276 16,768 54,640 (+4%) 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,395 N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 81.5 (+6%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,886 N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,777 N/A N/A N/A N/A

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.4 (-1%) 17.2 (+2%) 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.7 31.8 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.601 0.516 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 48.5 75.8 248 (+1%) 472 923 1,841 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 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.495 0.467 0.449 0.441 0.439 0.439 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.3 112 (-1%) 356 (+1%) 693 (+11%) 1,379 2,757 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 106 (-1%) 208 692 (+1%) 1,363 (+8%) 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.503 0.503 0.483 (+1%) 0.476 (+2%) 0.478 0.479 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 62.5 (+7%)
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 107 (+6%)
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.553 (+1%)

Miscellaneous

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

Metric 0 registered classes 1 registered classes
tx_size_in_bytes 84,053 (+6%) 665,267

Transaction size based on fee payment method

| Metric | |
| - | |

@codygunton codygunton force-pushed the cg-lde/integrate-client-ivc branch from 7918882 to 4d823cb Compare June 4, 2024 11:45
@codygunton codygunton force-pushed the cg-lde/integrate-client-ivc branch 2 times, most recently from 8138154 to 505ce45 Compare June 5, 2024 10:56
(note: need to set BB_BINARY_PATH
               and BB_WORKING_DIRECTORY)
@codygunton codygunton force-pushed the cg-lde/integrate-client-ivc branch from 505ce45 to bb0cc2b Compare June 5, 2024 11:14
@codygunton codygunton force-pushed the cg-lde/integrate-client-ivc branch 2 times, most recently from ab9aba3 to 7d58f68 Compare June 6, 2024 10:17
@codygunton
Copy link
Contributor Author

Subsumed by #6971

@codygunton codygunton closed this Jun 10, 2024
@codygunton codygunton reopened this Jun 10, 2024
@codygunton codygunton force-pushed the cg-lde/integrate-client-ivc branch from 82bbc73 to a6bb02c Compare June 10, 2024 09:28
@codygunton codygunton closed this Jun 18, 2024
@codygunton codygunton deleted the cg-lde/integrate-client-ivc branch September 14, 2024 04:43
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