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: Sync from noir #6717

Merged
merged 3 commits into from
May 28, 2024
Merged

feat: Sync from noir #6717

merged 3 commits into from
May 28, 2024

Conversation

AztecBot
Copy link
Collaborator

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: deduplicate ReturnConstant warning (noir-lang/noir#5109)
feat: Sync from aztec-packages (noir-lang/noir#5125)
chore: remove warnings field from DebugArtifact (noir-lang/noir#5118)
feat: make ACVM generic across fields (noir-lang/noir#5114)
fix: Auto dereference trait methods in the elaborator (noir-lang/noir#5124)
chore: perform dead instruction elimination through std::as_witness (noir-lang/noir#5123)
END_COMMIT_OVERRIDE

AztecBot and others added 3 commits May 28, 2024 16:36
…ir#5109)

feat: Sync from aztec-packages (noir-lang/noir#5125)
chore: remove warnings field from `DebugArtifact` (noir-lang/noir#5118)
feat: make ACVM generic across fields (noir-lang/noir#5114)
fix: Auto dereference trait methods in the elaborator (noir-lang/noir#5124)
chore: perform dead instruction elimination through `std::as_witness` (noir-lang/noir#5123)
@TomAFrench
Copy link
Member

Heads up @dbanks12 that ACVM (and so also brillig) is now generic over the choice of field. We're still exposing the same FieldElement struct as before so only impact on you guys for now is that you'll need to specify this type as in 9aa9af7

@AztecBot
Copy link
Collaborator Author

Benchmark results

Metrics with a significant change:

  • protocol_circuit_proving_time_in_ms (private-kernel-init): 22,173 (-19%)
  • protocol_circuit_proving_time_in_ms (private-kernel-reset-small): 45,386 (-21%)
  • protocol_circuit_proving_time_in_ms (private-kernel-tail-to-public): 93,117 (-16%)
  • protocol_circuit_proving_time_in_ms (private-kernel-tail): 36,047 (-25%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 74,246 (-20%)
  • protocol_circuit_proving_time_in_ms (root-parity): 44,554 (-17%)
  • protocol_circuit_proving_time_in_ms (public-kernel-tail): 155,495 (-18%)
  • protocol_circuit_proving_time_in_ms (root-rollup): 19,662 (-19%)
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,776 1,554 716 771 779

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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,464 9,476 9,464
l1_rollup_execution_gas 616,105 616,117 616,105
l2_block_processing_time_in_ms 1,301 4,793 (-1%) 9,561
l2_block_building_time_in_ms 44,676 177,110 354,398
l2_block_rollup_simulation_time_in_ms 44,508 176,474 353,150
l2_block_public_tx_process_time_in_ms 23,964 (-1%) 101,488 (+2%) 205,040

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 9,397 (-2%) 14,419 (-1%)
node_database_size_in_bytes 14,483,536 21,315,664
pxe_database_size_in_bytes 18,071 29,868

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 161 3,780 (+6%) ⚠️ 22,173 (-19%) 20,630 64,614 89,536 2,731 1,048,576
private-kernel-inner 623 4,354 (+7%) 45,828 (-8%) 92,318 64,614 89,536 2,731 2,097,152
private-kernel-tail 566 (-1%) 2,961 (+1%) ⚠️ 36,047 (-25%) 96,541 77,498 10,656 266 2,097,152
base-parity 6.56 (+1%) 1,145 (+1%) 2,925 (-1%) 128 64.0 2,208 2.00 131,072
root-parity 49.9 (+1%) 47.9 (-24%) ⚠️ 44,554 (-17%) 27,084 64.0 2,720 18.0 2,097,152
base-rollup 697 (-4%) 2,268 (-4%) ⚠️ 74,246 (-20%) 119,610 756 3,648 47.0 4,194,304
root-rollup 112 (+2%) 64.6 (-18%) ⚠️ 19,662 (-19%) 25,297 620 3,456 41.0 1,048,576
public-kernel-app-logic 520 (-1%) 3,020 (+1%) 47,888 (-15%) 104,941 86,302 114,784 3,520 2,097,152
public-kernel-tail 1,080 (-1%) 21,001 (-12%) ⚠️ 155,495 (-18%) 395,386 7,522 10,656 266 8,388,608
private-kernel-reset-small 590 (-1%) 2,144 (+9%) ⚠️ 45,386 (-21%) 120,733 64,614 89,536 2,731 2,097,152
merge-rollup 28.9 N/A N/A 16,534 756 N/A N/A N/A
public-kernel-setup 631 (-4%) N/A N/A 104,941 86,302 N/A N/A N/A
public-kernel-teardown 532 (-4%) N/A N/A 104,941 86,302 N/A N/A N/A
private-kernel-tail-to-public N/A 8,869 (+7%) ⚠️ 93,117 (-16%) N/A N/A 114,784 3,520 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 470 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 42.0 (+2%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,441 (+2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 989 (+2%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,088 16,768 50,899 (-14%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,141 (+4%) N/A N/A N/A N/A
Token:transfer 1,376 9,944 4,051 (+1%) 16,768 52,844 (-3%) 2,097,152 457
Benchmarking:create_note 1,312 9,944 949 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 217 (-1%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.2 (-4%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,233 (-3%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,009 (-3%) 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 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.4 (-1%) 17.0 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.607 (-1%) 0.521 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 48.5 77.0 (+1%) 246 472 (-1%) 929 1,848 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.496 0.475 (+1%) 0.446 0.441 (-1%) 0.440 0.440 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.5 (-1%) 112 (-2%) 356 698 (-1%) 1,384 2,764 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.506 0.504 (-1%) 0.481 0.478 (-1%) 0.478 0.480 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 62.3
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 107
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.553

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 83,794 665,117

Transaction size based on fee payment method

| Metric | |
| - | |

@TomAFrench TomAFrench merged commit a37895c into master May 28, 2024
85 checks passed
@TomAFrench TomAFrench deleted the sync-noir branch May 28, 2024 18:28
TomAFrench added a commit that referenced this pull request May 29, 2024
* master:
  feat: prepare circuit output for validation (#6678)
  chore: stop building/publishing `acvm_backend.wasm` (#6584)
  chore: add bench programs (#6566)
  chore: make public data update requests, note hashes, and unencrypted logs readonly in TS (#6658)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  feat: update honk recursion constraint (#6545)
  feat: Add code-workspace and update build dirs (#6723)
  feat: Sync from noir (#6717)
  feat: folding acir programs (#6685)
  feat: sumcheck part of ECCVM recursive verifier instantiated as an UltraCircuit (#6413)
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.

2 participants