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: devnet updates #7421

Merged
merged 90 commits into from
Jul 16, 2024
Merged

feat: devnet updates #7421

merged 90 commits into from
Jul 16, 2024

Conversation

spypsy
Copy link
Member

@spypsy spypsy commented Jul 10, 2024

Fixes: #6997
Fixes: #6512
Fixes: #7000
Fixes: #7313

@spypsy spypsy marked this pull request as ready for review July 10, 2024 12:44
@AztecBot
Copy link
Collaborator

AztecBot commented Jul 10, 2024

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 333 (+496%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 51.9 (-41%)
  • protocol_circuit_proving_time_in_ms (base-parity): 1,964 (+39%)
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,756 1,551 (-2%) 707 745 (-2%) 770
proof_construction_time_sha256_30_ms 11,811 3,178 1,417 (+1%) 1,438 1,467 (-1%)
proof_construction_time_sha256_100_ms 44,062 11,824 6,348 (+10%) 5,410 5,378
proof_construction_time_poseidon_hash_ms 79.0 (+1%) 34.0 34.0 59.0 (+2%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,527 419 200 230 (+2%) 272 (-2%)
proof_construction_time_poseidon_hash_100_ms 5,649 1,522 678 742 (+1%) 744

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,600 6,590 6,600
l1_rollup_execution_gas 583,062 583,203 583,364
l2_block_processing_time_in_ms 762 (+1%) 1,436 (+2%) 2,745 (+2%)
l2_block_building_time_in_ms 13,242 (+1%) 26,417 (+1%) 50,917 (+1%)
l2_block_rollup_simulation_time_in_ms 13,242 (+1%) 26,417 (+1%) 50,917 (+1%)
l2_block_public_tx_process_time_in_ms 11,090 24,025 (+1%) 48,456

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,158 (+1%) 10,069 (+2%)
node_database_size_in_bytes 12,447,824 16,482,384
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 117 (+1%) 394 (-1%) 21,732 54,085 N/A N/A N/A N/A
private-kernel-inner 230 699 (-2%) 81,199 54,264 N/A N/A N/A N/A
private-kernel-tail 1,132 2,466 (-1%) 61,808 61,554 N/A N/A N/A N/A
base-parity 6.55 (+1%) 813 160 96.0 ⚠️ 1,964 (+39%) 12,676 3.00 131,072
root-parity 108 121 (+3%) 64,860 96.0 48,264 (-2%) 12,676 3.00 4,194,304
base-rollup 4,265 4,876 180,315 632 48,629 13,476 28.0 4,194,304
root-rollup 152 (-1%) 119 (-6%) 51,261 652 42,118 (-1%) 13,412 26.0 4,194,304
public-kernel-setup 195 (+1%) 2,467 (+3%) 112,536 80,310 22,725 (-1%) 118,916 3,323 2,097,152
public-kernel-app-logic 152 (+1%) 3,279 112,536 80,310 10,455 (+3%) 118,916 3,323 1,048,576
public-kernel-tail 900 27,551 (+7%) 409,413 10,046 74,908 (+3%) 24,868 384 8,388,608
private-kernel-reset-tiny 1,286 980 (-2%) 77,007 53,954 N/A N/A N/A N/A
private-kernel-tail-to-public 6,707 (-2%) 2,829 (-1%) 777,415 1,632 N/A N/A N/A N/A
public-kernel-teardown 139 3,342 (+1%) 112,536 80,310 24,188 (-1%) 118,916 3,323 2,097,152
merge-rollup 57.9 N/A 33,566 632 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 163,852 (-4%) 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 400 (+1%) N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 24.9 N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 627 (+1%) N/A N/A
GasToken:deploy 1,344 9,344 559 (-1%) N/A N/A
SchnorrAccount:constructor 1,280 9,344 430 (+1%) N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 767 (+1%) N/A N/A
Token:privately_mint_private_note 1,248 9,344 503 N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 100 N/A N/A
Token:transfer 1,280 9,344 1,475 (+1%) N/A N/A
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 95,392 2,115 (+1%)
FPC:prepare_fee (avm) 26,664 N/A N/A 95,456 2,801
Token:transfer_public (avm) 42,914 N/A N/A 95,456 3,179 (+1%)
AuthRegistry:consume (avm) 33,100 N/A N/A 95,424 2,744
FPC:pay_refund (avm) 36,829 N/A N/A 95,424 10,771 (+1%)
Benchmarking:create_note 1,312 9,344 425 (+1%) N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.7 (+1%) N/A N/A
Token:unshield 1,344 9,344 1,202 (+2%) N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,557 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 109 (+9%) 13,790
GasToken:set_portal 12.9 (+9%) 3,339
Token:constructor 121 (-1%) 23,692
FPC:constructor 93.1 (+1%) 13,592
GasToken:mint_public 83.2 (+1%) 10,158
Token:mint_public ⚠️ 333 (+496%) 19,034
Token:assert_minter_and_mint ⚠️ 51.9 (-41%) 12,925
AuthRegistry:set_authorized 47.1 (+4%) 7,812
FPC:prepare_fee 115 (+16%) 15,062
Token:transfer_public 42.0 (+1%) 31,218
FPC:pay_refund 126 (-5%) 25,260
Benchmarking:increment_balance 1,364 (+1%) 15,267
Token:_increase_public_balance 16.9 (+15%) 15,006
FPC:pay_refund_with_shielded_rebate 178 (+1%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.165 (+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 17.1 (+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.600 0.526 (+3%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 48.1 (+1%) 76.4 132 (+1%) 249 (+2%) 471
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.491 0.469 0.453 (+1%) 0.450 (+1%) 0.442
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 59.5 111 (-1%) 182 357 (+1%) 689
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.502 0.500 0.477 (-1%) 0.482 (+1%) 0.474 (-1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 72.9 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.518 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 | |
| - | |

Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

LGTM, though you may want to wait for @PhilWindle's review who's more familiar than am I with the tf setup. Your call!

docker run aztecprotocol/cli:${{ env.DEPLOY_TAG }} \
deploy-l1-contracts -p ${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }} \
docker run aztecprotocol/cli:${{ env.DEPLOY_TAG }} deploy-l1-contracts \
-p ${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }} \
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was going to comment that -p is for exposing a port, when I noticed it was a CLI command of ours, not of docker, heh. WDYT about using long command names in our scripts in the future, to be more descriptive?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm you mean like using --private-key rather than -p? I was actually think it should be -pk anyway.
Or you mean putting this long command into a script that is then used in here

Copy link
Collaborator

Choose a reason for hiding this comment

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

you mean like using --private-key rather than -p?

Yep, that! Sorry, I meant "long option names", not "long command names"

@@ -13,12 +13,16 @@ trap 'kill $(jobs -p)' SIGTERM
HOST="0.0.0.0"
PORT=8544
ETHEREUM_HOST=$HOST:$PORT
# Stripping double quotations from the mnemonic seed phrase
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels like the kind of bug that takes hours to figure out and seconds to fix

Copy link
Member Author

Choose a reason for hiding this comment

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

precisely what happened 🙃

@spypsy spypsy requested a review from PhilWindle July 15, 2024 08:18
Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

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

If we could just make it clear where we talk about L1 or L2 chain ids. That would be great

/**
* The chain's ID
*/
chainId?: number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just name this l1ChainId (assuming that's what it represents). Also the same for the env var.

yarn-project/aztec-faucet/src/bin/index.ts Outdated Show resolved Hide resolved
@@ -16,7 +16,7 @@ variable "SEQ_2_PUBLISHER_PRIVATE_KEY" {

variable "CHAIN_ID" {
type = string
default = 31337
default = 677692
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use L1/L2 chain id

@AztecBot
Copy link
Collaborator

AztecBot commented Jul 15, 2024

Docs Preview

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

@spypsy spypsy merged commit 103f099 into master Jul 16, 2024
95 checks passed
@spypsy spypsy deleted the devnet branch July 16, 2024 08:35
@spypsy spypsy restored the devnet branch July 16, 2024 08:35
rahul-kothari pushed a commit that referenced this pull request Jul 16, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.7](aztec-package-v0.46.6...aztec-package-v0.46.7)
(2024-07-16)


### Features

* Devnet updates
([#7421](#7421))
([103f099](103f099))


### Bug Fixes

* Cli l1-chain-id option
([#7490](#7490))
([307bc57](307bc57))


### Miscellaneous

* Turn on elaborator
([#7451](#7451))
([0599500](0599500))
</details>

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

##
[0.46.7](barretenberg.js-v0.46.6...barretenberg.js-v0.46.7)
(2024-07-16)


### Miscellaneous

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

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

##
[0.46.7](aztec-packages-v0.46.6...aztec-packages-v0.46.7)
(2024-07-16)


### Features

* Add unconstrained context to txe
([#7448](#7448))
([699fb79](699fb79))
* Add unconstrained getters to sharedmutable
([#7429](#7429))
([c0ff566](c0ff566))
* Devnet updates
([#7421](#7421))
([103f099](103f099))
* Point::fromXandSign(...)
([#7455](#7455))
([225c6f6](225c6f6))


### Bug Fixes

* **avm:** Update generated verifier
([#7492](#7492))
([f1216a7](f1216a7))
* Cli l1-chain-id option
([#7490](#7490))
([307bc57](307bc57))
* Don't pass secrets to earthly-ci 'publish docs' command
([#7481](#7481))
([a3f6feb](a3f6feb))
* Fix msg_sender direct call exploit
([#7404](#7404))
([1dcae45](1dcae45))
* Missing NoteSelector from JSON RPC proxies
([#7493](#7493))
([b209fad](b209fad))
* **pxe:** Best effort noir call stack generation
([#7336](#7336))
([0c7459b](0c7459b))
* Validate gas used
([#7459](#7459))
([6dc7598](6dc7598))


### Miscellaneous

* **avm:** More stats and codegen cleanup
([#7475](#7475))
([1a6c7f2](1a6c7f2))
* Checking compute_encrypted_note_log against TS impl
([#7491](#7491))
([1e8a597](1e8a597))
* Included subrelation witness degrees in the relations relevant to
zk-sumcheck
([#7479](#7479))
([457a115](457a115))
* Replace relative paths to noir-protocol-circuits
([71960d4](71960d4))
* Turn on elaborator
([#7451](#7451))
([0599500](0599500))
</details>

<details><summary>barretenberg: 0.46.7</summary>

##
[0.46.7](barretenberg-v0.46.6...barretenberg-v0.46.7)
(2024-07-16)


### Features

* Point::fromXandSign(...)
([#7455](#7455))
([225c6f6](225c6f6))


### Bug Fixes

* **avm:** Update generated verifier
([#7492](#7492))
([f1216a7](f1216a7))


### Miscellaneous

* **avm:** More stats and codegen cleanup
([#7475](#7475))
([1a6c7f2](1a6c7f2))
* Included subrelation witness degrees in the relations relevant to
zk-sumcheck
([#7479](#7479))
([457a115](457a115))
</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 17, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.46.7](AztecProtocol/aztec-packages@aztec-package-v0.46.6...aztec-package-v0.46.7)
(2024-07-16)


### Features

* Devnet updates
([#7421](AztecProtocol/aztec-packages#7421))
([103f099](AztecProtocol/aztec-packages@103f099))


### Bug Fixes

* Cli l1-chain-id option
([#7490](AztecProtocol/aztec-packages#7490))
([307bc57](AztecProtocol/aztec-packages@307bc57))


### Miscellaneous

* Turn on elaborator
([#7451](AztecProtocol/aztec-packages#7451))
([0599500](AztecProtocol/aztec-packages@0599500))
</details>

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

##
[0.46.7](AztecProtocol/aztec-packages@barretenberg.js-v0.46.6...barretenberg.js-v0.46.7)
(2024-07-16)


### Miscellaneous

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

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

##
[0.46.7](AztecProtocol/aztec-packages@aztec-packages-v0.46.6...aztec-packages-v0.46.7)
(2024-07-16)


### Features

* Add unconstrained context to txe
([#7448](AztecProtocol/aztec-packages#7448))
([699fb79](AztecProtocol/aztec-packages@699fb79))
* Add unconstrained getters to sharedmutable
([#7429](AztecProtocol/aztec-packages#7429))
([c0ff566](AztecProtocol/aztec-packages@c0ff566))
* Devnet updates
([#7421](AztecProtocol/aztec-packages#7421))
([103f099](AztecProtocol/aztec-packages@103f099))
* Point::fromXandSign(...)
([#7455](AztecProtocol/aztec-packages#7455))
([225c6f6](AztecProtocol/aztec-packages@225c6f6))


### Bug Fixes

* **avm:** Update generated verifier
([#7492](AztecProtocol/aztec-packages#7492))
([f1216a7](AztecProtocol/aztec-packages@f1216a7))
* Cli l1-chain-id option
([#7490](AztecProtocol/aztec-packages#7490))
([307bc57](AztecProtocol/aztec-packages@307bc57))
* Don't pass secrets to earthly-ci 'publish docs' command
([#7481](AztecProtocol/aztec-packages#7481))
([a3f6feb](AztecProtocol/aztec-packages@a3f6feb))
* Fix msg_sender direct call exploit
([#7404](AztecProtocol/aztec-packages#7404))
([1dcae45](AztecProtocol/aztec-packages@1dcae45))
* Missing NoteSelector from JSON RPC proxies
([#7493](AztecProtocol/aztec-packages#7493))
([b209fad](AztecProtocol/aztec-packages@b209fad))
* **pxe:** Best effort noir call stack generation
([#7336](AztecProtocol/aztec-packages#7336))
([0c7459b](AztecProtocol/aztec-packages@0c7459b))
* Validate gas used
([#7459](AztecProtocol/aztec-packages#7459))
([6dc7598](AztecProtocol/aztec-packages@6dc7598))


### Miscellaneous

* **avm:** More stats and codegen cleanup
([#7475](AztecProtocol/aztec-packages#7475))
([1a6c7f2](AztecProtocol/aztec-packages@1a6c7f2))
* Checking compute_encrypted_note_log against TS impl
([#7491](AztecProtocol/aztec-packages#7491))
([1e8a597](AztecProtocol/aztec-packages@1e8a597))
* Included subrelation witness degrees in the relations relevant to
zk-sumcheck
([#7479](AztecProtocol/aztec-packages#7479))
([457a115](AztecProtocol/aztec-packages@457a115))
* Replace relative paths to noir-protocol-circuits
([71960d4](AztecProtocol/aztec-packages@71960d4))
* Turn on elaborator
([#7451](AztecProtocol/aztec-packages#7451))
([0599500](AztecProtocol/aztec-packages@0599500))
</details>

<details><summary>barretenberg: 0.46.7</summary>

##
[0.46.7](AztecProtocol/aztec-packages@barretenberg-v0.46.6...barretenberg-v0.46.7)
(2024-07-16)


### Features

* Point::fromXandSign(...)
([#7455](AztecProtocol/aztec-packages#7455))
([225c6f6](AztecProtocol/aztec-packages@225c6f6))


### Bug Fixes

* **avm:** Update generated verifier
([#7492](AztecProtocol/aztec-packages#7492))
([f1216a7](AztecProtocol/aztec-packages@f1216a7))


### Miscellaneous

* **avm:** More stats and codegen cleanup
([#7475](AztecProtocol/aztec-packages#7475))
([1a6c7f2](AztecProtocol/aztec-packages@1a6c7f2))
* Included subrelation witness degrees in the relations relevant to
zk-sumcheck
([#7479](AztecProtocol/aztec-packages#7479))
([457a115](AztecProtocol/aztec-packages@457a115))
</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
4 participants