Skip to content

fix: adding encrypted logs test#6662

Closed
sklppy88 wants to merge 1 commit into
masterfrom
ek/fix/adding-encrypted-logs-tests-2
Closed

fix: adding encrypted logs test#6662
sklppy88 wants to merge 1 commit into
masterfrom
ek/fix/adding-encrypted-logs-tests-2

Conversation

@sklppy88

@sklppy88 sklppy88 commented May 24, 2024

Copy link
Copy Markdown
Contributor

Resolves #6530

sklppy88 commented May 24, 2024

Copy link
Copy Markdown
Contributor Author

@sklppy88 sklppy88 changed the title Initial fix: adding encrypted logs test May 24, 2024
@AztecBot

AztecBot commented May 24, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • protocol_circuit_witness_generation_time_in_ms (base-parity): 1,768 (+96%)
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,734 (-1%) 1,545 (-1%) 694 (-2%) 762 (+1%) 778 (-1%)
proof_construction_time_sha256_30_ms 11,825 (-3%) 3,143 (-2%) 1,399 (-1%) 1,440 (-1%) 1,469 (-1%)
proof_construction_time_sha256_100_ms 43,936 (-4%) 12,021 (-3%) 5,824 (+1%) 5,522 (-2%) 5,552
proof_construction_time_poseidon_hash_ms 78.0 (-1%) 34.0 (-3%) 34.0 57.0 (-2%) 87.0
proof_construction_time_poseidon_hash_30_ms 1,519 (-1%) 418 (-1%) 202 222 (-2%) 264 (-2%)
proof_construction_time_poseidon_hash_100_ms 5,742 (-1%) 1,562 (-2%) 729 772 (-6%) 792 (-2%)

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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,428 9,464 9,440
l1_rollup_execution_gas 607,964 608,000 607,976
l2_block_processing_time_in_ms 1,286 (-2%) 4,843 9,632
l2_block_building_time_in_ms 44,248 175,825 349,890
l2_block_rollup_simulation_time_in_ms 44,053 175,092 348,454
l2_block_public_tx_process_time_in_ms 40,808 171,769 345,156

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 9,233 (-5%) 14,354 (-2%)
node_database_size_in_bytes 14,483,536 21,319,760
pxe_database_size_in_bytes 18,071 29,868

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 135 (+1%) 500 (+1%) 12,340 20,634 64,614 89,536 2,731 524,288
private-kernel-inner 404 (-1%) 1,021 (+1%) 44,846 (+1%) 92,326 64,614 89,536 2,731 2,097,152
private-kernel-tail 579 (-1%) 2,838 46,697 (-1%) 96,545 77,732 11,648 297 2,097,152
base-parity 6.57 ⚠️ 1,768 (+96%) 2,579 128 64.0 2,208 2.00 131,072
root-parity 50.0 46.7 (-6%) 34,427 27,100 64.0 2,720 18.0 2,097,152
base-rollup 11,914 2,341 (-1%) 65,022 119,738 756 3,648 47.0 4,194,304
root-rollup 112 62.3 (-2%) 19,558 (+1%) 25,309 620 3,456 41.0 1,048,576
public-kernel-app-logic 567 (-1%) 3,481 (-2%) 39,383 108,073 86,550 116,768 3,582 2,097,152
public-kernel-tail 1,121 (-1%) 23,799 (+3%) 155,168 (-1%) 403,238 7,646 11,648 297 8,388,608
private-kernel-reset-small 587 (-1%) 2,135 (+1%) 40,678 120,737 64,614 89,536 2,731 2,097,152
public-kernel-setup 672 (-1%) 2,677 37,748 (+1%) 108,073 86,550 116,768 3,582 2,097,152
public-kernel-teardown 573 (-1%) 3,564 39,144 108,073 86,550 116,768 3,582 2,097,152
merge-rollup 28.9 N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A 8,731 85,861 N/A N/A 116,768 3,582 4,194,304

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 9,944 466 (-1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 42.0 N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,794 N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,465 (+1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,735 (-1%) 16,768 50,197 (-1%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,679 (+2%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 1,132 (-1%) 16,768 10,281 (+2%) 524,288 457
Token:transfer 1,376 9,944 5,429 16,768 47,614 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,384 (-1%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.2 (-6%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,917 (-3%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,762 (-5%) N/A N/A N/A N/A

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 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.4 (-1%) 17.4 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.7 31.8 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.605 (-1%) 0.521 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.7 (-1%) 76.4 247 471 (-1%) 937 1,862 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 543 1,055 2,079 4,127 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.497 (-1%) 0.470 0.448 0.439 (-1%) 0.443 0.443 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.4 (-1%) 112 (-1%) 357 691 (-2%) 1,400 (+1%) 2,789 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 106 208 692 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.504 (-1%) 0.503 (-1%) 0.482 0.475 (-2%) 0.481 0.482 N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A N/A 62.7 (-1%)
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A N/A 107
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A N/A 0.554 (-1%)

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 84,053 665,267

Transaction size based on fee payment method

| Metric | |
| - | |

@LHerskind LHerskind 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.

Should to be added to the E2E in earthly. You can take a look at #6632 on how to add, fairly straight forward.

Comment thread yarn-project/end-to-end/src/e2e_logs.test.ts Outdated
@sklppy88 sklppy88 force-pushed the ek/fix/logic-issues-in-contracts-with-key-rotation-after-feedback branch 2 times, most recently from 008bf7d to 51ce776 Compare May 24, 2024 14:49
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch from aaf500a to 28a7e0f Compare May 24, 2024 14:49
@sklppy88 sklppy88 force-pushed the ek/fix/logic-issues-in-contracts-with-key-rotation-after-feedback branch from 51ce776 to 73b1a4a Compare May 24, 2024 15:11
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch from 28a7e0f to 52930d9 Compare May 24, 2024 15:13
@sklppy88 sklppy88 force-pushed the ek/fix/logic-issues-in-contracts-with-key-rotation-after-feedback branch from 73b1a4a to df6258e Compare May 24, 2024 15:20
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch from 52930d9 to e588846 Compare May 24, 2024 15:20
Base automatically changed from ek/fix/logic-issues-in-contracts-with-key-rotation-after-feedback to master May 24, 2024 17:19
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch from e588846 to 108280c Compare May 24, 2024 17:21
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch 2 times, most recently from cb04512 to a333e47 Compare May 24, 2024 21:13
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch 2 times, most recently from 944694a to 570321b Compare June 3, 2024 09:42
@sklppy88 sklppy88 force-pushed the ek/fix/adding-encrypted-logs-tests-2 branch from 570321b to 62918ab Compare June 3, 2024 16:06
@sklppy88

sklppy88 commented Jun 6, 2024

Copy link
Copy Markdown
Contributor Author

Renaming the branch from Graphite forced a new PR. Closing in favor of #6920.

@sklppy88 sklppy88 closed this Jun 6, 2024
@sklppy88 sklppy88 deleted the ek/fix/adding-encrypted-logs-tests-2 branch February 12, 2025 20:26
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.

test(Event_Logs): Add tests for encrypted event logs

3 participants