AztecProtocol / aztec-packages

Apache License 2.0
155 stars 157 forks source link

chore: charge for more l2 gas costs #7157

Open just-mitch opened 1 week ago

just-mitch commented 1 week ago

charge l2 gas for:

github-actions[bot] commented 1 week ago

Changes to circuit sizes

Generated at commit: f3092eca810b90fdaafcbfb3e33959af17176a71, compared to commit: eb9e9f6f2b3952760822faaacb7e851e936e0800

๐Ÿงพ Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail_to_public +9,066 โŒ +1.98% +11,167 โŒ +0.53%

Full diff report ๐Ÿ‘‡
| Program | ACIR opcodes (+/-) | % | Circuit size (+/-) | % | |:-|-:|-:|-:|-:| | **private_kernel_tail_to_public** | 467,628 (+9,066) | **+1.98%** | 2,129,321 (+11,167) | **+0.53%** |
AztecBot commented 1 week ago

Docs Preview

Hey there! ๐Ÿ‘‹ You can check your preview at https://668305390e7b306deee62812--aztec-docs-dev.netlify.app

AztecBot commented 1 week ago

Benchmark results

Metrics with a significant change:

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](https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/benchmarks-v1/pulls/7157.json). ### 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,931 (-1%) | 3,186 (-1%) | :warning: 1,440 (**-22%**) | 1,613 | 1,529 (-2%) | proof_construction_time_sha256_100_ms | 44,278 (-1%) | 11,861 (-1%) | 5,547 | 5,413 (-1%) | 5,365 (-2%) | proof_construction_time_poseidon_hash_ms | 79.0 (-1%) | 34.0 (-3%) | 34.0 (-3%) | 57.0 (-3%) | 86.0 (-2%) | proof_construction_time_poseidon_hash_30_ms | 1,536 (-2%) | 418 (-1%) | 199 (-2%) | 222 (-4%) | 267 (-1%) | proof_construction_time_poseidon_hash_100_ms | 5,808 (-1%) | 1,577 (-1%) | 723 (-1%) | 776 (-1%) | 796 (-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,464 | 9,462 | 9,476 | l1_rollup_execution_gas | 611,203 | 611,352 | 611,517 | l2_block_processing_time_in_ms | 760 (-2%) | 1,423 | 2,706 (-3%) | l2_block_building_time_in_ms | 24,631 (-7%) | 49,306 | 96,940 (-6%) | l2_block_rollup_simulation_time_in_ms | 24,631 (-7%) | 49,306 | 96,940 (-6%) | l2_block_public_tx_process_time_in_ms | 21,151 (-7%) | 45,604 | 93,304 (-6%) | ### 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 | 7,378 (+5%) | 10,047 (+1%) | node_database_size_in_bytes | 12,259,408 | 16,146,512 | 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 | 115 (-1%) | 469 (+2%) | 13,469 (+2%) | 20,634 | 67,190 | 92,352 | 2,819 | 524,288 | private-kernel-inner | 361 (-1%) | 953 (-11%) | 50,108 (+3%) | 94,902 | 67,190 | 92,352 | 2,819 | 2,097,152 | private-kernel-tail | 303 (-1%) | 1,800 (+2%) | 48,549 (-1%) | 99,121 | 71,733 | 14,912 | 399 | 2,097,152 | base-parity | 6.34 (+1%) | 1,946 (+8%) | 2,846 | 128 | 64.0 | 2,208 | 2.00 | 131,072 | root-parity | 49.1 (-2%) | 79.9 (+6%) | 43,168 (+4%) | 27,100 | 64.0 | 2,720 | 18.0 | 2,097,152 | base-rollup | 7,701 (-2%) | 5,334 (+7%) | 85,931 (+1%) | 170,330 | 728 | 3,648 | 47.0 | 4,194,304 | root-rollup | 111 (-1%) | 93.0 (+1%) | 25,152 (+7%) | 25,253 | 620 | 3,456 | 41.0 | 1,048,576 | public-kernel-setup | 653 (+2%) | 4,046 (+7%) | 45,413 | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | public-kernel-app-logic | 587 (-2%) | 5,116 (+7%) | 48,557 (-1%) | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | public-kernel-tail | 1,399 (-1%) | 42,314 (+8%) | 190,087 (+3%) | 511,910 | 10,014 | 14,912 | 399 | 8,388,608 | private-kernel-reset-small | 552 (-1%) | 1,968 | 48,047 (+1%) | 123,313 | 67,190 | 92,352 | 2,819 | 2,097,152 | public-kernel-teardown | 585 (+2%) | 5,139 (+6%) | 47,684 (-1%) | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | merge-rollup | 29.4 (-1%) | N/A | N/A | 16,486 | 728 | N/A | N/A | N/A | private-kernel-tail-to-public | N/A | 7,047 (+2%) | 96,030 (+1%) | 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 | 430 (+4%) | N/A | N/A | N/A | N/A | ContractInstanceDeployer:deploy | 1,408 | 9,944 | 41.3 (+3%) | N/A | N/A | N/A | N/A | MultiCallEntrypoint:entrypoint | 1,920 | 9,944 | 1,304 (-1%) | N/A | N/A | N/A | N/A | GasToken:deploy | 1,376 | 9,944 | :warning: 1,486 (**+54%**) | N/A | N/A | N/A | N/A | SchnorrAccount:constructor | 1,312 | 9,944 | 491 (-1%) | N/A | N/A | N/A | N/A | SchnorrAccount:entrypoint | 2,304 | 9,944 | 1,883 | 16,768 | 55,534 | 2,097,152 | 457 | Token:privately_mint_private_note | 1,280 | 9,944 | 672 (+4%) | N/A | N/A | N/A | N/A | FPC:fee_entrypoint_public | 1,344 | 9,944 | 305 | 16,768 | 11,668 (+2%) | 524,288 | 457 | Token:transfer | 1,312 | 9,944 | 2,918 (+1%) | 16,768 | 23,584 (+4%) | 1,048,576 | 457 | AuthRegistry:set_authorized (avm) | 20,954 | N/A | N/A | 94,336 | 1,414 (-1%) | N/A | N/A | FPC:prepare_fee (avm) | 28,396 | N/A | N/A | 94,400 | 3,119 (-2%) | N/A | N/A | Token:transfer_public (avm) | 44,612 | N/A | N/A | 94,400 | 4,114 (+2%) | N/A | N/A | AuthRegistry:consume (avm) | 34,832 | N/A | N/A | 94,336 | 3,041 (+1%) | N/A | N/A | FPC:pay_refund (avm) | 38,561 | N/A | N/A | 94,368 | 23,429 (-2%) | N/A | N/A | Benchmarking:create_note | 1,344 | 9,944 | 481 (-1%) | N/A | N/A | N/A | N/A | SchnorrAccount:verify_private_authwit | 1,280 | 9,944 | 72.4 | N/A | N/A | N/A | N/A | Token:unshield | 1,376 | 9,944 | 2,692 | N/A | N/A | N/A | N/A | FPC:fee_entrypoint_private | 1,376 | 9,944 | 3,466 | 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 | 69.5 (-14%) | 13,790 | GasToken:set_portal | 18.8 | 3,305 | Token:constructor | 100 (+1%) | 23,658 | FPC:constructor | 66.0 (+4%) | 13,592 | GasToken:mint_public | 52.9 (+3%) | 10,158 | Token:mint_public | :warning: 611 (**+744%**) | 19,000 | Token:assert_minter_and_mint | :warning: 56.7 (**-74%**) | 12,891 | AuthRegistry:set_authorized | 32.3 (-3%) | 7,812 | FPC:prepare_fee | 134 (+1%) | 15,062 | Token:transfer_public | :warning: 33.9 (**-53%**) | 31,184 | FPC:pay_refund | 158 (+7%) | 25,260 | Benchmarking:increment_balance | 2,607 (-2%) | 15,233 | Token:_increase_public_balance | 56.1 | 14,972 | FPC:pay_refund_with_shielded_rebate | 130 (-28%) | 26,347 | ### Public DB Access Time to access various public DBs. | Function | time_ms | | - | - | get-nullifier-index | 0.161 | ### 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 (-1%) | 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.606 (-1%) | 0.516 (-1%) | N/A | N/A | N/A | N/A | N/A | batch_insert_into_append_only_tree_32_depth_ms | N/A | N/A | 48.9 (-1%) | 76.3 (-2%) | 132 (-4%) | 247 | 470 (-4%) | 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.499 (-1%) | 0.468 (-2%) | 0.454 (-4%) | 0.446 | 0.440 (-4%) | batch_insert_into_indexed_tree_20_depth_ms | N/A | N/A | 60.1 (-1%) | 113 (-1%) | 184 (-4%) | 356 | 694 (-4%) | 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.505 (-1%) | 0.503 (-2%) | 0.486 (-4%) | 0.481 | 0.477 (-3%) | batch_insert_into_indexed_tree_40_depth_ms | N/A | N/A | 73.3 (-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.521 (-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,707 | 670,983 | Transaction size based on fee payment method | Metric | | | - | |
just-mitch commented 1 week ago

Okay @dbanks12 @fcarreiro all AVM Simulator stuff is removed ๐Ÿ‘ .