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: Further ClientIVC breakdown #5146

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

codygunton
Copy link
Contributor

@codygunton codygunton commented Mar 12, 2024

Further breakdown of the ClientIVC benchmarks, showing the contributions of major operations (e.g. commitments, combiner computation), and breaking down Protogalaxy prover and ECCVM prover construction costs.

Benchmarking lock created at ~/BENCHMARK_IN_PROGRESS.
client_ivc_bench                                                              100%   15MB  48.4MB/s   00:00    
2024-03-12T03:38:23+00:00
Running ./client_ivc_bench
Run on (16 X 3000 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x8)
  L1 Instruction 32 KiB (x8)
  L2 Unified 1024 KiB (x8)
  L3 Unified 36608 KiB (x1)
Load Average: 0.00, 0.00, 0.11
--------------------------------------------------------------------------------
Benchmark                      Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------
ClientIVCBench/Full/6      29446 ms        24872 ms            1 Decider::construct_proof=1 Decider::construct_proof(t)=753.082M ECCVMComposer::compute_commitment_key=1 ECCVMComposer::compute_commitment_key(t)=3.78026M ECCVMComposer::compute_witness=1 ECCVMComposer::compute_witness(t)=1.73739G ECCVMComposer::create_prover=1 ECCVMComposer::create_prover(t)=3.40893G ECCVMComposer::create_proving_key=1 ECCVMComposer::create_proving_key(t)=1.66752G ECCVMProver::construct_proof=1 ECCVMProver::construct_proof(t)=1.76066G Goblin::merge=11 Goblin::merge(t)=128.627M GoblinTranslatorCircuitBuilder::constructor=1 GoblinTranslatorCircuitBuilder::constructor(t)=56.5845M GoblinTranslatorComposer::create_prover=1 GoblinTranslatorComposer::create_prover(t)=123.279M GoblinTranslatorProver::construct_proof=1 GoblinTranslatorProver::construct_proof(t)=927.524M ProtoGalaxyProver_::accumulator_update_round=10 ProtoGalaxyProver_::accumulator_update_round(t)=3.46156G ProtoGalaxyProver_::combiner_quotient_round=10 ProtoGalaxyProver_::combiner_quotient_round(t)=7.17713G ProtoGalaxyProver_::perturbator_round=10 ProtoGalaxyProver_::perturbator_round(t)=1.38221G ProtoGalaxyProver_::preparation_round=10 ProtoGalaxyProver_::preparation_round(t)=4.1G ProtogalaxyProver::fold_instances=10 ProtogalaxyProver::fold_instances(t)=16.1209G ProverInstance(Circuit&)=11 ProverInstance(Circuit&)(t)=1.945G batch_mul_with_endomorphism=30 batch_mul_with_endomorphism(t)=562.528M commit=425 commit(t)=3.96966G compute_combiner=10 compute_combiner(t)=7.175G compute_perturbator=9 compute_perturbator(t)=1.38188G compute_univariate=48 compute_univariate(t)=1.41821G construct_circuits=6 construct_circuits(t)=4.20217G
Benchmarking lock deleted.
client_ivc_bench.json                                                         100% 4015   130.4KB/s   00:00    
function                                        ms     % sum
construct_circuits(t)                         4202    14.31%
ProverInstance(Circuit&)(t)                   1945     6.62%
ProtogalaxyProver::fold_instances(t)         16121    54.89%
Decider::construct_proof(t)                    753     2.56%
ECCVMComposer::create_prover(t)               3409    11.61%
GoblinTranslatorComposer::create_prover(t)     123     0.42%
ECCVMProver::construct_proof(t)               1761     5.99%
GoblinTranslatorProver::construct_proof(t)     928     3.16%
Goblin::merge(t)                               129     0.44%

Total time accounted for: 29370ms/29446ms = 99.74%

Major contributors:
function                                        ms    % sum
commit(t)                                     3970   13.52%
compute_combiner(t)                           7175   24.43%
compute_perturbator(t)                        1382    4.71%
compute_univariate(t)                         1418    4.83%

Breakdown of ECCVMProver::create_prover:
ECCVMComposer::compute_witness(t)             1737    50.97%
ECCVMComposer::create_proving_key(t)          1668    48.92%

Breakdown of ProtogalaxyProver::fold_instances:
ProtoGalaxyProver_::preparation_round(t)           4100    25.43%
ProtoGalaxyProver_::perturbator_round(t)           1382     8.57%
ProtoGalaxyProver_::combiner_quotient_round(t)     7177    44.52%
ProtoGalaxyProver_::accumulator_update_round(t)    3462    21.47%

@codygunton codygunton self-assigned this Mar 12, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 12, 2024

Benchmark results

No metrics with a significant change found.

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.

Values are compared against data from master at commit 5457edb3 and shown if the difference exceeds 1%.

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 5,668 18,820 36,356
l1_rollup_calldata_gas 65,980 238,660 469,556
l1_rollup_execution_gas 666,612 953,521 1,336,864
l2_block_processing_time_in_ms 1,289 (-2%) 4,849 (+2%) 8,978 (+1%)
note_successful_decrypting_time_in_ms 135 (-4%) 466 (-15%) 922 (-10%)
note_trial_decrypting_time_in_ms 43.3 (-6%) 79.9 (+25%) 55.6 (-27%)
l2_block_building_time_in_ms 11,886 (-1%) 47,056 (-1%) 94,735 (-3%)
l2_block_rollup_simulation_time_in_ms 6,924 (-1%) 27,502 (-1%) 55,691 (-3%)
l2_block_public_tx_process_time_in_ms 4,938 (-1%) 19,494 (-1%) 38,944 (-2%)

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 14,509 28,179 (+3%)
note_history_successful_decrypting_time_in_ms 1,463 (+12%) 2,442 (-5%)
note_history_trial_decrypting_time_in_ms 110 (-5%) 128 (-14%)
node_database_size_in_bytes 19,062,864 35,840,080 (+1%)
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 275 44,338 27,700
private-kernel-ordering 205 (-2%) 52,324 14,326
base-rollup 630 (-1%) 177,083 925
root-rollup 68.0 (-1%) 4,176 789
private-kernel-inner 357 (-3%) 73,197 27,700
public-kernel-app-logic 178 (-2%) 34,582 27,671
public-kernel-tail 91.4 (-2%) 34,206 27,671
merge-rollup 8.26 2,696 925

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.1 (+1%) 16.0 (-2%) 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.589 (+1%) 0.496 (-2%) 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 45.9 (-4%) 71.8 (-3%) 229 445 (-2%) 861 1,718 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.471 (-4%) 0.443 (-4%) 0.419 0.416 (-2%) 0.411 0.412 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.5 (-1%) 107 (+1%) 338 660 (-1%) 1,315 (+1%) 2,606 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.486 0.485 (+1%) 0.462 (+1%) 0.455 (-1%) 0.456 (+1%) 0.454 (+1%) 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 61.0 (-2%)
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.534 (-2%)

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes
tx_size_in_bytes 22,014

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 3,044 1,431 (-2%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 12.9 (-8%) 610 (-2%)

Base automatically changed from cg/fix/client-ivc-breakdown-parallel-witness-construction to master March 12, 2024 14:36
@codygunton codygunton force-pushed the cg/further-client-ivc-breakdown branch from f9d5189 to 68e3830 Compare March 12, 2024 15:45
@codygunton codygunton requested a review from maramihali March 12, 2024 15:53
@codygunton codygunton merged commit c8e1cb8 into master Mar 12, 2024
97 checks passed
@codygunton codygunton deleted the cg/further-client-ivc-breakdown branch March 12, 2024 17:30
critesjosh pushed a commit that referenced this pull request Mar 12, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.27.1](aztec-package-v0.27.0...aztec-package-v0.27.1)
(2024-03-12)


### Miscellaneous

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

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

##
[0.27.1](barretenberg.js-v0.27.0...barretenberg.js-v0.27.1)
(2024-03-12)


### Miscellaneous

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

<details><summary>aztec-cli: 0.27.1</summary>

##
[0.27.1](aztec-cli-v0.27.0...aztec-cli-v0.27.1)
(2024-03-12)


### Miscellaneous

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

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

##
[0.27.1](aztec-packages-v0.27.0...aztec-packages-v0.27.1)
(2024-03-12)


### Features

* Further ClientIVC breakdown
([#5146](#5146))
([c8e1cb8](c8e1cb8))
* Nullifier non membership
([#5152](#5152))
([426bd6d](426bd6d))


### Bug Fixes

* Increase the json limit for RPC requests
([#5161](#5161))
([419958c](419958c))
* Move timers for ClientIVC breakdown
([#5145](#5145))
([5457edb](5457edb))


### Miscellaneous

* **boxes:** Adding clone contract option
([#4980](#4980))
([a427aa5](a427aa5))
* Share code between provers
([#4655](#4655))
([ef10d65](ef10d65))
</details>

<details><summary>barretenberg: 0.27.1</summary>

##
[0.27.1](barretenberg-v0.27.0...barretenberg-v0.27.1)
(2024-03-12)


### Features

* Further ClientIVC breakdown
([#5146](#5146))
([c8e1cb8](c8e1cb8))


### Bug Fixes

* Move timers for ClientIVC breakdown
([#5145](#5145))
([5457edb](5457edb))


### Miscellaneous

* Share code between provers
([#4655](#4655))
([ef10d65](ef10d65))
</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 Mar 13, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.27.1](AztecProtocol/aztec-packages@aztec-package-v0.27.0...aztec-package-v0.27.1)
(2024-03-12)


### Miscellaneous

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

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

##
[0.27.1](AztecProtocol/aztec-packages@barretenberg.js-v0.27.0...barretenberg.js-v0.27.1)
(2024-03-12)


### Miscellaneous

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

<details><summary>aztec-cli: 0.27.1</summary>

##
[0.27.1](AztecProtocol/aztec-packages@aztec-cli-v0.27.0...aztec-cli-v0.27.1)
(2024-03-12)


### Miscellaneous

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

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

##
[0.27.1](AztecProtocol/aztec-packages@aztec-packages-v0.27.0...aztec-packages-v0.27.1)
(2024-03-12)


### Features

* Further ClientIVC breakdown
([#5146](AztecProtocol/aztec-packages#5146))
([c8e1cb8](AztecProtocol/aztec-packages@c8e1cb8))
* Nullifier non membership
([#5152](AztecProtocol/aztec-packages#5152))
([426bd6d](AztecProtocol/aztec-packages@426bd6d))


### Bug Fixes

* Increase the json limit for RPC requests
([#5161](AztecProtocol/aztec-packages#5161))
([419958c](AztecProtocol/aztec-packages@419958c))
* Move timers for ClientIVC breakdown
([#5145](AztecProtocol/aztec-packages#5145))
([5457edb](AztecProtocol/aztec-packages@5457edb))


### Miscellaneous

* **boxes:** Adding clone contract option
([#4980](AztecProtocol/aztec-packages#4980))
([a427aa5](AztecProtocol/aztec-packages@a427aa5))
* Share code between provers
([#4655](AztecProtocol/aztec-packages#4655))
([ef10d65](AztecProtocol/aztec-packages@ef10d65))
</details>

<details><summary>barretenberg: 0.27.1</summary>

##
[0.27.1](AztecProtocol/aztec-packages@barretenberg-v0.27.0...barretenberg-v0.27.1)
(2024-03-12)


### Features

* Further ClientIVC breakdown
([#5146](AztecProtocol/aztec-packages#5146))
([c8e1cb8](AztecProtocol/aztec-packages@c8e1cb8))


### Bug Fixes

* Move timers for ClientIVC breakdown
([#5145](AztecProtocol/aztec-packages#5145))
([5457edb](AztecProtocol/aztec-packages@5457edb))


### Miscellaneous

* Share code between provers
([#4655](AztecProtocol/aztec-packages#4655))
([ef10d65](AztecProtocol/aztec-packages@ef10d65))
</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