Skip to content

feat: Sync from noir#8322

Closed
AztecBot wants to merge 3 commits intomasterfrom
sync-noir
Closed

feat: Sync from noir#8322
AztecBot wants to merge 3 commits intomasterfrom
sync-noir

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 2, 2024

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: LSP diagnostics now have "unnecessary" and "deprecated" tags (noir-lang/noir#5878)
feat: LSP code actions to import or qualify unresolved paths (noir-lang/noir#5876)
END_COMMIT_OVERRIDE

@AztecBot
Copy link
Collaborator Author

AztecBot commented Sep 2, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-inner): 213 (+22%)
  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 665 (-52%)
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,744 1,561 713 754 768 (-1%)
proof_construction_time_sha256_30_ms 11,580 (+1%) 3,080 1,380 (-1%) 1,428 1,454
proof_construction_time_sha256_100_ms 44,081 11,786 5,434 (-1%) 5,620 (+2%) 5,746 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 87.0
proof_construction_time_poseidon_hash_30_ms 1,528 422 203 219 (-5%) 263 (-3%)
proof_construction_time_poseidon_hash_100_ms 5,637 1,511 675 726 (+2%) 746 (+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,356 7,876 14,884
l1_rollup_calldata_gas 50,184 92,972 178,096
l1_rollup_execution_gas 843,003 1,576,687 3,361,867
l2_block_processing_time_in_ms 265 (+8%) 450 (+3%) 827 (+2%)
l2_block_building_time_in_ms 11,340 22,350 44,230
l2_block_rollup_simulation_time_in_ms 11,340 22,350 44,229
l2_block_public_tx_process_time_in_ms 9,686 20,660 42,508 (-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 3,034 (+3%) 3,900 (+1%)
node_database_size_in_bytes 12,619,856 16,699,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 93.8 401 (+1%) 21,446 44,898 N/A
private-kernel-inner ⚠️ 213 (+22%) 705 72,411 45,020 N/A
private-kernel-reset-tiny 304 (-1%) 714 65,114 44,886 N/A
private-kernel-tail 167 (-1%) 135 (-3%) 50,608 52,921 N/A
base-parity 5.57 (-1%) N/A 160 96.0 N/A
root-parity 35.4 N/A 73,948 96.0 N/A
base-rollup 3,126 (-2%) N/A 189,193 664 N/A
block-root-rollup 41.4 (-1%) N/A 58,205 2,448 N/A
public-kernel-setup 85.4 (+1%) N/A 105,085 71,222 N/A
public-kernel-app-logic 96.8 N/A 104,899 71,222 N/A
public-kernel-tail 857 N/A 390,582 16,414 N/A
private-kernel-reset-small 308 N/A 66,341 45,629 N/A
private-kernel-tail-to-public ⚠️ 665 (-52%) 616 455,400 1,825 N/A
public-kernel-teardown 83.8 (-4%) N/A 105,349 71,222 N/A
merge-rollup 20.0 (-2%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 78,354 (-1%)

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 342 (-1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.2 (-2%)
MultiCallEntrypoint:entrypoint 1,920 11,731 405 (-1%)
FeeJuice:deploy 1,376 11,731 391 (+1%)
SchnorrAccount:constructor 1,312 11,731 73.7
SchnorrAccount:entrypoint 2,336 11,731 385 (-2%)
FeeJuice:claim 1,344 11,731 37.7 (-10%)
Token:privately_mint_private_note 1,280 11,731 105
FPC:fee_entrypoint_public 1,344 11,731 25.7 (-6%)
Token:transfer 1,312 11,731 223
Benchmarking:create_note 1,344 11,731 87.4
SchnorrAccount:verify_private_authwit 1,280 11,731 26.5
Token:unshield 1,376 11,731 527
FPC:fee_entrypoint_private 1,376 11,731 712 (+2%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 52.5 (-1%) 8,174
FeeJuice:set_portal 10.7 (-3%) 4,055
Token:constructor 83.0 (+2%) 23,253
FPC:constructor 51.4 13,111
FeeJuice:check_balance 38.8 (-1%) 5,978
Token:mint_public 322 (+3%) 12,704
Token:assert_minter_and_mint 499 (+2%) 8,467
AuthRegistry:set_authorized 47.7 (-3%) 4,194
FPC:prepare_fee 205 (-7%) 6,747
Token:transfer_public 29.1 32,272
FPC:pay_refund 53.5 (+3%) 9,398
Benchmarking:increment_balance 1,219 7,263
Token:_increase_public_balance 41.8 8,686
FPC:pay_refund_with_shielded_rebate 61.8 (+1%) 9,881

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.151 (+3%)

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.19 (+1%) 4.00 (+2%) 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.113 (+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.2 18.1 (+2%) 31.8 (+2%) 59.8 (+2%) 112 (-3%)
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.107 0.105 (+2%) 0.103 (+2%) 0.102 (+2%) 0.100 (-3%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 25.9 (+1%) 43.6 (-1%) 83.9 (+3%) 160 (-2%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 108 (+1%) 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.112 (-1%) 0.104 0.105 (-1%) 0.104 (+2%) 0.102
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.7 (+1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.107 (+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 64,838 668,997

Transaction size based on fee payment method

| Metric | |
| - | |

@TomAFrench TomAFrench closed this Sep 2, 2024
@TomAFrench TomAFrench deleted the sync-noir branch September 2, 2024 16:40
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