🐛 [BUG] - `solana-sdk` version constraint mismatch between the docs and the actual codebase
Description
Problem Description
The Trident documentation states that version 0.11.x supports Solana >=1.17.3 (see Installation), but in practice, the Solana SDK is pinned to version 2.0.x, preventing compatibility with programs that require newer Solana versions (e.g., 2.1.x or 2.2.x).
Expected Behavior
According to the Trident documentation, Trident 0.11.x should accept any Solana version >=1.17.3, allowing it to work with programs that use:
- Solana 2.0.x
- Solana 2.1.x
- etc.
Actual Behavior
-
Direct pinning: Even when explicitly setting
solana-sdk = ">=1.17.3"inCargo.toml, the dependency resolves tosolana-sdk v2.0.25due to transitive constraints. -
Transitive pinning via trident-svm: The
trident-svmcrate (a transitive dependency oftrident-fuzz) pinssolana-program = "=2.0.0", which forces the entire dependency tree to use Solana 2.0.x. -
Version conflict: This prevents importing code from programs that require newer Solana versions. For example:
- Programs using Anchor 0.31.1 require
solana-program ^2.1.0 - This conflicts with
trident-svm'ssolana-program = "=2.0.0"constraint - Result: Cannot share code between fuzz tests and the actual program
- Programs using Anchor 0.31.1 require
Workaround
Currently, the only workaround is to duplicate code between the fuzz tests and the main program, which:
- Increases maintenance burden
- Risks logic drift between implementations
- (Partially) defeats the purpose of testing the main program
Proposed Solution
- Update
trident-svmto use a more flexible Solana version constraint (e.g.,>=1.17.3or^2.0instead of=2.0.0) - Test compatibility with Anchor 0.31.1 and Solana 2.1+/2.2+
Environment
- Trident version: 0.11.0
- Rust version: 1.86 (as per docs)
- Anchor version: 0.31.1 (in the program being fuzzed)
- Solana version: ^2 (required by Anchor 0.31.1)
Additional Context
This issue affects projects that want to:
- Share utility functions between fuzz tests and the main program
- Import types or constants from the program being tested
- Maintain a single source of truth for business logic
The version mismatch forces code duplication, which is error-prone and increases maintenance overhead.
Reproduction steps
1. Create a Trident fuzz test project with `trident-fuzz = "0.11.0"`
2. Set `solana-sdk = ">=1.17.3"` in `Cargo.toml` (matching the documented support)
3. Try to add a dependency on a program that uses Anchor 0.31.1 (which requires Solana 2.0+)
4. Run `cargo check`
Logs
error: failed to select a version for `solana-program`.
OS
Mac
Hello, I can see this is confusing. The solana version docs refer to support of solana version which is used inside program. If the program is deployed through the entrypoint, there are program stubs implemented, which are implemnted for the mentioned solana version.