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!: keccak in noir using a permutation opcode (rebased from #3726) #3854

Merged
merged 19 commits into from
Jan 5, 2024

Conversation

kevaundray
Copy link
Contributor

This is #3726 but without the keccak changes in Noir which are not currently working

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@kevaundray kevaundray changed the base branch from gd/keccak_with_permutation to master January 5, 2024 16:12
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 5, 2024

Benchmark results

Metrics with a significant change:

  • note_history_trial_decrypting_time_in_ms (10): 340 (+107%)
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 88fcf8d3 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 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 222,960 868,244 3,448,196
l1_rollup_execution_gas 867,069 3,746,297 23,304,961
l2_block_processing_time_in_ms 1,339 (-12%) 5,146 (+1%) 21,284 (+2%)
note_successful_decrypting_time_in_ms 365 (-5%) 1,162 (+6%) 4,272 (+4%)
note_trial_decrypting_time_in_ms 76.2 (-19%) 38.9 (+10%) 139 (+2%)
l2_block_building_time_in_ms 14,967 (+1%) 60,018 (+1%) 238,892
l2_block_rollup_simulation_time_in_ms 10,635 (+1%) 42,811 (+2%) 170,494
l2_block_public_tx_process_time_in_ms 4,299 (+1%) 17,128 (+1%) 68,132

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 15,218 (-1%) 29,190 (+2%)
note_history_successful_decrypting_time_in_ms 2,680 (-4%) 5,267 (-3%)
note_history_trial_decrypting_time_in_ms 91.0 (-37%) ⚠️ 340 (+107%)
node_database_size_in_bytes 3,619,694 3,721,523
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 210 44,709 25,561
private-kernel-ordering 137 (+1%) 30,953 14,809
base-rollup 1,077 128,374 881
root-rollup 82.9 (-4%) 4,088 889
private-kernel-inner 287 71,236 25,561
public-kernel-private-input 202 31,891 25,561
public-kernel-non-first-iteration 201 (+1%) 31,933 25,561
merge-rollup 9.76 (+1%) 2,608 881

Miscellaneous

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

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 15,487 31,878

@kevaundray kevaundray changed the base branch from master to kw/noir-development January 5, 2024 16:46
@kevaundray kevaundray merged commit c98b807 into kw/noir-development Jan 5, 2024
7 of 16 checks passed
@kevaundray kevaundray deleted the kw/keccak-perm-noir branch January 5, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants