Skip to content

test(avm): e2e tests can optionally dump avm circuit inputs to files#18747

Merged
dbanks12 merged 8 commits into
merge-train/avmfrom
12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files
Dec 8, 2025
Merged

test(avm): e2e tests can optionally dump avm circuit inputs to files#18747
dbanks12 merged 8 commits into
merge-train/avmfrom
12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files

Conversation

@dbanks12

@dbanks12 dbanks12 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Engineering Design Document

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.

dbanks12 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch from b206756 to ad70f5c Compare December 3, 2025 22:25
@dbanks12 dbanks12 marked this pull request as ready for review December 3, 2025 22:26
@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch from ad70f5c to 479051b Compare December 3, 2025 22:35
@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch 9 times, most recently from 4197c52 to 985d629 Compare December 5, 2025 21:31
@dbanks12 dbanks12 requested review from ludamad and removed request for charlielye, fcarreiro and sirasistant December 6, 2025 01:13
Comment thread .github/workflows/nightly-avm-check-circuit.yml Outdated
Comment thread .github/workflows/nightly-avm-inputs-collection.yml Outdated
Comment thread .github/workflows/nightly-avm-inputs-collection.yml Outdated
@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch 2 times, most recently from aa1d3fe to b9e87bc Compare December 8, 2025 15:12
Comment thread .github/workflows/avm-circuit-inputs.yml Outdated
@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch 2 times, most recently from 2f6cfcd to 16deebe Compare December 8, 2025 18:24
@dbanks12 dbanks12 requested a review from ludamad December 8, 2025 18:25
run: |
# Use tree hash for tarball name - consistent across all environments
# Same content = same tree hash, even across different commits
TREE_HASH=$(git rev-parse HEAD^{tree})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the commit hash was probably fine but this works

aws s3 cp "s3://aztec-ci-artifacts/build-cache/$TARBALL_NAME" "./$TARBALL_NAME"

- name: Upload AVM inputs artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cool

@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch from 16deebe to ce61c4b Compare December 8, 2025 18:36
@ludamad

ludamad commented Dec 8, 2025

Copy link
Copy Markdown
Collaborator

LGTM

@dbanks12 dbanks12 force-pushed the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch from ce61c4b to eb7ebe5 Compare December 8, 2025 18:36
@dbanks12 dbanks12 merged commit 8f6b67f into merge-train/avm Dec 8, 2025
10 checks passed
@dbanks12 dbanks12 deleted the 12-03-test_avm_e2e_tests_can_optionally_dump_avm_circuit_inputs_to_files branch December 8, 2025 19:11
@AztecBot AztecBot mentioned this pull request Dec 8, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Dec 8, 2025
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
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.

2 participants