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

chore: Merge Devnet back to master #7677

Closed
wants to merge 0 commits into from
Closed

chore: Merge Devnet back to master #7677

wants to merge 0 commits into from

Conversation

PhilWindle
Copy link
Collaborator

This PR is simply to merge Devnet back to master.

@AztecBot
Copy link
Collaborator

AztecBot commented Jul 30, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:_increase_public_balance): 78.6 (+713%)
  • avm_simulation_time_ms (FPC:pay_refund_with_shielded_rebate): 72.1 (-49%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-tail): 27,848 (+16%)
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,639 (-2%) 1,529 (-2%) 699 (-1%) 749 (-1%) 767 (-1%)
proof_construction_time_sha256_30_ms 11,293 (-4%) 3,071 (-3%) 1,403 1,441 1,469 (+1%)
proof_construction_time_sha256_100_ms 42,522 (-3%) 12,333 5,791 (+3%) 5,617 (+1%) 5,536 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,515 (-1%) 416 (-1%) 200 (-1%) 225 (+2%) 266 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,595 (-1%) 1,512 (-1%) 677 729 752 (+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 740 740 740
l1_rollup_calldata_gas 6,716 6,714 6,692
l1_rollup_execution_gas 611,983 612,132 612,261
l2_block_processing_time_in_ms 242 (-8%) 446 (-3%) 798 (-5%)
l2_block_building_time_in_ms 9,523 (-1%) 18,647 37,148
l2_block_rollup_simulation_time_in_ms 9,523 (-1%) 18,646 37,148
l2_block_public_tx_process_time_in_ms 7,930 (-1%) 16,820 35,243

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,763 3,675 (-2%)
node_database_size_in_bytes 12,709,968 16,851,024
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 proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 95.6 (+1%) 426 (+2%) 21,846 44,858 N/A N/A N/A N/A
private-kernel-inner 175 (-1%) 752 (+3%) 72,545 45,005 N/A N/A N/A N/A
private-kernel-tail 663 (-1%) 778 52,710 52,256 N/A N/A N/A N/A
base-parity 5.89 (-1%) 604 (+1%) 160 96.0 1,677 (+1%) 13,188 19.0 65,536
root-parity 110 (+1%) 116 (-3%) 69,084 96.0 27,733 (-1%) 13,188 19.0 4,194,304
base-rollup 2,950 5,588 (-1%) 187,824 664 86,947 14,020 45.0 16,777,216
root-rollup 97.1 105 54,525 716 25,240 13,988 44.0 4,194,304
public-kernel-setup 91.7 (-2%) 2,708 (-2%) 104,025 71,222 15,288 (-1%) 129,220 3,645 2,097,152
public-kernel-app-logic 105 (-1%) 4,061 (-1%) 104,025 71,222 8,586 129,220 3,645 1,048,576
public-kernel-tail 571 ⚠️ 27,848 (+16%) 409,190 16,414 94,140 (-1%) 34,308 679 16,777,216
private-kernel-reset-tiny 190 (-1%) 906 (+3%) 68,621 44,750 N/A N/A N/A N/A
private-kernel-tail-to-public 2,036 (-2%) 1,609 (+1%) 931,564 1,697 N/A N/A N/A N/A
public-kernel-teardown 87.4 4,089 (-3%) 104,025 71,222 16,400 (+1%) 129,220 3,645 2,097,152
merge-rollup 59.6 N/A 35,742 664 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 66,701 N/A N/A N/A

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
ContractClassRegisterer:register 1,344 11,731 342 N/A N/A
ContractInstanceDeployer:deploy 1,408 11,731 18.3 N/A N/A
MultiCallEntrypoint:entrypoint 1,920 11,731 477 (-1%) N/A N/A
FeeJuice:deploy 1,376 11,731 389 (+1%) N/A N/A
SchnorrAccount:constructor 1,312 11,731 177 (-1%) N/A N/A
SchnorrAccount:entrypoint 2,304 11,731 540 N/A N/A
Token:privately_mint_private_note 1,280 11,731 223 (-3%) N/A N/A
FPC:fee_entrypoint_public 1,344 11,731 33.0 (-3%) N/A N/A
Token:transfer 1,312 11,731 456 (-1%) N/A N/A
AuthRegistry:set_authorized (avm) 18,491 N/A N/A 147,296 2,492 (-6%)
FPC:prepare_fee (avm) 22,958 N/A N/A 147,360 3,156 (-2%)
Token:transfer_public (avm) 61,614 N/A N/A 147,360 17,373 (-2%)
AuthRegistry:consume (avm) 41,719 N/A N/A 147,328 7,459 (-1%)
FPC:pay_refund (avm) 26,227 N/A N/A 147,328 7,448 (+2%)
Benchmarking:create_note 1,344 11,731 169 (-1%) N/A N/A
SchnorrAccount:verify_private_authwit 1,280 11,731 27.2 (-1%) N/A N/A
Token:unshield 1,376 11,731 737 (+1%) N/A N/A
FPC:fee_entrypoint_private 1,376 11,731 971 N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 95.5 8,139
FeeJuice:set_portal 9.79 (-5%) 2,362
Token:constructor 123 31,107
FPC:constructor 94.0 (+1%) 22,380
FeeJuice:mint_public 79.0 (-4%) 6,150
Token:mint_public 84.7 (-11%) 11,720
Token:assert_minter_and_mint 90.3 (+8%) 8,028
AuthRegistry:set_authorized 10.0 (+4%) 4,537
FPC:prepare_fee 287 (+1%) 8,812
Token:transfer_public 30.7 (+10%) 47,374
FPC:pay_refund 62.9 (-7%) 12,114
Benchmarking:increment_balance 1,011 7,450
Token:_increase_public_balance ⚠️ 78.6 (+713%) 8,960
FPC:pay_refund_with_shielded_rebate ⚠️ 72.1 (-49%) 12,663

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 2.17 3.89 (-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.110 (-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.8 (+1%) 17.5 (-1%) 30.8 (-2%) 58.6 (-3%) 116 (+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.113 (+2%) 0.102 (-1%) 0.100 (-2%) 0.101 (-3%) 0.104 (+2%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.3 (-1%) 25.0 (-2%) 43.6 (-2%) 82.4 (-2%) 160 (-1%)
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.109 0.102 (-2%) 0.106 (-1%) 0.102 (-1%) 0.101 (-1%)
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 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.105 (-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,756 668,997

Transaction size based on fee payment method

| Metric | |
| - | |

@@ -165,6 +194,7 @@ jobs:
- name: Deploy Aztec Nodes
working-directory: ./yarn-project/aztec/terraform/node
run: |
env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a debug leftover but I don't think it's worth delaying the merge.

@alexghr
Copy link
Contributor

alexghr commented Aug 8, 2024

This was merged in #7822

@alexghr alexghr closed this Aug 8, 2024
@spypsy spypsy reopened this Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

Changes to circuit sizes

Generated at commit: cb7c9e07074db7a5bcdfa5a61fba8036457c8a44, compared to commit: e5c6ced2f6672655734c95b7543db4da573a023d

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail_simulated 0 ➖ 0.00% +222 ❌ +49.78%
private_kernel_empty_simulated 0 ➖ 0.00% +222 ❌ +49.44%
private_kernel_tail_simulated 0 ➖ 0.00% +222 ❌ +49.44%
private_kernel_empty +222 ❌ +11.57% +444 ❌ +5.08%
rollup_base +4,997 ❌ +1.45% +210,357 ❌ +2.44%
public_kernel_app_logic_simulated 0 ➖ 0.00% +16 ❌ +0.44%
public_kernel_setup_simulated 0 ➖ 0.00% +16 ❌ +0.44%
public_kernel_teardown_simulated 0 ➖ 0.00% +16 ❌ +0.44%
private_kernel_tail_to_public_simulated 0 ➖ 0.00% +16 ❌ +0.44%
public_kernel_app_logic +76 ❌ +0.03% +77 ❌ +0.01%
public_kernel_setup +72 ❌ +0.03% +170 ❌ +0.01%
public_kernel_teardown +76 ❌ +0.03% +173 ❌ +0.01%
public_kernel_tail +2,177 ❌ +0.22% -145,097 ✅ -1.56%
private_kernel_tail_to_public -984 ✅ -1.32% -55,269 ✅ -31.60%
private_kernel_tail -3,899 ✅ -21.00% -207,790 ✅ -81.83%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail_simulated 1 (0) 0.00% 668 (+222) +49.78%
private_kernel_empty_simulated 1 (0) 0.00% 671 (+222) +49.44%
private_kernel_tail_simulated 1 (0) 0.00% 671 (+222) +49.44%
private_kernel_empty 2,141 (+222) +11.57% 9,179 (+444) +5.08%
rollup_base 349,423 (+4,997) +1.45% 8,819,294 (+210,357) +2.44%
public_kernel_app_logic_simulated 1 (0) 0.00% 3,634 (+16) +0.44%
public_kernel_setup_simulated 1 (0) 0.00% 3,634 (+16) +0.44%
public_kernel_teardown_simulated 1 (0) 0.00% 3,634 (+16) +0.44%
private_kernel_tail_to_public_simulated 1 (0) 0.00% 3,637 (+16) +0.44%
public_kernel_app_logic 294,532 (+76) +0.03% 596,065 (+77) +0.01%
public_kernel_setup 217,039 (+72) +0.03% 1,576,592 (+170) +0.01%
public_kernel_teardown 296,142 (+76) +0.03% 1,657,335 (+173) +0.01%
public_kernel_tail 1,006,333 (+2,177) +0.22% 9,127,983 (-145,097) -1.56%
private_kernel_tail_to_public 73,419 (-984) -1.32% 119,640 (-55,269) -31.60%
private_kernel_tail 14,666 (-3,899) -21.00% 46,143 (-207,790) -81.83%

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.

4 participants