Skip to content

feat: merge-train/avm#18867

Merged
fcarreiro merged 5 commits into
nextfrom
merge-train/avm
Dec 8, 2025
Merged

feat: merge-train/avm#18867
fcarreiro merged 5 commits into
nextfrom
merge-train/avm

Conversation

@AztecBot

@AztecBot AztecBot commented Dec 8, 2025

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
test(avm): e2e tests can optionally dump avm circuit inputs to files (#18747)
feat(avm): don't hash bytecode in fast simulation (#18853)
chore(avm): use ContractDeploymentData.fromPlainObject (#18855)
chore(avm): earlier bytecode deduplication
END_COMMIT_OVERRIDE

…18747)

[Engineering Design
Document](https://www.notion.so/aztecnetwork/E2E-AVM-Circuit-Inputs-Collection-Testing-2bea1f6b0e35809384e1fad21691c59d)

To gain confidence in the AVM circuit (its completeness in particular),
we would like to prove all end-to-end tests. Changing all of those tests
to run provers is a huge task and would lead to very slow tests.
Instead, we can take a much simpler approach of optionally dumping all
AvmCircuitInputs (basically the proving requests for the AVM) to a
tarball that gets cached. This can be wrapped in a CI job that runs on
`next` commits, and paired with another job that iterates over all such
AvmCircuitInputs and proves (or just check-circuits) them.

This will help us gain confidence in the AVM circuit, add a layer of
regression testing, and provide more transactions to feed our fuzzing
corpus.

**Proposed solution**: Add a `DumpingCppPublicTxSimulator` that extends
the base simulator and writes circuit inputs to disk after each
simulation. Control via an environment variable
`DUMP_AVM_INPUTS_TO_DIR`. Run nightly in CI, package results, and upload
to S3 cache. Run another nightly CI job to download from cache and prove
(or probably just check-circuit) all collected inputs.
AztecBot and others added 2 commits December 8, 2025 19:35
In fast simulation, don't hash bytecode and don't update check unless asking for hints.

Solves #18161 and https://linear.app/aztec-labs/issue/AVM-12/disable-bytecode-hashing-during-fast-simulation.

The following bench was just running before and after once, so don't trust it a lot. We'll see the real change when this lands on next.

# Performance Comparison: Before vs After

| TX     | Before (ms) | After (ms) | Difference % |
| ------ | ----------- | ---------- | ------------ |
| TX 1   | 45.6205     | 32.5902    | -28.56%      |
| TX 2   | 45.0508     | 14.1821    | -68.52%      |
| TX 3   | 43.4434     | 15.7217    | -63.81%      |
| TX 4   | 27.1896     | 16.8379    | -38.07%      |
| TX 5   | 14.2418     | 15.0181    | 5.45%        |
| TX 6   | 35.6377     | 15.7467    | -55.81%      |
| TX 7   | 25.9184     | 15.5752    | -39.91%      |
| TX 8   | 39.0134     | 15.1753    | -61.10%      |
| TX 9   | 27.8695     | 14.4692    | -48.08%      |
| TX 10  | 59.7841     | 14.3228    | -76.04%      |
| TX 11  | 57.9308     | 14.8002    | -74.45%      |
| TX 12  | 35.5910     | 15.8639    | -55.43%      |
| TX 13  | 15.5797     | 13.0764    | -16.07%      |
| TX 14  | 12.9283     | 61.8159    | 378.14%      |
| TX 15  | 13.6121     | 50.7118    | 272.55%      |
| TX 16  | 12.9670     | 34.7158    | 167.72%      |
| TX 17  | 14.1347     | 13.3011    | -5.90%       |
| TX 18  | 12.2613     | 12.6620    | 3.27%        |
| TX 19  | 13.7812     | 12.0825    | -12.33%      |
| TX 20  | 13.6484     | 13.0992    | -4.02%       |
| TX 21  | 13.4302     | 11.6249    | -13.44%      |
| TX 22  | 111.1149    | 10.3152    | -90.72%      |
| TX 23  | 40.7040     | 12.4170    | -69.50%      |
| TX 24  | 15.7238     | 12.3420    | -21.51%      |
| TX 25  | 11.2228     | 12.7231    | 13.37%       |
| TX 26  | 14.4293     | 33.2565    | 130.48%      |
| TX 27  | 13.1613     | 14.6755    | 11.51%       |
| TX 28  | 13.3343     | 11.8471    | -11.15%      |
| TX 29  | 15.0849     | 13.6830    | -9.29%       |
| TX 30  | 12.7343     | 11.2850    | -11.38%      |
| TX 31  | 45.3641     | 11.3602    | -74.96%      |
| TX 32  | 14.6793     | 13.8814    | -5.44%       |
| TX 33  | 15.1199     | 11.1683    | -26.13%      |
| TX 34  | 13.7063     | 18.0565    | 31.74%       |
| TX 35  | 14.3068     | 16.4247    | 14.80%       |
| TX 36  | 14.9269     | 15.1366    | 1.40%        |
| TX 37  | 15.4937     | 91.5274    | 490.74%      |
| TX 38  | 15.7002     | 32.1775    | 104.95%      |
| TX 39  | 15.1609     | 34.0217    | 124.40%      |
| TX 40  | 15.6692     | 32.1142    | 104.95%      |
| TX 41  | 16.5157     | 19.6163    | 18.77%       |
| TX 42  | 16.2124     | 13.6257    | -15.95%      |
| TX 43  | 17.9787     | 30.9630    | 72.22%       |
| TX 44  | 20.5974     | 23.4374    | 13.79%       |
| TX 45  | 17.3338     | 29.7317    | 71.52%       |
| TX 46  | 29.1956     | 13.2776    | -54.52%      |
| TX 47  | 30.5091     | 15.0963    | -50.52%      |
| TX 48  | 29.2279     | 15.7975    | -45.95%      |
| TX 49  | 29.5552     | 15.7246    | -46.80%      |
| TX 50  | 29.3517     | 15.9813    | -45.55%      |
| TX 51  | 30.3135     | 20.9737    | -30.81%      |
| TX 52  | 29.6178     | 16.3860    | -44.68%      |
| TX 53  | 31.7046     | 21.9473    | -30.78%      |
| TX 54  | 31.2743     | 19.2922    | -38.31%      |
| TX 55  | 31.4366     | 19.0294    | -39.47%      |
| TX 56  | 40.4035     | 27.2617    | -32.53%      |
| TX 57  | 43.0120     | 26.9692    | -37.30%      |
| TX 58  | 53.8648     | 51.7758    | -3.88%       |
| TX 59  | 56.3566     | 41.1194    | -27.04%      |
| TX 60  | 80.4779     | 68.8234    | -14.48%      |
| TX 61  | 108.5981    | 96.5275    | -11.11%      |
| TX 62  | 30.1644     | 14.7178    | -51.21%      |
| TX 63  | 116.4025    | 102.8303   | -11.66%      |
| TX 64  | 27.4064     | 14.6618    | -46.50%      |
| TX 65  | 26.8179     | 13.4844    | -49.72%      |
| TX 66  | 104.8157    | 96.1230    | -8.29%       |
| TX 67  | 87.5321     | 57.7488    | -34.02%      |
| TX 68  | 72.0782     | 58.4979    | -18.84%      |
| TX 69  | 44.7683     | 35.1704    | -21.44%      |
| TX 70  | 15.4529     | 13.9217    | -9.91%       |
| TX 71  | 12.0968     | 11.6362    | -3.81%       |
| TX 72  | 16.0817     | 13.9407    | -13.31%      |
| TX 73  | 12.6076     | 11.1379    | -11.66%      |
| TX 74  | 13.5392     | 10.6382    | -21.42%      |
| TX 75  | 16.1866     | 12.4156    | -23.28%      |
| TX 76  | 12.9790     | 10.6062    | -18.28%      |
| TX 77  | 41.2954     | 31.2786    | -24.25%      |
| TX 78  | 42.9297     | 33.5444    | -21.87%      |
| TX 79  | 41.3766     | 31.8146    | -23.11%      |
| TX 80  | 24.9970     | 18.8563    | -24.57%      |
| TX 81  | 15.0835     | 12.5931    | -16.52%      |
| TX 82  | 33.4667     | 29.3651    | -12.26%      |
| TX 83  | 26.6582     | 23.3770    | -12.31%      |
| TX 84  | 35.6922     | 30.4587    | -14.66%      |
| TX 85  | 106.9044    | 82.7466    | -22.60%      |
| TX 86  | 249.9548    | 242.4194   | -3.01%       |
| TX 87  | 58.4410     | 40.4346    | -30.81%      |
| TX 88  | 28.3157     | 14.2439    | -49.70%      |
| TX 89  | 27.2518     | 14.6348    | -46.30%      |
| TX 90  | 31.8427     | 15.0903    | -52.61%      |
| TX 91  | 27.6194     | 14.9010    | -46.05%      |
| TX 92  | 30.1784     | 15.1709    | -49.73%      |
| TX 93  | 30.1447     | 16.0628    | -46.71%      |
| TX 94  | 30.5910     | 17.4399    | -42.99%      |
| TX 95  | 31.9434     | 17.2256    | -46.07%      |
| TX 96  | 33.0917     | 17.7947    | -46.23%      |
| TX 97  | 32.9948     | 18.0287    | -45.36%      |
| TX 98  | 40.3504     | 27.3818    | -32.14%      |
| TX 99  | 40.4654     | 26.2407    | -35.15%      |
| TX 100 | 54.7813     | 40.5642    | -25.95%      |
| TX 101 | 58.3964     | 40.3257    | -30.95%      |
| TX 102 | 83.9649     | 67.0056    | -20.20%      |
| TX 103 | 107.8069    | 94.8606    | -12.01%      |
| TX 104 | 29.5196     | 15.4562    | -47.64%      |
| TX 105 | 113.7004    | 102.0835   | -10.22%      |
| TX 106 | 25.9757     | 12.7171    | -51.04%      |
| TX 107 | 26.7753     | 11.7045    | -56.29%      |
| TX 108 | 105.3427    | 91.6692    | -12.98%      |
| TX 109 | 73.3440     | 58.8163    | -19.81%      |
| TX 110 | 73.1386     | 58.2437    | -20.36%      |
We have a better way to do this, so use it.
@fcarreiro fcarreiro enabled auto-merge December 8, 2025 20:07
@fcarreiro fcarreiro disabled auto-merge December 8, 2025 20:13
@fcarreiro fcarreiro enabled auto-merge December 8, 2025 20:19
@fcarreiro fcarreiro added this pull request to the merge queue Dec 8, 2025
Merged via the queue into next with commit 998ab54 Dec 8, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants