deps: migrate rust workspace to solana 3.0#3830
Open
juan-malbeclabs wants to merge 12 commits into
Open
Conversation
211477b to
588a924
Compare
Bump the entire Rust workspace from solana-sdk 2.3.x to the solana 3.0 line plus the granular split crates (solana-pubkey, solana-instruction, solana-cpi, solana-sdk-ids, solana-system-interface, solana-commitment-config, solana-compute-budget-interface), aligning with the doublezero-solana programs. Onchain programs adapt to the 3.0 APIs (AccountInfo::resize, solana-sdk-ids for system/loader IDs, ProgramError::BorshIoError unit variant, AccountInfo::new without rent_epoch) and move to the Rust 1.91 build toolchain. Off-chain crates adapt the moved modules (commitment_config, compute_budget, system_instruction), the boxed ClientError.kind, the UiTransactionError conversion, and Keypair::try_from. SBF builds now require platform-tools >= v1.52; the Makefile pins --tools-version v1.54 and CI installs agave v3.0.4. Account layouts are unchanged: regenerated fixtures are byte-identical, so the Go, TypeScript, and Python SDKs are unaffected.
Bump the e2e base image SOLANA_VERSION to v3.0.4 and pass --tools-version v1.54 to the program cargo build-sbf steps, matching the workspace solana 3.0 migration.
… daily release The record validator test, the local start-test helpers, and the daily devnet program-release workflow each invoke cargo build-sbf directly. Pin --tools-version v1.54 (overridable via SBF_TOOLS_VERSION) so they build the solana 3.0 program dependency tree, which needs Cargo >= 1.85 (the default platform-tools v1.51 ships Cargo 1.84.x).
The local_validator_test-gated record_tests integration test imported CommitmentConfig from solana_sdk::commitment_config, which moved to the solana-commitment-config crate in solana 3.0. This test is only compiled under --cfg local_validator_test (run_record_test.sh), so it was missed by the regular cargo test build.
8b45110 to
b6aee90
Compare
Contributor
Findings1) Low: Program
|
elitegreg
approved these changes
Jun 4, 2026
elitegreg
left a comment
Contributor
There was a problem hiding this comment.
LGTM except the rust-version issue pointed out above.
WaitForTunnelUp returns as soon as the already-up first tunnel is up, so the single-shot post-connect doublezero status assertion could race the onchain propagation of the incrementally-added second multicast group and the daemon's 5s-cached program data. Poll doublezero user list until both clients show both groups before the post-connect checks, mirroring the modify_roles subtest.
This was referenced Jun 12, 2026
Resolve 6 manifest/lock conflicts. Restore reqwest json feature in sentinel and declare solana-commitment-config for client/doublezero after the doublezero-admin retirement landed on main. Off-chain workspace compiles under solana 3.0 and passes make rust-lint; SBF build unverified locally on arm64-linux, CI covers it.
solana 3.0 pulls aws-lc-sys into the CLI via rustls/quinn, which would raise a gnu-linked binary's glibc floor above Ubuntu 22.04. Build the CLI for x86_64-unknown-linux-musl instead: a fully static binary that loads on any Linux regardless of glibc, and ~5% smaller than the dynamic gnu build. Replaces rust-cli-no-aws-lc with rust-cli-static, which builds for musl and asserts the binary is statically linked.
…ilds The musl switch needs musl-tools and the x86_64-unknown-linux-musl rust target wherever the client goreleaser config is built. release.client.yml already had it; add it to release.pipeline.validation.yml (the release-validation-client check that regressed) and release.daily.yml (devnet client nightly). The CC/linker env comes from the goreleaser config.
x86_64-unknown-linux-musl produces a static-PIE binary that file reports as 'static-pie linked', not 'statically linked'. Accept both so the fully-static musl CLI passes the check.
# Conflicts: # CHANGELOG.md
…on tests The permission-flag PRs merged from main added authorize tests calling the pre-3.0 8-arg AccountInfo::new (Epoch::default() rent_epoch). Solana 3.0 dropped rent_epoch (7 args); remove it to match the rest of the v3 migration. Fixes the rust-lint lib-test compile break surfaced by the merge.
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.
Summary of Changes
solana-sdk2.3.x to the solana 3.0 line plus the granular split crates (solana-pubkey,solana-instruction,solana-cpi,solana-sdk-ids,solana-system-interface,solana-commitment-config,solana-compute-budget-interface), aligning with the doublezero-solana programs. This unblocks composing offchain RFC-20 CLI module crates (e.g. passport) into the unifieddoublezerobinary, which previously failed because those crates transitively require solana 3.x.AccountInfo::realloc→resize, system-program / BPF-upgradeable-loader IDs move tosolana-sdk-ids,ProgramError::BorshIoErroris now a unit variant, andAccountInfo::newdrops itsrent_epochargument. The programs build toolchain moves to Rust 1.91.commitment_config/compute_budget/system_instructionmodules, the now-boxedClientError.kind, theUiTransactionError→TransactionErrorconversion, andKeypair::from_bytes→Keypair::try_from.--tools-version v1.54viaSBF_TOOLS_VERSION, and CI installs agave v3.0.4.Testing Verification
-Dclippy::all -Dwarnings, and program clippy clean with the same flags.doublezero accountsdeserializes live devnet, testnet, and mainnet accounts successfully against the migrated SDK.