AztecProtocol / aztec-packages

Apache License 2.0
155 stars 157 forks source link

feat: Sync from noir #7257

Closed AztecBot closed 3 days ago

AztecBot commented 4 days ago

Automated pull of development from the noir programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE feat: Sync from aztec-packages (https://github.com/noir-lang/noir/pull/5377) feat: mod.nr entrypoint (https://github.com/noir-lang/noir/pull/5039) feat!: error on too large integer value (https://github.com/noir-lang/noir/pull/5371) fix: Runtime brillig bigint id assignment (https://github.com/noir-lang/noir/pull/5369) feat!: rename struct-specific TypeDefinition -> StructDefinition (https://github.com/noir-lang/noir/pull/5356) END_COMMIT_OVERRIDE

AztecBot commented 3 days 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/7257.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_ms | 5,714 | 1,546 | 710 | 771 | 780 | proof_construction_time_sha256_30_ms | 11,747 (-3%) | 3,130 (-3%) | :warning: 1,408 (**-24%**) | 1,435 (-11%) | 1,470 (-6%) | proof_construction_time_sha256_100_ms | 43,616 (-3%) | 11,738 (-2%) | 5,424 (-2%) | 5,405 (-1%) | 5,370 (-2%) | proof_construction_time_poseidon_hash_ms | 79.0 (-1%) | 34.0 (-3%) | 34.0 (-3%) | 59.0 | 88.0 | proof_construction_time_poseidon_hash_30_ms | 1,515 (-3%) | 416 (-2%) | 201 (-1%) | 234 (+1%) | 267 (-1%) | proof_construction_time_poseidon_hash_100_ms | 5,740 (-3%) | 1,559 (-2%) | 724 (-1%) | 773 (-1%) | 792 (-2%) | ### 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,466 | 9,464 | l1_rollup_execution_gas | 611,203 | 611,356 | 611,505 | l2_block_processing_time_in_ms | 758 (-3%) | 1,411 | 2,745 (-2%) | l2_block_building_time_in_ms | 24,387 (-8%) | 49,613 | 95,702 (-8%) | l2_block_rollup_simulation_time_in_ms | 24,387 (-8%) | 49,613 | 95,702 (-8%) | l2_block_public_tx_process_time_in_ms | 20,951 (-8%) | 45,912 | 92,117 (-8%) | ### 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,009 | 9,837 (-1%) | node_database_size_in_bytes | 12,255,312 | 16,191,568 | 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%) | 462 (+1%) | 12,924 (-3%) | 20,634 | 67,190 | 92,352 | 2,819 | 524,288 | private-kernel-inner | 359 (-1%) | 945 (-12%) | 49,627 (+2%) | 94,902 | 67,190 | 92,352 | 2,819 | 2,097,152 | private-kernel-tail | 302 (-1%) | 1,923 (+9%) | 48,191 (-2%) | 99,121 | 71,733 | 14,912 | 399 | 2,097,152 | base-parity | 6.51 (+4%) | 1,751 (-3%) | 2,698 (-5%) | 128 | 64.0 | 2,208 | 2.00 | 131,072 | root-parity | 48.4 (-4%) | 71.8 (-4%) | 38,981 (-6%) | 27,100 | 64.0 | 2,720 | 18.0 | 2,097,152 | base-rollup | 7,693 (-2%) | 4,801 (-4%) | 84,657 (-1%) | 170,330 | 728 | 3,648 | 47.0 | 4,194,304 | root-rollup | 109 (-3%) | 86.5 (-6%) | 23,995 (+2%) | 25,253 | 620 | 3,456 | 41.0 | 1,048,576 | public-kernel-setup | 632 (-1%) | 3,697 (-3%) | 45,270 | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | public-kernel-app-logic | 584 (-3%) | 4,762 | 47,331 (-3%) | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | public-kernel-tail | 1,382 (-2%) | 39,035 | 194,720 (+5%) | 511,910 | 10,014 | 14,912 | 399 | 8,388,608 | private-kernel-reset-small | 553 (-1%) | 2,073 (+6%) | 47,178 (-1%) | 123,313 | 67,190 | 92,352 | 2,819 | 2,097,152 | public-kernel-teardown | 569 (-1%) | 4,744 (-3%) | 47,336 (-2%) | 116,905 | 93,334 | 125,344 | 3,850 | 2,097,152 | merge-rollup | 29.2 (-2%) | N/A | N/A | 16,486 | 728 | N/A | N/A | N/A | private-kernel-tail-to-public | N/A | 7,076 (+2%) | 94,544 (-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 | 405 (-2%) | N/A | N/A | N/A | N/A | ContractInstanceDeployer:deploy | 1,408 | 9,944 | 39.4 (-2%) | N/A | N/A | N/A | N/A | MultiCallEntrypoint:entrypoint | 1,920 | 9,944 | 1,295 (-2%) | N/A | N/A | N/A | N/A | GasToken:deploy | 1,376 | 9,944 | 945 (-2%) | N/A | N/A | N/A | N/A | SchnorrAccount:constructor | 1,312 | 9,944 | 492 (-1%) | N/A | N/A | N/A | N/A | SchnorrAccount:entrypoint | 2,304 | 9,944 | 1,871 (-1%) | 16,768 | 55,410 | 2,097,152 | 457 | Token:privately_mint_private_note | 1,280 | 9,944 | 641 | N/A | N/A | N/A | N/A | FPC:fee_entrypoint_public | 1,344 | 9,944 | 307 | 16,768 | 11,613 (+1%) | 524,288 | 457 | Token:transfer | 1,312 | 9,944 | 2,912 | 16,768 | 23,404 (+3%) | 1,048,576 | 457 | AuthRegistry:set_authorized (avm) | 20,954 | N/A | N/A | 94,336 | 1,315 (-8%) | N/A | N/A | FPC:prepare_fee (avm) | 28,396 | N/A | N/A | 94,400 | 3,061 (-4%) | N/A | N/A | Token:transfer_public (avm) | 44,612 | N/A | N/A | 94,400 | 3,862 (-4%) | N/A | N/A | AuthRegistry:consume (avm) | 34,832 | N/A | N/A | 94,336 | 2,899 (-3%) | N/A | N/A | FPC:pay_refund (avm) | 38,561 | N/A | N/A | 94,368 | 23,022 (-3%) | 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.3 | N/A | N/A | N/A | N/A | Token:unshield | 1,376 | 9,944 | 2,708 (+1%) | N/A | N/A | N/A | N/A | FPC:fee_entrypoint_private | 1,376 | 9,944 | 3,456 | 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 | 67.3 (-16%) | 13,790 | GasToken:set_portal | 15.6 (-17%) | 3,305 | Token:constructor | 97.9 (-1%) | 23,658 | FPC:constructor | 64.8 (+2%) | 13,592 | GasToken:mint_public | 63.8 (+24%) | 10,158 | Token:mint_public | 60.4 (-17%) | 19,000 | Token:assert_minter_and_mint | 213 (-3%) | 12,891 | AuthRegistry:set_authorized | 34.0 (+3%) | 7,812 | FPC:prepare_fee | 134 (+1%) | 15,062 | Token:transfer_public | :warning: 45.6 (**-37%**) | 31,184 | FPC:pay_refund | 151 (+2%) | 25,260 | Benchmarking:increment_balance | 2,615 (-2%) | 15,233 | Token:_increase_public_balance | 56.4 (+1%) | 14,972 | FPC:pay_refund_with_shielded_rebate | 132 (-27%) | 26,347 | ### Public DB Access Time to access various public DBs. | Function | time_ms | | - | - | get-nullifier-index | 0.155 (-4%) | ### 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.3 (-2%) | 16.7 (-2%) | 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.597 (-2%) | 0.514 (-2%) | N/A | N/A | N/A | N/A | N/A | batch_insert_into_append_only_tree_32_depth_ms | N/A | N/A | 48.4 (-1%) | 75.9 (-2%) | 132 (-4%) | 246 | 476 (-3%) | 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.494 (-1%) | 0.466 (-2%) | 0.454 (-4%) | 0.445 | 0.443 (-3%) | batch_insert_into_indexed_tree_20_depth_ms | N/A | N/A | 59.6 (-2%) | 112 (-2%) | 183 (-4%) | 354 | 705 (-2%) | 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.503 (-2%) | 0.502 (-2%) | 0.484 (-4%) | 0.479 | 0.483 (-2%) | batch_insert_into_indexed_tree_40_depth_ms | N/A | N/A | 72.9 (-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,707 | 670,983 | Transaction size based on fee payment method | Metric | | | - | |
github-actions[bot] commented 3 days ago

Changes to circuit sizes

Generated at commit: f1384da0746d3776dd6787161bd9609cc054d700, compared to commit: 244ef7e5a6871443444df88c28a1c2a7430d6db1

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

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail_to_public +13,124 โŒ +2.95% +347,648 โŒ +19.64%
private_kernel_tail +536 โŒ +2.50% +1,269 โŒ +0.10%
private_kernel_init -1 โœ… -0.00% 0 โž– 0.00%

Full diff report ๐Ÿ‘‡
| Program | ACIR opcodes (+/-) | % | Circuit size (+/-) | % | |:-|-:|-:|-:|-:| | **private_kernel_tail_to_public** | 458,562 (+13,124) | **+2.95%** | 2,118,154 (+347,648) | **+19.64%** | | **private_kernel_tail** | 21,972 (+536) | **+2.50%** | 1,336,812 (+1,269) | **+0.10%** | | **private_kernel_init** | 30,686 (-1) | **-0.00%** | 390,775 (0) | **0.00%** |
TomAFrench commented 3 days ago

fyi @sirasistant on above circuit changes as the only changes in this sync which affect compiler output is your PR.

sirasistant commented 3 days ago

Seems like a gate counter gh action mixup since my change only touches brillig and the tail circuit has been changed in a recent PR