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

Merged
merged 10 commits into from
Sep 4, 2024
Merged

feat: Sync from noir #8363

merged 10 commits into from
Sep 4, 2024

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 4, 2024

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: prevent comptime println from crashing LSP (noir-lang/noir#5918)
chore: remove equality operation on boolean constraints against constants (noir-lang/noir#5919)
feat(perf): Remove last store in return block if last load is before that store (noir-lang/noir#5910)
chore: Add pass to normalize Ids in SSA (noir-lang/noir#5909)
feat: Sync from aztec-packages (noir-lang/noir#5917)
chore: bump some dependencies (noir-lang/noir#5893)
chore: make nested slice error more clear for [[T]; N] case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
END_COMMIT_OVERRIDE

AztecBot and others added 6 commits September 4, 2024 08:02
chore: make nested slice error more clear for `[[T]; N]` case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
chore: bump some dependencies (noir-lang/noir#5893)
chore: make nested slice error more clear for `[[T]; N]` case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
chore: bump some dependencies (noir-lang/noir#5893)
chore: make nested slice error more clear for `[[T]; N]` case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
@TomAFrench TomAFrench enabled auto-merge (squash) September 4, 2024 11:26
@AztecBot
Copy link
Collaborator Author

AztecBot commented Sep 4, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (FeeJuice:_increase_public_balance): 145 (+216%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 61.2 (+30%)
  • avm_simulation_time_ms (Token:transfer_public): 19.7 (+46%)
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,763 1,561 715 745 (+1%) 776
proof_construction_time_sha256_30_ms 11,501 (-1%) 3,090 1,382 1,425 1,470
proof_construction_time_sha256_100_ms 44,091 11,794 5,432 (-1%) 5,405 (-8%) 5,776 (-1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (-2%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,536 (+1%) 422 203 223 (-4%) 270
proof_construction_time_poseidon_hash_100_ms 5,640 1,514 679 (+1%) 740 (+1%) 744 (-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,148 92,936 178,132
l1_rollup_execution_gas 842,989 1,576,673 3,361,925
l2_block_processing_time_in_ms 263 (+3%) 443 (+1%) 829 (+3%)
l2_block_building_time_in_ms 10,830 21,462 (+1%) 42,400 (+1%)
l2_block_rollup_simulation_time_in_ms 10,829 21,462 (+1%) 42,400 (+1%)
l2_block_public_tx_process_time_in_ms 9,239 19,837 (+1%) 40,730 (+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,003 (+2%) 3,872 (-1%)
node_database_size_in_bytes 12,374,256 16,359,664
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 76.2 (-1%) 379 (+1%) 21,373 44,898 N/A
private-kernel-inner 151 (-1%) 698 (+3%) 72,354 45,020 N/A
private-kernel-reset-tiny 270 (-1%) 690 (+4%) 65,018 44,886 N/A
private-kernel-tail 149 127 (-2%) 50,589 52,921 N/A
base-parity 5.56 N/A 160 96.0 N/A
root-parity 35.1 (-1%) N/A 73,948 96.0 N/A
base-rollup 3,014 (-1%) N/A 189,207 664 N/A
block-root-rollup 41.0 N/A 58,205 2,448 N/A
public-kernel-setup 79.0 N/A 105,085 71,222 N/A
public-kernel-app-logic 92.7 N/A 104,899 71,222 N/A
public-kernel-tail 801 (+1%) N/A 390,582 16,414 N/A
private-kernel-reset-small 271 (+1%) N/A 66,341 45,629 N/A
private-kernel-tail-to-public 1,364 (+2%) 586 (-4%) 445,634 1,825 N/A
public-kernel-teardown 78.4 N/A 105,349 71,222 N/A
merge-rollup 20.0 (-1%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 87,366 (+6%)

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 344
ContractInstanceDeployer:deploy 1,408 11,731 18.1
MultiCallEntrypoint:entrypoint 1,920 11,731 399 (-1%)
FeeJuice:deploy 1,376 11,731 386
SchnorrAccount:constructor 1,312 11,731 62.3
SchnorrAccount:entrypoint 2,336 11,731 369 (-1%)
FeeJuice:claim 1,344 11,731 34.2 (-1%)
Token:privately_mint_private_note 1,280 11,731 77.6 (-1%)
FPC:fee_entrypoint_public 1,344 11,731 23.8 (-6%)
Token:transfer 1,312 11,731 212
Benchmarking:create_note 1,344 11,731 75.3 (+2%)
SchnorrAccount:verify_private_authwit 1,280 11,731 26.4 (-11%)
Token:unshield 1,376 11,731 494 (-1%)
FPC:fee_entrypoint_private 1,376 11,731 656 (-1%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance ⚠️ 145 (+216%) 2,307
FeeJuice:set_portal 10.2 (-27%) 2,680
Token:constructor 77.2 (+3%) 13,809
FPC:constructor 57.9 (+18%) 8,523
FeeJuice:check_balance 36.1 (-3%) 2,026 (-1%)
Token:mint_public 458 (+2%) 4,557
Token:assert_minter_and_mint ⚠️ 61.2 (+30%) 2,991
AuthRegistry:set_authorized 36.9 (-19%) 923
FPC:prepare_fee 76.2 (+3%) 3,925
Token:transfer_public ⚠️ 19.7 (+46%) 9,482
FPC:pay_refund 42.5 (+5%) 4,856
Benchmarking:increment_balance 1,166 (+1%) 3,170
Token:_increase_public_balance 37.1 (-4%) 2,284
FPC:pay_refund_with_shielded_rebate 55.0 (+11%) 4,856

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.21 (+4%) 3.93 (+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.115 (+4%) 0.111 (+2%) 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 (+2%) 18.3 (+4%) 33.5 (+7%) 59.5 (+1%) 119 (+6%)
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 (+2%) 0.106 (+4%) 0.108 (+6%) 0.102 (+1%) 0.106 (+5%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.3 (+1%) 26.6 (+4%) 45.7 (+3%) 83.2 (+2%) 169 (+6%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 107 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.110 (+1%) 0.108 (+5%) 0.107 (+4%) 0.103 (+2%) 0.106 (+5%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.7 (+2%) 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 (+2%) 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 | |
| - | |

…g/noir#5918)

chore: remove equality operation on boolean constraints against constants (noir-lang/noir#5919)
feat(perf): Remove last store in return block if last load is before that store (noir-lang/noir#5910)
chore: Add pass to normalize Ids in SSA (noir-lang/noir#5909)
feat: Sync from aztec-packages (noir-lang/noir#5917)
chore: bump some dependencies (noir-lang/noir#5893)
chore: make nested slice error more clear for `[[T]; N]` case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
chore: remove equality operation on boolean constraints against constants (noir-lang/noir#5919)
feat(perf): Remove last store in return block if last load is before that store (noir-lang/noir#5910)
chore: Add pass to normalize Ids in SSA (noir-lang/noir#5909)
feat: Sync from aztec-packages (noir-lang/noir#5917)
chore: bump some dependencies (noir-lang/noir#5893)
chore: make nested slice error more clear for `[[T]; N]` case (noir-lang/noir#5906)
feat: better println for Quoted (noir-lang/noir#5896)
feat: LSP diagnostics for all package files (noir-lang/noir#5895)
feat: LSP code action "Fill struct fields" (noir-lang/noir#5885)
chore: Cleanup str_as_bytes (noir-lang/noir#5900)
chore: update git user for release PRs (noir-lang/noir#5894)
@TomAFrench TomAFrench merged commit 176bce6 into master Sep 4, 2024
99 checks passed
@TomAFrench TomAFrench deleted the sync-noir branch September 4, 2024 17:11
TomAFrench added a commit that referenced this pull request Sep 5, 2024
* master:
  feat: verify public validation requests (#8150)
  feat: ultra keccak honk verifier (#8261)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  chore(bb): use std::span for srs (#8371)
  feat: router contract (#8352)
  chore: Merge provernet to master (#8373)
  feat: Sync from noir (#8363)
  chore: Change efs volumes to use bursting throughput (#8370)
  chore: move spartan network tests to nightly (#8369)
  chore(ci): Test lowering of non-persistent ebs provisions (#8360)
  chore(bb): reinstate "chore: uncomment asserts in oink rec verifier"" (#8356)
  fix: Split stores per component and split merkle tree operations (#8299)
  fix: TXE logs in docker (#8365)
  feat: Liveness analysis for constants (#8294)
  chore(avm): remove some unused deps (#8366)
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