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(docs): Cleanup voting tutorial and deployment guide #7406

Merged
merged 10 commits into from
Jul 10, 2024

Conversation

critesjosh
Copy link
Contributor

The voting tutorial code was recently updated, this PR updates the text. It also updates some of the deployment docs to reference source code instead of using hardcoded blocks.

@critesjosh critesjosh requested a review from a team July 9, 2024 15:54
@AztecBot
Copy link
Collaborator

AztecBot commented Jul 9, 2024

Docs Preview

Hey there! 👋 You can check your preview at https://668e3e63ecf80507c46f82e1--aztec-docs-dev.netlify.app

@AztecBot
Copy link
Collaborator

AztecBot commented Jul 9, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:assert_minter_and_mint): 93.9 (+44%)
  • app_circuit_proving_time_in_ms (AuthRegistry:set_authorized (avm)): 1,736 (+25%)
  • app_circuit_proving_time_in_ms (FPC:pay_refund (avm)): 18,479 (-21%)
  • protocol_circuit_proving_time_in_ms (base-rollup): 77,806 (-17%)
  • protocol_circuit_proving_time_in_ms (public-kernel-setup): 36,756 (-16%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 37,093 (-18%)
  • protocol_circuit_proving_time_in_ms (public-kernel-tail): 155,864 (-19%)
  • protocol_circuit_proving_time_in_ms (root-rollup): 19,712 (-18%)
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,775 (+1%) 1,554 (+1%) 704 (+1%) 748 772
proof_construction_time_sha256_30_ms 11,836 (+1%) 3,169 (+1%) 1,408 1,426 1,469
proof_construction_time_sha256_100_ms 44,105 (+1%) 11,810 (+1%) 5,753 (-13%) 5,404 5,366
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 60.0 (+2%) 89.0 (+2%)
proof_construction_time_poseidon_hash_30_ms 1,526 (+1%) 419 200 (+1%) 222 (-3%) 271 (+2%)
proof_construction_time_poseidon_hash_100_ms 5,651 (+1%) 1,528 (+1%) 677 737 (+3%) 746

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,464 9,464 9,476
l1_rollup_execution_gas 613,492 613,643 613,806
l2_block_processing_time_in_ms 754 1,417 2,701
l2_block_building_time_in_ms 12,998 25,602 (-1%) 50,179 (-1%)
l2_block_rollup_simulation_time_in_ms 12,998 25,601 (-1%) 50,179 (-1%)
l2_block_public_tx_process_time_in_ms 10,946 23,360 (-1%) 47,945 (-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,014 (-1%) 9,834 (-1%)
node_database_size_in_bytes 12,443,728 16,154,704
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 110 411 (+2%) 13,774 (-8%) 20,002 55,022 74,208 2,252 524,288
private-kernel-inner 223 736 (+5%) 26,542 (-10%) 82,134 55,022 74,208 2,252 1,048,576
private-kernel-tail 1,069 2,521 (+3%) 47,073 (-14%) 62,409 62,089 14,944 400 2,097,152
base-parity 6.35 (+1%) 891 (+6%) 2,507 (-4%) 160 96.0 2,240 3.00 131,072
root-parity 71.3 (+2%) 62.2 (-14%) 34,365 (-14%) 27,868 96.0 2,752 19.0 2,097,152
base-rollup 4,165 5,089 (+5%) ⚠️ 77,806 (-17%) 172,028 632 3,552 44.0 4,194,304
root-rollup 129 (+2%) 74.5 (-13%) ⚠️ 19,712 (-18%) 25,053 652 3,488 42.0 1,048,576
public-kernel-setup 189 2,342 (-1%) ⚠️ 36,756 (-16%) 103,911 80,310 106,944 3,275 2,097,152
public-kernel-app-logic 146 3,387 (+3%) ⚠️ 37,093 (-18%) 103,911 80,310 106,944 3,275 2,097,152
public-kernel-tail 900 (+1%) 26,152 (-1%) ⚠️ 155,864 (-19%) 400,808 10,046 14,944 400 8,388,608
private-kernel-reset-small 293 1,178 (-11%) 25,920 (-6%) 79,273 55,022 74,208 2,252 1,048,576
public-kernel-teardown 135 (+1%) 3,331 36,930 (-14%) 103,911 80,310 106,944 3,275 2,097,152
merge-rollup 40.5 (+1%) N/A N/A 16,094 632 N/A N/A N/A
private-kernel-tail-to-public N/A 8,825 (+1%) 58,239 (-3%) N/A N/A 106,944 3,275 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 399 (+1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.1 (+3%) N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 651 (+1%) N/A N/A N/A N/A
GasToken:deploy 1,344 9,344 576 (+3%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,280 9,344 487 (+2%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 826 15,840 5,019 (-1%) 131,072 428
Token:privately_mint_private_note 1,248 9,344 568 (+6%) N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 107 (+6%) 15,840 1,811 (+5%) 65,536 428
Token:transfer 1,280 9,344 1,655 (+2%) 15,840 10,399 (-9%) 524,288 428
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 91,232 ⚠️ 1,736 (+25%) N/A N/A
FPC:prepare_fee (avm) 26,664 N/A N/A 91,296 3,068 (+2%) N/A N/A
Token:transfer_public (avm) 42,914 N/A N/A 91,296 3,956 (+4%) N/A N/A
AuthRegistry:consume (avm) 33,100 N/A N/A 91,232 3,007 (+5%) N/A N/A
FPC:pay_refund (avm) 36,829 N/A N/A 91,264 ⚠️ 18,479 (-21%) N/A N/A
Benchmarking:create_note 1,312 9,344 469 N/A N/A N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 49.5 (+19%) N/A N/A N/A N/A
Token:unshield 1,344 9,344 1,348 (+1%) N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,736 (+1%) 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 82.0 (+4%) 13,790
GasToken:set_portal 18.2 (+26%) 3,339
Token:constructor 102 (+1%) 23,692
FPC:constructor 75.1 (+6%) 13,592
GasToken:mint_public 65.3 (+7%) 10,158
Token:mint_public 51.4 (-20%) 19,034
Token:assert_minter_and_mint ⚠️ 93.9 (+44%) 12,925
AuthRegistry:set_authorized 33.2 7,812
FPC:prepare_fee 100 (+2%) 15,062
Token:transfer_public 41.5 (+1%) 31,218
FPC:pay_refund 128 (-1%) 25,260
Benchmarking:increment_balance 1,322 (-1%) 15,267
Token:_increase_public_balance 15.0 15,006
FPC:pay_refund_with_shielded_rebate 166 (+2%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.150 (-2%)

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.8 (+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.604 (+1%) 0.516 (+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.3 (+1%) 75.5 131 245 470
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.493 (+1%) 0.464 0.452 (+1%) 0.444 0.439
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.9 (+1%) 111 183 (+1%) 352 (-1%) 693
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 (+1%) 0.499 0.485 (+1%) 0.476 (-1%) 0.476 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 73.0 (+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 74,082 667,868

Transaction size based on fee payment method

| Metric | |
| - | |

Copy link
Contributor

Changes to circuit sizes

Generated at commit: 348fb3370b72be9af42f6303c8edb67463a3259f, compared to commit: a917198c6a17063414087419d8cb1de93e6dc21e

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail -64 ✅ -0.01% -10,143 ✅ -0.23%
private_kernel_tail_to_public -202 ✅ -0.05% -10,543 ✅ -0.62%
private_kernel_reset -1,532 ✅ -1.14% -11,963 ✅ -0.70%
public_kernel_teardown -128 ✅ -0.05% -10,271 ✅ -0.74%
public_kernel_app_logic -128 ✅ -0.05% -10,271 ✅ -0.74%
public_kernel_setup -128 ✅ -0.07% -10,270 ✅ -0.77%
private_kernel_tail -74 ✅ -0.34% -10,351 ✅ -0.82%
private_kernel_init -1,025 ✅ -3.84% -3,435 ✅ -0.90%
private_kernel_reset_big -1,372 ✅ -1.46% -11,747 ✅ -0.97%
private_kernel_reset_medium -1,292 ✅ -1.75% -11,639 ✅ -1.21%
private_kernel_inner -1,963 ✅ -4.23% -14,519 ✅ -1.37%
private_kernel_reset_small -1,252 ✅ -1.97% -11,649 ✅ -1.39%
private_kernel_tail_to_public_simulated 0 ➖ 0.00% -64 ✅ -1.92%
public_kernel_app_logic_simulated 0 ➖ 0.00% -64 ✅ -1.92%
public_kernel_setup_simulated 0 ➖ 0.00% -64 ✅ -1.92%
public_kernel_teardown_simulated 0 ➖ 0.00% -64 ✅ -1.92%
private_kernel_init_simulated 0 ➖ 0.00% -64 ✅ -2.78%
private_kernel_inner_simulated 0 ➖ 0.00% -64 ✅ -2.78%
private_kernel_reset_simulated 0 ➖ 0.00% -64 ✅ -2.78%
private_kernel_reset_simulated_big 0 ➖ 0.00% -64 ✅ -2.78%
private_kernel_reset_simulated_medium 0 ➖ 0.00% -64 ✅ -2.78%
private_kernel_reset_simulated_small 0 ➖ 0.00% -64 ✅ -2.78%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail 971,097 (-64) -0.01% 4,408,451 (-10,143) -0.23%
private_kernel_tail_to_public 443,865 (-202) -0.05% 1,678,810 (-10,543) -0.62%
private_kernel_reset 132,326 (-1,532) -1.14% 1,694,245 (-11,963) -0.70%
public_kernel_teardown 241,281 (-128) -0.05% 1,383,928 (-10,271) -0.74%
public_kernel_app_logic 241,085 (-128) -0.05% 1,383,689 (-10,271) -0.74%
public_kernel_setup 182,749 (-128) -0.07% 1,320,011 (-10,270) -0.77%
private_kernel_tail 21,394 (-74) -0.34% 1,245,982 (-10,351) -0.82%
private_kernel_init 25,692 (-1,025) -3.84% 379,827 (-3,435) -0.90%
private_kernel_reset_big 92,350 (-1,372) -1.46% 1,199,421 (-11,747) -0.97%
private_kernel_reset_medium 72,361 (-1,292) -1.75% 952,008 (-11,639) -1.21%
private_kernel_inner 44,471 (-1,963) -4.23% 1,044,599 (-14,519) -1.37%
private_kernel_reset_small 62,366 (-1,252) -1.97% 828,341 (-11,649) -1.39%
private_kernel_tail_to_public_simulated 1 (0) 0.00% 3,264 (-64) -1.92%
public_kernel_app_logic_simulated 1 (0) 0.00% 3,264 (-64) -1.92%
public_kernel_setup_simulated 1 (0) 0.00% 3,264 (-64) -1.92%
public_kernel_teardown_simulated 1 (0) 0.00% 3,264 (-64) -1.92%
private_kernel_init_simulated 1 (0) 0.00% 2,241 (-64) -2.78%
private_kernel_inner_simulated 1 (0) 0.00% 2,241 (-64) -2.78%
private_kernel_reset_simulated 1 (0) 0.00% 2,241 (-64) -2.78%
private_kernel_reset_simulated_big 1 (0) 0.00% 2,241 (-64) -2.78%
private_kernel_reset_simulated_medium 1 (0) 0.00% 2,241 (-64) -2.78%
private_kernel_reset_simulated_small 1 (0) 0.00% 2,241 (-64) -2.78%

@critesjosh critesjosh merged commit 60cead2 into master Jul 10, 2024
91 checks passed
@critesjosh critesjosh deleted the docs/jc/voting_docs branch July 10, 2024 12:42
Thunkar pushed a commit that referenced this pull request Jul 10, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.2](aztec-package-v0.46.1...aztec-package-v0.46.2)
(2024-07-10)


### Miscellaneous

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

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

##
[0.46.2](barretenberg.js-v0.46.1...barretenberg.js-v0.46.2)
(2024-07-10)


### Miscellaneous

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

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

##
[0.46.2](aztec-packages-v0.46.1...aztec-packages-v0.46.2)
(2024-07-10)


### Features

* Optimize assert_split_sorted_transformed_value_arrays
([#7417](#7417))
([4355b3f](4355b3f))


### Bug Fixes

* Updated docs
([#7418](#7418))
([ad3da14](ad3da14))


### Miscellaneous

* **docs:** Cleanup voting tutorial and deployment guide
([#7406](#7406))
([60cead2](60cead2))
</details>

<details><summary>barretenberg: 0.46.2</summary>

##
[0.46.2](barretenberg-v0.46.1...barretenberg-v0.46.2)
(2024-07-10)


### Miscellaneous

* **barretenberg:** Synchronize aztec-packages versions
</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 11, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.2](AztecProtocol/aztec-packages@aztec-package-v0.46.1...aztec-package-v0.46.2)
(2024-07-10)


### Miscellaneous

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

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

##
[0.46.2](AztecProtocol/aztec-packages@barretenberg.js-v0.46.1...barretenberg.js-v0.46.2)
(2024-07-10)


### Miscellaneous

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

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

##
[0.46.2](AztecProtocol/aztec-packages@aztec-packages-v0.46.1...aztec-packages-v0.46.2)
(2024-07-10)


### Features

* Optimize assert_split_sorted_transformed_value_arrays
([#7417](AztecProtocol/aztec-packages#7417))
([4355b3f](AztecProtocol/aztec-packages@4355b3f))


### Bug Fixes

* Updated docs
([#7418](AztecProtocol/aztec-packages#7418))
([ad3da14](AztecProtocol/aztec-packages@ad3da14))


### Miscellaneous

* **docs:** Cleanup voting tutorial and deployment guide
([#7406](AztecProtocol/aztec-packages#7406))
([60cead2](AztecProtocol/aztec-packages@60cead2))
</details>

<details><summary>barretenberg: 0.46.2</summary>

##
[0.46.2](AztecProtocol/aztec-packages@barretenberg-v0.46.1...barretenberg-v0.46.2)
(2024-07-10)


### Miscellaneous

* **barretenberg:** Synchronize aztec-packages versions
</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