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

docs: minor comments for private refunds/partial notes #7447

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

rahul-kothari
Copy link
Contributor

No description provided.

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-reset-tiny): 1,293 (+335%)
  • avm_simulation_time_ms (Token:mint_public): 90.6 (-75%)
  • avm_simulation_time_ms (Token:_increase_public_balance): 16.1 (-81%)
  • avm_simulation_time_ms (FPC:pay_refund_with_shielded_rebate): 184 (+66%)
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,541 705 753 (-3%) 770
proof_construction_time_sha256_30_ms 11,721 3,150 1,403 1,437 (-2%) 1,468
proof_construction_time_sha256_100_ms 43,785 (-1%) 11,782 (-1%) 5,923 (-9%) 5,417 (-1%) 5,371 (-1%)
proof_construction_time_poseidon_hash_ms 77.0 (-1%) 34.0 34.0 59.0 (+2%) 86.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,515 415 199 227 (+1%) 266 (-1%)
proof_construction_time_poseidon_hash_100_ms 5,604 1,516 678 (+1%) 719 (-3%) 747

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,588 6,600
l1_rollup_execution_gas 583,038 583,201 583,364
l2_block_processing_time_in_ms 772 (-1%) 1,423 (+1%) 2,742
l2_block_building_time_in_ms 13,292 (+1%) 26,156 (+1%) 51,355 (+1%)
l2_block_rollup_simulation_time_in_ms 13,292 (+1%) 26,156 (+1%) 51,354 (+1%)
l2_block_public_tx_process_time_in_ms 11,137 (+1%) 23,798 (+1%) 48,959 (+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,203 (+2%) 9,904 (+1%)
node_database_size_in_bytes 12,423,248 16,433,232
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 116 399 (+2%) 21,732 54,085 N/A N/A N/A N/A
private-kernel-inner 231 (+1%) 723 (+2%) 81,199 54,264 N/A N/A N/A N/A
private-kernel-tail 1,132 (+2%) 2,478 (+2%) 61,808 61,554 N/A N/A N/A N/A
base-parity 6.49 (+1%) 799 (+2%) 160 96.0 1,395 (+1%) 12,676 3.00 131,072
root-parity 108 118 (+2%) 64,860 96.0 50,132 (-1%) 12,676 3.00 4,194,304
base-rollup 4,259 (+1%) 4,983 (+2%) 180,315 632 49,234 (+2%) 13,476 28.0 4,194,304
root-rollup 153 (+1%) 120 51,261 652 42,150 (-2%) 13,412 26.0 4,194,304
public-kernel-setup 198 (+3%) 2,412 (+1%) 112,536 80,310 23,104 (+3%) 118,916 3,323 2,097,152
public-kernel-app-logic 151 (+1%) 3,326 (+2%) 112,536 80,310 10,654 (+5%) 118,916 3,323 1,048,576
public-kernel-tail 899 (+1%) 27,809 (+6%) 409,413 10,046 72,025 24,868 384 8,388,608
private-kernel-reset-tiny ⚠️ 1,293 (+335%) 1,007 (+3%) 77,007 53,954 N/A N/A N/A N/A
private-kernel-tail-to-public 6,847 (+2%) 2,842 (+2%) 777,415 1,632 N/A N/A N/A N/A
public-kernel-teardown 141 (-1%) 3,385 (+3%) 112,536 80,310 23,037 (+1%) 118,916 3,323 2,097,152
merge-rollup 57.5 N/A 33,566 632 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 163,486 (-2%) 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 398 (+1%) N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.2 (+1%) N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 629 (+1%) N/A N/A
GasToken:deploy 1,344 9,344 569 (+3%) N/A N/A
SchnorrAccount:constructor 1,280 9,344 429 (+1%) N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 769 (+1%) N/A N/A
Token:privately_mint_private_note 1,248 9,344 500 (+2%) N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 101 (+1%) N/A N/A
Token:transfer 1,280 9,344 1,469 N/A N/A
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 95,392 2,265 (+10%)
FPC:prepare_fee (avm) 26,664 N/A N/A 95,456 2,987 (+8%)
Token:transfer_public (avm) 42,914 N/A N/A 95,456 3,367 (+6%)
AuthRegistry:consume (avm) 33,100 N/A N/A 95,424 2,947 (+7%)
FPC:pay_refund (avm) 36,829 N/A N/A 95,424 11,108 (+1%)
Benchmarking:create_note 1,312 9,344 429 (+2%) N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.8 (-9%) N/A N/A
Token:unshield 1,344 9,344 1,191 N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,559 (+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 103 (+4%) 13,790
GasToken:set_portal 12.8 (+23%) 3,339
Token:constructor 122 (-7%) 23,692
FPC:constructor 92.6 (-1%) 13,592
GasToken:mint_public 81.2 (+1%) 10,158
Token:mint_public ⚠️ 90.6 (-75%) 19,034
Token:assert_minter_and_mint 69.9 (-17%) 12,925
AuthRegistry:set_authorized 45.6 (-7%) 7,812
FPC:prepare_fee 108 (-20%) 15,062
Token:transfer_public 39.8 (-16%) 31,218
FPC:pay_refund 128 (-12%) 25,260
Benchmarking:increment_balance 1,352 (+1%) 15,267
Token:_increase_public_balance ⚠️ 16.1 (-81%) 15,006
FPC:pay_refund_with_shielded_rebate ⚠️ 184 (+66%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.167 (+6%)

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 (+1%) 16.7 (+1%) 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.602 (+1%) 0.514 (+1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.7 (+2%) 76.4 (+1%) 132 (+1%) 247 (+1%) 474
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.497 (+2%) 0.469 (+1%) 0.452 (+1%) 0.446 (+1%) 0.443
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.0 (+1%) 113 (+1%) 185 (+1%) 355 (+1%) 704 (+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.505 (+1%) 0.506 (+1%) 0.482 (+1%) 0.479 (+1%) 0.478
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 73.1 (+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 (+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 76,837 667,838

Transaction size based on fee payment method

| Metric | |
| - | |

@benesjan benesjan merged commit 9bcbb6c into master Jul 12, 2024
91 checks passed
@benesjan benesjan deleted the rk/partial_notes_comments branch July 12, 2024 07:26
rahul-kothari pushed a commit that referenced this pull request Jul 15, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.5](aztec-package-v0.46.4...aztec-package-v0.46.5)
(2024-07-14)


### Miscellaneous

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

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

##
[0.46.5](barretenberg.js-v0.46.4...barretenberg.js-v0.46.5)
(2024-07-14)


### Miscellaneous

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

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

##
[0.46.5](aztec-packages-v0.46.4...aztec-packages-v0.46.5)
(2024-07-14)


### Features

* Added barrett_reduction implementation into uintx
([#6768](#6768))
([abced57](abced57))
* Databus allows arbitrarily many reads per index
([#6524](#6524))
([f07200c](f07200c))
* Let LSP always work in a Noir workspace if there's any
(noir-lang/noir#5461)
([8403e84](8403e84))
* Multiple trace structuring configurations
([#7408](#7408))
([e4abe1d](e4abe1d))
* Verify ClientIVC proofs through Bb binary
([#7407](#7407))
([3760c64](3760c64))


### Bug Fixes

* Lagrange interpolation
([#7440](#7440))
([76bcd72](76bcd72))
* Move BigInt modulus checks to runtime in brillig
(noir-lang/noir#5374)
([8403e84](8403e84))
* Run macro processors in the elaborator
(noir-lang/noir#5472)
([8403e84](8403e84))


### Miscellaneous

* Keccak256 in Noir (noir-lang/noir#5316)
([8403e84](8403e84))
* Redo typo PR by omahs (noir-lang/noir#5487)
([8403e84](8403e84))
* Replace relative paths to noir-protocol-circuits
([e89bfd8](e89bfd8))
* Replace relative paths to noir-protocol-circuits
([fae353e](fae353e))


### Documentation

* Minor comments for private refunds/partial notes
([#7447](#7447))
([9bcbb6c](9bcbb6c))
</details>

<details><summary>barretenberg: 0.46.5</summary>

##
[0.46.5](barretenberg-v0.46.4...barretenberg-v0.46.5)
(2024-07-14)


### Features

* Added barrett_reduction implementation into uintx
([#6768](#6768))
([abced57](abced57))
* Databus allows arbitrarily many reads per index
([#6524](#6524))
([f07200c](f07200c))
* Multiple trace structuring configurations
([#7408](#7408))
([e4abe1d](e4abe1d))
* Verify ClientIVC proofs through Bb binary
([#7407](#7407))
([3760c64](3760c64))


### Bug Fixes

* Lagrange interpolation
([#7440](#7440))
([76bcd72](76bcd72))
</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 16, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.5](AztecProtocol/aztec-packages@aztec-package-v0.46.4...aztec-package-v0.46.5)
(2024-07-14)


### Miscellaneous

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

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

##
[0.46.5](AztecProtocol/aztec-packages@barretenberg.js-v0.46.4...barretenberg.js-v0.46.5)
(2024-07-14)


### Miscellaneous

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

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

##
[0.46.5](AztecProtocol/aztec-packages@aztec-packages-v0.46.4...aztec-packages-v0.46.5)
(2024-07-14)


### Features

* Added barrett_reduction implementation into uintx
([#6768](AztecProtocol/aztec-packages#6768))
([abced57](AztecProtocol/aztec-packages@abced57))
* Databus allows arbitrarily many reads per index
([#6524](AztecProtocol/aztec-packages#6524))
([f07200c](AztecProtocol/aztec-packages@f07200c))
* Let LSP always work in a Noir workspace if there's any
(noir-lang/noir#5461)
([8403e84](AztecProtocol/aztec-packages@8403e84))
* Multiple trace structuring configurations
([#7408](AztecProtocol/aztec-packages#7408))
([e4abe1d](AztecProtocol/aztec-packages@e4abe1d))
* Verify ClientIVC proofs through Bb binary
([#7407](AztecProtocol/aztec-packages#7407))
([3760c64](AztecProtocol/aztec-packages@3760c64))


### Bug Fixes

* Lagrange interpolation
([#7440](AztecProtocol/aztec-packages#7440))
([76bcd72](AztecProtocol/aztec-packages@76bcd72))
* Move BigInt modulus checks to runtime in brillig
(noir-lang/noir#5374)
([8403e84](AztecProtocol/aztec-packages@8403e84))
* Run macro processors in the elaborator
(noir-lang/noir#5472)
([8403e84](AztecProtocol/aztec-packages@8403e84))


### Miscellaneous

* Keccak256 in Noir (noir-lang/noir#5316)
([8403e84](AztecProtocol/aztec-packages@8403e84))
* Redo typo PR by omahs (noir-lang/noir#5487)
([8403e84](AztecProtocol/aztec-packages@8403e84))
* Replace relative paths to noir-protocol-circuits
([e89bfd8](AztecProtocol/aztec-packages@e89bfd8))
* Replace relative paths to noir-protocol-circuits
([fae353e](AztecProtocol/aztec-packages@fae353e))


### Documentation

* Minor comments for private refunds/partial notes
([#7447](AztecProtocol/aztec-packages#7447))
([9bcbb6c](AztecProtocol/aztec-packages@9bcbb6c))
</details>

<details><summary>barretenberg: 0.46.5</summary>

##
[0.46.5](AztecProtocol/aztec-packages@barretenberg-v0.46.4...barretenberg-v0.46.5)
(2024-07-14)


### Features

* Added barrett_reduction implementation into uintx
([#6768](AztecProtocol/aztec-packages#6768))
([abced57](AztecProtocol/aztec-packages@abced57))
* Databus allows arbitrarily many reads per index
([#6524](AztecProtocol/aztec-packages#6524))
([f07200c](AztecProtocol/aztec-packages@f07200c))
* Multiple trace structuring configurations
([#7408](AztecProtocol/aztec-packages#7408))
([e4abe1d](AztecProtocol/aztec-packages@e4abe1d))
* Verify ClientIVC proofs through Bb binary
([#7407](AztecProtocol/aztec-packages#7407))
([3760c64](AztecProtocol/aztec-packages@3760c64))


### Bug Fixes

* Lagrange interpolation
([#7440](AztecProtocol/aztec-packages#7440))
([76bcd72](AztecProtocol/aztec-packages@76bcd72))
</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