Skip to content

test: Add test to show-case nullifier issue#6958

Closed
LHerskind wants to merge 2 commits into
lh/5864-escrow-tokenfrom
lh/show-break-multi-pxe
Closed

test: Add test to show-case nullifier issue#6958
LHerskind wants to merge 2 commits into
lh/5864-escrow-tokenfrom
lh/show-break-multi-pxe

Conversation

@LHerskind

Copy link
Copy Markdown
Contributor

Please read contributing guidelines and remove this line.

LHerskind commented Jun 6, 2024

Copy link
Copy Markdown
Contributor 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 @LHerskind and the rest of your teammates on Graphite Graphite

@LHerskind LHerskind force-pushed the lh/show-break-multi-pxe branch from ef3cfb1 to ca164ae Compare June 6, 2024 17:42
@github-actions

github-actions Bot commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

Changes to circuit sizes

Generated at commit: 023eae9b8d3a66850a083b835f4ce2f0a6313bd5, compared to commit: 449052ab04e6ddf502fd513e73f6f1d0fb29f3b4

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_reset 0 ➖ 0.00% +128 ❌ +0.01%
private_kernel_reset_big 0 ➖ 0.00% +64 ❌ +0.00%
private_kernel_reset_medium 0 ➖ 0.00% +32 ❌ +0.00%
private_kernel_reset_small 0 ➖ 0.00% +16 ❌ +0.00%
parity_base -1 ✅ -0.29% 0 ➖ 0.00%
parity_root -1 ✅ -0.05% -1 ✅ -0.00%
rollup_merge -4 ✅ -0.30% -4 ✅ -0.00%
rollup_base -2 ✅ -0.00% -23 ✅ -0.00%
public_kernel_tail -70 ✅ -0.01% -70 ✅ -0.00%
public_kernel_setup -981 ✅ -0.40% -981 ✅ -0.06%
public_kernel_app_logic -1,182 ✅ -0.40% -1,183 ✅ -0.06%
public_kernel_teardown -1,341 ✅ -0.45% -1,342 ✅ -0.07%
private_kernel_tail_to_public -105,672 ✅ -18.82% -133,691 ✅ -6.16%
private_kernel_tail -171,622 ✅ -89.67% -207,515 ✅ -14.23%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_reset 241,966 (0) 0.00% 2,546,190 (+128) +0.01%
private_kernel_reset_big 178,779 (0) 0.00% 1,701,907 (+64) +0.00%
private_kernel_reset_medium 147,187 (0) 0.00% 1,279,767 (+32) +0.00%
private_kernel_reset_small 131,390 (0) 0.00% 1,068,696 (+16) +0.00%
parity_base 346 (-1) -0.29% 79,811 (0) 0.00%
parity_root 2,139 (-1) -0.05% 1,129,295 (-1) -0.00%
rollup_merge 1,315 (-4) -0.30% 601,662 (-4) -0.00%
rollup_base 191,347 (-2) -0.00% 2,143,080 (-23) -0.00%
public_kernel_tail 983,065 (-70) -0.01% 4,475,573 (-70) -0.00%
public_kernel_setup 244,113 (-981) -0.40% 1,650,853 (-981) -0.06%
public_kernel_app_logic 294,951 (-1,182) -0.40% 1,847,977 (-1,183) -0.06%
public_kernel_teardown 295,149 (-1,341) -0.45% 1,848,216 (-1,342) -0.07%
private_kernel_tail_to_public 455,774 (-105,672) -18.82% 2,036,774 (-133,691) -6.16%
private_kernel_tail 19,768 (-171,622) -89.67% 1,250,275 (-207,515) -14.23%

@AztecBot

AztecBot commented Jun 6, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • protocol_circuit_witness_generation_time_in_ms (root-parity): 65.2 (+37%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 84,159 (+20%)
  • protocol_circuit_proving_time_in_ms (root-parity): 43,307 (+28%)
  • protocol_circuit_proving_time_in_ms (public-kernel-setup): 44,080 (+17%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 46,363 (+20%)
  • protocol_circuit_proving_time_in_ms (public-kernel-teardown): 46,143 (+19%)
  • protocol_circuit_proving_time_in_ms (public-kernel-tail): 181,170 (+17%)
  • protocol_circuit_proving_time_in_ms (root-rollup): 22,873 (+17%)
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,721 1,550 695 749 (+1%) 772 (+1%)
proof_construction_time_sha256_30_ms 11,397 3,071 1,370 1,412 (-1%) 1,450
proof_construction_time_sha256_100_ms 43,783 11,765 (+1%) 5,435 5,400 5,355
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 57.0 (-2%) 87.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,520 419 201 (-1%) 227 268
proof_construction_time_poseidon_hash_100_ms 5,747 1,581 729 780 (-2%) 799 (+1%)

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 1,412 1,412 1,412
l1_rollup_calldata_gas 9,452 9,454 9,464
l1_rollup_execution_gas 610,273 610,275 610,285
l2_block_processing_time_in_ms 689 1,294 (+4%) 2,452 (+2%)
l2_block_building_time_in_ms 22,522 (+3%) 46,125 (+3%) 88,266 (+5%)
l2_block_rollup_simulation_time_in_ms 22,416 (+3%) 45,760 (+3%) 87,874 (+5%)
l2_block_public_tx_process_time_in_ms 19,239 (+3%) 42,320 (+3%) 84,560 (+5%)

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 5,914 (+3%) 8,546 (+4%)
node_database_size_in_bytes 9,510,992 12,783,696
pxe_database_size_in_bytes 9,242 15,127

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 135 (+3%) 465 (-5%) 13,108 (+4%) 20,634 64,614 89,536 2,731 524,288
private-kernel-inner 389 (+2%) 1,103 (+10%) 48,718 (+7%) 92,326 64,614 89,536 2,731 2,097,152
private-kernel-tail 370 (+2%) 2,128 (+9%) 43,406 (+10%) 96,545 68,261 11,648 297 2,097,152
base-parity 6.37 (-1%) 1,615 (-6%) 2,628 (+7%) 128 64.0 2,208 2.00 131,072
root-parity 48.6 (-3%) ⚠️ 65.2 (+37%) ⚠️ 43,307 (+28%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup 6,521 (+4%) 2,350 (+1%) ⚠️ 84,159 (+20%) 119,738 756 3,648 47.0 4,194,304
root-rollup 109 (-2%) 75.1 (+22%) ⚠️ 22,873 (+17%) 25,309 620 3,456 41.0 1,048,576
public-kernel-app-logic 572 (+4%) 3,438 (-5%) ⚠️ 46,363 (+20%) 108,073 86,550 116,768 3,582 2,097,152
public-kernel-tail 1,142 (+3%) 24,519 (+8%) ⚠️ 181,170 (+17%) 403,238 7,646 11,648 297 8,388,608
private-kernel-reset-small 588 (+3%) 1,939 (-7%) 48,048 (+13%) 120,737 64,614 89,536 2,731 2,097,152
public-kernel-setup 661 2,675 ⚠️ 44,080 (+17%) 108,073 86,550 116,768 3,582 2,097,152
public-kernel-teardown 569 (+1%) 3,534 ⚠️ 46,143 (+19%) 108,073 86,550 116,768 3,582 2,097,152
merge-rollup 29.1 (+3%) N/A N/A 16,542 756 N/A N/A N/A
private-kernel-tail-to-public N/A 6,686 (-6%) 52,323 (+8%) N/A N/A 116,768 3,582 2,097,152

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 459 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 40.2 (-3%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,745 (-2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,420 (-1%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,814 (+1%) 16,768 55,238 (+10%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,558 (-4%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 1,007 (-10%) 16,768 10,940 (+10%) 524,288 457
Token:transfer 1,376 9,944 5,261 (-1%) 16,768 52,647 (+10%) 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,395 (+2%) N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 76.2 (+1%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,907 (+2%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,814 (+2%) 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 256 leaves 512 leaves 1024 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.4 16.8 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
batch_insert_into_append_only_tree_16_depth_hash_ms 0.600 0.514 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.2 76.2 (+2%) 133 247 (+3%) 475 (+2%) N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 288 543 1,055 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.493 0.469 (+2%) 0.455 0.448 (+3%) 0.443 (+2%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.8 113 (+3%) 183 (+1%) 356 (+3%) 700 (+2%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 108 208 355 691 1,363 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.500 0.505 (+2%) 0.486 (+1%) 0.482 (+4%) 0.482 (+3%) N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A 59.6 (+2%)
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A 103
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A 0.548 (+2%)

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 79,470 665,267

Transaction size based on fee payment method

| Metric | |
| - | |

@LHerskind

Copy link
Copy Markdown
Contributor Author

Closed this as it was only used to showcase something a long time ago.

@LHerskind LHerskind closed this Aug 30, 2024
@ludamad ludamad deleted the lh/show-break-multi-pxe branch December 17, 2024 19: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.

2 participants