trident icon indicating copy to clipboard operation
trident copied to clipboard

🐛 [BUG] - `solana-sdk` version constraint mismatch between the docs and the actual codebase

Open IaroslavMazur opened this issue 3 months ago • 1 comments

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

  1. Direct pinning: Even when explicitly setting solana-sdk = ">=1.17.3" in Cargo.toml, the dependency resolves to solana-sdk v2.0.25 due to transitive constraints.

  2. Transitive pinning via trident-svm: The trident-svm crate (a transitive dependency of trident-fuzz) pins solana-program = "=2.0.0", which forces the entire dependency tree to use Solana 2.0.x.

  3. 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's solana-program = "=2.0.0" constraint
    • Result: Cannot share code between fuzz tests and the actual program

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

  1. Update trident-svm to use a more flexible Solana version constraint (e.g., >=1.17.3 or ^2.0 instead of =2.0.0)
  2. 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

IaroslavMazur avatar Nov 12 '25 12:11 IaroslavMazur

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.

lukacan avatar Nov 13 '25 12:11 lukacan