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: aztec-network helm chart #8078

Merged
merged 2 commits into from
Aug 25, 2024
Merged

feat: aztec-network helm chart #8078

merged 2 commits into from
Aug 25, 2024

Conversation

just-mitch
Copy link
Collaborator

@just-mitch just-mitch commented Aug 20, 2024

Initial definition of the helm chart for an "aztec-network".

Currently not part of CI (that is #8000).

However, a meaningful smoke test is included that can be run with:

./yarn-project/end-to-end/scripts/setup_local_k8s.sh
earthly ./yarn-project/end-to-end/+network-smoke

@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
Copy link
Member

@Maddiaa0 Maddiaa0 Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be stateful? If this is just for short running tests i guess not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it probably should/will. We might be able to test L1 censorship by killing the anvil pod, and when it comes back it shouldn't start from scratch.

@just-mitch just-mitch force-pushed the mt/7999-basic-helm-chart branch from a62f452 to 9e60d71 Compare August 20, 2024 20:29
@just-mitch just-mitch changed the title Mt/7999-basic-helm-chart feat: aztec-network helm chart Aug 20, 2024
@just-mitch just-mitch marked this pull request as ready for review August 20, 2024 21:07
@just-mitch just-mitch force-pushed the mt/7999-basic-helm-chart branch from d66d497 to 56d5922 Compare August 20, 2024 23:33
[
"/bin/sh",
"-c",
"cp /scripts/deploy-contracts.sh /tmp/deploy-contracts.sh && chmod +x /tmp/deploy-contracts.sh && /tmp/deploy-contracts.sh",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new script, I can't see it. But would it be better to use the deploy-l1-contracts command on aztec?

nvm, seen the inline script further down.

- name: ETHEREUM_HOST
value: {{ include "aztec-network.ethereumHost" . | quote }}
- name: P2P_ENABLED
value: "{{ .Values.bootNode.p2p.enabled }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this be overridden by the cli option?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch.

[
"/bin/bash",
"-c",
"source /shared/contracts.env && env && node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --node p2pEnabled=true --archiver --sequencer --prover --pxe",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to start a pxe? And I don't think running a --prover as part of the node does anything now.

Copy link
Collaborator Author

@just-mitch just-mitch Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I took both out.

Edit: Actually, having a pxe on the bootnode is useful for other nodes who want to use the get-node-info cli command.

- name: VALIDATOR_PRIVATE_KEY
value: "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
ports:
- containerPort: 8080
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoud these be the values in the ENV VARS?

command:
- "/bin/bash"
- "-c"
- "source /shared/contracts.env && env && node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --node --archiver --sequencer --prover"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably remove the --prover.

@just-mitch just-mitch force-pushed the mt/7999-basic-helm-chart branch 2 times, most recently from 06b2a5c to 49bdebd Compare August 22, 2024 19:41
@just-mitch just-mitch force-pushed the mt/7999-basic-helm-chart branch from 49bdebd to bc53f9d Compare August 23, 2024 15:31
@just-mitch just-mitch force-pushed the mt/7999-basic-helm-chart branch from bc53f9d to dd88e3d Compare August 23, 2024 22:17
Copy link
Contributor

Changes to circuit sizes

Generated at commit: c0394ddc6a619678fc8a2a14273a2ae9e265427e, compared to commit: 7f95ee75e14e82915c480fbb65c325052ebec9c3

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail +480,378 ❌ +102.86% +1,090,990 ❌ +36.57%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_tail 947,390 (+480,378) +102.86% 4,073,918 (+1,090,990) +36.57%

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-reset-tiny): 457 (+48%)
  • protocol_circuit_simulation_time_in_ms (base-rollup): 2,748 (-21%)
  • protocol_circuit_simulation_time_in_ms (public-kernel-tail): 556 (-36%)
  • protocol_circuit_simulation_time_in_ms (private-kernel-reset-small): 463 (+51%)
  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 1,366 (+108%)
  • avm_simulation_time_ms (Benchmarking:increment_balance): 933 (-23%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-reset-tiny): 879 (+22%)
  • l2_block_building_time_in_ms (4): 8,960 (-21%)
  • l2_block_building_time_in_ms (8): 17,482 (-22%)
  • l2_block_building_time_in_ms (16): 34,916 (-21%)
  • l2_block_rollup_simulation_time_in_ms (4): 8,959 (-21%)
  • l2_block_rollup_simulation_time_in_ms (8): 17,482 (-22%)
  • l2_block_rollup_simulation_time_in_ms (16): 34,916 (-21%)
  • l2_block_public_tx_process_time_in_ms (4): 7,531 (-22%)
  • l2_block_public_tx_process_time_in_ms (8): 15,968 (-23%)
  • l2_block_public_tx_process_time_in_ms (16): 33,335 (-21%)
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,750 1,559 713 (+1%) 749 (+1%) 774
proof_construction_time_sha256_30_ms 11,461 3,095 1,380 (+1%) 1,436 1,462
proof_construction_time_sha256_100_ms 44,085 11,818 5,438 5,516 (+1%) 5,693 (+1%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 (+2%) 88.0 (+1%)
proof_construction_time_poseidon_hash_30_ms 1,526 422 (+1%) 202 226 277 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,639 1,511 680 (+1%) 757 (+2%) 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 4,356 7,876 14,884
l1_rollup_calldata_gas 50,232 92,972 178,324
l1_rollup_execution_gas 1,396,483 2,130,119 3,915,527
l2_block_processing_time_in_ms 255 (+3%) 448 (+2%) 814 (-1%)
l2_block_building_time_in_ms ⚠️ 8,960 (-21%) ⚠️ 17,482 (-22%) ⚠️ 34,916 (-21%)
l2_block_rollup_simulation_time_in_ms ⚠️ 8,959 (-21%) ⚠️ 17,482 (-22%) ⚠️ 34,916 (-21%)
l2_block_public_tx_process_time_in_ms ⚠️ 7,531 (-22%) ⚠️ 15,968 (-23%) ⚠️ 33,335 (-21%)

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 2,878 (-1%) 3,885 (+2%)
node_database_size_in_bytes 12,656,720 16,695,376
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
private-kernel-init 89.3 (+6%) 405 (+2%) 21,755 44,860 N/A
private-kernel-inner 166 (-2%) 722 (+2%) 72,566 45,007 N/A
private-kernel-reset-tiny ⚠️ 457 (+48%) ⚠️ 879 (+22%) 65,675 44,846 N/A
private-kernel-tail 195 (+20%) 159 (+14%) 50,686 52,257 N/A
base-parity 5.65 N/A 160 96.0 N/A
root-parity 35.5 N/A 73,948 96.0 N/A
base-rollup ⚠️ 2,748 (-21%) N/A 189,136 664 N/A
block-root-rollup 41.5 N/A 58,205 2,448 N/A
public-kernel-setup 84.1 (-1%) N/A 105,085 71,222 N/A
public-kernel-app-logic 95.5 N/A 104,911 71,222 N/A
public-kernel-tail ⚠️ 556 (-36%) N/A 410,534 (+5%) 16,414 N/A
private-kernel-reset-small ⚠️ 463 (+51%) N/A 66,341 45,629 N/A
private-kernel-tail-to-public ⚠️ 1,366 (+108%) 659 (+7%) 460,796 (+1%) 1,825 N/A
public-kernel-teardown 82.8 N/A 105,349 71,222 N/A
merge-rollup 20.1 (-3%) N/A 38,174 664 N/A
undefined N/A N/A N/A N/A 77,438

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 346 (+1%)
ContractInstanceDeployer:deploy 1,408 11,731 18.4
MultiCallEntrypoint:entrypoint 1,920 11,731 410
FeeJuice:deploy 1,376 11,731 391
SchnorrAccount:constructor 1,312 11,731 74.4 (-1%)
SchnorrAccount:entrypoint 2,304 11,731 400
Token:privately_mint_private_note 1,280 11,731 106 (+6%)
FPC:fee_entrypoint_public 1,344 11,731 28.0 (+1%)
Token:transfer 1,312 11,731 230 (+2%)
Benchmarking:create_note 1,344 11,731 89.3
SchnorrAccount:verify_private_authwit 1,280 11,731 27.5 (-3%)
Token:unshield 1,376 11,731 531 (+1%)
FPC:fee_entrypoint_private 1,376 11,731 707 (+1%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 54.7 (-1%) 7,739
FeeJuice:set_portal 11.5 (+7%) 2,354
Token:constructor 79.5 (+2%) 26,051
FPC:constructor 52.9 (-1%) 18,001
FeeJuice:mint_public 39.1 (-1%) 5,877
Token:mint_public 45.0 (+1%) 10,917
Token:assert_minter_and_mint 66.9 (+2%) 7,512
AuthRegistry:set_authorized 47.2 (+27%) 4,391
FPC:prepare_fee 236 7,043
Token:transfer_public 33.0 (+6%) 39,426
FPC:pay_refund 54.1 (+6%) 10,234
Benchmarking:increment_balance ⚠️ 933 (-23%) 6,563
Token:_increase_public_balance 39.4 (-2%) 8,433
FPC:pay_refund_with_shielded_rebate 64.9 (+3%) 10,783

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.158

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 2.19 (-1%) 3.97 (+3%) 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.114 (-1%) 0.113 (+3%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.4 (+1%) 17.5 (-1%) 30.7 (-1%) 64.0 (+9%) 113 (-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.110 (+1%) 0.101 0.0995 (-1%) 0.110 (+9%) 0.0996 (-2%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.4 25.8 (-1%) 43.5 (-1%) 84.8 (+2%) 161
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.109 (+1%) 0.104 (-1%) 0.105 (-1%) 0.104 (+2%) 0.101
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 (-1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.105 (-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 64,779 668,997

Transaction size based on fee payment method

| Metric | |
| - | |

@just-mitch just-mitch enabled auto-merge (squash) August 23, 2024 22:50
@just-mitch just-mitch merged commit 4b6da5f into master Aug 25, 2024
96 checks passed
@just-mitch just-mitch deleted the mt/7999-basic-helm-chart branch August 25, 2024 20:59
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.

4 participants