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: minor naming cleanup #7144

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Jun 21, 2024

No description provided.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @benesjan and the rest of your teammates on Graphite Graphite

@AztecBot
Copy link
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.

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_30_ms 11,535 (+2%) 3,107 (+1%) 1,614 (+3%) 1,427 (-10%) 1,462
proof_construction_time_sha256_100_ms 45,630 (+2%) 12,369 (+2%) 5,707 5,637 (+2%) 5,561 (+2%)
proof_construction_time_poseidon_hash_ms 79.0 (+1%) 34.0 34.0 58.0 88.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,536 (+2%) 424 (+2%) 203 228 (+3%) 266
proof_construction_time_poseidon_hash_100_ms 5,839 (+2%) 1,595 (+1%) 726 799 (+3%) 805 (+1%)

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 1,412 1,412 1,412
l1_rollup_calldata_gas 9,452 9,476 9,476
l1_rollup_execution_gas 610,273 610,297 610,297
l2_block_processing_time_in_ms 744 1,408 (+1%) 2,666
l2_block_building_time_in_ms 25,592 (+1%) 50,759 100,837 (+2%)
l2_block_rollup_simulation_time_in_ms 25,496 (+1%) 50,457 100,483 (+2%)
l2_block_public_tx_process_time_in_ms 21,905 (+1%) 46,694 96,756 (+2%)

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 6,994 (+1%) 9,895 (+1%)
node_database_size_in_bytes 12,206,160 (+1%) 16,113,744
pxe_database_size_in_bytes 16,254 26,813

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 130 (+1%) 497 12,321 (+3%) 20,634 67,190 92,352 2,819 524,288
private-kernel-inner 393 1,018 (-15%) 45,066 94,902 67,190 92,352 2,819 2,097,152
private-kernel-tail 372 1,854 (-1%) 45,913 99,121 71,733 14,912 399 2,097,152
base-parity 6.31 1,934 (-3%) 2,564 (-2%) 128 64.0 2,208 2.00 131,072
root-parity 49.7 (+1%) 47.0 (-1%) 34,047 27,100 64.0 2,720 18.0 2,097,152
base-rollup 7,888 4,418 (+1%) 71,870 170,330 756 3,648 47.0 4,194,304
root-rollup 113 (+1%) 63.7 (-1%) 19,534 25,309 620 3,456 41.0 1,048,576
public-kernel-setup 720 (-1%) 3,124 (-1%) 38,806 116,905 93,334 125,344 3,850 2,097,152
public-kernel-app-logic 612 4,181 39,906 116,905 93,334 125,344 3,850 2,097,152
public-kernel-tail 1,415 34,519 (+13%) 167,009 (+1%) 511,910 10,014 14,912 399 8,388,608
private-kernel-reset-small 594 2,050 (-4%) 41,456 (+1%) 123,313 67,190 92,352 2,819 2,097,152
public-kernel-teardown 619 4,196 (+1%) 40,357 116,905 93,334 125,344 3,850 2,097,152
merge-rollup 28.8 N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A 7,558 (+5%) 85,428 N/A N/A 125,344 3,850 4,194,304

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 404 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 41.1 (+1%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,807 (+1%) N/A N/A N/A N/A
GasToken:deploy 1,376 9,944 982 N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,467 (+2%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,834 16,768 51,091 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,763 (+1%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 382 (-4%) 16,768 10,467 (+2%) 524,288 457
Token:transfer 1,312 9,944 4,784 (+3%) 16,768 41,629 2,097,152 457
AuthRegistry:set_authorized (avm) 21,043 N/A N/A 87,200 1,654 (+3%) N/A N/A
Token:transfer_public (avm) 44,971 N/A N/A 87,865 4,092 N/A N/A
AuthRegistry:consume (avm) 34,973 N/A N/A 87,616 2,894 (+1%) N/A N/A
Benchmarking:create_note 1,344 9,944 1,390 (+1%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 74.4 (-6%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,758 (+5%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,710 (+5%) N/A N/A N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
GasToken:_increase_public_balance 68.1 13,873
GasToken:set_portal 16.5 (-2%) 3,495
Token:constructor 96.3 24,207
FPC:constructor 62.6 (-1%) 13,893
GasToken:mint_public 54.3 (+2%) 10,241
Token:mint_public 68.4 (-8%) 19,216
Token:assert_minter_and_mint 228 (+4%) 13,034
AuthRegistry:set_authorized 32.3 (-2%) 7,869
FPC:prepare_fee 150 (+1%) 15,187
Token:transfer_public 33.9 (-17%) 31,425
FPC:pay_refund 134 (+2%) 20,080
Benchmarking:increment_balance 2,676 15,465
Token:_increase_public_balance 55.6 (-2%) 15,089
FPC:pay_refund_with_shielded_rebate 142 (-1%) 21,167

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.174 (-1%)

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 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.5 (+1%) 16.8 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.604 (+1%) 0.516 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.6 (+1%) 77.9 (+4%) 130 (+1%) 245 (+1%) 466 (+1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.496 (+1%) 0.478 (+3%) 0.448 (+1%) 0.444 (+1%) 0.436 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.9 (-1%) 113 (+3%) 181 (+1%) 352 (+1%) 686 (+1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.506 (-2%) 0.504 (+2%) 0.479 0.477 0.473 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 72.8 (+1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 133 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.518 (+1%) N/A N/A N/A N/A

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 85,672 670,983

Transaction size based on fee payment method

| Metric | |
| - | |

@benesjan benesjan marked this pull request as ready for review June 26, 2024 14:36
@benesjan benesjan changed the title feat: injecting nonce in pub kernel refactor: minor naming cleanup Jun 26, 2024
@benesjan benesjan requested a review from sklppy88 June 26, 2024 14:36
@benesjan benesjan enabled auto-merge (squash) June 26, 2024 14:36
@benesjan benesjan merged commit 20e2492 into master Jun 26, 2024
92 checks passed
@benesjan benesjan deleted the 06-21-feat_injecting_nonce_in_pub_kernel branch June 26, 2024 16:04
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.

3 participants