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

Merged
merged 9 commits into from
Sep 19, 2024
Merged

feat: Sync from noir #8653

merged 9 commits into from
Sep 19, 2024

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 19, 2024

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: Allow macros to change types on each iteration of a comptime loop (noir-lang/noir#6105)
chore: Schnorr signature verification in Noir (noir-lang/noir#5437)
feat: Implement solver for mov_registers_to_registers (noir-lang/noir#6089)
END_COMMIT_OVERRIDE

@sirasistant sirasistant enabled auto-merge (squash) September 19, 2024 19:13
@TomAFrench
Copy link
Member

@sirasistant Failure potentially caused by your brillig changes?

@sirasistant
Copy link
Contributor

let me see!

@sirasistant sirasistant added e2e-all CI: Enables this CI job. bench-all CI: Enables this CI job. labels Sep 19, 2024
@AztecBot
Copy link
Collaborator Author

AztecBot commented Sep 19, 2024

Benchmark results

No metrics with a significant change found.

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_ms 5,734 1,538 700 (-1%) 744 (+1%) 770 (+1%)
proof_construction_time_sha256_30_ms 11,822 3,143 (-1%) 1,401 1,435 (-1%) 1,460 (-1%)
proof_construction_time_sha256_100_ms 44,066 11,904 5,395 (-1%) 5,388 (-1%) 5,360
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 (+4%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,526 419 201 225 266
proof_construction_time_poseidon_hash_100_ms 5,630 1,497 670 719 (-4%) 750 (+1%)

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 4,612 8,260 15,556
l1_rollup_calldata_gas 52,864 97,728 187,072
l1_rollup_execution_gas 822,454 1,559,340 3,351,835
l2_block_processing_time_in_ms 246 (-7%) 443 (-2%) 800 (-5%)
l2_block_building_time_in_ms 9,189 (+1%) 17,933 36,213
l2_block_rollup_simulation_time_in_ms 9,188 (+1%) 17,932 36,212
l2_block_public_tx_process_time_in_ms 4,584 (+1%) 8,988 18,159 (+1%)

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 2,824 (-1%) 3,644 (-1%)
node_database_size_in_bytes 12,382,448 16,351,472
pxe_database_size_in_bytes 16,254 26,813

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 input_size_in_bytes output_size_in_bytes proving_time_in_ms
private-kernel-init 75.4 (-1%) 376 21,165 44,898 N/A
private-kernel-inner 139 682 (-1%) 72,235 45,020 N/A
private-kernel-reset-tiny 319 (-13%) 683 (-2%) 64,538 44,886 N/A
private-kernel-tail 152 (+1%) 129 (-1%) 50,577 59,239 N/A
base-parity 6.02 N/A 160 96.0 N/A
root-parity 35.7 (+1%) N/A 73,964 96.0 N/A
base-rollup 398 (-3%) N/A 189,165 664 N/A
block-root-rollup 42.2 (-2%) N/A 58,217 2,448 N/A
public-kernel-setup 84.8 N/A 114,433 79,670 N/A
public-kernel-app-logic 97.5 N/A 114,251 79,670 N/A
public-kernel-tail 569 N/A 487,098 16,414 N/A
private-kernel-reset-small 288 (-1%) N/A 66,345 45,629 N/A
private-kernel-tail-to-public 787 (-1%) 597 (-1%) 444,313 1,825 N/A
public-kernel-teardown 87.4 (+4%) N/A 114,697 79,670 N/A
merge-rollup 20.2 (-2%) N/A 38,182 664 N/A
undefined N/A N/A N/A N/A 101,441

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 348 (-1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.2
MultiCallEntrypoint:entrypoint 1,920 11,731 396 (-1%)
FeeJuice:deploy 1,376 11,731 396 (-2%)
SchnorrAccount:constructor 1,312 11,731 50.4 (+2%)
SchnorrAccount:entrypoint 2,336 11,731 345 (+1%)
FeeJuice:claim 1,344 11,731 36.7 (+6%)
Token:privately_mint_private_note 1,280 11,731 59.9
FPC:fee_entrypoint_public 1,344 11,731 43.6
Token:transfer 1,312 11,731 133
Benchmarking:create_note 1,344 11,731 50.0 (-3%)
SchnorrAccount:verify_private_authwit 1,280 11,731 25.0
Token:unshield 1,376 11,731 468
FPC:fee_entrypoint_private 1,376 11,731 653 (+3%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 6.80 (-2%) 1,040
FeeJuice:set_portal 4.43 (-23%) 1,042
Token:constructor 179 7,121
FPC:constructor 13.7 (+5%) 4,579
FeeJuice:check_balance 3.66 (+2%) 923
Token:mint_public 7.54 (+2%) 1,903
Token:assert_minter_and_mint 5.42 (+18%) 1,236
AuthRegistry:set_authorized 3.15 465
FPC:prepare_fee 58.5 (+2%) 1,290
Token:transfer_public 9.66 (+12%) 5,304
FPC:pay_refund 32.0 (-2%) 1,708
Benchmarking:increment_balance 9.43 (+2%) 1,405
Token:_increase_public_balance 4.65 (+1%) 1,087
FPC:pay_refund_with_shielded_rebate 43.4 (-2%) 1,708

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.591

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 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 2.18 (-1%) 3.91 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.113 0.110 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.3 (+2%) 18.1 31.9 (+1%) 58.2 (-2%) 112 (+1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.108 (+3%) 0.105 0.103 (+1%) 0.100 (-2%) 0.101 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.2 (+1%) 25.7 44.1 (-1%) 81.5 (-2%) 161 (-4%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 108 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.109 (+2%) 0.103 0.107 (-1%) 0.101 (-2%) 0.103 (-4%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 (-1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 131 (-1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.106 (-1%) N/A N/A N/A N/A

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 72,431 671,025

Transaction size based on fee payment method

| Metric | |
| - | |

@sirasistant
Copy link
Contributor

it seems to be failing even if I revert back locally the changes to codegen_stack. Let me check on master

@sirasistant
Copy link
Contributor

Oh I think I'm getting it on master. Let's update this branch and open a clean PR to see if it's reproduced

@sirasistant
Copy link
Contributor

Confirmed, it's an issue on master #8657

@TomAFrench
Copy link
Member

Yep, looks like we need to do some git investigation to see where it broke. Looks like the path filters on CI are too narrow.

@sirasistant
Copy link
Contributor

Should pass now

@sirasistant sirasistant enabled auto-merge (squash) September 19, 2024 22:57
@sirasistant sirasistant merged commit 03b9e71 into master Sep 19, 2024
94 checks passed
@sirasistant sirasistant deleted the sync-noir branch September 19, 2024 23:35
lucasxia01 added a commit that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bench-all CI: Enables this CI job. e2e-all CI: Enables this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants