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: incoming viewing key roation #6883

Closed
wants to merge 6 commits into from

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Jun 4, 2024

Fixes #6531

Copy link
Contributor Author

benesjan commented Jun 4, 2024

@benesjan benesjan force-pushed the 06-04-refactor_note_processor_cleanup branch from 210a4de to d2b966d Compare June 4, 2024 18:30
@benesjan benesjan force-pushed the 06-04-feat_incoming_viewing_key_roation branch from 86cab69 to 13eb225 Compare June 4, 2024 18:30
@AztecBot
Copy link
Collaborator

AztecBot commented Jun 4, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_witness_generation_time_in_ms (private-kernel-inner): 1,196 (+27%)
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,715 1,550 (+1%) 712 768 (+3%) 778
proof_construction_time_sha256_30_ms 11,436 3,075 1,379 1,426 1,465
proof_construction_time_sha256_100_ms 44,783 11,750 5,518 (+2%) 5,496 (+2%) 5,385
proof_construction_time_poseidon_hash_ms 77.0 34.0 34.0 58.0 (+2%) 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,517 418 203 226 (+3%) 274 (+2%)
proof_construction_time_poseidon_hash_100_ms 5,731 1,575 728 774 (+1%) 794

L2 block published to L1

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

Metric 4 txs 8 txs
l1_rollup_calldata_size_in_bytes 1,412 1,412
l1_rollup_calldata_gas 9,476 9,462
l1_rollup_execution_gas 608,012 607,998
l2_block_processing_time_in_ms 701 1,289 (-1%)
l2_block_building_time_in_ms 22,543 (+2%) 45,677 (-2%)
l2_block_rollup_simulation_time_in_ms 22,417 (+2%) 45,325 (-2%)
l2_block_public_tx_process_time_in_ms 19,260 (+2%) 41,913 (-2%)

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 5,895 (-2%) 8,505 (-1%)
node_database_size_in_bytes 9,490,512 12,787,792
pxe_database_size_in_bytes 7,774 15,127

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 136 (+1%) 472 (+1%) 13,424 (-1%) 20,634 64,614 89,536 2,731 524,288
private-kernel-inner 406 ⚠️ 1,196 (+27%) 50,330 (+1%) 92,326 64,614 89,536 2,731 2,097,152
private-kernel-tail 580 2,907 (+12%) 52,898 (-5%) 96,545 68,261 11,648 297 2,097,152
base-parity 6.47 (+1%) 1,686 (+3%) 2,763 128 64.0 2,208 2.00 131,072
root-parity 49.4 (+2%) 65.8 (+11%) 43,065 (+8%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup 5,922 (-2%) 2,454 (+2%) 77,692 (+1%) 119,738 756 3,648 47.0 4,194,304
root-rollup 110 (+2%) 83.4 (+7%) 23,310 (+4%) 25,309 620 3,456 41.0 1,048,576
public-kernel-app-logic 568 (-1%) 3,604 46,592 (+2%) 108,073 86,550 116,768 3,582 2,097,152
public-kernel-tail 1,135 23,506 (-4%) 182,364 403,238 7,646 11,648 297 8,388,608
private-kernel-reset-small 588 1,958 46,223 (+1%) 120,737 64,614 89,536 2,731 2,097,152
public-kernel-setup 665 (+2%) 2,816 (+3%) 43,625 108,073 86,550 116,768 3,582 2,097,152
public-kernel-teardown 571 (+3%) 3,690 (+4%) 44,927 (+1%) 108,073 86,550 116,768 3,582 2,097,152
merge-rollup 30.3 (-8%) N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A 8,427 (-2%) 101,506 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 467 (+2%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 42.1 (+3%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,783 (+2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,435 (+1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,816 (+1%) 16,768 55,115 (+1%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,580 (+3%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 1,056 (+4%) 16,768 11,016 (+1%) 524,288 457
Token:transfer 1,376 9,944 5,315 (+2%) 16,768 53,364 (+2%) 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,392 N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.2 (+2%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,922 (+2%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,800 (+1%) 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 256 leaves 512 leaves 1024 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.5 (+1%) 16.9 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.7 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.519 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.9 (+1%) 77.4 (+1%) 134 (-1%) 248 477 (+1%) N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 288 543 1,055 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.499 (+1%) 0.477 (+1%) 0.459 (-1%) 0.450 (-1%) 0.446 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.6 (+1%) 113 (-1%) 185 353 633 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 107 208 355 686 1,263 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.505 (+1%) 0.509 0.490 0.482 0.473 N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A 59.1
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A 101
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A 0.552

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 79,470 665,267

Transaction size based on fee payment method

| Metric | |
| - | |

@benesjan benesjan force-pushed the 06-04-refactor_note_processor_cleanup branch from d2b966d to d95fb83 Compare June 5, 2024 10:10
Base automatically changed from 06-04-refactor_note_processor_cleanup to master June 5, 2024 10:42
@benesjan benesjan force-pushed the 06-04-feat_incoming_viewing_key_roation branch from 13eb225 to fe7b5c3 Compare June 5, 2024 10:45
@benesjan
Copy link
Contributor Author

Closed as not sure if planned at this point

@benesjan benesjan closed this Jun 24, 2024
@benesjan benesjan deleted the 06-04-feat_incoming_viewing_key_roation branch August 27, 2024 16: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.

triage(Keys_Incoming): Investigate key rotation
2 participants