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 #6555

Merged
merged 4 commits into from
May 21, 2024
Merged

feat: Sync from noir #6555

merged 4 commits into from
May 21, 2024

Conversation

AztecBot
Copy link
Collaborator

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: add native rust implementations of pedersen functions (noir-lang/noir#4871)
chore: add benchmarks for pedersen and schnorr verification (noir-lang/noir#5056)
END_COMMIT_OVERRIDE

AztecBot and others added 4 commits May 21, 2024 10:41
* master: (217 commits)
  feat: run benchmarks for ACIR proving (#6155)
  feat: generic key validation request (#6474)
  chore: fix migration notes (#6551)
  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: Adding autogenerated variants for the reset circuit (#6508)
  chore: Copy subset of constants to cpp (#6544)
  feat(docs): Key rotation / owner -> nullifier key docs (#6538)
  chore(docs): restructure improvs (#6502)
  chore: anvil kill wrapper now supports mac (#6520)
  feat: sum transaction fees and pay on l1 (#6522)
  refactor: private call validation (#6510)
  chore: add c++ tests for generator derivation (#6528)
  feat: View functions with static context enforcing (#6338)
  feat: Update the encrypted note log format (#6411)
  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
  ...
@TomAFrench TomAFrench enabled auto-merge (squash) May 21, 2024 10:50
@TomAFrench TomAFrench merged commit 8bbbbb6 into master May 21, 2024
73 checks passed
@TomAFrench TomAFrench deleted the sync-noir branch May 21, 2024 11:26
@AztecBot
Copy link
Collaborator Author

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (root-rollup): 94.8 (+42%)
  • protocol_circuit_simulation_time_in_ms (public-kernel-app-logic): 245 (+28%)
  • protocol_circuit_simulation_time_in_ms (public-kernel-setup): 227 (+38%)
  • protocol_circuit_simulation_time_in_ms (public-kernel-teardown): 234 (+38%)
  • tx_pxe_processing_time_ms (1): 4,234 (+31%)
  • tx_sequencer_processing_time_ms (1): 2,681 (+22%)
  • tx_sequencer_processing_time_ms (4): 3,287 (+19%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 900 (+285%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-app-logic): 217 (-26%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-setup): 249 (-37%)
  • protocol_circuit_witness_generation_time_in_ms (base-rollup): 2,787 (-45%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-teardown): 318 (-27%)
  • protocol_circuit_witness_generation_time_in_ms (root-rollup): 113 (-33%)
  • l2_block_public_tx_process_time_in_ms (8): 20,297 (+32%)
  • l2_block_public_tx_process_time_in_ms (32): 82,207 (+17%)
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,614 (-1%) 1,544 716 756 (-2%) 771

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,844 6,856 6,868 (+1%)
l1_rollup_execution_gas 587,384 587,396 587,408
l2_block_processing_time_in_ms 1,357 (-1%) 5,086 (-7%) 10,100
l2_block_building_time_in_ms 33,150 (-1%) 130,992 (-3%) 261,115 (-4%)
l2_block_rollup_simulation_time_in_ms 32,968 130,343 (-2%) 259,815 (-4%)
l2_block_public_tx_process_time_in_ms ⚠️ 20,297 (+32%) ⚠️ 82,207 (+17%) 164,205 (+14%)

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,033 (-2%) 28,355 (-1%)
node_database_size_in_bytes 21,450,832 38,166,608
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 158 (-2%) 3,639 (-1%) 22,091 (+1%) 19,987 61,999 86,720 2,643 1,048,576
private-kernel-inner 603 (+8%) 4,905 (+2%) 40,793 (+1%) 89,054 61,999 86,720 2,643 2,097,152
private-kernel-reset-small 570 2,406 (-6%) 23,494 (+2%) 117,961 61,999 86,720 2,643 1,048,576
private-kernel-tail 526 (-5%) 3,949 (-2%) 38,596 (+3%) 86,849 79,454 10,688 267 2,097,152
base-parity 7.63 (-2%) ⚠️ 900 (+285%) 3,742 (-10%) 128 64.0 2,208 2.00 131,072
root-parity 49.9 139 (-1%) 41,051 (+3%) 27,064 64.0 2,720 18.0 2,097,152
base-rollup 788 (-8%) ⚠️ 2,787 (-45%) 43,289 (+1%) 111,158 957 3,136 31.0 2,097,152
root-rollup ⚠️ 94.8 (+42%) ⚠️ 113 (-33%) 8,363 (+1%) 11,518 821 3,456 41.0 524,288
public-kernel-app-logic ⚠️ 245 (+28%) ⚠️ 217 (-26%) 734 96,979 85,095 116,448 3,572 4,096
public-kernel-tail 867 823 (-4%) 1,161 388,207 7,755 10,176 251 512
public-kernel-setup ⚠️ 227 (+38%) ⚠️ 249 (-37%) 918 (-4%) 138,310 85,095 116,448 3,572 4,096
public-kernel-teardown ⚠️ 234 (+38%) ⚠️ 318 (-27%) 1,051 (+12%) 143,321 85,095 116,448 3,572 4,096
merge-rollup 6.46 (-2%) 87.4 (-2%) 1,639 (+5%) 2,760 957 3,136 31.0 65,536
private-kernel-tail-to-public N/A 9,515 (+1%) 74,991 (+3%) 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 48,806 (+1%) 2,097,152 437
Test:emit_nullifier 16,128 2,649 (+2%) 65,536 437
FPC:fee_entrypoint_public 16,128 16,528 (+2%) 524,288 437
FPC:fee_entrypoint_private 16,128 8,956 (+1%) 524,288 437
Token:unshield 16,128 50,151 (+1%) 2,097,152 437
SchnorrAccount:spend_private_authwit 16,128 2,717 (+3%) 131,072 437
Token:transfer 16,128 35,087 (+1%) 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 (-2%) 18.4 (-3%) 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.655 (-2%) 0.566 (-3%) 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 52.1 (-2%) 80.8 262 502 (-2%) 991 (+1%) 1,964 (+1%) 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.533 (-2%) 0.499 0.476 0.469 (-2%) 0.470 (+1%) 0.469 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 62.4 (-2%) 120 (+1%) 379 (+1%) 739 (-1%) 1,477 (+1%) 2,941 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.542 (-2%) 0.538 0.515 (+1%) 0.508 (-1%) 0.510 0.512 (+1%) 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 67.5 (-1%)
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.591 (-1%)

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,743 673,221

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 30,124 (+5%) ⚠️ 4,234 (+31%) 101,105 (+3%)
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,417 (+7%) ⚠️ 2,681 (+22%) 2,093 (+12%) ⚠️ 3,287 (+19%) 1,991 (+12%)

TomAFrench added a commit that referenced this pull request May 21, 2024
* master: (37 commits)
  refactor: nuking `KeyStore` and `KeyPair` interfaces (#6553)
  feat: Sync from noir (#6555)
  refactor: purge secret and open keywords (#6501)
  feat: run benchmarks for ACIR proving (#6155)
  feat: generic key validation request (#6474)
  chore: fix migration notes (#6551)
  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: Adding autogenerated variants for the reset circuit (#6508)
  chore: Copy subset of constants to cpp (#6544)
  feat(docs): Key rotation / owner -> nullifier key docs (#6538)
  chore(docs): restructure improvs (#6502)
  chore: anvil kill wrapper now supports mac (#6520)
  feat: sum transaction fees and pay on l1 (#6522)
  refactor: private call validation (#6510)
  chore: add c++ tests for generator derivation (#6528)
  feat: View functions with static context enforcing (#6338)
  feat: Update the encrypted note log format (#6411)
  ...
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request May 22, 2024
Automated pull of Noir development from
[aztec-packages](https://github.com/AztecProtocol/aztec-packages).
BEGIN_COMMIT_OVERRIDE
feat: Sync from noir
(AztecProtocol/aztec-packages#6573)
feat!: compile-time incorrect exec environment errors
(AztecProtocol/aztec-packages#6442)
feat: Sync from noir
(AztecProtocol/aztec-packages#6555)
feat: View functions with static context enforcing
(AztecProtocol/aztec-packages#6338)
feat!: add is_infinite to curve addition opcode
(AztecProtocol/aztec-packages#6384)
feat: Sync from noir
(AztecProtocol/aztec-packages#6500)
chore!: remove backend interactions from `nargo`
(AztecProtocol/aztec-packages#6320)
fix: removed plain from path in array args of contract interfaces
(AztecProtocol/aztec-packages#6497)
chore: bump maximum nullifier read requests (necessary for e2e tests in
AVM) (AztecProtocol/aztec-packages#6495)
Revert "chore: bump maximum nullifier read requests (necessary for e2e
tests in AVM)"
(AztecProtocol/aztec-packages#6483)
chore: bump maximum nullifier read requests (necessary for e2e tests in
AVM) (AztecProtocol/aztec-packages#6462)
fix: Check for public args in aztec functions
(AztecProtocol/aztec-packages#6355)
feat: Move abi demonomorphizer to noir_codegen and use noir_codegen in
protocol types
(AztecProtocol/aztec-packages#6302)
feat!: switch `bb` over to read ACIR from nargo artifacts
(AztecProtocol/aztec-packages#6283)
feat: ToRadix BB + avm transpiler support
(AztecProtocol/aztec-packages#6330)
feat: Sync from noir
(AztecProtocol/aztec-packages#6332)
fix: temporarily revert to_radix blackbox
(AztecProtocol/aztec-packages#6304)
feat: move to_radix to a blackbox
(AztecProtocol/aztec-packages#6294)
chore: skip formatting informattable comments
(AztecProtocol/aztec-packages#6288)
chore(dsl): Update backend gateCount command to query a Program in a
single request
(AztecProtocol/aztec-packages#6228)
feat: Private Kernel Recursion
(AztecProtocol/aztec-packages#6278)
feat: Proper padding in ts AES and constrained AES in body and header
computations (AztecProtocol/aztec-packages#6269)
chore: simplify nargo CLI to read from artifacts
(AztecProtocol/aztec-packages#6279)
feat: Sync from noir
(AztecProtocol/aztec-packages#6280)
chore: enforce formatting of noir code
(AztecProtocol/aztec-packages#6271)
feat!: specify databus arrays for BB
(AztecProtocol/aztec-packages#6239)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <[email protected]>
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request May 22, 2024
Automated pull of Noir development from
[aztec-packages](https://github.com/AztecProtocol/aztec-packages).
BEGIN_COMMIT_OVERRIDE
feat: Sync from noir
(AztecProtocol/aztec-packages#6573)
feat!: compile-time incorrect exec environment errors
(AztecProtocol/aztec-packages#6442)
feat: Sync from noir
(AztecProtocol/aztec-packages#6555)
feat: View functions with static context enforcing
(AztecProtocol/aztec-packages#6338)
feat!: add is_infinite to curve addition opcode
(AztecProtocol/aztec-packages#6384)
feat: Sync from noir
(AztecProtocol/aztec-packages#6500)
chore!: remove backend interactions from `nargo`
(AztecProtocol/aztec-packages#6320)
fix: removed plain from path in array args of contract interfaces
(AztecProtocol/aztec-packages#6497)
chore: bump maximum nullifier read requests (necessary for e2e tests in
AVM) (AztecProtocol/aztec-packages#6495)
Revert "chore: bump maximum nullifier read requests (necessary for e2e
tests in AVM)"
(AztecProtocol/aztec-packages#6483)
chore: bump maximum nullifier read requests (necessary for e2e tests in
AVM) (AztecProtocol/aztec-packages#6462)
fix: Check for public args in aztec functions
(AztecProtocol/aztec-packages#6355)
feat: Move abi demonomorphizer to noir_codegen and use noir_codegen in
protocol types
(AztecProtocol/aztec-packages#6302)
feat!: switch `bb` over to read ACIR from nargo artifacts
(AztecProtocol/aztec-packages#6283)
feat: ToRadix BB + avm transpiler support
(AztecProtocol/aztec-packages#6330)
feat: Sync from noir
(AztecProtocol/aztec-packages#6332)
fix: temporarily revert to_radix blackbox
(AztecProtocol/aztec-packages#6304)
feat: move to_radix to a blackbox
(AztecProtocol/aztec-packages#6294)
chore: skip formatting informattable comments
(AztecProtocol/aztec-packages#6288)
chore(dsl): Update backend gateCount command to query a Program in a
single request
(AztecProtocol/aztec-packages#6228)
feat: Private Kernel Recursion
(AztecProtocol/aztec-packages#6278)
feat: Proper padding in ts AES and constrained AES in body and header
computations (AztecProtocol/aztec-packages#6269)
chore: simplify nargo CLI to read from artifacts
(AztecProtocol/aztec-packages#6279)
feat: Sync from noir
(AztecProtocol/aztec-packages#6280)
chore: enforce formatting of noir code
(AztecProtocol/aztec-packages#6271)
feat!: specify databus arrays for BB
(AztecProtocol/aztec-packages#6239)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <[email protected]>
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