Skip to content

feat: Sync from noir#7392

Merged
TomAFrench merged 3 commits into
masterfrom
sync-noir
Jul 9, 2024
Merged

feat: Sync from noir#7392
TomAFrench merged 3 commits into
masterfrom
sync-noir

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 9, 2024

Copy link
Copy Markdown
Collaborator

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: Change panic to error in interpreter (noir-lang/noir#5446)
feat: Add more slice methods to the stdlib (noir-lang/noir#5424)
feat: Unquote multiple items from annotations (noir-lang/noir#5441)
chore: move SSA checks to a new folder (noir-lang/noir#5434)
feat: lsp rename/find-all-references for type aliases (noir-lang/noir#5414)
chore: dummy workflow (noir-lang/noir#5438)
chore: refactor logic around inlining no_predicates functions (noir-lang/noir#5433)
chore: extracts refactoring of reading error payloads from #5403 (noir-lang/noir#5413)
fix: lsp struct rename/reference difference (noir-lang/noir#5411)
chore: merge BarretenbergVerifierBackend and BarretenbergBackend (noir-lang/noir#5399)
feat: Sync from aztec-packages (noir-lang/noir#5432)
END_COMMIT_OVERRIDE

AztecBot added 2 commits July 9, 2024 08:02
…#5446)

feat: Add more slice methods to the stdlib (noir-lang/noir#5424)
feat: Unquote multiple items from annotations (noir-lang/noir#5441)
chore: move SSA checks to a new folder (noir-lang/noir#5434)
feat: lsp rename/find-all-references for type aliases (noir-lang/noir#5414)
chore: dummy workflow (noir-lang/noir#5438)
chore: refactor logic around inlining `no_predicates` functions (noir-lang/noir#5433)
chore: extracts refactoring of reading error payloads from #5403 (noir-lang/noir#5413)
fix: lsp struct rename/reference difference (noir-lang/noir#5411)
chore: merge `BarretenbergVerifierBackend` and `BarretenbergBackend` (noir-lang/noir#5399)
feat: Sync from aztec-packages (noir-lang/noir#5432)
@AztecBot

AztecBot commented Jul 9, 2024

Copy link
Copy Markdown
Collaborator Author

Benchmark results

Metrics with a significant change:

  • proof_construction_time_poseidon_hash_ms (4): 48.0 (+41%)
  • proof_construction_time_poseidon_hash_100_ms (16): 877 (+30%)
  • proof_construction_time_poseidon_hash_30_ms (16): 282 (+41%)
  • proof_construction_time_poseidon_hash_30_ms (32): 263 (+17%)
  • proof_construction_time_sha256_100_ms (16): 5,427 (-17%)
  • avm_simulation_time_ms (Token:mint_public): 51.4 (-86%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 93.1 (+48%)
  • avm_simulation_time_ms (Token:transfer_public): 27.3 (-32%)
  • app_circuit_proving_time_in_ms (FPC:pay_refund (avm)): 17,992 (-25%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 78,032 (-16%)
  • protocol_circuit_proving_time_in_ms (root-parity): 34,156 (-17%)
  • protocol_circuit_proving_time_in_ms (public-kernel-setup): 36,523 (-17%)
  • protocol_circuit_proving_time_in_ms (public-kernel-teardown): 36,542 (-20%)
  • protocol_circuit_proving_time_in_ms (root-rollup): 19,676 (-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_ms 5,710 1,542 701 750 (-1%) 772
proof_construction_time_sha256_30_ms 11,695 3,140 1,411 1,426 (-1%) 1,461
proof_construction_time_sha256_100_ms 43,802 11,858 (+1%) ⚠️ 5,427 (-17%) 5,404 5,354
proof_construction_time_poseidon_hash_ms 78.0 ⚠️ 48.0 (+41%) 44.0 (+29%) 67.0 (+16%) 90.0 (+3%)
proof_construction_time_poseidon_hash_30_ms 1,516 416 (-1%) ⚠️ 282 (+41%) ⚠️ 263 (+17%) 286 (+6%)
proof_construction_time_poseidon_hash_100_ms 5,626 (+1%) 1,511 ⚠️ 877 (+30%) 816 (+13%) 794 (+7%)

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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,476 9,462 9,476
l1_rollup_execution_gas 613,504 613,641 613,806
l2_block_processing_time_in_ms 759 1,415 2,698 (-1%)
l2_block_building_time_in_ms 12,902 (-1%) 25,469 49,879 (-1%)
l2_block_rollup_simulation_time_in_ms 12,902 (-1%) 25,469 49,878 (-1%)
l2_block_public_tx_process_time_in_ms 10,844 (-1%) 23,239 47,640 (-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 7,040 9,830 (-2%)
node_database_size_in_bytes 12,443,728 16,191,568
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 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 108 (-3%) 419 (+6%) 13,898 (-5%) 20,002 55,022 74,208 2,252 524,288
private-kernel-inner 222 748 (+6%) 26,298 (-9%) 82,134 55,022 74,208 2,252 1,048,576
private-kernel-tail 1,052 (-2%) 2,565 (+2%) 49,836 (-7%) 62,409 62,089 14,944 400 2,097,152
base-parity 6.36 (+1%) 941 (+7%) 2,471 (-7%) 160 96.0 2,240 3.00 131,072
root-parity 71.0 (+1%) 64.8 (-13%) ⚠️ 34,156 (-17%) 27,868 96.0 2,752 19.0 2,097,152
base-rollup 4,139 (-1%) 5,030 (+2%) ⚠️ 78,032 (-16%) 172,028 632 3,552 44.0 4,194,304
root-rollup 129 (+2%) 76.3 (-14%) ⚠️ 19,676 (-17%) 25,053 652 3,488 42.0 1,048,576
public-kernel-setup 192 (+1%) 2,354 (-2%) ⚠️ 36,523 (-17%) 103,911 80,310 106,944 3,275 2,097,152
public-kernel-app-logic 145 (-1%) 3,340 36,795 (-12%) 103,911 80,310 106,944 3,275 2,097,152
public-kernel-tail 894 22,616 (-7%) 155,755 (-13%) 400,808 10,046 14,944 400 8,388,608
private-kernel-reset-small 291 1,212 (+6%) 25,633 (-1%) 79,273 55,022 74,208 2,252 1,048,576
public-kernel-teardown 135 (+1%) 3,292 (-2%) ⚠️ 36,542 (-20%) 103,911 80,310 106,944 3,275 2,097,152
merge-rollup 40.2 (-1%) N/A N/A 16,094 632 N/A N/A N/A
private-kernel-tail-to-public N/A 8,828 (-4%) 53,856 (-12%) N/A N/A 106,944 3,275 2,097,152

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,312 9,344 400 (+2%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.4 (+3%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 655 (+2%) N/A N/A N/A N/A
GasToken:deploy 1,344 9,344 573 (+3%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,280 9,344 486 (+1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 821 15,840 4,862 (+3%) 131,072 428
Token:privately_mint_private_note 1,248 9,344 568 (+4%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 106 (+1%) 15,840 1,830 (+7%) 65,536 428
Token:transfer 1,280 9,344 1,655 (+1%) 15,840 10,265 (-12%) 524,288 428
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 91,232 1,562 (+13%) N/A N/A
FPC:prepare_fee (avm) 26,664 N/A N/A 91,296 2,953 N/A N/A
Token:transfer_public (avm) 42,914 N/A N/A 91,296 3,676 (-7%) N/A N/A
AuthRegistry:consume (avm) 33,100 N/A N/A 91,232 3,023 (+9%) N/A N/A
FPC:pay_refund (avm) 36,829 N/A N/A 91,264 ⚠️ 17,992 (-25%) N/A N/A
Benchmarking:create_note 1,312 9,344 464 (-1%) N/A N/A N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.2 N/A N/A N/A N/A
Token:unshield 1,344 9,344 1,338 (-1%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,740 (+1%) N/A N/A N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
GasToken:_increase_public_balance 82.2 (+3%) 13,790
GasToken:set_portal 15.1 (-1%) 3,339
Token:constructor 103 (+1%) 23,692
FPC:constructor 73.2 13,592
GasToken:mint_public 61.9 (-1%) 10,158
Token:mint_public ⚠️ 51.4 (-86%) 19,034
Token:assert_minter_and_mint ⚠️ 93.1 (+48%) 12,925
AuthRegistry:set_authorized 34.3 (-1%) 7,812
FPC:prepare_fee 100 (-3%) 15,062
Token:transfer_public ⚠️ 27.3 (-32%) 31,218
FPC:pay_refund 131 (+4%) 25,260
Benchmarking:increment_balance 1,313 (-1%) 15,267
Token:_increase_public_balance 14.9 (-1%) 15,006
FPC:pay_refund_with_shielded_rebate 163 (+1%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.157 (+1%)

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 10.4 (+1%) 16.8 (+1%) 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.604 (+1%) 0.518 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.6 (+1%) 75.7 131 247 (+1%) 470
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.496 (+1%) 0.466 0.451 0.448 (+1%) 0.439
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.0 (+1%) 111 183 (+1%) 355 (+1%) 692
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.506 0.500 0.484 0.480 0.475
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 73.3 (+1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 133 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.521 (+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 74,082 667,868

Transaction size based on fee payment method

| Metric | |
| - | |

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