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: p2pEnabled option source #7810

Merged
merged 4 commits into from
Aug 7, 2024
Merged

fix: p2pEnabled option source #7810

merged 4 commits into from
Aug 7, 2024

Conversation

spypsy
Copy link
Member

@spypsy spypsy commented Aug 7, 2024

Please read contributing guidelines and remove this line.

@spypsy spypsy force-pushed the spy/fix-p2p-enabled branch from 0cc66e1 to 2a61251 Compare August 7, 2024 12:00
@spypsy spypsy force-pushed the spy/fix-p2p-enabled branch from d7eb009 to 15e79e0 Compare August 7, 2024 12:12
@spypsy spypsy marked this pull request as ready for review August 7, 2024 12:13
@PhilWindle PhilWindle merged commit e83f5ae into alphanet Aug 7, 2024
23 checks passed
@PhilWindle PhilWindle deleted the spy/fix-p2p-enabled branch August 7, 2024 12:18
@AztecBot
Copy link
Collaborator

AztecBot commented Aug 7, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (public-kernel-setup): 121 (+36%)
  • avm_simulation_time_ms (Token:mint_public): 84.1 (-64%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 276 (-50%)
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,738 1,544 (-1%) 706 (-3%) 749 (-2%) 764 (-4%)
proof_construction_time_sha256_30_ms 11,586 (-2%) 3,095 (-3%) 1,402 (-4%) 1,433 (-4%) 1,462 (-2%)
proof_construction_time_sha256_100_ms 43,868 12,452 5,663 (-1%) 5,579 (-4%) 5,503 (-2%)
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,523 416 201 225 (-2%) 268
proof_construction_time_poseidon_hash_100_ms 5,623 1,518 676 (-1%) 728 (-4%) 752

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,704 6,712 6,704
l1_rollup_execution_gas 611,971 612,130 612,273
l2_block_processing_time_in_ms 249 (-2%) 445 (-3%) 831 (+5%)
l2_block_building_time_in_ms 9,411 (+1%) 19,169 (+5%) 36,576 (+1%)
l2_block_rollup_simulation_time_in_ms 9,411 (+1%) 19,169 (+5%) 36,576 (+1%)
l2_block_public_tx_process_time_in_ms 7,845 (+1%) 17,284 (+4%) 34,726 (+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,821 (-2%) 3,650 (-1%)
node_database_size_in_bytes 12,775,504 (+1%) 16,871,504
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 97.2 (+2%) 429 (+9%) 21,846 44,858 N/A N/A N/A N/A
private-kernel-inner 170 (-1%) 733 (+8%) 72,545 45,005 N/A N/A N/A N/A
private-kernel-tail 744 (+8%) 871 (+6%) 53,523 49,801 N/A N/A N/A N/A
base-parity 6.24 (+1%) ⚠️ 276 (-50%) 160 96.0 1,125 (+3%) 13,188 19.0 65,536
root-parity 113 (-7%) 113 (-5%) 69,084 96.0 27,875 (-11%) 13,188 19.0 4,194,304
base-rollup 3,049 (+3%) 5,608 (+8%) 182,288 664 86,403 (-11%) 14,020 45.0 16,777,216
root-rollup 98.4 (-4%) 105 (-5%) 54,525 716 25,720 (-8%) 13,988 44.0 4,194,304
public-kernel-setup ⚠️ 121 (+36%) 2,795 (+2%) 102,617 69,814 15,325 (-12%) 127,172 3,581 2,097,152
public-kernel-app-logic 106 (+1%) 4,158 (+4%) 102,617 69,814 9,061 (-13%) 127,172 3,581 1,048,576
public-kernel-tail 602 (+3%) 28,775 (-2%) 402,342 10,878 92,471 (-11%) 26,436 433 16,777,216
private-kernel-reset-tiny 203 (+4%) 883 (+10%) 68,621 44,750 N/A N/A N/A N/A
private-kernel-tail-to-public 5,034 (-1%) 1,648 (+5%) 977,330 1,697 N/A N/A N/A N/A
public-kernel-teardown 92.5 (+9%) 4,240 (+5%) 102,617 69,814 16,300 (-12%) 127,172 3,581 2,097,152
merge-rollup 61.8 (+3%) N/A 35,742 664 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 150,987 (-1%) 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 338 (-3%) N/A N/A
ContractInstanceDeployer:deploy 1,408 11,731 18.4 (-9%) N/A N/A
MultiCallEntrypoint:entrypoint 1,920 11,731 476 (+1%) N/A N/A
GasToken:deploy 1,376 11,731 386 (+4%) N/A N/A
SchnorrAccount:constructor 1,312 11,731 178 (+2%) N/A N/A
SchnorrAccount:entrypoint 2,304 11,731 584 (+2%) N/A N/A
Token:privately_mint_private_note 1,280 11,731 225 (+2%) N/A N/A
FPC:fee_entrypoint_public 1,344 11,731 29.9 (-2%) N/A N/A
Token:transfer 1,312 11,731 812 (+3%) N/A N/A
AuthRegistry:set_authorized (avm) 18,491 N/A N/A 147,456 2,643 (+6%)
FPC:prepare_fee (avm) 22,958 N/A N/A 147,520 3,325 (+10%)
Token:transfer_public (avm) 61,614 N/A N/A 147,520 17,801 (+1%)
AuthRegistry:consume (avm) 41,719 N/A N/A 147,488 7,550 (+5%)
FPC:pay_refund (avm) 26,227 N/A N/A 147,488 7,446 (+4%)
Benchmarking:create_note 1,344 11,731 180 (+5%) N/A N/A
SchnorrAccount:verify_private_authwit 1,280 11,731 27.6 (+1%) N/A N/A
Token:unshield 1,376 11,731 751 (+1%) N/A N/A
FPC:fee_entrypoint_private 1,376 11,731 1,016 (+3%) 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 94.8 (+4%) 8,139
GasToken:set_portal 10.0 (+2%) 2,362
Token:constructor 122 (-9%) 31,107
FPC:constructor 96.9 (+6%) 24,011
GasToken:mint_public 78.0 (+1%) 6,150
Token:mint_public ⚠️ 84.1 (-64%) 11,720
Token:assert_minter_and_mint 66.2 (-22%) 8,028
AuthRegistry:set_authorized 7.17 (+8%) 4,537
FPC:prepare_fee 282 (+6%) 8,812
Token:transfer_public 24.3 (-28%) 47,374
FPC:pay_refund 66.4 (+9%) 12,114
Benchmarking:increment_balance 1,054 (+8%) 7,450
Token:_increase_public_balance 9.43 (+1%) 8,960
FPC:pay_refund_with_shielded_rebate 139 12,663

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.158 (+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.16 (-2%) 3.95 (+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 (-2%) 0.112 (+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.3 17.8 30.1 (-2%) 59.3 (-1%) 114 (+2%)
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.109 (+1%) 0.104 0.0996 (-1%) 0.103 0.102 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 (+3%) 25.5 43.2 82.4 (-1%) 162 (+2%)
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.110 (+2%) 0.103 (-1%) 0.106 (+5%) 0.103 0.103 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.7 (+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.107 (+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 62,729 664,455

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