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(e2e snapshots): be specific about ipv4 localhost #7350

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

ludamad
Copy link
Collaborator

@ludamad ludamad commented Jul 4, 2024

It's safer we use 127.0.0.1 as systems start to resolve localhost to ipv6

It's safer we use 127.0.0.1 as systems start to resolve localhost to ipv6
@AztecBot
Copy link
Collaborator

AztecBot commented Jul 4, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 71.1 (+54%)
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,721 1,545 706 760 (+1%) 771 (-1%)
proof_construction_time_sha256_30_ms 11,713 3,133 1,406 1,427 1,457 (-1%)
proof_construction_time_sha256_100_ms 43,777 11,730 5,413 5,364 5,344
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (+2%) 89.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,515 415 200 224 (+1%) 268 (+2%)
proof_construction_time_poseidon_hash_100_ms 5,740 1,562 720 771 793 (+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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,464 9,472 9,476
l1_rollup_execution_gas 611,203 611,362 611,517
l2_block_processing_time_in_ms 760 1,428 (+1%) 2,708
l2_block_building_time_in_ms 20,808 41,532 (-1%) 81,320
l2_block_rollup_simulation_time_in_ms 20,808 41,532 (-1%) 81,320
l2_block_public_tx_process_time_in_ms 17,791 38,343 (-1%) 78,163 (-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 7,126 (+1%) 10,027 (+2%)
node_database_size_in_bytes 12,443,728 16,207,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 proving_time_in_ms input_size_in_bytes output_size_in_bytes proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 100 374 (-1%) 12,667 (-3%) 19,418 53,878 71,872 2,179 524,288
private-kernel-inner 304 746 (+1%) 48,382 80,374 53,878 71,872 2,179 2,097,152
private-kernel-tail 1,039 (-1%) 2,424 (-1%) 47,840 (-1%) 61,201 62,057 14,912 399 2,097,152
base-parity 6.30 (-1%) 1,537 (+3%) 2,643 128 64.0 2,208 2.00 131,072
root-parity 49.2 65.9 (-3%) 38,740 (-9%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup 6,529 4,781 88,665 (-1%) 170,330 728 3,648 47.0 4,194,304
root-rollup 110 85.3 (+3%) 22,741 (-5%) 25,253 620 3,456 41.0 1,048,576
public-kernel-setup 538 (-1%) 2,360 (-1%) 42,371 (-1%) 102,121 80,278 106,912 3,274 2,097,152
public-kernel-app-logic 498 (-1%) 3,306 (+1%) 42,298 (-2%) 102,121 80,278 106,912 3,274 2,097,152
public-kernel-tail 1,141 (-1%) 26,866 178,999 399,014 10,014 14,912 399 8,388,608
private-kernel-reset-small 286 1,094 (+1%) 28,956 (-5%) 78,065 53,878 71,872 2,179 1,048,576
public-kernel-teardown 493 3,244 (-1%) 44,404 (+4%) 102,121 80,278 106,912 3,274 2,097,152
merge-rollup 29.5 N/A N/A 16,486 728 N/A N/A N/A
private-kernel-tail-to-public N/A 8,207 (-2%) 51,503 (+1%) N/A N/A 106,912 3,274 2,097,152

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 size_in_gates num_public_inputs
ContractClassRegisterer:register 1,344 8,792 389 (-1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 8,792 23.9 N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 8,792 1,146 (-1%) N/A N/A N/A N/A
GasToken:deploy 1,376 8,792 805 (-2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 8,792 472 (-1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 8,792 1,593 (-1%) 14,720 53,151 (+1%) 2,097,152 393
Token:privately_mint_private_note 1,280 8,792 607 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 8,792 237 (-5%) 14,720 11,297 (+1%) 524,288 393
Token:transfer 1,312 8,792 1,761 (-2%) 14,720 12,820 (+1%) 524,288 393
AuthRegistry:set_authorized (avm) 19,226 N/A N/A 91,264 1,297 (-6%) N/A N/A
FPC:prepare_fee (avm) 26,668 N/A N/A 91,328 2,673 (-7%) N/A N/A
Token:transfer_public (avm) 42,918 N/A N/A 91,328 3,742 (-5%) N/A N/A
AuthRegistry:consume (avm) 33,104 N/A N/A 91,264 2,656 (-10%) N/A N/A
FPC:pay_refund (avm) 36,833 N/A N/A 91,296 22,685 (-2%) N/A N/A
Benchmarking:create_note 1,344 8,792 463 (-1%) N/A N/A N/A N/A
SchnorrAccount:verify_private_authwit 1,280 8,792 40.3 N/A N/A N/A N/A
Token:unshield 1,376 8,792 1,449 (-1%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 8,792 1,974 (-1%) N/A N/A 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 68.5 (-5%) 13,790
GasToken:set_portal 15.9 (+29%) 3,339
Token:constructor 92.4 (-2%) 23,692
FPC:constructor 60.7 (+18%) 13,592
GasToken:mint_public 50.1 10,158
Token:mint_public ⚠️ 71.1 (+54%) 19,034
Token:assert_minter_and_mint 182 (-1%) 12,925
AuthRegistry:set_authorized 29.6 (-3%) 7,812
FPC:prepare_fee 104 (-10%) 15,062
Token:transfer_public 42.3 (+19%) 31,218
FPC:pay_refund 123 (-10%) 25,260
Benchmarking:increment_balance 2,184 (-1%) 15,267
Token:_increase_public_balance 54.4 (-6%) 15,006
FPC:pay_refund_with_shielded_rebate 112 (-7%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.156 (-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 10.3 16.7 (+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.597 0.514 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.1 76.2 132 (-1%) 246 (+1%) 471
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.491 0.468 0.453 0.446 (+1%) 0.438 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.3 112 183 (-1%) 354 (+1%) 693
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.500 0.502 0.484 (-1%) 0.479 (+1%) 0.474 (-1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 72.8 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.518 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 74,057 667,841

Transaction size based on fee payment method

| Metric | |
| - | |

@ludamad ludamad enabled auto-merge (squash) July 5, 2024 01:34
@ludamad ludamad requested a review from charlielye July 8, 2024 14:54
@ludamad ludamad disabled auto-merge July 9, 2024 13:19
@ludamad ludamad merged commit e2bbf06 into master Jul 9, 2024
91 checks passed
@ludamad ludamad deleted the ad/fix-ipv4-snapshots branch July 9, 2024 13:19
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.

2 participants