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

chore: remove aes slice #6550

Merged
merged 20 commits into from
May 22, 2024
Merged

chore: remove aes slice #6550

merged 20 commits into from
May 22, 2024

Conversation

Thunkar
Copy link
Contributor

@Thunkar Thunkar commented May 21, 2024

Closes: #6547

Also generalises EncryptedLogBody so it can be used with things that aren't notes

@Thunkar Thunkar self-assigned this May 21, 2024
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.

Good stuff, have a tiny suggestion/comment on a name and cheekyness. The happiness that this will bring to the hearts of the noir folks for getting rid of the slice is 🚢-able

@AztecBot
Copy link
Collaborator

AztecBot commented May 21, 2024

Benchmark results

No base data found for comparison.

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 5,751 1,564 716 759 773

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 772 772 772
l1_rollup_calldata_gas 6,868 6,832 6,868
l1_rollup_execution_gas 587,408 587,372 587,408
l2_block_processing_time_in_ms 1,380 5,097 10,148
l2_block_building_time_in_ms 32,316 128,163 256,269
l2_block_rollup_simulation_time_in_ms 32,136 127,514 255,005
l2_block_public_tx_process_time_in_ms 16,821 70,999 143,640

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,726 27,824
node_database_size_in_bytes 21,192,784 37,822,544
pxe_database_size_in_bytes 29,868 59,425

Circuits stats

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

Circuit protocol_circuit_simulation_time_in_ms protocol_circuit_witness_generation_time_in_ms protocol_circuit_proving_time_in_ms protocol_circuit_input_size_in_bytes protocol_circuit_output_size_in_bytes protocol_circuit_proof_size_in_bytes protocol_circuit_num_public_inputs protocol_circuit_size_in_gates
private-kernel-init 157 3,615 22,316 19,985 61,999 86,720 2,643 1,048,576
private-kernel-inner 598 4,842 40,405 89,053 61,999 86,720 2,643 2,097,152
private-kernel-reset-small 568 2,357 23,120 117,961 61,999 86,720 2,643 1,048,576
private-kernel-tail 525 3,804 37,977 86,849 79,454 10,688 267 2,097,152
base-parity 6.51 1,653 3,357 128 64.0 2,208 2.00 131,072
root-parity 49.0 114 41,402 27,064 64.0 2,720 18.0 2,097,152
base-rollup 692 2,636 43,083 111,158 957 3,136 31.0 2,097,152
root-rollup 94.2 49.1 8,290 11,518 821 3,456 41.0 524,288
public-kernel-app-logic 241 129 772 96,978 85,095 116,448 3,572 4,096
public-kernel-tail 866 677 1,187 388,207 7,755 10,176 251 512
public-kernel-setup 218 221 834 138,309 85,095 116,448 3,572 4,096
public-kernel-teardown 228 175 993 143,320 85,095 116,448 3,572 4,096
merge-rollup 6.53 40.7 1,968 2,760 957 3,136 31.0 65,536
private-kernel-tail-to-public N/A 9,522 72,479 N/A N/A 116,960 3,588 4,194,304

Stats on running time collected for app circuits

Function app_circuit_proof_size_in_bytes app_circuit_proving_time_in_ms app_circuit_size_in_gates app_circuit_num_public_inputs
SchnorrAccount:entrypoint 16,128 47,831 2,097,152 437
Test:emit_nullifier 16,128 2,644 65,536 437
FPC:fee_entrypoint_public 16,128 16,270 524,288 437
FPC:fee_entrypoint_private 16,128 8,810 524,288 437
Token:unshield 16,128 49,910 2,097,152 437
SchnorrAccount:spend_private_authwit 16,128 2,631 131,072 437
Token:transfer 16,128 34,847 2,097,152 437

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 11.2 18.2 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.652 0.558 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 51.3 80.0 264 487 991 1,965 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.525 0.494 0.478 0.455 0.470 0.469 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 61.9 118 381 733 1,474 2,947 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.538 0.531 0.516 0.505 0.510 0.512 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 66.8
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 108
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.585

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,741 673,219

Transaction size based on fee payment method

| Metric | |
| - | |

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 29,469 4,200 100,067
Metric 0 public data writes 1 public data writes 2 public data writes 4 public data writes 8 public data writes
tx_sequencer_processing_time_ms 1,341 2,186 1,975 3,125 1,973

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.

Added a few tiny comments. Main one is the incoming_body that is overwriting a value unnecessarily.

Somehow my brain also look at the generic names and go "hmm", as it seem to somewhere be "M" and other "NB", but I don't think that is really a concern when those are the kind of names, sage, klix out.

@Thunkar
Copy link
Contributor Author

Thunkar commented May 21, 2024

Somehow my brain also look at the generic names and go "hmm", as it seem to somewhere be "M" and other "NB", but I don't think that is really a concern when those are the kind of names, sage, klix out.

@LHerskind It's not good, but we need the noir functionality to get rid of a lot of them...arithmetic over generics and turbofish to avoid hints mainly. I don't think it's worth refactoring if we're nuking them eventually.

@Thunkar Thunkar merged commit f44d567 into master May 22, 2024
73 checks passed
@Thunkar Thunkar deleted the gj/remove_aes_slice branch May 22, 2024 08:15
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request May 28, 2024
Automated pull of Noir development from
[aztec-packages](https://github.com/AztecProtocol/aztec-packages).
BEGIN_COMMIT_OVERRIDE
feat: remove external blackbox solver from acir simulator
(AztecProtocol/aztec-packages#6586)
chore: remove aes slice
(AztecProtocol/aztec-packages#6550)
END_COMMIT_OVERRIDE

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: TomAFrench <tom@tomfren.ch>
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request May 28, 2024
Automated pull of Noir development from
[aztec-packages](https://github.com/AztecProtocol/aztec-packages).
BEGIN_COMMIT_OVERRIDE
feat: remove external blackbox solver from acir simulator
(AztecProtocol/aztec-packages#6586)
chore: remove aes slice
(AztecProtocol/aztec-packages#6550)
END_COMMIT_OVERRIDE

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: TomAFrench <tom@tomfren.ch>
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.

chore(AztecMacro): Remove aes slice
4 participants