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

chore(proving): post prover system move fixes #7435

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

ludamad
Copy link
Collaborator

@ludamad ludamad commented Jul 10, 2024

The original PR #6971 was too much to delay any further, these are the straggler fixups post merge

@ludamad ludamad force-pushed the ad/proving-system-switch-fast-follow branch from 3e12015 to 951069a Compare July 11, 2024 00:03
Copy link
Contributor

github-actions bot commented Jul 11, 2024

Changes to circuit sizes

Generated at commit: 512459ce8ad72961b03eae07298cbabe709fc4f4, compared to commit: 2e41ac7d6b3c0e9e0bf02a8687f9c3d7446a08c6

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail_to_public +8,662 ❌ +13.91% +11,615 ❌ +2.34%
public_kernel_tail +4,898 ❌ +0.51% +4,946 ❌ +0.11%
private_kernel_init +36 ❌ +0.14% +45 ❌ +0.10%
rollup_base +93 ❌ +0.03% +283 ❌ +0.01%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail_to_public 70,949 (+8,662) +13.91% 508,117 (+11,615) +2.34%
public_kernel_tail 970,224 (+4,898) +0.51% 4,667,997 (+4,946) +0.11%
private_kernel_init 26,126 (+36) +0.14% 45,307 (+45) +0.10%
rollup_base 339,866 (+93) +0.03% 3,761,341 (+283) +0.01%

@ludamad ludamad enabled auto-merge (squash) July 11, 2024 00:20
@ludamad ludamad changed the title chore(proving): post honk branch fixes chore(proving): post prover system move fixes Jul 11, 2024
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • proof_construction_time_sha256_100_ms (16): 6,482 (+20%)
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,716 (-1%) 1,539 (-1%) 702 (-1%) 744 (-1%) 772 (-1%)
proof_construction_time_sha256_30_ms 11,728 (-1%) 3,147 (-1%) 1,410 1,440 (-1%) 1,456 (-1%)
proof_construction_time_sha256_100_ms 43,840 11,767 (-1%) ⚠️ 6,482 (+20%) 5,406 5,384 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 60.0 (+3%) 88.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,514 (-1%) 414 (-1%) 200 225 (+1%) 266 (-1%)
proof_construction_time_poseidon_hash_100_ms 5,608 (-1%) 1,514 (-1%) 676 742 (+2%) 752

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 708 708 708
l1_rollup_calldata_gas 6,588 6,596 6,576
l1_rollup_execution_gas 583,050 583,209 583,340
l2_block_processing_time_in_ms 751 (-2%) 1,426 (+1%) 2,698 (-1%)
l2_block_building_time_in_ms 13,128 (-1%) 26,125 50,763 (-1%)
l2_block_rollup_simulation_time_in_ms 13,128 (-1%) 26,125 50,763 (-1%)
l2_block_public_tx_process_time_in_ms 10,990 (-1%) 23,770 48,387 (-1%)

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 7,066 (+1%) 9,989 (+2%)
node_database_size_in_bytes 12,427,344 16,175,184
pxe_database_size_in_bytes 16,254 26,813

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 input_size_in_bytes output_size_in_bytes proving_time_in_ms proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 115 433 (+3%) 21,737 54,085 N/A N/A N/A N/A
private-kernel-inner 246 802 (+7%) 81,199 54,264 N/A N/A N/A N/A
private-kernel-tail 1,122 (+1%) 2,657 (+4%) 61,808 61,554 N/A N/A N/A N/A
base-parity 6.59 825 160 96.0 1,323 (-1%) 12,676 3.00 131,072
root-parity 109 108 (-4%) 64,860 96.0 44,663 (+1%) 12,676 3.00 4,194,304
base-rollup 4,238 5,012 (-1%) 180,315 632 44,643 13,476 28.0 4,194,304
root-rollup 154 (-1%) 109 (-1%) 51,261 652 37,686 13,412 26.0 4,194,304
public-kernel-setup 197 (+1%) 2,370 (+1%) 112,536 80,310 19,909 118,916 3,323 2,097,152
public-kernel-app-logic 151 (+1%) 3,248 112,536 80,310 8,757 (-2%) 118,916 3,323 1,048,576
public-kernel-tail 900 21,572 (+5%) 409,413 10,046 66,167 24,868 384 8,388,608
private-kernel-reset-small 341 (+3%) 1,120 (-1%) 85,493 53,954 N/A N/A N/A N/A
private-kernel-tail-to-public 6,176 (+8%) 3,141 (+2%) 868,634 1,632 N/A N/A N/A N/A
public-kernel-teardown 141 (+1%) 3,288 112,536 80,310 20,402 (-1%) 118,916 3,323 2,097,152
merge-rollup 58.6 (+1%) N/A 33,566 632 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 163,205 (+1%) N/A N/A N/A

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
ContractClassRegisterer:register 1,312 9,344 393 (-1%) N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.5 N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 624 N/A N/A
GasToken:deploy 1,344 9,344 563 (-2%) N/A N/A
SchnorrAccount:constructor 1,280 9,344 436 N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 776 N/A N/A
Token:privately_mint_private_note 1,248 9,344 521 N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 104 (-2%) N/A N/A
Token:transfer 1,280 9,344 1,606 N/A N/A
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 95,392 2,426 (+5%)
FPC:prepare_fee (avm) 26,664 N/A N/A 95,456 3,020 (-2%)
Token:transfer_public (avm) 42,914 N/A N/A 95,456 3,365
AuthRegistry:consume (avm) 33,100 N/A N/A 95,424 2,938 (-1%)
FPC:pay_refund (avm) 36,829 N/A N/A 95,424 10,421 (+2%)
Benchmarking:create_note 1,312 9,344 423 N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.6 N/A N/A
Token:unshield 1,344 9,344 1,317 (+1%) N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,686 (+1%) N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
GasToken:_increase_public_balance 100 13,790
GasToken:set_portal 11.9 (-2%) 3,339
Token:constructor 122 23,692
FPC:constructor 93.3 13,592
GasToken:mint_public 81.5 (-1%) 10,158
Token:mint_public 57.1 (-9%) 19,034
Token:assert_minter_and_mint 89.7 (-14%) 12,925
AuthRegistry:set_authorized 42.9 (-4%) 7,812
FPC:prepare_fee 101 (-10%) 15,062
Token:transfer_public 38.3 (+2%) 31,218
FPC:pay_refund 145 (+9%) 25,260
Benchmarking:increment_balance 1,348 15,267
Token:_increase_public_balance 15.1 (+1%) 15,006
FPC:pay_refund_with_shielded_rebate 183 (+2%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.155 (+1%)

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
batch_insert_into_append_only_tree_16_depth_ms 10.4 16.8 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.603 0.518 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.4 75.8 (-1%) 130 (-2%) 246 468 (-1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.495 0.466 (-1%) 0.448 (-1%) 0.445 0.437 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.0 111 (-1%) 182 (-1%) 354 689 (-1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.507 0.500 0.481 (-1%) 0.480 0.473 (-1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 73.1 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 133 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.520 N/A N/A N/A N/A

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 76,837 667,838

Transaction size based on fee payment method

| Metric | |
| - | |

@ludamad ludamad merged commit 86eafa0 into master Jul 11, 2024
90 of 91 checks passed
@ludamad ludamad deleted the ad/proving-system-switch-fast-follow branch July 11, 2024 14:28
rahul-kothari pushed a commit that referenced this pull request Jul 11, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.46.4</summary>

##
[0.46.4](aztec-package-v0.46.3...aztec-package-v0.46.4)
(2024-07-11)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.46.4</summary>

##
[0.46.4](barretenberg.js-v0.46.3...barretenberg.js-v0.46.4)
(2024-07-11)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.46.4</summary>

##
[0.46.4](aztec-packages-v0.46.3...aztec-packages-v0.46.4)
(2024-07-11)


### Features

* Configure world-state to follow the proven chain only
([#7430](#7430))
([2e41ac7](2e41ac7))


### Bug Fixes

* Missing secrets in docs publish
([#7445](#7445))
([840a4b9](840a4b9))


### Miscellaneous

* Apply where statement to impls instead of fns
([#7433](#7433))
([bb201f2](bb201f2))
* **avm:** Codegen cleanup
([#7439](#7439))
([e31887e](e31887e))
* **proving:** Post honk branch fixes
([#7435](#7435))
([86eafa0](86eafa0))
</details>

<details><summary>barretenberg: 0.46.4</summary>

##
[0.46.4](barretenberg-v0.46.3...barretenberg-v0.46.4)
(2024-07-11)


### Miscellaneous

* **avm:** Codegen cleanup
([#7439](#7439))
([e31887e](e31887e))
* **proving:** Post honk branch fixes
([#7435](#7435))
([86eafa0](86eafa0))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Jul 12, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.46.4</summary>

##
[0.46.4](AztecProtocol/aztec-packages@aztec-package-v0.46.3...aztec-package-v0.46.4)
(2024-07-11)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.46.4</summary>

##
[0.46.4](AztecProtocol/aztec-packages@barretenberg.js-v0.46.3...barretenberg.js-v0.46.4)
(2024-07-11)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.46.4</summary>

##
[0.46.4](AztecProtocol/aztec-packages@aztec-packages-v0.46.3...aztec-packages-v0.46.4)
(2024-07-11)


### Features

* Configure world-state to follow the proven chain only
([#7430](AztecProtocol/aztec-packages#7430))
([2e41ac7](AztecProtocol/aztec-packages@2e41ac7))


### Bug Fixes

* Missing secrets in docs publish
([#7445](AztecProtocol/aztec-packages#7445))
([840a4b9](AztecProtocol/aztec-packages@840a4b9))


### Miscellaneous

* Apply where statement to impls instead of fns
([#7433](AztecProtocol/aztec-packages#7433))
([bb201f2](AztecProtocol/aztec-packages@bb201f2))
* **avm:** Codegen cleanup
([#7439](AztecProtocol/aztec-packages#7439))
([e31887e](AztecProtocol/aztec-packages@e31887e))
* **proving:** Post honk branch fixes
([#7435](AztecProtocol/aztec-packages#7435))
([86eafa0](AztecProtocol/aztec-packages@86eafa0))
</details>

<details><summary>barretenberg: 0.46.4</summary>

##
[0.46.4](AztecProtocol/aztec-packages@barretenberg-v0.46.3...barretenberg-v0.46.4)
(2024-07-11)


### Miscellaneous

* **avm:** Codegen cleanup
([#7439](AztecProtocol/aztec-packages#7439))
([e31887e](AztecProtocol/aztec-packages@e31887e))
* **proving:** Post honk branch fixes
([#7435](AztecProtocol/aztec-packages#7435))
([86eafa0](AztecProtocol/aztec-packages@86eafa0))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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