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

Merged
merged 5 commits into from
May 17, 2024
Merged

feat: Sync from noir #6500

merged 5 commits into from
May 17, 2024

Conversation

AztecBot
Copy link
Collaborator

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: do not return databus returndata, keep it private. (noir-lang/noir#5023)
fix: Fixed several vulnerabilities in U128, added some tests (noir-lang/noir#5024)
fix: Fix no predicates for brillig with intermediate functions (noir-lang/noir#5015)
chore: add script to print lines of code (noir-lang/noir#4991)
END_COMMIT_OVERRIDE

AztecBot and others added 2 commits May 17, 2024 10:54
…oir-lang/noir#5023)

fix: Fixed several vulnerabilities in U128, added some tests (noir-lang/noir#5024)
fix: Fix no predicates for brillig with intermediate functions (noir-lang/noir#5015)
chore: add script to print lines of code (noir-lang/noir#4991)
@TomAFrench TomAFrench enabled auto-merge (squash) May 17, 2024 13:21
@AztecBot
Copy link
Collaborator Author

AztecBot commented May 17, 2024

Benchmark results

Metrics with a significant change:

  • app_circuit_proving_time_in_ms (Test:emit_nullifier): 1,773 (-34%)
  • app_circuit_proving_time_in_ms (FPC:fee_entrypoint_public): 9,308 (-44%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 348 (-30%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-app-logic): 297 (-16%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-teardown): 407 (-20%)
  • protocol_circuit_proving_time_in_ms (base-parity): 4,166 (+16%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 821 (-16%)
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.

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 740 740 740
l1_rollup_calldata_gas 6,656 6,680 6,692
l1_rollup_execution_gas 586,841 586,865 586,877
l2_block_processing_time_in_ms 1,602 6,053 11,994
l2_block_building_time_in_ms 35,249 139,131 277,475
l2_block_rollup_simulation_time_in_ms 35,035 138,360 275,888
l2_block_public_tx_process_time_in_ms 16,469 70,735 143,040 (+1%)

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 18,022 33,298 (-1%)
node_database_size_in_bytes 21,352,528 37,957,712
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 163 (-1%) 3,610 24,770 (+10%) 20,412 62,374 85,376 2,601 1,048,576
private-kernel-inner 536 (-1%) 4,560 (+5%) 45,743 89,855 62,374 85,376 2,601 2,097,152
private-kernel-reset 1,004 6,565 89,307 (+1%) 330,808 62,374 85,376 2,601 4,194,304
private-kernel-tail 532 (-1%) 4,864 (+2%) 38,933 (-1%) 87,224 79,333 10,656 266 2,097,152
base-parity 8.18 ⚠️ 348 (-30%) ⚠️ 4,166 (+16%) 128 64.0 2,208 2.00 131,072
root-parity 51.3 140 (+11%) 40,255 (+3%) 27,064 64.0 2,720 18.0 2,097,152
base-rollup 921 (+1%) 5,141 (+7%) 43,326 111,126 925 3,104 30.0 2,097,152
root-rollup 72.4 176 (+2%) 8,372 11,454 789 3,424 40.0 524,288
public-kernel-app-logic 194 (+1%) ⚠️ 297 (-16%) ⚠️ 821 (-16%) 96,791 84,967 113,344 3,475 4,096
public-kernel-tail 895 (+1%) 858 (-7%) 1,217 (+9%) 388,047 7,723 10,144 250 512
public-kernel-setup 166 (+2%) 406 (-4%) 946 (+1%) 137,024 84,967 113,344 3,475 4,096
public-kernel-teardown 171 (-1%) ⚠️ 407 (-20%) 939 (-10%) 141,902 84,967 113,344 3,475 4,096
merge-rollup 6.81 (+1%) 84.8 (-1%) 1,595 (+1%) 2,696 925 3,104 30.0 65,536
private-kernel-tail-to-public N/A 10,412 (-1%) 68,183 N/A N/A 113,856 3,491 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 15,456 47,139 (-1%) 2,097,152 416
Test:emit_nullifier 15,456 ⚠️ 1,773 (-34%) 65,536 416
FPC:fee_entrypoint_public 15,456 ⚠️ 9,308 (-44%) 524,288 416
Token:transfer 15,456 39,541 (+1%) 2,097,152 416
FPC:fee_entrypoint_private 15,456 9,064 (+1%) 524,288 416
Token:unshield 15,456 36,843 2,097,152 416
SchnorrAccount:spend_private_authwit 15,456 2,677 131,072 416

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 13.2 (+1%) 21.4 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.772 (+1%) 0.658 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 61.7 96.9 315 607 1,195 2,369 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.634 0.599 0.573 0.568 0.567 0.567 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 73.8 143 452 890 (-1%) 1,776 3,537 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.645 0.645 0.615 0.614 (-1%) 0.615 0.616 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 80.5
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.708

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,315 673,143

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 37,701 3,671 114,168
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,314 2,293 (+1%) 1,908 2,833 1,816 (-1%)

@TomAFrench TomAFrench merged commit 26f2197 into master May 17, 2024
94 checks passed
@TomAFrench TomAFrench deleted the sync-noir branch May 17, 2024 17:51
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 <tom@tomfren.ch>
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 <tom@tomfren.ch>
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.

None yet

3 participants