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

fix: wallet fixes for devnet, testing and misc

Open Thunkar opened this issue 1 year ago • 2 comments

Please read contributing guidelines and remove this line.

Thunkar avatar Aug 19 '24 08:08 Thunkar

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 675 (-51%)
  • avm_simulation_time_ms (Token:mint_public): 70.3 (+54%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 41.5 (-38%)
  • avm_simulation_time_ms (Token:transfer_public): 21.4 (-32%)
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,777 1,574 717 (+1%) 761 778
proof_construction_time_sha256_30_ms 11,516 3,094 1,387 1,438 (+2%) 1,459
proof_construction_time_sha256_100_ms 44,269 11,888 5,462 (+1%) 5,456 (-3%) 5,759 (+2%)
proof_construction_time_poseidon_hash_ms 79.0 34.0 34.0 58.0 (-2%) 87.0 (-2%)
proof_construction_time_poseidon_hash_30_ms 1,538 424 203 221 (-3%) 269 (-2%)
proof_construction_time_poseidon_hash_100_ms 5,674 1,520 683 (+1%) 707 (-5%) 754 (+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 4,324 7,844 14,852
l1_rollup_calldata_gas 49,684 92,498 177,668
l1_rollup_execution_gas 1,373,712 2,107,422 3,892,648
l2_block_processing_time_in_ms 258 (+3%) 437 (-2%) 803
l2_block_building_time_in_ms 9,049 17,364 (-2%) 34,875 (-1%)
l2_block_rollup_simulation_time_in_ms 9,048 17,364 (-2%) 34,875 (-1%)
l2_block_public_tx_process_time_in_ms 7,637 15,873 (-1%) 33,339 (-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,938 (+3%) 3,805 (-3%)
node_database_size_in_bytes 12,664,912 16,719,952
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 91.3 (+2%) 399 21,755 44,860 N/A
private-kernel-inner 169 (+1%) 705 (-1%) 72,566 45,007 N/A
private-kernel-reset-tiny 463 877 (-1%) 65,675 44,846 N/A
private-kernel-tail 195 (-1%) 161 (+1%) 50,686 52,257 N/A
base-parity 5.62 N/A 160 96.0 N/A
root-parity 35.6 (-1%) N/A 73,948 96.0 N/A
base-rollup 2,734 (-2%) N/A 189,136 664 N/A
root-rollup 40.3 (-1%) N/A 58,173 716 N/A
public-kernel-setup 84.1 (-1%) N/A 105,085 71,222 N/A
public-kernel-app-logic 94.9 (-1%) N/A 104,911 71,222 N/A
public-kernel-tail 555 (-1%) N/A 410,534 16,414 N/A
private-kernel-reset-small 457 (-10%) N/A 66,341 45,629 N/A
private-kernel-tail-to-public :warning: 675 (-51%) 647 (-2%) 460,796 1,825 N/A
public-kernel-teardown 82.9 (-1%) N/A 105,349 71,222 N/A
merge-rollup 19.9 (-6%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 79,020

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 342 (-1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.3 (-1%)
MultiCallEntrypoint:entrypoint 1,920 11,731 404 (-1%)
FeeJuice:deploy 1,376 11,731 388 (-2%)
SchnorrAccount:constructor 1,312 11,731 74.9 (-1%)
SchnorrAccount:entrypoint 2,304 11,731 414
Token:privately_mint_private_note 1,280 11,731 105 (+3%)
FPC:fee_entrypoint_public 1,344 11,731 26.3 (-16%)
Token:transfer 1,312 11,731 243 (+4%)
Benchmarking:create_note 1,344 11,731 88.8
SchnorrAccount:verify_private_authwit 1,280 11,731 27.5 (-11%)
Token:unshield 1,376 11,731 526 (-1%)
FPC:fee_entrypoint_private 1,376 11,731 710 (-1%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 55.1 (-1%) 7,739
FeeJuice:set_portal 12.4 2,354
Token:constructor 89.4 (+9%) 26,051
FPC:constructor 55.7 (+4%) 18,001
FeeJuice:mint_public 39.7 5,877
Token:mint_public :warning: 70.3 (+54%) 10,917
Token:assert_minter_and_mint :warning: 41.5 (-38%) 7,512
AuthRegistry:set_authorized 40.3 (-14%) 4,391
FPC:prepare_fee 232 7,043
Token:transfer_public :warning: 21.4 (-32%) 39,426
FPC:pay_refund 51.0 (-23%) 10,234
Benchmarking:increment_balance 931 (-1%) 6,563
Token:_increase_public_balance 39.7 (-2%) 8,433
FPC:pay_refund_with_shielded_rebate 62.4 10,783

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.155 (-5%)

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.16 (-2%) 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.112 (-2%) 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 11.6 18.0 32.2 (+4%) 58.1 (-2%) 114 (+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.111 0.105 (+1%) 0.104 (+4%) 0.100 (-2%) 0.102 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.7 25.8 45.1 (+2%) 81.3 (-3%) 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.112 0.104 (-1%) 0.109 (+3%) 0.101 (-2%) 0.103 (+1%)
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 132 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 64,779 668,997

Transaction size based on fee payment method

| Metric | | | - | |

AztecBot avatar Aug 19 '24 08:08 AztecBot