Skip to content

chore: remove passing/parsing of protocol#8089

Merged
Maddiaa0 merged 1 commit into
md/p2p-requestsfrom
mt/p2p-requests-patch
Aug 20, 2024
Merged

chore: remove passing/parsing of protocol#8089
Maddiaa0 merged 1 commit into
md/p2p-requestsfrom
mt/p2p-requests-patch

Conversation

@just-mitch

Copy link
Copy Markdown
Collaborator

add more types to interface

add more types to interface
@just-mitch just-mitch changed the title remove passing/parsing of protocol chore: remove passing/parsing of protocol Aug 20, 2024
@Maddiaa0 Maddiaa0 merged commit cadca64 into md/p2p-requests Aug 20, 2024
@Maddiaa0 Maddiaa0 deleted the mt/p2p-requests-patch branch August 20, 2024 14:44
@AztecBot

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:assert_minter_and_mint): 64.4 (+63%)
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,741 1,550 707 764 (+1%) 775
proof_construction_time_sha256_30_ms 11,815 3,168 1,405 1,451 (+1%) 1,474
proof_construction_time_sha256_100_ms 45,162 12,134 (+1%) 5,468 (+1%) 5,402 (+1%) 5,338
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (-2%) 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,527 422 203 224 (+1%) 272 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,629 1,510 692 (+2%) 732 749

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,696 92,330 177,644
l1_rollup_execution_gas 1,383,190 2,130,792 3,958,145
l2_block_processing_time_in_ms 254 (-1%) 443 (-1%) 801
l2_block_building_time_in_ms 9,115 (+2%) 17,523 35,316 (+2%)
l2_block_rollup_simulation_time_in_ms 9,115 (+2%) 17,523 35,315 (+2%)
l2_block_public_tx_process_time_in_ms 7,690 (+2%) 16,001 33,757 (+2%)

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,869 (-3%) 3,788 (-3%)
node_database_size_in_bytes 12,636,240 16,724,048
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 85.1 (+1%) 379 21,502 44,858 N/A
private-kernel-inner 159 (-1%) 678 (-1%) 72,180 45,005 N/A
private-kernel-reset-tiny 479 (+1%) 843 (-1%) 65,502 44,844 N/A
private-kernel-tail 200 (+1%) 156 (-1%) 50,606 52,256 N/A
base-parity 5.62 N/A 160 96.0 N/A
root-parity 33.1 N/A 69,084 96.0 N/A
base-rollup 2,753 (+1%) N/A 187,817 664 N/A
root-rollup 38.6 (+1%) N/A 54,525 716 N/A
public-kernel-setup 86.0 (+3%) N/A 103,760 71,222 N/A
public-kernel-app-logic 95.8 (+1%) N/A 103,599 71,222 N/A
public-kernel-tail 552 (+1%) N/A 409,190 16,414 N/A
private-kernel-reset-small 457 (-1%) N/A 66,085 45,629 N/A
private-kernel-tail-to-public 969 628 473,529 1,697 N/A
public-kernel-teardown 82.5 N/A 104,005 71,222 N/A
merge-rollup 19.4 (+2%) N/A 35,742 664 N/A
undefined N/A N/A N/A N/A 66,844 (-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 343 (+1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.2 (+1%)
MultiCallEntrypoint:entrypoint 1,920 11,731 422 (+1%)
FeeJuice:deploy 1,376 11,731 386 (+1%)
SchnorrAccount:constructor 1,312 11,731 105 (+3%)
SchnorrAccount:entrypoint 2,304 11,731 429
Token:privately_mint_private_note 1,280 11,731 137 (-2%)
FPC:fee_entrypoint_public 1,344 11,731 29.7 (+9%)
Token:transfer 1,312 11,731 263 (-1%)
Benchmarking:create_note 1,344 11,731 103 (+3%)
SchnorrAccount:verify_private_authwit 1,280 11,731 27.6
Token:unshield 1,376 11,731 557
FPC:fee_entrypoint_private 1,376 11,731 759

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 54.7 (+1%) 7,739
FeeJuice:set_portal 9.42 2,354
Token:constructor 84.6 (-1%) 26,525
FPC:constructor 52.7 (+1%) 18,383
FeeJuice:mint_public 37.6 (-1%) 5,877
Token:mint_public 53.0 (-21%) 10,917
Token:assert_minter_and_mint ⚠️ 64.4 (+63%) 7,512
AuthRegistry:set_authorized 36.0 (-5%) 4,391
FPC:prepare_fee 228 (-7%) 7,712
Token:transfer_public 21.6 (+4%) 39,946
FPC:pay_refund 51.2 (-2%) 10,811
Benchmarking:increment_balance 940 (+1%) 6,929
Token:_increase_public_balance 39.5 (+3%) 8,433
FPC:pay_refund_with_shielded_rebate 64.9 (-3%) 11,360

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.162 (+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.86 (+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.113 (+1%) 0.109 (+2%) 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 (+1%) 17.7 31.4 (+1%) 59.1 112 (-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 (+1%) 0.102 (-1%) 0.102 (+1%) 0.102 0.101 (+2%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.3 (-1%) 26.2 (+2%) 44.0 (+2%) 82.4 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.108 (-1%) 0.104 (+1%) 0.106 (+1%) 0.101 (-1%) 0.102 (-1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 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 | |
| - | |

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