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

Merged
merged 9 commits into from
May 27, 2024
Merged

feat: Sync from noir #6631

merged 9 commits into from
May 27, 2024

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented May 23, 2024

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: Consider block parameters in variable liveness (noir-lang/noir#5097)
chore(docs): Link to evmdiff for supported EVM chains (noir-lang/noir#5107)
chore: Avoid creating witness for simple multiplications (noir-lang/noir#5100)
feat: Add intrinsic to get if running inside an unconstrained context (noir-lang/noir#5098)
chore: Move turbofish changes to the elaborator (noir-lang/noir#5094)
fix: Apply self type from generic trait constraint before instantiating identifiers (noir-lang/noir#5087)
chore: reactivate gates report (noir-lang/noir#5084)
chore: automatically clear any unwanted directories in test_programs (noir-lang/noir#5081)
chore: update nargo info table to remove circuit size column
feat: Activate return_data in ACIR opcodes (noir-lang/noir#5080)
fix: Use plain integer addresses for opcodes in DAP disassembly view (noir-lang/noir#4941)
chore(experimental): Elaborate globals (noir-lang/noir#5069)
chore(experimental): Add types and traits to the elaborator (noir-lang/noir#5066)
feat: remove conditional compilation of bn254_blackbox_solver (noir-lang/noir#5058)
chore: use bbup to install bb (noir-lang/noir#5073)
feat: Sync from aztec-packages (noir-lang/noir#5070)
chore: update docs to represent zksync supporting necessary precompiles (noir-lang/noir#5071)
feat(stdlib)!: eddsa function using turbofish (noir-lang/noir#5050)
fix(frontend): Correctly monomorphize turbofish functions (noir-lang/noir#5049)
END_COMMIT_OVERRIDE

AztecBot and others added 7 commits May 23, 2024 10:57
chore: automatically clear any unwanted directories in `test_programs` (noir-lang/noir#5081)
chore: update `nargo info` table to remove circuit size column
feat: Activate return_data in ACIR opcodes (noir-lang/noir#5080)
fix: Use plain integer addresses for opcodes in DAP disassembly view (noir-lang/noir#4941)
chore(experimental): Elaborate globals (noir-lang/noir#5069)
chore(experimental): Add types and traits to the elaborator (noir-lang/noir#5066)
feat: remove conditional compilation of `bn254_blackbox_solver` (noir-lang/noir#5058)
chore: use `bbup` to install `bb` (noir-lang/noir#5073)
feat: Sync from aztec-packages (noir-lang/noir#5070)
chore: update docs to represent zksync supporting necessary precompiles (noir-lang/noir#5071)
feat(stdlib)!: eddsa function using turbofish (noir-lang/noir#5050)
fix(frontend): Correctly monomorphize turbofish functions (noir-lang/noir#5049)
…r-lang/noir#5097)

chore(docs): Link to evmdiff for supported EVM chains (noir-lang/noir#5107)
chore: Avoid creating witness for simple multiplications (noir-lang/noir#5100)
feat: Add intrinsic to get if running inside an unconstrained context (noir-lang/noir#5098)
chore: Move turbofish changes to the elaborator (noir-lang/noir#5094)
fix: Apply self type from generic trait constraint before instantiating identifiers (noir-lang/noir#5087)
chore: reactivate gates report (noir-lang/noir#5084)
chore: automatically clear any unwanted directories in `test_programs` (noir-lang/noir#5081)
chore: update `nargo info` table to remove circuit size column
feat: Activate return_data in ACIR opcodes (noir-lang/noir#5080)
fix: Use plain integer addresses for opcodes in DAP disassembly view (noir-lang/noir#4941)
chore(experimental): Elaborate globals (noir-lang/noir#5069)
chore(experimental): Add types and traits to the elaborator (noir-lang/noir#5066)
feat: remove conditional compilation of `bn254_blackbox_solver` (noir-lang/noir#5058)
chore: use `bbup` to install `bb` (noir-lang/noir#5073)
feat: Sync from aztec-packages (noir-lang/noir#5070)
chore: update docs to represent zksync supporting necessary precompiles (noir-lang/noir#5071)
feat(stdlib)!: eddsa function using turbofish (noir-lang/noir#5050)
fix(frontend): Correctly monomorphize turbofish functions (noir-lang/noir#5049)
…5097)

chore(docs): Link to evmdiff for supported EVM chains (noir-lang/noir#5107)
chore: Avoid creating witness for simple multiplications (noir-lang/noir#5100)
feat: Add intrinsic to get if running inside an unconstrained context (noir-lang/noir#5098)
chore: Move turbofish changes to the elaborator (noir-lang/noir#5094)
fix: Apply self type from generic trait constraint before instantiating identifiers (noir-lang/noir#5087)
chore: reactivate gates report (noir-lang/noir#5084)
chore: automatically clear any unwanted directories in `test_programs` (noir-lang/noir#5081)
chore: update `nargo info` table to remove circuit size column
feat: Activate return_data in ACIR opcodes (noir-lang/noir#5080)
fix: Use plain integer addresses for opcodes in DAP disassembly view (noir-lang/noir#4941)
chore(experimental): Elaborate globals (noir-lang/noir#5069)
chore(experimental): Add types and traits to the elaborator (noir-lang/noir#5066)
feat: remove conditional compilation of `bn254_blackbox_solver` (noir-lang/noir#5058)
chore: use `bbup` to install `bb` (noir-lang/noir#5073)
feat: Sync from aztec-packages (noir-lang/noir#5070)
chore: update docs to represent zksync supporting necessary precompiles (noir-lang/noir#5071)
feat(stdlib)!: eddsa function using turbofish (noir-lang/noir#5050)
fix(frontend): Correctly monomorphize turbofish functions (noir-lang/noir#5049)
Copy link
Contributor

github-actions bot commented May 27, 2024

Changes to circuit sizes

Generated at commit: d26e06965b8f6cc736c45f9b91a3ad61fd6e9d33, compared to commit: f67d6f38b03225849e99c02d069073a504ce7c55

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_app_logic +6,772 ❌ +2.71% +6,772 ❌ +0.41%
public_kernel_teardown +6,769 ❌ +2.70% +6,769 ❌ +0.41%
rollup_root -164 ✅ -7.10% -164 ✅ -0.02%
public_kernel_setup -1,140 ✅ -0.51% -1,140 ✅ -0.07%
private_kernel_tail -1,498 ✅ -0.74% -1,498 ✅ -0.10%
private_kernel_inner -2,151 ✅ -0.80% -2,151 ✅ -0.12%
private_kernel_init -2,011 ✅ -0.86% -2,011 ✅ -0.23%
private_kernel_tail_to_public -6,342 ✅ -1.10% -6,342 ✅ -0.29%
rollup_base -7,368 ✅ -3.84% -7,368 ✅ -0.35%
public_kernel_tail -19,704 ✅ -2.03% -19,704 ✅ -0.45%
private_kernel_reset -16,648 ✅ -6.44% -16,648 ✅ -0.65%
private_kernel_reset_big -11,208 ✅ -5.90% -11,208 ✅ -0.65%
private_kernel_reset_medium -8,488 ✅ -5.45% -8,488 ✅ -0.66%
private_kernel_reset_small -7,128 ✅ -5.15% -7,128 ✅ -0.66%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_app_logic 256,807 (+6,772) +2.71% 1,662,291 (+6,772) +0.41%
public_kernel_teardown 257,164 (+6,769) +2.70% 1,662,689 (+6,769) +0.41%
rollup_root 2,145 (-164) -7.10% 910,781 (-164) -0.02%
public_kernel_setup 220,620 (-1,140) -0.51% 1,524,381 (-1,140) -0.07%
private_kernel_tail 199,791 (-1,498) -0.74% 1,465,146 (-1,498) -0.10%
private_kernel_inner 265,942 (-2,151) -0.80% 1,783,212 (-2,151) -0.12%
private_kernel_init 231,177 (-2,011) -0.86% 865,493 (-2,011) -0.23%
private_kernel_tail_to_public 569,816 (-6,342) -1.10% 2,177,758 (-6,342) -0.29%
rollup_base 184,437 (-7,368) -3.84% 2,123,315 (-7,368) -0.35%
public_kernel_tail 949,934 (-19,704) -2.03% 4,397,289 (-19,704) -0.45%
private_kernel_reset 241,966 (-16,648) -6.44% 2,546,062 (-16,648) -0.65%
private_kernel_reset_big 178,779 (-11,208) -5.90% 1,701,843 (-11,208) -0.65%
private_kernel_reset_medium 147,187 (-8,488) -5.45% 1,279,735 (-8,488) -0.66%
private_kernel_reset_small 131,390 (-7,128) -5.15% 1,068,680 (-7,128) -0.66%

@AztecBot
Copy link
Collaborator Author

Benchmark results

Metrics with a significant change:

  • app_circuit_proving_time_in_ms (Token:transfer): 58,824 (+17%)
  • protocol_circuit_witness_generation_time_in_ms (root-parity): 61.8 (-42%)
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,684 1,559 714 771 775

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,440 9,476 9,476
l1_rollup_execution_gas 616,081 616,117 616,117
l2_block_processing_time_in_ms 1,291 4,818 9,531
l2_block_building_time_in_ms 45,094 (-5%) 178,649 (-5%) 356,949 (-5%)
l2_block_rollup_simulation_time_in_ms 44,923 (-5%) 178,004 (-5%) 355,679 (-5%)
l2_block_public_tx_process_time_in_ms 24,201 (-4%) 101,168 (-4%) 206,948 (-4%)

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,581 15,115 (+4%)
node_database_size_in_bytes 14,495,824 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 (-2%) 3,561 26,393 (+3%) 20,630 64,614 89,536 2,731 1,048,576
private-kernel-inner 623 (-1%) 4,065 (-10%) 53,229 (+4%) 92,318 64,614 89,536 2,731 2,097,152
private-kernel-tail 564 (-1%) 2,740 (-1%) 44,446 (+7%) 96,541 77,498 10,656 266 2,097,152
base-parity 6.50 (+1%) 1,132 (-12%) 2,789 (-2%) 128 64.0 2,208 2.00 131,072
root-parity 49.6 (+1%) ⚠️ 61.8 (-42%) 52,385 (+3%) 27,084 64.0 2,720 18.0 2,097,152
base-rollup 703 (-7%) 2,314 (-5%) 86,375 (-1%) 119,610 756 3,648 47.0 4,194,304
root-rollup 110 (-3%) 80.0 (+7%) 24,383 (-1%) 25,297 620 3,456 41.0 1,048,576
public-kernel-app-logic 522 (-1%) 3,066 (+8%) 52,381 104,941 86,302 114,784 3,520 2,097,152
public-kernel-tail 1,097 (-8%) 22,526 (-4%) 186,271 (+5%) 395,386 7,522 10,656 266 8,388,608
private-kernel-reset-small 588 (-1%) 2,075 (+1%) 48,770 (-6%) 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 626 (+1%) N/A N/A 104,941 86,302 N/A N/A N/A
public-kernel-teardown 532 (+2%) N/A N/A 104,941 86,302 N/A N/A N/A
private-kernel-tail-to-public N/A 8,294 94,728 (+3%) 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 459 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 41.1 (-1%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,405 (-2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 970 (-4%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,101 (-1%) 16,768 49,772 (-2%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,092 (-3%) N/A N/A N/A N/A
Token:transfer 1,376 9,944 3,993 (-2%) 16,768 ⚠️ 58,824 (+17%) 2,097,152 457
Benchmarking:create_note 1,312 9,944 953 (-4%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 219 (-5%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.2 (-2%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,227 (-2%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,002 (-2%) 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.5 17.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.606 0.535 (+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 48.9 76.7 249 474 (-1%) 936 (+1%) 1,844 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.500 0.471 0.451 0.442 (-1%) 0.444 (+1%) 0.441 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.9 (+1%) 113 359 (+1%) 770 (+9%) 1,395 (+1%) 2,773 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.510 (+1%) 0.506 0.488 (+1%) 0.531 (+10%) 0.482 (+1%) 0.481 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.9
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.557 (+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 83,794 665,117

Transaction size based on fee payment method

| Metric | |
| - | |

@sirasistant sirasistant merged commit 17f6e1d into master May 27, 2024
85 checks passed
@sirasistant sirasistant deleted the sync-noir branch May 27, 2024 12:37
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.

3 participants