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

docs: documenting fields #7468

Merged
merged 1 commit into from
Jul 15, 2024
Merged

docs: documenting fields #7468

merged 1 commit into from
Jul 15, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Jul 15, 2024

I was very confused with what our fields actually are. This PR clarifies it.

Copy link
Contributor Author

benesjan commented Jul 15, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @benesjan and the rest of your teammates on Graphite Graphite

@benesjan benesjan marked this pull request as ready for review July 15, 2024 09:49
@benesjan benesjan enabled auto-merge (squash) July 15, 2024 09:49
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 329 (+486%)
  • avm_simulation_time_ms (Token:_increase_public_balance): 78.9 (+404%)
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,728 1,540 702 (-1%) 744 (+1%) 768 (-1%)
proof_construction_time_sha256_30_ms 11,716 (-1%) 3,149 1,408 1,444 (+1%) 1,479 (+1%)
proof_construction_time_sha256_100_ms 43,855 11,740 (-1%) 6,039 (+11%) 5,368 (-1%) 5,347
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 89.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,519 415 201 222 267
proof_construction_time_poseidon_hash_100_ms 5,620 1,517 677 (-1%) 728 (-1%) 744

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 708 708 708
l1_rollup_calldata_gas 6,600 6,590 6,600
l1_rollup_execution_gas 583,062 583,203 583,364
l2_block_processing_time_in_ms 763 (+1%) 1,414 2,718 (+1%)
l2_block_building_time_in_ms 13,291 (+2%) 26,024 51,059 (+1%)
l2_block_rollup_simulation_time_in_ms 13,291 (+2%) 26,024 51,059 (+1%)
l2_block_public_tx_process_time_in_ms 11,118 (+2%) 23,667 48,692 (+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,071 (-2%) 9,822 (-1%)
node_database_size_in_bytes 12,415,056 16,441,424
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 116 (+1%) 389 (-1%) 21,732 54,085 N/A N/A N/A N/A
private-kernel-inner 229 697 (-2%) 81,199 54,264 N/A N/A N/A N/A
private-kernel-tail 1,127 (-2%) 2,450 61,808 61,554 N/A N/A N/A N/A
base-parity 6.43 (-2%) 789 (-1%) 160 96.0 1,393 (-4%) 12,676 3.00 131,072
root-parity 107 (-2%) 115 64,860 96.0 30,332 (-5%) 12,676 3.00 4,194,304
base-rollup 4,212 4,844 (-1%) 180,315 632 43,669 (-1%) 13,476 28.0 4,194,304
root-rollup 152 117 (+2%) 51,261 652 28,341 (-2%) 13,412 26.0 4,194,304
public-kernel-setup 193 (-3%) 2,328 (-4%) 112,536 80,310 18,070 (-1%) 118,916 3,323 2,097,152
public-kernel-app-logic 150 3,240 (-2%) 112,536 80,310 10,437 118,916 3,323 1,048,576
public-kernel-tail 894 26,572 (-4%) 409,413 10,046 66,269 (-2%) 24,868 384 8,388,608
private-kernel-reset-tiny 297 981 (-2%) 77,007 53,954 N/A N/A N/A N/A
private-kernel-tail-to-public 6,635 (-1%) 2,811 777,415 1,632 N/A N/A N/A N/A
public-kernel-teardown 139 (+1%) 3,197 (-3%) 112,536 80,310 18,501 (-4%) 118,916 3,323 2,097,152
merge-rollup 57.4 N/A 33,566 632 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 168,881 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,312 9,344 393 N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 24.9 N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 624 (+1%) N/A N/A
GasToken:deploy 1,344 9,344 565 N/A N/A
SchnorrAccount:constructor 1,280 9,344 429 N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 762 N/A N/A
Token:privately_mint_private_note 1,248 9,344 502 (+1%) N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 100 (+1%) N/A N/A
Token:transfer 1,280 9,344 1,460 N/A N/A
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 95,392 2,163 (+1%)
FPC:prepare_fee (avm) 26,664 N/A N/A 95,456 2,888 (+1%)
Token:transfer_public (avm) 42,914 N/A N/A 95,456 3,274 (+2%)
AuthRegistry:consume (avm) 33,100 N/A N/A 95,424 2,763 (-2%)
FPC:pay_refund (avm) 36,829 N/A N/A 95,424 10,549 (-4%)
Benchmarking:create_note 1,312 9,344 423 (-1%) N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.3 (-1%) N/A N/A
Token:unshield 1,344 9,344 1,178 (-1%) N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,556 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 98.7 (-1%) 13,790
GasToken:set_portal 11.8 (+1%) 3,339
Token:constructor 123 (-5%) 23,692
FPC:constructor 91.2 (-2%) 13,592
GasToken:mint_public 80.3 (-3%) 10,158
Token:mint_public ⚠️ 329 (+486%) 19,034
Token:assert_minter_and_mint 83.0 (+21%) 12,925
AuthRegistry:set_authorized 44.2 (-1%) 7,812
FPC:prepare_fee 109 (-1%) 15,062
Token:transfer_public 41.1 (-4%) 31,218
FPC:pay_refund 125 (-9%) 25,260
Benchmarking:increment_balance 1,345 15,267
Token:_increase_public_balance ⚠️ 78.9 (+404%) 15,006
FPC:pay_refund_with_shielded_rebate 181 (-1%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.162 (+5%)

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 16.7 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.600 0.514 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.1 75.9 131 (+1%) 246 472 (+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.492 0.466 0.452 (+1%) 0.445 0.440 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.5 112 (+1%) 183 (+1%) 353 695 (+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.503 0.501 0.485 (+1%) 0.478 0.476 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 72.7 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.517 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 76,847 667,838

Transaction size based on fee payment method

| Metric | |
| - | |

@benesjan benesjan merged commit 05a11a1 into master Jul 15, 2024
93 checks passed
@benesjan benesjan deleted the 07-15-docs_documenting_fields branch July 15, 2024 10:49
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