Split expensive tests based on n={1, 2, 3}#194
Merged
automergerpr-permission-manager[bot] merged 6 commits intoproofsfrom Apr 15, 2026
Merged
Split expensive tests based on n={1, 2, 3}#194automergerpr-permission-manager[bot] merged 6 commits intoproofsfrom
automergerpr-permission-manager[bot] merged 6 commits intoproofsfrom
Conversation
Stevengre
approved these changes
Apr 14, 2026
4443daf to
f4b06c4
Compare
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
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.
This PR adds test functions with assumptions in order to split expensive multisig proofs into per-N variants (n=1, n=2, n=3)
The most expensive multisig proof tests (
burn,burn_checked,transfer,transfer_checked,set_authority_account,set_authority_mint) each explore all three values ofN(number of registered signers) in a single proof. Thevalidate_ownersigner-checking loop produces an N=1/N=2/N=3 cascade, multiplying the combinatorial path count and making these proofs very large (40+ hours, high memory usage).This PR adds
_n1,_n2,_n3variants of each test function that constrainmultisig.nto a specific value instead of the range1..MAX_SIGNERS. Each variant replaces:with:
The rest of the function body is identical. The three per-N proofs together cover the same state space as the original combined proof.
Functions added (18 total, 3 per test):
test_process_burn_multisig_n1/n2/n3test_process_burn_checked_multisig_n1/n2/n3test_process_transfer_multisig_n1/n2/n3test_process_transfer_checked_multisig_n1/n2/n3test_process_set_authority_account_multisig_n1/n2/n3test_process_set_authority_mint_multisig_n1/n2/n3Each variant is added to the same spec file as the original function and referenced in
use_testsin bothp-tokenandspl-tokenentrypoints to ensure inclusion in the smir json.Expected benefits:
Mthreshold remains symbolic (1..MAX_SIGNERS) in all variants, but we could choose to further reduce branching by restricting this in favor of more variants as well.Original functions are preserved — the combined
test_process_*_multisigfunctions remain unchanged, for dispatch.Also included: A minor fix adding a missing doc comment on
MAX_SIGNERSininterface/src/instruction.rs(pre-existing lint error for spl-token builds).