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

feat: Use gas fees from historical header for computing tx fee #6010

Closed
wants to merge 1 commit into from

Conversation

spalladino
Copy link
Collaborator

Built on #5941

@spalladino spalladino force-pushed the palla/use-gas-fees-from-previous-block branch from 68be373 to 89f7135 Compare April 24, 2024 22:32
@AztecBot
Copy link
Collaborator

AztecBot commented Apr 24, 2024

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (8): 69.4 (+399%)
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.

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 772 772 772
l1_rollup_calldata_gas 6,844 6,832 6,832
l1_rollup_execution_gas 587,325 587,313 587,313
l2_block_processing_time_in_ms 1,582 (+8%) 5,465 (+1%) 10,538
note_successful_decrypting_time_in_ms 181 (-20%) 563 (+3%) 1,114 (+1%)
note_trial_decrypting_time_in_ms ⚠️ 69.4 (+399%) 63.0 (+49%) 141 (+19%)
l2_block_building_time_in_ms 18,881 73,274 145,972 (-1%)
l2_block_rollup_simulation_time_in_ms 18,665 72,526 144,518 (-1%)
l2_block_public_tx_process_time_in_ms 8,539 33,261 66,790 (-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 16,566 (+5%) 31,447 (+2%)
note_history_successful_decrypting_time_in_ms 1,295 (-2%) 2,755
note_history_trial_decrypting_time_in_ms 79.1 (-4%) 154 (+5%)
node_database_size_in_bytes 19,169,360 35,754,064
pxe_database_size_in_bytes 29,859 59,414

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 158 (-4%) 47,763 31,978
private-kernel-inner 177 (-4%) 80,794 31,978
private-kernel-ordering 137 (-4%) 57,732 50,043
base-parity 9.21 (-12%) 128 265
root-parity 72.5 (+1%) 1,244 265
base-rollup 12,266 (-1%) 110,926 957
root-rollup 49.5 (-4%) 4,551 821
public-kernel-app-logic 1,552 (-1%) 62,017 26,202
public-kernel-tail 4,224 (-1%) 168,566 3,812
merge-rollup 3,146 (-1%) 2,760 957
public-kernel-teardown 118 (-2%) 62,017 34,711
public-kernel-setup 132 (-2%) 62,017 34,711

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 11.0 (-1%) 17.7 (-4%) 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.8 31.6 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.637 (-1%) 0.546 (-4%) 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 51.9 80.6 261 502 981 1,946 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 96.0 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.532 0.497 0.476 0.469 0.466 0.465 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.8 (-2%) 119 376 (-1%) 743 (+1%) 1,457 2,911 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 105 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.537 (-2%) 0.535 0.510 0.511 (+1%) 0.506 0.507 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 67.8 (-1%)
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 109
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.590 (-1%)

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 51,411 543,524

Transaction size based on fee payment method

Metric native fee payment method fpc_public fee payment method fpc_private fee payment method
tx_with_fee_size_in_bytes 897 1,145 1,345

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 1,286 (-3%) 867 (-4%) 3,479 (-1%)
Metric 1 public data writes 2 public data writes 3 public data writes 4 public data writes 5 public data writes 8 public data writes
tx_sequencer_processing_time_ms 838 (-2%) 760 (-5%) 1,348 (-4%) 901 (-5%) 2,065 (-4%) 1,089 (-4%)

Base automatically changed from palla/wire-gas-again to master April 24, 2024 23:00
Copy link
Contributor

github-actions bot commented Apr 24, 2024

Changes to circuit sizes

Generated at commit: 9790a39fd45e14542ee01b0f3eee84274504ab25, compared to commit: 4cee8e0644780e527395da452a831055ec41a4c7

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_teardown +3 ❌ +0.00% +3 ❌ +0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_teardown 71,594 (+3) +0.00% 299,169 (+3) +0.00%

@spalladino spalladino force-pushed the palla/use-gas-fees-from-previous-block branch from 89f7135 to 4daead1 Compare April 25, 2024 11:27
@spalladino spalladino force-pushed the palla/use-gas-fees-from-previous-block branch from 4daead1 to 34792a6 Compare April 25, 2024 14:26
@spalladino
Copy link
Collaborator Author

Superseded by #6031

@spalladino spalladino closed this Apr 25, 2024
@ludamad ludamad deleted the palla/use-gas-fees-from-previous-block branch August 22, 2024 15:01
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.

2 participants