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

feat: fixing e2e tests by adding scopes to wallets #7756

Conversation

sklppy88
Copy link
Contributor

@sklppy88 sklppy88 commented Aug 2, 2024

Please read contributing guidelines and remove this line.

@sklppy88 sklppy88 changed the title init feat: fixing e2e tests by adding scopes to wallets Aug 2, 2024
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch from ba1ff82 to 417d6ca Compare August 2, 2024 21:27
@AztecBot
Copy link
Collaborator

AztecBot commented Aug 2, 2024

Benchmark results

Metrics with a significant change:

  • proof_construction_time_sha256_100_ms (16): 7,021 (+24%)
  • proof_construction_time_sha256_30_ms (16): 1,787 (+27%)
  • avm_simulation_time_ms (Token:_increase_public_balance): 9.48 (-84%)
  • l2_block_processing_time_in_ms (8): 442 (-22%)
  • node_history_sync_time_in_ms (5): 3,611 (-30%)
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,716 (+1%) 1,538 717 (+2%) 750 761 (-1%)
proof_construction_time_sha256_30_ms 11,809 (+2%) 3,175 (+2%) ⚠️ 1,787 (+27%) 1,619 (+13%) 1,541 (+4%)
proof_construction_time_sha256_100_ms 43,712 (+1%) 12,556 (+2%) ⚠️ 7,021 (+24%) 6,125 (+10%) 5,768 (+5%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 88.0
proof_construction_time_poseidon_hash_30_ms 1,501 416 201 (+1%) 220 (-5%) 270 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,587 (+1%) 1,508 (-1%) 673 724 (-2%) 749 (+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 740 740 740
l1_rollup_calldata_gas 6,716 6,718 6,716
l1_rollup_execution_gas 611,983 612,136 612,285
l2_block_processing_time_in_ms 253 (+2%) ⚠️ 442 (-22%) 807 (-6%)
l2_block_building_time_in_ms 9,400 18,503 (-3%) 36,828
l2_block_rollup_simulation_time_in_ms 9,400 18,503 (-3%) 36,828
l2_block_public_tx_process_time_in_ms 7,835 (-1%) 16,708 (-3%) 34,884

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,721 (-1%) ⚠️ 3,611 (-30%)
node_database_size_in_bytes 12,673,104 (-1%) 16,842,832
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 100 (-2%) 410 21,846 44,858 N/A N/A N/A N/A
private-kernel-inner 168 728 72,545 45,005 N/A N/A N/A N/A
private-kernel-tail 685 855 (-2%) 53,523 49,801 N/A N/A N/A N/A
base-parity 5.89 298 (+1%) 160 96.0 1,688 13,188 19.0 65,536
root-parity 112 (+2%) 119 (+6%) 69,084 96.0 27,748 13,188 19.0 4,194,304
base-rollup 2,952 (-2%) 5,508 (+1%) 182,288 664 86,425 14,020 45.0 16,777,216
root-rollup 99.6 (+1%) 105 54,525 716 25,323 13,988 44.0 4,194,304
public-kernel-setup 92.5 (+3%) 2,734 (-1%) 102,617 69,814 15,313 127,172 3,581 2,097,152
public-kernel-app-logic 105 (-2%) 4,259 (+2%) 102,617 69,814 8,905 (-2%) 127,172 3,581 1,048,576
public-kernel-tail 585 29,730 (+11%) 402,342 10,878 92,967 26,436 433 16,777,216
private-kernel-reset-tiny 193 886 (+2%) 68,621 44,750 N/A N/A N/A N/A
private-kernel-tail-to-public 3,410 (-3%) 1,628 (-3%) 977,330 1,697 N/A N/A N/A N/A
public-kernel-teardown 87.9 (+3%) 4,222 (+3%) 102,617 69,814 16,446 (+1%) 127,172 3,581 2,097,152
merge-rollup 61.0 (+1%) N/A 35,742 664 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 148,561 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 (-1%) N/A N/A
ContractInstanceDeployer:deploy 1,408 11,731 18.6 (+3%) N/A N/A
MultiCallEntrypoint:entrypoint 1,920 11,731 473 N/A N/A
GasToken:deploy 1,376 11,731 388 N/A N/A
SchnorrAccount:constructor 1,312 11,731 177 (+1%) N/A N/A
SchnorrAccount:entrypoint 2,304 11,731 567 (-1%) N/A N/A
Token:privately_mint_private_note 1,280 11,731 236 (+5%) N/A N/A
FPC:fee_entrypoint_public 1,344 11,731 33.6 (+14%) N/A N/A
Token:transfer 1,312 11,731 820 (+2%) N/A N/A
AuthRegistry:set_authorized (avm) 18,491 N/A N/A 147,456 2,564 (-1%)
FPC:prepare_fee (avm) 22,958 N/A N/A 147,520 3,279 (-1%)
Token:transfer_public (avm) 61,614 N/A N/A 147,520 17,952 (+1%)
AuthRegistry:consume (avm) 41,719 N/A N/A 147,488 7,555 (-1%)
FPC:pay_refund (avm) 26,227 N/A N/A 147,488 7,311 (-2%)
Benchmarking:create_note 1,344 11,731 170 (-3%) N/A N/A
SchnorrAccount:verify_private_authwit 1,280 11,731 28.0 (+4%) N/A N/A
Token:unshield 1,376 11,731 763 (+5%) N/A N/A
FPC:fee_entrypoint_private 1,376 11,731 1,008 (+5%) 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.4 (+3%) 8,139
GasToken:set_portal 12.3 (+23%) 2,362
Token:constructor 119 (+3%) 31,107
FPC:constructor 96.0 (+4%) 24,011
GasToken:mint_public 80.5 (+5%) 6,150
Token:mint_public 84.1 (+2%) 11,720
Token:assert_minter_and_mint 94.3 (-1%) 8,028
AuthRegistry:set_authorized 8.89 (-6%) 4,537
FPC:prepare_fee 327 (+12%) 8,812
Token:transfer_public 26.3 (-17%) 47,374
FPC:pay_refund 68.7 (+4%) 12,114
Benchmarking:increment_balance 986 (-1%) 7,450
Token:_increase_public_balance ⚠️ 9.48 (-84%) 8,960
FPC:pay_refund_with_shielded_rebate 139 (+1%) 12,663

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.149

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.26 (-1%) 3.94 (-5%) 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.118 (-1%) 0.112 (-5%) 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 (+4%) 18.8 (-7%) 30.8 (+4%) 59.6 (-26%) 116 (-11%)
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.108 (+3%) 0.109 (-8%) 0.100 (+3%) 0.103 (-27%) 0.103 (-11%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 (+4%) 25.5 (-16%) 43.4 (+4%) 83.5 (-25%) 159 (-7%)
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 (+3%) 0.103 (-16%) 0.106 (+3%) 0.103 (-26%) 0.101 (-6%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.7 (-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.107 (-8%) 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 | |
| - | |

@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/break-e2e-tests-with-initial-impl branch from 6df9517 to 175771e Compare August 4, 2024 09:50
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch 14 times, most recently from deb341d to 0ca5fb2 Compare August 4, 2024 21:51
@@ -60,12 +60,18 @@ describe('e2e_authwit_tests', () => {
isValidInPublic: false,
});

// We give wallets[0] access to wallets[1]'s notes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be an absurd amount of work, but I think it would improve readability a lot to do as in other tests and name these wallets (alice, bob...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, I think there should be a pass on cleaning up the e2e tests in general, but this would be a good start. Will add a task for this.

@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/break-e2e-tests-with-initial-impl branch from 175771e to b0675aa Compare August 5, 2024 14:42
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch from ef091d2 to fa2e6ad Compare August 5, 2024 14:42
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/break-e2e-tests-with-initial-impl branch from b0675aa to 0813329 Compare August 5, 2024 15:08
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch from fa2e6ad to 724fb47 Compare August 5, 2024 15:08
@sklppy88 sklppy88 marked this pull request as ready for review August 5, 2024 16:12
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/break-e2e-tests-with-initial-impl branch from 0813329 to 0656cbe Compare August 5, 2024 21:19
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch from 724fb47 to 98738ea Compare August 5, 2024 21:19
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/break-e2e-tests-with-initial-impl branch from 0656cbe to 745fba4 Compare August 6, 2024 09:17
@sklppy88 sklppy88 force-pushed the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch from 98738ea to 56eabb3 Compare August 6, 2024 09:17
@sklppy88 sklppy88 merged commit b0f1e74 into ek/feat/silo-notes/break-e2e-tests-with-initial-impl Aug 6, 2024
34 of 35 checks passed
@sklppy88 sklppy88 deleted the ek/feat/silo-notes/fix-e2e-tests-by-adding-scopes-to-wallets branch August 6, 2024 11:09
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