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: Tx receipt serialization to JSON #6711

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

spalladino
Copy link
Collaborator

Thought we had finally got rid of all serialization issues? Never!

@spalladino spalladino force-pushed the palla/fix-tx-receipt-json branch from 5f415f0 to 5bc21c4 Compare May 28, 2024 13:20
@spalladino spalladino merged commit 1d785fd into master May 28, 2024
85 checks passed
@spalladino spalladino deleted the palla/fix-tx-receipt-json branch May 28, 2024 13:57
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • app_circuit_proving_time_in_ms (Token:transfer): 57,956 (+27%)
  • protocol_circuit_proving_time_in_ms (private-kernel-inner): 51,087 (+20%)
  • protocol_circuit_proving_time_in_ms (private-kernel-tail-to-public): 108,994 (+19%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 89,207 (+20%)
  • protocol_circuit_proving_time_in_ms (root-parity): 51,693 (+16%)
  • protocol_circuit_proving_time_in_ms (public-kernel-tail): 185,598 (+20%)
  • protocol_circuit_proving_time_in_ms (root-rollup): 22,554 (+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 | |
| - | |

L2 block published to L1

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

Metric 8 txs 32 txs 64 txs
l1_rollup_calldata_size_in_bytes 1,412 1,412 1,412
l1_rollup_calldata_gas 9,440 9,464 9,476
l1_rollup_execution_gas 616,081 616,105 616,117
l2_block_processing_time_in_ms 1,287 (-1%) 4,788 (-1%) 9,551
l2_block_building_time_in_ms 44,964 178,899 357,183
l2_block_rollup_simulation_time_in_ms 44,793 178,260 355,925
l2_block_public_tx_process_time_in_ms 24,149 101,350 (-1%) 207,148

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 9,483 14,503
node_database_size_in_bytes 14,463,056 21,299,280
pxe_database_size_in_bytes 18,071 29,868

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 161 3,570 (-3%) 24,730 (+7%) 20,630 64,614 89,536 2,731 1,048,576
private-kernel-inner 624 (-1%) 4,071 (-7%) ⚠️ 51,087 (+20%) 92,318 64,614 89,536 2,731 2,097,152
private-kernel-tail 571 2,783 (-9%) 42,185 (+15%) 96,541 77,498 10,656 266 2,097,152
base-parity 6.52 (-1%) 1,229 2,852 (-2%) 128 64.0 2,208 2.00 131,072
root-parity 49.9 78.7 (+1%) ⚠️ 51,693 (+16%) 27,084 64.0 2,720 18.0 2,097,152
base-rollup 674 (-6%) 2,324 (+6%) ⚠️ 89,207 (+20%) 119,610 756 3,648 47.0 4,194,304
root-rollup 110 (-2%) 76.5 (+22%) ⚠️ 22,554 (+16%) 25,297 620 3,456 41.0 1,048,576
public-kernel-app-logic 524 2,930 (-1%) 52,735 (+11%) 104,941 86,302 114,784 3,520 2,097,152
public-kernel-tail 1,089 23,435 (+3%) ⚠️ 185,598 (+20%) 395,386 7,522 10,656 266 8,388,608
private-kernel-reset-small 593 2,355 (+14%) 49,918 (+9%) 120,733 64,614 89,536 2,731 2,097,152
merge-rollup 28.9 (-1%) N/A N/A 16,534 756 N/A N/A N/A
public-kernel-setup 632 (+1%) N/A N/A 104,941 86,302 N/A N/A N/A
public-kernel-teardown 532 (+1%) N/A N/A 104,941 86,302 N/A N/A N/A
private-kernel-tail-to-public N/A 8,316 (-3%) ⚠️ 108,994 (+19%) N/A N/A 114,784 3,520 4,194,304

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 470 (-1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 40.9 (-5%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,414 (-3%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 968 (-4%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,079 (-1%) 16,768 55,186 (+8%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,089 (-5%) N/A N/A N/A N/A
Token:transfer 1,376 9,944 3,992 (-3%) 16,768 ⚠️ 57,956 (+27%) 2,097,152 457
Benchmarking:create_note 1,312 9,944 948 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 217 (-7%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.3 (-4%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,243 (-10%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,052 (-7%) N/A N/A N/A N/A

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 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.4 (-1%) 16.9 (-1%) N/A N/A 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 N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.606 (-1%) 0.519 (-1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.5 75.9 (-1%) 246 (-1%) 473 (-1%) 931 1,848 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 543 1,055 2,079 4,127 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.495 0.468 0.447 0.442 0.440 0.441 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.5 (-1%) 112 (-2%) 356 698 1,387 2,768 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 106 208 692 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.506 (-1%) 0.504 (-1%) 0.483 0.479 0.480 0.480 N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A N/A 62.4
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A N/A 107
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A N/A 0.553

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,794 665,117

Transaction size based on fee payment method

| Metric | |
| - | |

AztecBot added a commit to noir-lang/noir that referenced this pull request May 28, 2024
)

Thought we had finally got rid of all serialization issues? Never!
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