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: Configure world-state to follow the proven chain only #7430

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

spalladino
Copy link
Collaborator

Related to #7346

@spalladino spalladino enabled auto-merge (squash) July 10, 2024 17:25
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • proof_construction_time_sha256_100_ms (16): 6,648 (+23%)
  • avm_simulation_time_ms (Token:mint_public): 45.1 (-41%)
  • app_circuit_proving_time_in_ms (FPC:prepare_fee (avm)): 2,782 (+39%)
  • app_circuit_proving_time_in_ms (Token:transfer_public (avm)): 3,920 (+70%)
  • app_circuit_proving_time_in_ms (AuthRegistry:consume (avm)): 3,043 (+55%)
  • app_circuit_proving_time_in_ms (FPC:pay_refund (avm)): 23,505 (+158%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 92,647 (+17%)
  • protocol_circuit_proving_time_in_ms (root-parity): 43,872 (+29%)
  • protocol_circuit_proving_time_in_ms (public-kernel-setup): 43,760 (+19%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 47,255 (+28%)
  • protocol_circuit_proving_time_in_ms (public-kernel-teardown): 43,014 (+16%)
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,725 1,537 702 734 (-1%) 776 (+1%)
proof_construction_time_sha256_30_ms 11,726 3,150 1,417 (+1%) 1,430 1,474 (+1%)
proof_construction_time_sha256_100_ms 43,784 12,022 (+2%) ⚠️ 6,648 (+23%) 5,394 5,367 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (-2%) 87.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,515 415 199 220 269 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,605 1,515 677 (+1%) 747 (+2%) 750

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,576 6,594 6,576
l1_rollup_execution_gas 583,038 583,207 583,340
l2_block_processing_time_in_ms 752 (-2%) 1,426 2,697 (-2%)
l2_block_building_time_in_ms 13,087 25,877 (+1%) 50,153 (-1%)
l2_block_rollup_simulation_time_in_ms 13,086 25,876 (+1%) 50,153 (-1%)
l2_block_public_tx_process_time_in_ms 11,023 23,638 (+1%) 47,917 (-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,070 (+1%) 10,113 (+2%)
node_database_size_in_bytes 12,415,056 16,478,288 (+1%)
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 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 109 (-1%) 409 (-4%) 14,801 (+7%) 20,002 55,022 76,256 2,316 524,288
private-kernel-inner 225 739 (-3%) 50,985 (+8%) 82,134 55,022 76,256 2,316 2,097,152
private-kernel-tail 1,057 2,468 (-2%) 51,438 (+13%) 62,409 62,089 14,944 400 2,097,152
base-parity 6.31 (-1%) 873 (-8%) 2,654 (+5%) 160 96.0 2,240 3.00 131,072
root-parity 69.3 (-1%) 76.1 (+25%) ⚠️ 43,872 (+29%) 27,868 96.0 2,752 19.0 2,097,152
base-rollup 4,162 4,945 (-3%) ⚠️ 92,647 (+17%) 172,028 632 3,552 44.0 4,194,304
root-rollup 126 (-4%) 89.4 (+19%) 22,612 (+15%) 25,053 652 3,488 42.0 1,048,576
public-kernel-setup 192 2,426 (+4%) ⚠️ 43,760 (+19%) 103,911 80,310 108,992 3,339 2,097,152
public-kernel-app-logic 149 (+1%) 3,356 (+3%) ⚠️ 47,255 (+28%) 103,911 80,310 108,992 3,339 2,097,152
public-kernel-tail 895 (-1%) 25,914 (+6%) 188,150 (+15%) 400,808 10,046 14,944 400 8,388,608
private-kernel-reset-small 292 (-1%) 1,143 26,139 (+9%) 79,273 55,022 76,256 2,316 1,048,576
public-kernel-teardown 137 3,317 (+1%) ⚠️ 43,014 (+16%) 103,911 80,310 108,992 3,339 2,097,152
merge-rollup 40.2 (-1%) N/A N/A 16,094 632 N/A N/A N/A
private-kernel-tail-to-public N/A 3,261 (+6%) 49,861 (+11%) N/A N/A 108,992 3,339 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,312 9,344 392 N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.0 (-2%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 619 (-1%) N/A N/A N/A N/A
GasToken:deploy 1,344 9,344 558 (-2%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,280 9,344 425 (-3%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 775 (-1%) 16,352 4,716 (-3%) 131,072 444
Token:privately_mint_private_note 1,248 9,344 494 (-11%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 99.6 (-9%) 16,352 1,708 (-6%) 65,536 444
Token:transfer 1,280 9,344 1,578 (-6%) 16,352 11,627 (+12%) 524,288 444
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 91,232 (-4%) 1,390 (+15%) N/A N/A
FPC:prepare_fee (avm) 26,664 N/A N/A 91,296 (-4%) ⚠️ 2,782 (+39%) N/A N/A
Token:transfer_public (avm) 42,914 N/A N/A 91,296 (-4%) ⚠️ 3,920 (+70%) N/A N/A
AuthRegistry:consume (avm) 33,100 N/A N/A 91,232 (-4%) ⚠️ 3,043 (+55%) N/A N/A
FPC:pay_refund (avm) 36,829 N/A N/A 91,264 (-4%) ⚠️ 23,505 (+158%) N/A N/A
Benchmarking:create_note 1,312 9,344 428 (+1%) N/A N/A N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.6 N/A N/A N/A N/A
Token:unshield 1,344 9,344 1,315 N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,685 N/A N/A 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 78.6 (-3%) 13,790
GasToken:set_portal 14.8 (+5%) 3,339
Token:constructor 110 (+7%) 23,692
FPC:constructor 70.1 (-2%) 13,592
GasToken:mint_public 60.4 (-3%) 10,158
Token:mint_public ⚠️ 45.1 (-41%) 19,034
Token:assert_minter_and_mint 90.7 (-4%) 12,925
AuthRegistry:set_authorized 38.9 (+11%) 7,812
FPC:prepare_fee 116 (+5%) 15,062
Token:transfer_public 35.2 (-8%) 31,218
FPC:pay_refund 134 (+2%) 25,260
Benchmarking:increment_balance 1,330 15,267
Token:_increase_public_balance 15.0 (+2%) 15,006
FPC:pay_refund_with_shielded_rebate 164 (+1%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.153 (+3%)

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.3 (-1%) 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.595 (-1%) 0.514 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 47.9 (-1%) 75.5 (-1%) 131 246 469 (-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.490 (-1%) 0.464 (-1%) 0.449 (-1%) 0.445 0.438 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.1 (-1%) 111 (-1%) 182 (-1%) 354 691 (-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.500 (-1%) 0.500 0.482 (-1%) 0.478 0.474 (-1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 72.5 (-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.516 (-1%) 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 74,105 667,868

Transaction size based on fee payment method

| Metric | |
| - | |

@spalladino spalladino merged commit 2e41ac7 into master Jul 11, 2024
92 checks passed
@spalladino spalladino deleted the palla/world-state-proven-only branch July 11, 2024 13:13
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