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

fix(avm): fixes AVM full tests and decrease timeout to 35 minutes #7438

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

jeanmon
Copy link
Contributor

@jeanmon jeanmon commented Jul 11, 2024

Fixes failure in: https://github.com/AztecProtocol/aztec-packages/actions/runs/9885438673
Timeout decrease for the AVM full tests action to 35 minutes.

@jeanmon jeanmon marked this pull request as ready for review July 11, 2024 07:41
@jeanmon
Copy link
Contributor Author

jeanmon commented Jul 11, 2024

All AVM tests in full proving mode are passing: https://github.com/AztecProtocol/aztec-packages/actions/runs/9887473673

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • proof_construction_time_sha256_100_ms (16): 6,490 (+20%)
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,709 (-1%) 1,537 (-1%) 701 (-1%) 749 (-1%) 772 (-1%)
proof_construction_time_sha256_30_ms 11,712 (-1%) 3,134 (-2%) 1,399 (-1%) 1,439 (-1%) 1,467
proof_construction_time_sha256_100_ms 43,684 (-1%) 11,781 ⚠️ 6,490 (+20%) 5,404 5,343
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 59.0 (+2%) 87.0
proof_construction_time_poseidon_hash_30_ms 1,513 (-1%) 415 (-1%) 200 229 (+3%) 268
proof_construction_time_poseidon_hash_100_ms 5,614 (-1%) 1,515 (-1%) 675 735 (+1%) 741 (-1%)

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,592 6,600
l1_rollup_execution_gas 583,062 583,205 583,364
l2_block_processing_time_in_ms 757 (-1%) 1,412 2,706
l2_block_building_time_in_ms 13,173 26,082 50,970
l2_block_rollup_simulation_time_in_ms 13,173 26,081 50,970
l2_block_public_tx_process_time_in_ms 11,023 (-1%) 23,726 48,608

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,039 9,839
node_database_size_in_bytes 12,464,208 16,142,416
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 115 411 (-2%) 21,737 54,085 N/A N/A N/A N/A
private-kernel-inner 246 742 (-1%) 81,199 54,264 N/A N/A N/A N/A
private-kernel-tail 1,119 2,554 61,808 61,554 N/A N/A N/A N/A
base-parity 6.55 841 (+2%) 160 96.0 1,343 12,676 3.00 131,072
root-parity 108 (-1%) 110 (-2%) 64,860 96.0 44,133 12,676 3.00 4,194,304
base-rollup 4,240 5,054 180,315 632 44,502 13,476 28.0 4,194,304
root-rollup 155 112 (+2%) 51,261 652 37,811 (+1%) 13,412 26.0 4,194,304
public-kernel-setup 198 (+2%) 2,374 (+1%) 112,536 80,310 19,835 (-1%) 118,916 3,323 2,097,152
public-kernel-app-logic 151 (+1%) 3,252 112,536 80,310 8,913 118,916 3,323 1,048,576
public-kernel-tail 899 23,323 (+14%) 409,413 10,046 66,540 (+1%) 24,868 384 8,388,608
private-kernel-reset-small 339 (+2%) 1,108 (-2%) 85,493 53,954 N/A N/A N/A N/A
private-kernel-tail-to-public 6,097 (+6%) 3,044 (-1%) 868,634 1,632 N/A N/A N/A N/A
public-kernel-teardown 141 (+1%) 3,295 112,536 80,310 20,506 118,916 3,323 2,097,152
merge-rollup 57.7 N/A 33,566 632 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 161,274 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 397 (+1%) N/A N/A
ContractInstanceDeployer:deploy 1,376 9,344 25.5 N/A N/A
MultiCallEntrypoint:entrypoint 1,888 9,344 631 (+1%) N/A N/A
GasToken:deploy 1,344 9,344 568 (-1%) N/A N/A
SchnorrAccount:constructor 1,280 9,344 438 N/A N/A
SchnorrAccount:entrypoint 2,272 9,344 778 (+1%) N/A N/A
Token:privately_mint_private_note 1,248 9,344 518 (-1%) N/A N/A
FPC:fee_entrypoint_public 1,312 9,344 106 N/A N/A
Token:transfer 1,280 9,344 1,633 (+2%) N/A N/A
AuthRegistry:set_authorized (avm) 19,222 N/A N/A 95,392 2,315
FPC:prepare_fee (avm) 26,664 N/A N/A 95,456 3,073
Token:transfer_public (avm) 42,914 N/A N/A 95,456 3,345 (-1%)
AuthRegistry:consume (avm) 33,100 N/A N/A 95,424 3,010 (+1%)
FPC:pay_refund (avm) 36,829 N/A N/A 95,424 10,094 (-1%)
Benchmarking:create_note 1,312 9,344 427 (+1%) N/A N/A
SchnorrAccount:verify_private_authwit 1,248 9,344 41.4 N/A N/A
Token:unshield 1,344 9,344 1,311 (+1%) N/A N/A
FPC:fee_entrypoint_private 1,344 9,344 1,685 (+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 98.4 (-1%) 13,790
GasToken:set_portal 11.5 (-5%) 3,339
Token:constructor 127 (+4%) 23,692
FPC:constructor 92.0 (-1%) 13,592
GasToken:mint_public 81.9 10,158
Token:mint_public 59.9 (-5%) 19,034
Token:assert_minter_and_mint 109 (+5%) 12,925
AuthRegistry:set_authorized 43.7 (-3%) 7,812
FPC:prepare_fee 105 (-6%) 15,062
Token:transfer_public 32.2 (-14%) 31,218
FPC:pay_refund 135 (+2%) 25,260
Benchmarking:increment_balance 1,351 15,267
Token:_increase_public_balance 15.9 (+7%) 15,006
FPC:pay_refund_with_shielded_rebate 183 (+2%) 26,347

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.155

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 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.603 0.516 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 75.8 (-1%) 131 (-1%) 244 (-1%) 468 (-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.494 0.466 0.449 (-1%) 0.442 (-1%) 0.437 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.0 111 (-1%) 182 (-1%) 351 (-1%) 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.507 0.498 (-1%) 0.482 (-1%) 0.475 (-1%) 0.475 (-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 | |
| - | |

@jeanmon jeanmon enabled auto-merge (squash) July 11, 2024 08:36
@jeanmon jeanmon merged commit 2a7494b into master Jul 11, 2024
95 checks passed
@jeanmon jeanmon deleted the jm/avm-full-tests-fixes-and-timeout-decrease branch July 11, 2024 08:43
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.3</summary>

##
[0.46.3](aztec-package-v0.46.2...aztec-package-v0.46.3)
(2024-07-11)


### Miscellaneous

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

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

##
[0.46.3](barretenberg.js-v0.46.2...barretenberg.js-v0.46.3)
(2024-07-11)


### Miscellaneous

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

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

##
[0.46.3](aztec-packages-v0.46.2...aztec-packages-v0.46.3)
(2024-07-11)


### Features

* Add CLI argument for debugging comptime blocks
(noir-lang/noir#5192)
([97ecff5](97ecff5))
* Add reset tiny and optimize tail
([#7422](#7422))
([399917b](399917b))
* **avm:** Calldatacopy and return gadget
([#7415](#7415))
([ec39e4e](ec39e4e)),
closes
[#7381](#7381)
[#7211](#7211)
* **avm:** Make ProverPolynomials::get_row return references
([#7419](#7419))
([108fc5f](108fc5f))
* Integrate new proving systems in e2e
([#6971](#6971))
([723a0c1](723a0c1))
* Lsp rename/find-all-references for struct members
(noir-lang/noir#5443)
([97ecff5](97ecff5))
* MSM sorting
([#7351](#7351))
([5cbdc54](5cbdc54))
* **optimization:** Deduplicate more instructions
(noir-lang/noir#5457)
([97ecff5](97ecff5))
* Prefix operator overload trait dispatch
(noir-lang/noir#5423)
([97ecff5](97ecff5))
* Remove proof from L1 Rollup process
([#7347](#7347))
([2645eab](2645eab)),
closes
[#7346](#7346)
* Remove ram tables in note_getter
([#7434](#7434))
([fd67da3](fd67da3))
* Sync from aztec-packages (noir-lang/noir#5467)
([97ecff5](97ecff5))
* Typing return values of embedded_curve_ops
([#7413](#7413))
([db96077](db96077))


### Bug Fixes

* **avm:** Fixes AVM full tests and decrease timeout to 35 minutes
([#7438](#7438))
([2a7494b](2a7494b))
* Memory init with no other ops gate counting
([#7427](#7427))
([e7177ba](e7177ba))
* Pass secrets to ci-arm.yml
([#7436](#7436))
([619501d](619501d))
* Remove compile-time error for invalid indices
(noir-lang/noir#5466)
([97ecff5](97ecff5))
* Using different generators in private refund
([#7414](#7414))
([59b92ca](59b92ca)),
closes
[#7320](#7320)


### Miscellaneous

* **bb:** Fix double increment
([#7428](#7428))
([7870a58](7870a58))
* **boxes:** Adding an init command for an empty project
([#7398](#7398))
([a6a605d](a6a605d))
* Bump bb to 0.45.1 (noir-lang/noir#5469)
([97ecff5](97ecff5))
* Disable flaky cheat code test
([7b8c2ba](7b8c2ba))
* Document EmbeddedCurvePoint
(noir-lang/noir#5468)
([97ecff5](97ecff5))
* Minimize usage of get_row in inverse computation
([#7431](#7431))
([f177887](f177887))
* Private refund cleanup
([#7403](#7403))
([ebec8ff](ebec8ff))
* Replace relative paths to noir-protocol-circuits
([842f6d1](842f6d1))
* Unbundle `check_array_is_initialized`
(noir-lang/noir#5451)
([97ecff5](97ecff5))
</details>

<details><summary>barretenberg: 0.46.3</summary>

##
[0.46.3](barretenberg-v0.46.2...barretenberg-v0.46.3)
(2024-07-11)


### Features

* **avm:** Calldatacopy and return gadget
([#7415](#7415))
([ec39e4e](ec39e4e)),
closes
[#7381](#7381)
[#7211](#7211)
* **avm:** Make ProverPolynomials::get_row return references
([#7419](#7419))
([108fc5f](108fc5f))
* Integrate new proving systems in e2e
([#6971](#6971))
([723a0c1](723a0c1))
* MSM sorting
([#7351](#7351))
([5cbdc54](5cbdc54))


### Bug Fixes

* **avm:** Fixes AVM full tests and decrease timeout to 35 minutes
([#7438](#7438))
([2a7494b](2a7494b))
* Memory init with no other ops gate counting
([#7427](#7427))
([e7177ba](e7177ba))


### Miscellaneous

* **bb:** Fix double increment
([#7428](#7428))
([7870a58](7870a58))
* Minimize usage of get_row in inverse computation
([#7431](#7431))
([f177887](f177887))
</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.3</summary>

##
[0.46.3](AztecProtocol/aztec-packages@aztec-package-v0.46.2...aztec-package-v0.46.3)
(2024-07-11)


### Miscellaneous

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

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

##
[0.46.3](AztecProtocol/aztec-packages@barretenberg.js-v0.46.2...barretenberg.js-v0.46.3)
(2024-07-11)


### Miscellaneous

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

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

##
[0.46.3](AztecProtocol/aztec-packages@aztec-packages-v0.46.2...aztec-packages-v0.46.3)
(2024-07-11)


### Features

* Add CLI argument for debugging comptime blocks
(noir-lang/noir#5192)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Add reset tiny and optimize tail
([#7422](AztecProtocol/aztec-packages#7422))
([399917b](AztecProtocol/aztec-packages@399917b))
* **avm:** Calldatacopy and return gadget
([#7415](AztecProtocol/aztec-packages#7415))
([ec39e4e](AztecProtocol/aztec-packages@ec39e4e)),
closes
[#7381](AztecProtocol/aztec-packages#7381)
[#7211](AztecProtocol/aztec-packages#7211)
* **avm:** Make ProverPolynomials::get_row return references
([#7419](AztecProtocol/aztec-packages#7419))
([108fc5f](AztecProtocol/aztec-packages@108fc5f))
* Integrate new proving systems in e2e
([#6971](AztecProtocol/aztec-packages#6971))
([723a0c1](AztecProtocol/aztec-packages@723a0c1))
* Lsp rename/find-all-references for struct members
(noir-lang/noir#5443)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* MSM sorting
([#7351](AztecProtocol/aztec-packages#7351))
([5cbdc54](AztecProtocol/aztec-packages@5cbdc54))
* **optimization:** Deduplicate more instructions
(noir-lang/noir#5457)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Prefix operator overload trait dispatch
(noir-lang/noir#5423)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Remove proof from L1 Rollup process
([#7347](AztecProtocol/aztec-packages#7347))
([2645eab](AztecProtocol/aztec-packages@2645eab)),
closes
[#7346](AztecProtocol/aztec-packages#7346)
* Remove ram tables in note_getter
([#7434](AztecProtocol/aztec-packages#7434))
([fd67da3](AztecProtocol/aztec-packages@fd67da3))
* Sync from aztec-packages (noir-lang/noir#5467)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Typing return values of embedded_curve_ops
([#7413](AztecProtocol/aztec-packages#7413))
([db96077](AztecProtocol/aztec-packages@db96077))


### Bug Fixes

* **avm:** Fixes AVM full tests and decrease timeout to 35 minutes
([#7438](AztecProtocol/aztec-packages#7438))
([2a7494b](AztecProtocol/aztec-packages@2a7494b))
* Memory init with no other ops gate counting
([#7427](AztecProtocol/aztec-packages#7427))
([e7177ba](AztecProtocol/aztec-packages@e7177ba))
* Pass secrets to ci-arm.yml
([#7436](AztecProtocol/aztec-packages#7436))
([619501d](AztecProtocol/aztec-packages@619501d))
* Remove compile-time error for invalid indices
(noir-lang/noir#5466)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Using different generators in private refund
([#7414](AztecProtocol/aztec-packages#7414))
([59b92ca](AztecProtocol/aztec-packages@59b92ca)),
closes
[#7320](AztecProtocol/aztec-packages#7320)


### Miscellaneous

* **bb:** Fix double increment
([#7428](AztecProtocol/aztec-packages#7428))
([7870a58](AztecProtocol/aztec-packages@7870a58))
* **boxes:** Adding an init command for an empty project
([#7398](AztecProtocol/aztec-packages#7398))
([a6a605d](AztecProtocol/aztec-packages@a6a605d))
* Bump bb to 0.45.1 (noir-lang/noir#5469)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Disable flaky cheat code test
([7b8c2ba](AztecProtocol/aztec-packages@7b8c2ba))
* Document EmbeddedCurvePoint
(noir-lang/noir#5468)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
* Minimize usage of get_row in inverse computation
([#7431](AztecProtocol/aztec-packages#7431))
([f177887](AztecProtocol/aztec-packages@f177887))
* Private refund cleanup
([#7403](AztecProtocol/aztec-packages#7403))
([ebec8ff](AztecProtocol/aztec-packages@ebec8ff))
* Replace relative paths to noir-protocol-circuits
([842f6d1](AztecProtocol/aztec-packages@842f6d1))
* Unbundle `check_array_is_initialized`
(noir-lang/noir#5451)
([97ecff5](AztecProtocol/aztec-packages@97ecff5))
</details>

<details><summary>barretenberg: 0.46.3</summary>

##
[0.46.3](AztecProtocol/aztec-packages@barretenberg-v0.46.2...barretenberg-v0.46.3)
(2024-07-11)


### Features

* **avm:** Calldatacopy and return gadget
([#7415](AztecProtocol/aztec-packages#7415))
([ec39e4e](AztecProtocol/aztec-packages@ec39e4e)),
closes
[#7381](AztecProtocol/aztec-packages#7381)
[#7211](AztecProtocol/aztec-packages#7211)
* **avm:** Make ProverPolynomials::get_row return references
([#7419](AztecProtocol/aztec-packages#7419))
([108fc5f](AztecProtocol/aztec-packages@108fc5f))
* Integrate new proving systems in e2e
([#6971](AztecProtocol/aztec-packages#6971))
([723a0c1](AztecProtocol/aztec-packages@723a0c1))
* MSM sorting
([#7351](AztecProtocol/aztec-packages#7351))
([5cbdc54](AztecProtocol/aztec-packages@5cbdc54))


### Bug Fixes

* **avm:** Fixes AVM full tests and decrease timeout to 35 minutes
([#7438](AztecProtocol/aztec-packages#7438))
([2a7494b](AztecProtocol/aztec-packages@2a7494b))
* Memory init with no other ops gate counting
([#7427](AztecProtocol/aztec-packages#7427))
([e7177ba](AztecProtocol/aztec-packages@e7177ba))


### Miscellaneous

* **bb:** Fix double increment
([#7428](AztecProtocol/aztec-packages#7428))
([7870a58](AztecProtocol/aztec-packages@7870a58))
* Minimize usage of get_row in inverse computation
([#7431](AztecProtocol/aztec-packages#7431))
([f177887](AztecProtocol/aztec-packages@f177887))
</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