Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing classes to rpc serialisation #8166

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

alexghr
Copy link
Contributor

@alexghr alexghr commented Aug 23, 2024

No description provided.

@alexghr alexghr enabled auto-merge (squash) August 23, 2024 16:07
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 1,479 (+89%)
  • avm_simulation_time_ms (Token:mint_public): 71.3 (+58%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 40.9 (-38%)
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,753 1,561 709 (-1%) 752 (+2%) 779 (+1%)
proof_construction_time_sha256_30_ms 11,575 3,072 1,368 (-1%) 1,415 (-1%) 1,465
proof_construction_time_sha256_100_ms 44,311 12,007 (+1%) 5,420 5,665 5,822
proof_construction_time_poseidon_hash_ms 77.0 (-1%) 34.0 34.0 57.0 (-2%) 86.0 (-2%)
proof_construction_time_poseidon_hash_30_ms 1,534 421 201 225 (-2%) 267
proof_construction_time_poseidon_hash_100_ms 5,684 (+1%) 1,523 (+1%) 679 (+1%) 735 (+3%) 745 (-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,356 7,876 14,884
l1_rollup_calldata_gas 50,232 92,988 178,216
l1_rollup_execution_gas 1,396,483 2,130,135 3,915,419
l2_block_processing_time_in_ms 248 (-4%) 441 821 (-1%)
l2_block_building_time_in_ms 9,016 (+1%) 17,548 35,016
l2_block_rollup_simulation_time_in_ms 9,016 (+1%) 17,547 35,016
l2_block_public_tx_process_time_in_ms 7,617 (+1%) 16,030 33,424

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,895 3,815 (+3%)
node_database_size_in_bytes 12,636,240 16,695,376
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 90.3 (+6%) 378 (+1%) 21,755 44,860 N/A
private-kernel-inner 169 (+2%) 677 (+1%) 72,566 45,007 N/A
private-kernel-reset-tiny 456 (-1%) 843 65,675 44,846 N/A
private-kernel-tail 195 155 (+3%) 50,686 52,257 N/A
base-parity 5.52 (-1%) N/A 160 96.0 N/A
root-parity 35.1 N/A 73,948 96.0 N/A
base-rollup 2,758 N/A 189,136 664 N/A
block-root-rollup 41.0 N/A 58,205 2,448 N/A
public-kernel-setup 83.6 (+2%) N/A 105,085 71,222 N/A
public-kernel-app-logic 95.6 N/A 104,911 71,222 N/A
public-kernel-tail 551 N/A 410,534 16,414 N/A
private-kernel-reset-small 451 N/A 66,341 45,629 N/A
private-kernel-tail-to-public ⚠️ 1,479 (+89%) 623 (+1%) 460,796 1,825 N/A
public-kernel-teardown 83.3 (+2%) N/A 105,349 71,222 N/A
merge-rollup 19.9 (-2%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 84,225 (+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 342
ContractInstanceDeployer:deploy 1,408 11,731 18.2
MultiCallEntrypoint:entrypoint 1,920 11,731 405
FeeJuice:deploy 1,376 11,731 385 (-1%)
SchnorrAccount:constructor 1,312 11,731 74.8
SchnorrAccount:entrypoint 2,304 11,731 398
Token:privately_mint_private_note 1,280 11,731 101
FPC:fee_entrypoint_public 1,344 11,731 27.6 (+5%)
Token:transfer 1,312 11,731 231 (+4%)
Benchmarking:create_note 1,344 11,731 89.0 (+1%)
SchnorrAccount:verify_private_authwit 1,280 11,731 27.5
Token:unshield 1,376 11,731 528
FPC:fee_entrypoint_private 1,376 11,731 714 (+1%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 54.3 7,739
FeeJuice:set_portal 9.27 (+1%) 2,354
Token:constructor 84.6 (+5%) 26,051
FPC:constructor 53.3 18,001
FeeJuice:mint_public 39.3 (-1%) 5,877
Token:mint_public ⚠️ 71.3 (+58%) 10,917
Token:assert_minter_and_mint ⚠️ 40.9 (-38%) 7,512
AuthRegistry:set_authorized 45.5 (+24%) 4,391
FPC:prepare_fee 238 (+2%) 7,043
Token:transfer_public 34.9 (+22%) 39,426
FPC:pay_refund 63.0 (+22%) 10,234
Benchmarking:increment_balance 938 6,563
Token:_increase_public_balance 47.4 (+16%) 8,433
FPC:pay_refund_with_shielded_rebate 66.2 (+5%) 10,783

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.163 (-1%)

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.87 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.113 (-1%) 0.109 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%) 17.8 (+1%) 30.7 (-1%) 59.0 116 (+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.110 (+1%) 0.103 0.0996 (-1%) 0.101 0.103 (+2%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 (+1%) 25.5 (-2%) 43.9 82.8 (-1%) 169 (+5%)
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 0.103 (-1%) 0.106 0.102 (-2%) 0.106 (+3%)
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 | |
| - | |

@alexghr alexghr merged commit bd6626c into master Aug 23, 2024
97 checks passed
@alexghr alexghr deleted the ag/fix-serialisation branch August 23, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants