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

fix: CCI issues #7043

Closed
wants to merge 4 commits into from
Closed

fix: CCI issues #7043

wants to merge 4 commits into from

Conversation

spypsy
Copy link
Member

@spypsy spypsy commented Jun 13, 2024

  • Fixes avm-transpiler multi-arch image
  • Fixes aztec-up terraform apply & only publishes on tagged releases

@spypsy spypsy marked this pull request as ready for review June 13, 2024 13:33
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 565 (+723%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 71.8 (-67%)
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,730 1,547 695 748 (+2%) 768
proof_construction_time_sha256_30_ms 11,416 3,058 1,364 1,404 (-1%) 1,452
proof_construction_time_sha256_100_ms 43,906 11,758 5,416 5,400 5,349
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 (+2%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,519 416 200 224 275 (+3%)
proof_construction_time_poseidon_hash_100_ms 5,741 1,558 722 (-1%) 770 (-3%) 793

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,464 9,446 9,464
l1_rollup_execution_gas 610,285 610,267 610,285
l2_block_processing_time_in_ms 746 (-2%) 1,407 (+1%) 2,684
l2_block_building_time_in_ms 22,912 (-1%) 46,177 91,638 (+2%)
l2_block_rollup_simulation_time_in_ms 22,822 (-1%) 45,888 91,299 (+2%)
l2_block_public_tx_process_time_in_ms 19,565 (-1%) 42,411 87,756 (+2%)

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 6,435 (+1%) 9,350 (+2%)
node_database_size_in_bytes 10,567,760 14,467,152 (+1%)
pxe_database_size_in_bytes 9,242 15,127

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 129 494 (+1%) 12,315 (+1%) 20,634 65,142 90,304 2,755 524,288
private-kernel-inner 389 998 (-11%) 44,832 92,854 65,142 90,304 2,755 2,097,152
private-kernel-tail 369 (-1%) 1,863 (+1%) 46,109 (+5%) 97,073 73,629 14,912 399 2,097,152
base-parity 6.30 1,778 (+1%) 2,587 (+2%) 128 64.0 2,208 2.00 131,072
root-parity 51.5 (+2%) 48.1 (+2%) 33,977 27,100 64.0 2,720 18.0 2,097,152
base-rollup 7,793 (+1%) 4,365 (-2%) 72,155 170,330 756 3,648 47.0 4,194,304
root-rollup 112 63.9 19,405 (-2%) 25,309 620 3,456 41.0 1,048,576
public-kernel-setup 699 (+1%) 2,880 (+1%) 38,139 (-1%) 113,321 91,286 123,296 3,786 2,097,152
public-kernel-app-logic 594 3,895 (-2%) 39,626 (+1%) 113,321 91,286 123,296 3,786 2,097,152
public-kernel-tail 1,182 (+1%) 27,954 (-11%) 156,664 (-5%) 412,582 10,014 14,912 399 8,388,608
private-kernel-reset-small 589 2,153 (+1%) 40,997 121,265 65,142 90,304 2,755 2,097,152
public-kernel-teardown 600 (+2%) 3,907 39,666 (-1%) 113,321 91,286 123,296 3,786 2,097,152
merge-rollup 29.4 N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A 7,128 85,138 (-13%) N/A N/A 123,296 3,786 4,194,304
avm-circuit N/A N/A 3,129 (-2%) N/A N/A 86,117 0.00 0.00

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,344 9,944 404 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 41.1 (-1%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,993 N/A N/A N/A N/A
GasToken:deploy 1,376 9,944 962 (-1%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,457 N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,819 16,768 50,636 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,859 (+7%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 336 16,768 10,239 (+2%) 524,288 457
Token:transfer 1,312 9,944 4,901 16,768 46,374 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,401 N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 75.9 N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,943 (-1%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,884 N/A N/A N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms
GasToken:_increase_public_balance 69.3 (-1%)
GasToken:set_portal 16.6 (-1%)
Token:constructor 96.1 (+2%)
FPC:constructor 62.6 (-1%)
GasToken:mint_public 53.0 (-3%)
Token:mint_public ⚠️ 565 (+723%)
Token:assert_minter_and_mint ⚠️ 71.8 (-67%)
SchnorrAccount:approve_public_authwit 31.4 (-1%)
FPC:prepare_fee 73.3 (-8%)
Token:transfer_public 38.4 (-13%)
FPC:pay_refund 64.1 (+8%)
Benchmarking:increment_balance 2,438 (+1%)
Token:_increase_public_balance 69.1 (+20%)
FPC:pay_refund_with_shielded_rebate 50.8 (-2%)

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.178

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.3 17.1 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.7 31.8 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.599 0.525 (+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.4 75.1 130 (-2%) 244 468
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 288 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.495 0.463 0.447 (-1%) 0.443 (+1%) 0.437
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.5 111 180 (-2%) 351 689
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 208 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.504 0.497 0.480 (-1%) 0.476 0.473
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 74.4 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 135 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.520 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 83,854 676,749

Transaction size based on fee payment method

| Metric | |
| - | |

@dbanks12 dbanks12 enabled auto-merge (squash) June 13, 2024 13:51
@dbanks12 dbanks12 disabled auto-merge June 13, 2024 13:51
@spypsy
Copy link
Member Author

spypsy commented Jun 13, 2024

closing in favour of #7045

@spypsy spypsy closed this Jun 13, 2024
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.

3 participants