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!: add blake3 blackbox function to acir format #3856

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Jan 5, 2024

Resolves noir-lang/noir#3171

We've started adding breaking changes to the serialisation so I thought I'd chuck this in.

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).

@TomAFrench TomAFrench requested a review from kevaundray January 5, 2024 16:17
@TomAFrench TomAFrench marked this pull request as ready for review January 5, 2024 16:18
@kevaundray
Copy link
Contributor

Can you point it to #3858 as reports gate diff is failing?

@AztecBot
Copy link
Collaborator

AztecBot commented Jan 5, 2024

Benchmark results

Metrics with a significant change:

  • note_successful_decrypting_time_in_ms (8): 507 (+32%)
  • note_trial_decrypting_time_in_ms (8): 16.3 (-83%)
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 223,068 868,316 3,449,744
l1_rollup_execution_gas 867,177 3,746,369 23,306,509
l2_block_processing_time_in_ms 1,313 (-13%) 5,192 (+2%) 21,249 (+1%)
note_successful_decrypting_time_in_ms ⚠️ 507 (+32%) 1,246 (+14%) 4,098
note_trial_decrypting_time_in_ms ⚠️ 16.3 (-83%) 35.2 137 (+1%)
l2_block_building_time_in_ms 14,848 59,079 238,652
l2_block_rollup_simulation_time_in_ms 10,559 42,000 170,343
l2_block_public_tx_process_time_in_ms 4,260 16,999 67,996

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,289 29,336 (+2%)
note_history_successful_decrypting_time_in_ms 2,695 (-4%) 5,278 (-3%)
note_history_trial_decrypting_time_in_ms 98.5 (-32%) 181 (+10%)
node_database_size_in_bytes 3,619,984 3,719,871
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,076 128,374 881
root-rollup 82.2 (-4%) 4,088 889
private-kernel-inner 286 71,236 25,561
public-kernel-private-input 202 31,891 25,561
public-kernel-non-first-iteration 200 31,933 25,561
merge-rollup 9.64 (-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

@TomAFrench TomAFrench changed the base branch from master to kw/noir-development January 5, 2024 16:59
@TomAFrench
Copy link
Member Author

I've rebased it onto that branch.

@kevaundray kevaundray merged commit 8c96d4c into kw/noir-development Jan 5, 2024
81 of 82 checks passed
@kevaundray kevaundray deleted the tf/blake3-opcode branch January 5, 2024 18:36
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.

Add blake3 opcode into ACIR
3 participants