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

Merged
merged 18 commits into from
Sep 23, 2024
Merged

feat: Sync from noir #8663

merged 18 commits into from
Sep 23, 2024

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 20, 2024

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat(perf): Allow array set last uses optimization in return block of Brillig functions (noir-lang/noir#6119)
feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for TypePath (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside quote { ... } (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
END_COMMIT_OVERRIDE

AztecBot and others added 17 commits September 20, 2024 08:02
…urn block of Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
… Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
…urn block of Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
… Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
…urn block of Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
… Brillig functions (noir-lang/noir#6119)

feat: represent assertions more similarly to function calls (noir-lang/noir#6103)
feat: pretty print Quoted token stream (noir-lang/noir#6111)
feat: LSP autocompletion for `TypePath` (noir-lang/noir#6117)
fix: disambiguate field or int static trait method call (noir-lang/noir#6112)
chore: delete duplicated test (noir-lang/noir#6113)
feat: (LSP) suggest $vars inside `quote { ... }` (noir-lang/noir#6114)
chore: ec addition for non-zero points (noir-lang/noir#5858)
chore(docs): removing old versions (noir-lang/noir#6075)
fix(mem2reg): Remove possibility of underflow (noir-lang/noir#6107)
fix: decode databus return values (noir-lang/noir#6095)
@sirasistant sirasistant added e2e-all CI: Enables this CI job. bench-all CI: Enables this CI job. labels Sep 23, 2024
@AztecBot
Copy link
Collaborator Author

Benchmark results

Metrics with a significant change:

  • proof_construction_time_poseidon_hash_ms (4): 45.0 (+32%)
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,770 1,543 699 755 (-1%) 773 (+1%)
proof_construction_time_sha256_30_ms 12,035 (+1%) 3,199 (+1%) 1,418 (+2%) 1,445 (+1%) 1,482
proof_construction_time_sha256_100_ms 44,492 (+1%) 12,029 (+1%) 5,510 (+2%) 5,484 (+2%) 5,422 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 ⚠️ 45.0 (+32%) 34.0 59.0 87.0 (-2%)
proof_construction_time_poseidon_hash_30_ms 1,534 419 201 (+1%) 228 (-1%) 270 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,666 1,509 674 740 (+4%) 747

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,828 97,586 187,252
l1_rollup_execution_gas 822,418 1,559,198 3,352,015
l2_block_processing_time_in_ms 257 (+6%) 449 (+3%) 803 (-1%)
l2_block_building_time_in_ms 4,524 (-1%) 8,956 17,712 (-1%)
l2_block_rollup_simulation_time_in_ms 4,524 (-1%) 8,955 17,712 (-1%)
l2_block_public_tx_process_time_in_ms 4,497 (-1%) 8,927 17,665 (-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,811 (+3%) 3,677 (+2%)
node_database_size_in_bytes 12,390,640 16,376,048
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 74.4 (+2%) 405 (+7%) 21,165 44,898 N/A
private-kernel-inner 139 (+1%) 711 (+4%) 72,235 45,020 N/A
private-kernel-reset-tiny 319 (+2%) 712 (+4%) 64,538 44,886 N/A
private-kernel-tail 151 134 (+3%) 50,577 59,239 N/A
public-kernel-setup 52.3 N/A 114,697 79,670 N/A
public-kernel-app-logic 52.0 N/A 114,697 79,670 N/A
public-kernel-tail 496 (+1%) N/A 487,098 16,414 N/A
private-kernel-reset-small 290 N/A 66,345 45,629 N/A
private-kernel-tail-to-public 695 (-12%) 628 (+5%) 444,313 1,825 N/A
public-kernel-teardown 51.9 (-1%) N/A 114,697 79,670 N/A
undefined N/A N/A N/A N/A 98,821 (-3%)

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 343 (-1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.2
MultiCallEntrypoint:entrypoint 1,920 11,731 394
FeeJuice:deploy 1,376 11,731 385 (-1%)
SchnorrAccount:constructor 1,312 11,731 51.3 (+3%)
SchnorrAccount:entrypoint 2,336 11,731 347 (+1%)
FeeJuice:claim 1,344 11,731 34.7 (-4%)
Token:privately_mint_private_note 1,280 11,731 56.4 (-5%)
FPC:fee_entrypoint_public 1,344 11,731 47.0 (+8%)
Token:transfer 1,312 11,731 135 (+2%)
Benchmarking:create_note 1,344 11,731 49.7 (-1%)
SchnorrAccount:verify_private_authwit 1,280 11,731 26.1 (+5%)
Token:unshield 1,376 11,731 479 (+4%)
FPC:fee_entrypoint_private 1,376 11,731 641 (+3%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 6.52 1,040
FeeJuice:set_portal 4.03 (-2%) 1,042
Token:constructor 177 (+1%) 7,121
FPC:constructor 11.4 (-8%) 4,579
FeeJuice:check_balance 3.15 (-3%) 923
Token:mint_public 7.48 (-3%) 1,903
Token:assert_minter_and_mint 4.58 (-14%) 1,236
AuthRegistry:set_authorized 2.92 (-5%) 465
FPC:prepare_fee 50.2 (-3%) 1,290
Token:transfer_public 9.40 (+4%) 5,304
FPC:pay_refund 29.7 (-2%) 1,708
Benchmarking:increment_balance 8.89 (-2%) 1,405
Token:_increase_public_balance 4.59 (+4%) 1,087
FPC:pay_refund_with_shielded_rebate 43.7 (-1%) 1,708

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.623 (+4%)

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.14 (-2%) 4.05 (+3%) 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.111 0.114 (+3%) 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 17.6 (-5%) 30.8 (-1%) 59.4 (+1%) 111 (-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.108 0.102 (-6%) 0.101 0.102 (+1%) 0.100 (-3%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 (-1%) 25.9 (-2%) 43.8 (-1%) 83.2 (+1%) 161 (-2%)
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.111 (-1%) 0.104 (-2%) 0.107 0.103 (+1%) 0.102 (-2%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.5 (-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 72,431 671,025

Transaction size based on fee payment method

| Metric | |
| - | |

@sirasistant sirasistant merged commit 7a87314 into master Sep 23, 2024
96 checks passed
@sirasistant sirasistant deleted the sync-noir branch September 23, 2024 16:11
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