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: fix test to accomodate new max read requests #7286

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Jul 2, 2024

Reconciles TXE with new note reading limits.

@Thunkar Thunkar requested a review from LHerskind July 2, 2024 16:41
@Thunkar Thunkar self-assigned this Jul 2, 2024
@Thunkar Thunkar changed the title bug: fix test to accomodate new max read requests fix: fix test to accomodate new max read requests Jul 2, 2024
@Thunkar Thunkar enabled auto-merge (squash) July 2, 2024 16:46
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@AztecBot
Copy link
Collaborator

AztecBot commented Jul 2, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 508 (+714%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 56.2 (-67%)
  • avm_simulation_time_ms (Token:transfer_public): 31.2 (-38%)
  • protocol_circuit_proving_time_in_ms (private-kernel-reset-small): 30,782 (+16%)
  • l2_block_building_time_in_ms (16): 94,473 (+16%)
  • l2_block_rollup_simulation_time_in_ms (16): 94,473 (+16%)
  • l2_block_public_tx_process_time_in_ms (16): 91,309 (+16%)
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,736 (+1%) 1,568 (+1%) 724 (+3%) 771 (+1%) 791 (+2%)
proof_construction_time_sha256_30_ms 11,881 3,200 (+1%) 1,413 1,450 (+1%) 1,472
proof_construction_time_sha256_100_ms 44,072 (+1%) 12,075 (+2%) 5,552 (+1%) 5,564 (+3%) 5,490 (+2%)
proof_construction_time_poseidon_hash_ms 78.0 (-1%) 34.0 34.0 58.0 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,516 416 201 221 (-1%) 266 (-2%)
proof_construction_time_poseidon_hash_100_ms 5,763 1,564 726 769 799 (+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,452 9,470 9,476
l1_rollup_execution_gas 611,191 611,360 611,517
l2_block_processing_time_in_ms 772 (+2%) 1,417 2,711
l2_block_building_time_in_ms 21,269 (+2%) 42,018 (+1%) ⚠️ 94,473 (+16%)
l2_block_rollup_simulation_time_in_ms 21,268 (+2%) 42,017 (+1%) ⚠️ 94,473 (+16%)
l2_block_public_tx_process_time_in_ms 18,231 (+2%) 38,780 (+1%) ⚠️ 91,309 (+16%)

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,038 9,822 (-1%)
node_database_size_in_bytes 12,275,792 16,158,800
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 102 392 (-1%) 12,902 (+3%) 19,482 54,134 73,920 2,243 524,288
private-kernel-inner 309 (+1%) 784 50,321 (+2%) 80,694 54,134 73,920 2,243 2,097,152
private-kernel-tail 1,122 (+4%) 2,581 (+1%) 50,210 (+9%) 61,457 62,057 14,912 399 2,097,152
base-parity 6.14 (+1%) 1,551 (-1%) 2,750 (+5%) 128 64.0 2,208 2.00 131,072
root-parity 49.3 69.6 (+7%) 42,905 (+5%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup 6,908 (+6%) 5,009 (+4%) 93,426 (+4%) 170,330 728 3,648 47.0 4,194,304
root-rollup 110 (+1%) 81.7 (+4%) 22,290 (-3%) 25,253 620 3,456 41.0 1,048,576
public-kernel-setup 542 (+1%) 2,441 (+2%) 42,810 (+1%) 102,121 80,278 106,912 3,274 2,097,152
public-kernel-app-logic 527 (+6%) 3,450 (+4%) 44,140 (+2%) 102,121 80,278 106,912 3,274 2,097,152
public-kernel-tail 1,169 (+3%) 26,062 (-4%) 180,601 (-1%) 399,014 10,014 14,912 399 8,388,608
private-kernel-reset-small 469 (+1%) 1,090 (+1%) ⚠️ 30,782 (+16%) 109,233 54,134 73,920 2,243 1,048,576
public-kernel-teardown 496 (-1%) 3,434 (+3%) 45,002 (+2%) 102,121 80,278 106,912 3,274 2,097,152
merge-rollup 29.5 (+2%) N/A N/A 16,486 728 N/A N/A N/A
private-kernel-tail-to-public N/A 8,531 (+3%) 52,697 (+6%) 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 410 (+1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 8,792 39.0 (+2%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 8,792 1,204 (+2%) N/A N/A N/A N/A
GasToken:deploy 1,376 8,792 908 (+2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 8,792 491 (+1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 8,792 1,647 (+2%) 14,720 52,714 (-3%) 2,097,152 393
Token:privately_mint_private_note 1,280 8,792 627 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 8,792 273 (+1%) 14,720 11,809 (+4%) 524,288 393
Token:transfer 1,312 8,792 1,805 (+2%) 14,720 13,328 (+10%) 524,288 393
AuthRegistry:set_authorized (avm) 19,226 N/A N/A 91,264 1,369 (+11%) N/A N/A
FPC:prepare_fee (avm) 26,668 N/A N/A 91,328 3,292 (+15%) N/A N/A
Token:transfer_public (avm) 42,918 N/A N/A 91,328 4,013 (+4%) N/A N/A
AuthRegistry:consume (avm) 33,104 N/A N/A 91,264 3,024 (+6%) N/A N/A
FPC:pay_refund (avm) 36,833 N/A N/A 91,296 25,271 (+11%) N/A N/A
Benchmarking:create_note 1,344 8,792 489 (+2%) N/A N/A N/A N/A
SchnorrAccount:verify_private_authwit 1,280 8,792 72.4 (+1%) N/A N/A N/A N/A
Token:unshield 1,376 8,792 1,538 (+1%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 8,792 2,154 (+2%) 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 70.9 (+7%) 13,790
GasToken:set_portal 19.7 (+20%) 3,339
Token:constructor 92.9 (-7%) 23,692
FPC:constructor 63.4 (+4%) 13,592
GasToken:mint_public 52.6 (+2%) 10,158
Token:mint_public ⚠️ 508 (+714%) 19,034
Token:assert_minter_and_mint ⚠️ 56.2 (-67%) 12,925
AuthRegistry:set_authorized 32.0 7,812
FPC:prepare_fee 121 (+6%) 15,062
Token:transfer_public ⚠️ 31.2 (-38%) 31,218
FPC:pay_refund 135 (+5%) 25,260
Benchmarking:increment_balance 2,224 (+2%) 15,267
Token:_increase_public_balance 58.1 (+5%) 15,006
FPC:pay_refund_with_shielded_rebate 121 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.161 (+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.4 (+1%) 16.8 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.601 (+1%) 0.516 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.6 (+2%) 76.3 (+1%) 138 (+5%) 246 (+1%) 473 (+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.496 (+2%) 0.469 (+1%) 0.472 (+5%) 0.446 (+1%) 0.441 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.2 (+2%) 113 (+1%) 184 (+1%) 354 (+1%) 692
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.509 (+2%) 0.507 (+1%) 0.486 0.480 (+1%) 0.476
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 73.3 (+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.522 (+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 74,057 667,850

Transaction size based on fee payment method

| Metric | |
| - | |

@Thunkar Thunkar merged commit a023367 into master Jul 2, 2024
91 of 92 checks passed
@Thunkar Thunkar deleted the gj/fix_txe_tests branch July 2, 2024 17:28
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