Skip to content

feat: Added cast opcode and cast calldata#4423

Merged
sirasistant merged 3 commits into
masterfrom
arv/cast_opcode
Feb 9, 2024
Merged

feat: Added cast opcode and cast calldata#4423
sirasistant merged 3 commits into
masterfrom
arv/cast_opcode

Conversation

@sirasistant

@sirasistant sirasistant commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

@AztecBot

AztecBot commented Feb 5, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

No metrics with a significant change found.

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.

Values are compared against data from master at commit bc25f9bd and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,700 180,580 720,100
l1_rollup_calldata_gas 222,880 871,276 3,465,820
l1_rollup_execution_gas 316,071 989,724 3,686,198
l2_block_processing_time_in_ms 1,166 (+2%) 4,709 (+8%) 17,405 (+1%)
note_successful_decrypting_time_in_ms 317 (+1%) 1,085 (+7%) 3,861 (+6%)
note_trial_decrypting_time_in_ms 28.8 (+7%) 43.9 (+4%) 147 (+4%)
l2_block_building_time_in_ms 18,059 (+1%) 71,160 (+1%) 285,934 (+1%)
l2_block_rollup_simulation_time_in_ms 13,281 (+1%) 52,305 (+1%) 210,666 (+1%)
l2_block_public_tx_process_time_in_ms 4,746 (+1%) 18,776 (+1%) 74,981 (+1%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 13,763 26,417
note_history_successful_decrypting_time_in_ms 2,393 (-6%) 4,619 (-1%)
note_history_trial_decrypting_time_in_ms 100 (-37%) 217 (+19%)
node_database_size_in_bytes 17,342,544 33,058,896
pxe_database_size_in_bytes 29,923 59,478

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 308 (+1%) 44,528 25,825
private-kernel-ordering 196 (+1%) 44,145 16,225
base-rollup 1,422 (+1%) 128,654 933
root-rollup 82.6 4,192 729
private-kernel-inner 439 (+1%) 71,331 25,825
public-kernel-private-input 242 (+1%) 32,287 25,825
public-kernel-non-first-iteration 238 (+1%) 32,329 25,825
merge-rollup 8.05 (+3%) 2,712 933

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 128 leaves 64 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.2 11.2 (+6%) 12.8 (+2%) 17.0 28.8 (+26%) 64.1 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 143 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.594 0.628 (+6%) 0.543 (+1%) 0.525 0.601 (+26%) 0.442 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 75.0 47.7 (+1%) 241 (+1%) 461 906 3,584 (+1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 159 96.0 543 1,055 2,079 8,223
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.463 0.488 0.439 (+1%) 0.431 0.430 0.430
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 104 56.9 (+1%) 351 (+1%) 688 1,378 (+1%) 5,438
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 197 104 691 1,363 2,707 10,771
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.493 0.497 0.476 0.473 0.474 0.471
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.7 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A 94.1 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A 0.579 N/A N/A N/A N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 16,859 40,311

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 554 1,314 (+1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.539 (+11%) 580 (+1%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Add CAST opcodes to program type conversions

3 participants