-
Notifications
You must be signed in to change notification settings - Fork 231
Adds test files inclusion for Voyager verification #3550
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
Open
ametel01
wants to merge
13
commits into
foundry-rs:master
Choose a base branch
from
ametel01:verifier-test-filter-proc-macros
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adds test files inclusion for Voyager verification #3550
ametel01
wants to merge
13
commits into
foundry-rs:master
from
ametel01:verifier-test-filter-proc-macros
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces a `--test-files` flag to the `verify` command. This flag allows users to include test files located under the `src/` directory during contract verification with the Voyager verifier. This ensures that all relevant source code, including test-related code, is considered during the verification process, providing a more comprehensive and accurate verification result.
ddoktorski
reviewed
Jul 16, 2025
crates/sncast/tests/data/contracts/map_with_tests/src/lib.cairo
Outdated
Show resolved
Hide resolved
Extends Voyager tests to assert that the presence or absence of test files in the request to Voyager is correct. This ensures that the test files flag functions as expected.
Updates the Voyager tests to reflect changes in the location of the contract files. Simplifies the directory structure by removing the redundant `map_with_tests` directory and using `map` instead. This change improves code maintainability and test clarity.
The `--test-files` flag is not supported when using the Walnut verifier. This change throws an error when a user attempts to use the flag with the Walnut verifier to prevent unexpected behavior.
ddoktorski
reviewed
Jul 21, 2025
Co-authored-by: ddoktorski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Terminal
Adds --test-files flag to include test files in Voyager verification.
This change introduces a new
--test-files
flag to the sncast verify command. When used with the Voyager verifier, this flag includes files in the src/ directory, even those containing "test" in their path, in the source code uploaded for verification.Changes
test_files
boolean field to the Verify struct incrates/sncast/src/starknet_commands/verify/mod.rs
with a default value of false.crates/sncast/src/starknet_commands/verify/mod.rs
to pass thetest_files
flag to the verifier implementations.VerificationInterface
trait incrates/sncast/src/starknet_commands/verify/explorer.rs
to include a test_files parameter in the verify method.Voyager::verify
implementation incrates/sncast/src/starknet_commands/verify/voyager.rs
to accept thetest_files
flag and pass it toself.gather_files
.Voyager::gather_files
function to pass theinclude_test_files
flag to thepackage_source_files
function.package_source_files
function to include or exclude test files based on theinclude_test_files
flag. Added logic to walk through the path and check for "test" in the lowercase representation.map_with_tests
including source and test files undercrates/sncast/tests/data/contracts/
.--test-files
flag works correctly by using the new test contract.Impact
sncast verify
command now accepts a--test-files flag
.--test-files
flag is used with the Voyager verifier, test files undersrc/
are included in the verification process.test_files
flag.