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

fix: ensure VERSION is set from NETWORK or --network option

Open spypsy opened this issue 1 year ago • 1 comments

spypsy avatar Aug 09 '24 13:08 spypsy

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 1,189 (+17%)
  • avm_simulation_time_ms (Token:transfer_public): 39.1 (+37%)
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,779 1,560 705 (-2%) 763 (-1%) 775 (-2%)
proof_construction_time_sha256_30_ms 11,931 3,181 (-1%) 1,416 (-2%) 1,435 (-3%) 1,486
proof_construction_time_sha256_100_ms 45,509 12,096 (-1%) 5,464 (-1%) 5,455 (-1%) 5,390 (-1%)
proof_construction_time_poseidon_hash_ms 78.0 (-1%) 34.0 (-3%) 34.0 57.0 (-2%) 87.0 (-2%)
proof_construction_time_poseidon_hash_30_ms 1,537 424 202 (-1%) 237 268
proof_construction_time_poseidon_hash_100_ms 5,661 (-1%) 1,518 676 (-1%) 725 754

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 4,324 7,844 14,852
l1_rollup_calldata_gas 49,780 92,454 177,380
l1_rollup_execution_gas 1,383,274 2,130,916 3,957,881
l2_block_processing_time_in_ms 252 (-4%) 445 (-1%) 854 (+6%)
l2_block_building_time_in_ms 9,247 18,138 36,128
l2_block_rollup_simulation_time_in_ms 9,247 18,138 36,128
l2_block_public_tx_process_time_in_ms 7,826 16,586 34,559

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 3,008 (+1%) 3,845 (-1%)
node_database_size_in_bytes 12,632,144 16,744,528
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
private-kernel-init 96.8 (+7%) 383 (-5%) 21,673 44,858 N/A
private-kernel-inner 165 (-1%) 681 (-5%) 72,309 45,005 N/A
private-kernel-reset-tiny 501 866 (-4%) 65,974 44,844 N/A
private-kernel-tail 207 167 50,728 52,256 N/A
base-parity 5.61 N/A 160 96.0 N/A
root-parity 33.2 N/A 69,084 96.0 N/A
base-rollup 2,851 N/A 187,817 664 N/A
root-rollup 38.4 (-1%) N/A 54,525 716 N/A
public-kernel-setup 97.1 (-2%) N/A 103,760 71,222 N/A
public-kernel-app-logic 103 (-1%) N/A 103,599 71,222 N/A
public-kernel-tail 573 (-1%) N/A 409,190 16,414 N/A
private-kernel-reset-small 485 (-2%) N/A 66,085 45,629 N/A
private-kernel-tail-to-public :warning: 1,189 (+17%) 636 (-3%) 492,960 1,697 N/A
public-kernel-teardown 91.7 (-1%) N/A 104,005 71,222 N/A
merge-rollup 19.2 (+1%) N/A 35,742 664 N/A
undefined N/A N/A N/A N/A 67,921 (+2%)

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 340 (-1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.0 (-1%)
MultiCallEntrypoint:entrypoint 1,920 11,731 420 (-1%)
FeeJuice:deploy 1,376 11,731 384 (-3%)
SchnorrAccount:constructor 1,312 11,731 103 (-2%)
SchnorrAccount:entrypoint 2,304 11,731 431
Token:privately_mint_private_note 1,280 11,731 138 (-1%)
FPC:fee_entrypoint_public 1,344 11,731 26.2 (-3%)
Token:transfer 1,312 11,731 265 (-2%)
Benchmarking:create_note 1,344 11,731 101 (+1%)
SchnorrAccount:verify_private_authwit 1,280 11,731 27.5
Token:unshield 1,376 11,731 556 (-1%)
FPC:fee_entrypoint_private 1,376 11,731 746 (-2%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 54.3 (-6%) 8,139
FeeJuice:set_portal 11.5 (+6%) 2,362
Token:constructor 86.2 (+7%) 31,107
FPC:constructor 53.9 (+1%) 22,380
FeeJuice:mint_public 38.1 (-1%) 6,150
Token:mint_public 45.4 (+1%) 11,720
Token:assert_minter_and_mint 67.6 (-2%) 8,028
AuthRegistry:set_authorized 36.0 (-13%) 4,537
FPC:prepare_fee 262 (+6%) 8,812
Token:transfer_public :warning: 39.1 (+37%) 47,358
FPC:pay_refund 59.6 (+1%) 12,082
Benchmarking:increment_balance 969 (-1%) 7,450
Token:_increase_public_balance 38.4 (-3%) 8,960
FPC:pay_refund_with_shielded_rebate 72.4 (+9%) 12,631

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.164 (+2%)

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.18 (-1%) 3.85 (-3%) 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.112 (-2%) 0.108 (-3%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.5 (-1%) 18.1 (-2%) 31.3 (-1%) 59.6 (-2%) 113
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.110 (-1%) 0.105 (-2%) 0.102 (-1%) 0.103 (-2%) 0.101
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.4 (-1%) 26.3 (+1%) 44.3 84.1 (-1%) 163 (+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.109 (-2%) 0.107 (+1%) 0.107 0.104 (-1%) 0.104 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 (-2%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.105 (-2%) 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 64,779 668,997

Transaction size based on fee payment method

| Metric | | | - | |

AztecBot avatar Aug 09 '24 15: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