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: update ACIR serialisation format #2771

Merged
merged 4 commits into from
Oct 11, 2023
Merged

chore: update ACIR serialisation format #2771

merged 4 commits into from
Oct 11, 2023

Conversation

TomAFrench
Copy link
Member

This PR updates the ACIR serialization format to match that defined in noir-lang/noir#2872. The main change is that Brillig ACIR opcodes no longer contain a foreign_call_results field.

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 October 10, 2023 18:49
@TomAFrench TomAFrench marked this pull request as draft October 10, 2023 18:53
@TomAFrench TomAFrench marked this pull request as ready for review October 10, 2023 18:57
@ludamad
Copy link
Collaborator

ludamad commented Oct 11, 2023

thinking aloud: Do we update this in tandem with a noir tag bump?

@TomAFrench
Copy link
Member Author

Do we update this in tandem with a noir tag bump?

What does the noir tag feed into in this repository? We don't have a fully working noir tag for this serialisation yet (as we rely on a compatible release of bb/bb.js) though.

@kevaundray
Copy link
Contributor

Because we recently added integrations tests which effectively test barretenberg again (we should remove these) it makes this process a bit tedious

@TomAFrench TomAFrench enabled auto-merge (squash) October 11, 2023 16:20
@TomAFrench TomAFrench merged commit 6d85527 into master Oct 11, 2023
2 checks passed
@TomAFrench TomAFrench deleted the tf/update-acir branch October 11, 2023 16:56
@AztecBot
Copy link
Collaborator

Benchmark 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 082ab56d 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,984 868,076 3,449,456
l1_rollup_execution_gas 842,071 3,595,184 22,204,825
l2_block_processing_time_in_ms 1,028 3,925 (-1%) 15,455 (-1%)
note_successful_decrypting_time_in_ms 325 (-1%) 1,001 (-2%) 3,685 (-3%)
note_trial_decrypting_time_in_ms 28.0 (-7%) 107 137
l2_block_building_time_in_ms 9,003 35,909 (-1%) 149,787 (-2%)
l2_block_rollup_simulation_time_in_ms 6,687 26,703 105,572 (-1%)
l2_block_public_tx_process_time_in_ms 2,276 9,081 (-1%) 43,584 (-2%)

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,410 (-9%) 31,975 (-5%)
note_history_successful_decrypting_time_in_ms ⚠️ 2,380 (-18%) ⚠️ 4,870 (-18%)
note_history_trial_decrypting_time_in_ms ⚠️ 140 (+12%) 147 (-6%)
node_database_size_in_bytes 1,647,732 1,193,162
pxe_database_size_in_bytes 27,188 54,187

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 43.9 (-9%) 56,577 14,745
private-kernel-ordering 21.9 (-8%) 20,137 8,089
base-rollup 850 (-10%) 631,605 811
root-rollup 39.0 (-7%) 4,072 1,097
private-kernel-inner 37.2 (-8%) 72,288 14,745
public-kernel-private-input 47.0 (-9%) 37,359 14,745
public-kernel-non-first-iteration 28.1 (-10%) 37,401 14,745
merge-rollup ⚠️ 0.964 (-13%) 2,592 873

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.

4 participants