Skip to content

chore(boxes): adding react frontend tests#4824

Merged
signorecello merged 15 commits into
masterfrom
zpedro/boxes_ftest_react
Mar 5, 2024
Merged

chore(boxes): adding react frontend tests#4824
signorecello merged 15 commits into
masterfrom
zpedro/boxes_ftest_react

Conversation

@signorecello

@signorecello signorecello commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

This PR adds a frontend test for the react box

@signorecello signorecello changed the title adding react frontend tests chore(boxes): adding react frontend tests Feb 28, 2024

signorecello commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

@signorecello signorecello marked this pull request as ready for review February 28, 2024 12:39
@AztecBot

AztecBot commented Feb 28, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (8): 13.3 (+77%)
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.

Values are compared against data from master at commit cd1ca2e1 and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 64 txs
l1_rollup_calldata_size_in_bytes 5,700 18,884 36,452
l1_rollup_calldata_gas 66,168 238,964 469,796
l1_rollup_execution_gas 194,116 500,270 909,054
l2_block_processing_time_in_ms 1,217 (+2%) 4,550 9,044 (+1%)
note_successful_decrypting_time_in_ms 204 (+1%) 537 1,006 (+2%)
note_trial_decrypting_time_in_ms ⚠️ 13.3 (+77%) 63.9 (+7%) 36.9 (-70%)
l2_block_building_time_in_ms 16,132 (+1%) 63,854 128,308
l2_block_rollup_simulation_time_in_ms 12,262 (+1%) 48,545 (+1%) 97,751
l2_block_public_tx_process_time_in_ms 3,839 (+2%) 15,239 (-1%) 30,388

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 14,342 (+1%) 26,982
note_history_successful_decrypting_time_in_ms 1,308 (+3%) 2,402 (-1%)
note_history_trial_decrypting_time_in_ms 106 (+6%) 155 (-8%)
node_database_size_in_bytes 18,817,104 35,532,880 (+1%)
pxe_database_size_in_bytes 29,923 59,478

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 248 44,736 28,001
private-kernel-ordering 178 52,625 14,627
base-rollup 1,287 (-1%) 177,932 933
root-rollup 70.7 4,192 825
private-kernel-inner 315 (+1%) 73,715 28,001
public-kernel-app-logic 191 (-1%) 32,254 25,379
merge-rollup 5.82 (+1%) 2,712 933

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 4096 leaves
batch_insert_into_append_only_tree_16_depth_ms 9.90 11.9 (+13%) 12.6 (-7%) 16.5 (+1%) 22.6 (+3%) 35.7 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 79.0 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.573 0.656 (+13%) 0.533 (-7%) 0.508 (+2%) 0.470 (+2%) 0.444 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 46.9 (+2%) 72.9 (+1%) 232 (+1%) 445 875 (+1%) 1,734 (+1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 96.0 159 543 1,055 2,079 4,127
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.480 (+2%) 0.449 (+1%) 0.422 (+1%) 0.416 0.416 (+1%) 0.415
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 54.1 109 (+1%) 341 (+1%) 664 1,317 (+1%) 2,628 (+1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 104 207 691 1,363 2,707 5,395
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.480 0.487 0.461 (+1%) 0.455 0.455 0.455 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 61.4 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A 109 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A 0.535 N/A N/A N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts
tx_size_in_bytes 19,179

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 2,619 1,355
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0331 (+2%) 469

@spalladino spalladino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good, except for the implicit dependency on playwright!

That aside, I'd just be wary about what sort of stuff gets included into a box and what doesn't - the more we include, the more work is needed to maintain it.

Comment thread boxes/react/package.json Outdated
Comment thread boxes/react/package.json
@signorecello

Copy link
Copy Markdown
Contributor Author

Indeed, that was one of the reasons for the refactor in the first place. We had all sorts of things in boxes. In this case it was decided that boxes would contain a minimal e2e so they can be in sync with the monorepo.

Thanks for the review!

@AztecBot

AztecBot commented Mar 1, 2024

Copy link
Copy Markdown
Collaborator

Docs Preview

Hey there! 👋 You can check your preview at https://65e223057dacf100a6f97788--aztec-docs-dev.netlify.app

@signorecello signorecello force-pushed the zpedro/boxes_ftest_react branch 4 times, most recently from 6f8d3f6 to b9e13a8 Compare March 4, 2024 17:15
Base automatically changed from zpedro/boxes_ftest to master March 4, 2024 17:34
@signorecello signorecello force-pushed the zpedro/boxes_ftest_react branch from b9e13a8 to f6e439f Compare March 4, 2024 17:38

signorecello commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

Merge activity

@signorecello signorecello merged commit 086e478 into master Mar 5, 2024
@signorecello signorecello deleted the zpedro/boxes_ftest_react branch March 5, 2024 11:08
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.

4 participants