Skip to content

feat: sum fees in block and pay out - #6482

Closed
just-mitch wants to merge 1 commit into
05-15-feat_add_totalfees_to_global_variablesfrom
05-16-feat_sum_fees_in_block_and_pay_out
Closed

feat: sum fees in block and pay out#6482
just-mitch wants to merge 1 commit into
05-15-feat_add_totalfees_to_global_variablesfrom
05-16-feat_sum_fees_in_block_and_pay_out

Conversation

@just-mitch

Copy link
Copy Markdown
Collaborator

Please read contributing guidelines and remove this line.

just-mitch commented May 16, 2024

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

Join @just-mitch and the rest of your teammates on Graphite Graphite

@github-actions

github-actions Bot commented May 16, 2024

Copy link
Copy Markdown
Contributor

Changes to circuit sizes

Generated at commit: 15ee7f67c0b37ae6f150ec86995ecf9f4b2d487d, compared to commit: b5a573e9680e8288e13b22c8854abdd9d8034586

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base_simulated 0 ➖ 0.00% +1 ❌ +2.13%
rollup_root +1 ❌ +0.07% +1 ❌ +0.00%
rollup_base +2 ❌ +0.00% +3 ❌ +0.00%
rollup_merge +2 ❌ +0.66% 0 ➖ 0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base_simulated 1 (0) 0.00% 48 (+1) +2.13%
rollup_root 1,408 (+1) +0.07% 296,071 (+1) +0.00%
rollup_base 181,039 (+2) +0.00% 1,772,809 (+3) +0.00%
rollup_merge 306 (+2) +0.66% 45,980 (0) 0.00%

@just-mitch
just-mitch force-pushed the 05-16-feat_sum_fees_in_block_and_pay_out branch from 8b748f1 to 9523429 Compare May 16, 2024 20:31
@AztecBot

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • app_circuit_proving_time_in_ms (Test:emit_nullifier): 2,744 (+20%)
  • app_circuit_proving_time_in_ms (FPC:fee_entrypoint_public): 16,619 (+90%)
  • app_circuit_proving_time_in_ms (FPC:fee_entrypoint_private): 9,060 (-49%)
  • app_circuit_proving_time_in_ms (Token:unshield): 37,039 (-20%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 968 (+79%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-teardown): 387 (-16%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 791 (-19%)
  • protocol_circuit_proving_time_in_ms (public-kernel-setup): 1,084 (+20%)
  • protocol_circuit_proving_time_in_ms (merge-rollup): 2,165 (+36%)
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 (+4%) 772 (+4%) 772 (+4%)
l1_rollup_calldata_gas 6,856 (+2%) 6,868 (+3%) 6,856 (+3%)
l1_rollup_execution_gas 587,411 587,423 587,411
l2_block_processing_time_in_ms 1,609 6,057 12,051
l2_block_building_time_in_ms 35,335 138,890 275,693
l2_block_rollup_simulation_time_in_ms 35,117 138,104 274,066
l2_block_public_tx_process_time_in_ms 16,609 (+1%) 71,021 (+1%) 141,826

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 18,057 33,718
node_database_size_in_bytes 21,373,008 38,027,344
pxe_database_size_in_bytes 29,868 59,425

Circuits stats

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

Circuit protocol_circuit_simulation_time_in_ms protocol_circuit_witness_generation_time_in_ms protocol_circuit_proving_time_in_ms protocol_circuit_input_size_in_bytes protocol_circuit_output_size_in_bytes protocol_circuit_proof_size_in_bytes protocol_circuit_num_public_inputs protocol_circuit_size_in_gates
private-kernel-init 162 (-1%) 3,576 (-1%) 22,583 (+6%) 20,508 62,502 85,504 2,605 1,048,576
private-kernel-inner 539 4,296 (-4%) 45,858 (+6%) 90,079 62,502 85,504 2,605 2,097,152
private-kernel-reset 1,001 6,539 (+4%) 88,729 (+1%) 330,936 62,502 85,504 2,605 4,194,304
private-kernel-tail 537 4,971 (+6%) 38,812 (+3%) 87,352 79,515 10,720 (+1%) 268 (+1%) 2,097,152
base-parity 8.18 (-1%) ⚠️ 968 (+79%) 4,120 (+3%) 128 64.0 2,208 2.00 131,072
root-parity 51.6 131 (-2%) 40,412 (+4%) 27,064 64.0 2,720 18.0 2,097,152
base-rollup 932 (+1%) 5,043 (+6%) 43,337 (+1%) 111,222 989 (+7%) 3,168 (+2%) 32.0 (+7%) 2,097,152
root-rollup 72.8 174 (+1%) 8,395 (+2%) 11,582 (+1%) 821 (+4%) 3,456 (+1%) 41.0 (+3%) 524,288
public-kernel-app-logic 195 (+1%) 310 (-12%) ⚠️ 791 (-19%) 97,079 85,159 113,536 3,481 4,096
public-kernel-tail 892 938 (-3%) 1,099 (+3%) 388,241 7,787 (+1%) 10,208 (+1%) 252 (+1%) 512
public-kernel-setup 166 (+2%) 373 (-8%) ⚠️ 1,084 (+20%) 137,381 85,159 113,536 3,481 4,096
public-kernel-teardown 171 ⚠️ 387 (-16%) 957 (-10%) 142,267 85,159 113,536 3,481 4,096
merge-rollup 7.00 (+2%) 87.8 (+3%) ⚠️ 2,165 (+36%) 2,824 (+5%) 989 (+7%) 3,168 (+2%) 32.0 (+7%) 65,536
private-kernel-tail-to-public N/A 10,495 (+10%) 68,547 (-1%) N/A N/A 114,048 3,497 4,194,304

Stats on running time collected for app circuits

Function app_circuit_proof_size_in_bytes app_circuit_proving_time_in_ms app_circuit_size_in_gates app_circuit_num_public_inputs
SchnorrAccount:entrypoint 15,552 48,073 (-1%) 2,097,152 419
Test:emit_nullifier 15,552 ⚠️ 2,744 (+20%) 65,536 419
FPC:fee_entrypoint_public 15,552 ⚠️ 16,619 (+90%) 524,288 419
Token:transfer 15,552 39,705 (+1%) 2,097,152 419
FPC:fee_entrypoint_private 15,552 ⚠️ 9,060 (-49%) 524,288 419
Token:unshield 15,552 ⚠️ 37,039 (-20%) 2,097,152 419
SchnorrAccount:spend_private_authwit 15,552 2,690 (+1%) 131,072 419

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 13.1 21.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.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.767 0.660 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 62.0 97.6 (-1%) 317 613 1,200 2,379 (+1%) 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.636 0.604 (-1%) 0.576 0.573 (+1%) 0.569 0.569 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 73.9 143 455 897 1,774 3,531 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.645 0.645 0.619 0.618 0.615 0.616 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 80.8
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 108
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.710

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 84,505 673,247

Transaction size based on fee payment method

| Metric | |
| - | |

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 37,689 (+1%) 3,683 114,210 (+2%)
Metric 0 public data writes 1 public data writes 2 public data writes 4 public data writes 8 public data writes
tx_sequencer_processing_time_ms 1,317 (-14%) 2,273 (+1%) 1,907 2,831 (-1%) 1,816

@just-mitch

Copy link
Copy Markdown
Collaborator Author

Close in favor of #6522

@just-mitch just-mitch closed this May 17, 2024
@ludamad
ludamad deleted the 05-16-feat_sum_fees_in_block_and_pay_out branch August 22, 2024 15:27
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