aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

fix: enabling prover when --network or NETWORK is set

Open spypsy opened this issue 1 year ago • 1 comments

spypsy avatar Aug 08 '24 07:08 spypsy

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 92.1 (-60%)
  • avm_simulation_time_ms (AuthRegistry:set_authorized): 10.9 (+64%)
  • avm_simulation_time_ms (FPC:prepare_fee): 320 (+21%)
  • avm_simulation_time_ms (Token:transfer_public): 47.5 (+41%)
  • protocol_circuit_proving_time_in_ms (base-parity): 1,793 (+64%)
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,730 1,541 (-1%) 708 (-3%) 753 (-1%) 767 (-3%)
proof_construction_time_sha256_30_ms 11,785 3,170 (-1%) 1,424 (-2%) 1,439 (-4%) 1,468 (-2%)
proof_construction_time_sha256_100_ms 44,115 12,254 (-2%) 5,805 (+1%) 5,684 (-2%) 5,612
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 (-3%) 60.0 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,517 416 201 224 (-2%) 265 (-1%)
proof_construction_time_poseidon_hash_100_ms 5,612 1,515 (-1%) 676 (-1%) 732 (-3%) 747 (-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 740 740 740
l1_rollup_calldata_gas 6,716 6,716 6,704
l1_rollup_execution_gas 611,983 612,134 612,273
l2_block_processing_time_in_ms 250 (-2%) 443 (-3%) 800 (+1%)
l2_block_building_time_in_ms 9,425 (+1%) 18,495 (+1%) 36,706 (+1%)
l2_block_rollup_simulation_time_in_ms 9,425 (+1%) 18,495 (+1%) 36,705 (+1%)
l2_block_public_tx_process_time_in_ms 7,853 (+1%) 16,686 (+1%) 34,842 (+1%)

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 2,798 (-3%) 3,639 (-2%)
node_database_size_in_bytes 12,734,544 16,867,408
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 input_size_in_bytes output_size_in_bytes proving_time_in_ms proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 94.9 (-1%) 393 21,846 44,858 N/A N/A N/A N/A
private-kernel-inner 167 (-2%) 694 (+2%) 72,545 45,005 N/A N/A N/A N/A
private-kernel-tail 682 (-1%) 852 (+4%) 53,523 49,801 N/A N/A N/A N/A
base-parity 5.86 (-5%) 592 (+7%) 160 96.0 :warning: 1,793 (+64%) 13,188 19.0 65,536
root-parity 108 (-11%) 126 (+6%) 69,084 96.0 31,027 (-1%) 13,188 19.0 4,194,304
base-rollup 2,993 (+1%) 5,341 (+3%) 182,288 664 98,437 (+1%) 14,020 45.0 16,777,216
root-rollup 96.3 (-6%) 117 (+6%) 54,525 716 29,067 (+4%) 13,988 44.0 4,194,304
public-kernel-setup 88.8 2,844 (+4%) 102,617 69,814 17,874 (+3%) 127,172 3,581 2,097,152
public-kernel-app-logic 103 (-2%) 4,119 (+3%) 102,617 69,814 10,711 (+2%) 127,172 3,581 1,048,576
public-kernel-tail 573 (-2%) 31,371 (+6%) 402,342 10,878 104,450 26,436 433 16,777,216
private-kernel-reset-tiny 197 (+1%) 829 (+3%) 68,621 44,750 N/A N/A N/A N/A
private-kernel-tail-to-public 5,188 (+2%) 1,578 977,330 1,697 N/A N/A N/A N/A
public-kernel-teardown 84.1 (-1%) 4,195 (+4%) 102,617 69,814 18,824 (+1%) 127,172 3,581 2,097,152
merge-rollup 60.0 N/A 35,742 664 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 155,532 (+2%) N/A N/A N/A

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
ContractClassRegisterer:register 1,344 11,731 335 (-3%) N/A N/A
ContractInstanceDeployer:deploy 1,408 11,731 18.0 (-11%) N/A N/A
MultiCallEntrypoint:entrypoint 1,920 11,731 471 N/A N/A
GasToken:deploy 1,376 11,731 377 (+1%) N/A N/A
SchnorrAccount:constructor 1,312 11,731 177 (+2%) N/A N/A
SchnorrAccount:entrypoint 2,304 11,731 562 (-2%) N/A N/A
Token:privately_mint_private_note 1,280 11,731 219 (-1%) N/A N/A
FPC:fee_entrypoint_public 1,344 11,731 32.7 (+7%) N/A N/A
Token:transfer 1,312 11,731 799 (+1%) N/A N/A
AuthRegistry:set_authorized (avm) 18,491 N/A N/A 147,456 2,506 (+1%)
FPC:prepare_fee (avm) 22,958 N/A N/A 147,520 3,214 (+6%)
Token:transfer_public (avm) 61,614 N/A N/A 147,520 17,872 (+1%)
AuthRegistry:consume (avm) 41,719 N/A N/A 147,488 7,608 (+6%)
FPC:pay_refund (avm) 26,227 N/A N/A 147,488 7,633 (+7%)
Benchmarking:create_note 1,344 11,731 170 (-1%) N/A N/A
SchnorrAccount:verify_private_authwit 1,280 11,731 27.5 N/A N/A
Token:unshield 1,376 11,731 743 N/A N/A
FPC:fee_entrypoint_private 1,376 11,731 998 (+1%) 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 93.4 (+2%) 8,139
GasToken:set_portal 10.1 (+3%) 2,362
Token:constructor 118 (-12%) 31,107
FPC:constructor 93.4 (+2%) 24,011
GasToken:mint_public 77.0 6,150
Token:mint_public :warning: 92.1 (-60%) 11,720
Token:assert_minter_and_mint 78.7 (-7%) 8,028
AuthRegistry:set_authorized :warning: 10.9 (+64%) 4,537
FPC:prepare_fee :warning: 320 (+21%) 8,812
Token:transfer_public :warning: 47.5 (+41%) 47,374
FPC:pay_refund 63.8 (+5%) 12,114
Benchmarking:increment_balance 1,003 (+3%) 7,450
Token:_increase_public_balance 10.0 (+7%) 8,960
FPC:pay_refund_with_shielded_rebate 137 (-1%) 12,663

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.157 (+3%)

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 2.10 (-5%) 3.83 (-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.109 (-5%) 0.108 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 10.9 (-3%) 17.6 (-1%) 31.7 (+3%) 59.0 (-1%) 112
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.104 (-3%) 0.102 (-1%) 0.102 (+2%) 0.102 (-1%) 0.100 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 13.9 (-2%) 25.3 (-1%) 43.5 (+1%) 82.0 (-1%) 160 (+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.106 (-2%) 0.103 (-1%) 0.105 (+4%) 0.101 (-1%) 0.102
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 (-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.105 (-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 62,729 664,455

Transaction size based on fee payment method

| Metric | | | - | |

AztecBot avatar Aug 08 '24 08:08 AztecBot

Check if still relevant. If so rework, rebase and reopen. Engineers need to land their PR's. Policy is to close if stale > 1 month.

charlielye avatar Mar 13 '25 18:03 charlielye