chore(omni-executor): upgrade solana 2.x -> 3.x + anchor 1.0#4027
Merged
Conversation
Bumps the Solana stack and Anchor to the matched 3.x / 1.0 line: - solana-sdk/solana-client 2.2 -> 3.x, spl-token 7 -> 9, spl-associated-token-account 6 -> 8 - anchor-client/anchor-lang 0.32 -> 1.0 (worker client AND the accounting contract crate, since the client builds instructions from the contract's generated types and both must share the same anchor trait versions) Why 3.x not 4.x: anchor-client 1.0.2 targets the solana 3.x crate line; solana 4.0.0's own crates are internally inconsistent (solana-sdk wants solana-transaction 4.0, solana-rpc-client wants 3.1), failing the Transaction SerializableTransaction bound. Solana 3.x is the coherent set. Code changes are small/mechanical: anchor 1.0 dropped anchor_client::solana_sdk re-export -> depend on solana-sdk directly + split-out crates solana-commitment-config / solana-system-interface / solana-sdk-ids for paths solana-sdk no longer re-exports; CpiContext::new now takes a Pubkey; allow clippy::diverging_sub_expression on the contract (anchor #[program] macro). Contract workspace: rust-toolchain 1.87 -> 1.89 (solana 3.x requirement); solana-rpc-client pinned 3.1.14 (anchor-client 1.0.2 needs a method absent before 3.1.14); proc-macro2 1.0.94 -> 1.0.106 (anchor-syn 1.0.2 handles it). Contract logic unchanged and NOT redeployed; recompiled client stays compatible with the deployed program (anchor default discriminators unchanged across 0.31+).
…lana-4 # Conflicts: # tee-worker/omni-executor/Cargo.lock # tee-worker/omni-executor/Cargo.toml
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Upgrades the Solana stack and Anchor to the matched solana 3.x / anchor 1.0 line. Merged latest
dev, so it sits on top of #4025 (alloy 2.0).Version bumps
solana-sdk/solana-client2.2 → 3.x,spl-token7 → 9,spl-associated-token-account6 → 8anchor-client/anchor-lang0.32 → 1.0 — in both the worker client and theaccounting-contractcrate (the client builds instructions from the contract's generated types, so both must share the same anchor trait versions)solana-commitment-config,solana-system-interface,solana-sdk-ids(pathssolana-sdkno longer re-exports)Why 3.x and not 4.x
anchor-client 1.0.2targets the solana 3.x crate line. solana 4.0.0's own crates are internally inconsistent —solana-sdkwantssolana-transaction 4.0whilesolana-rpc-clientwants3.1, soTransactionfails theSerializableTransactionbound. solana 3.x is the coherent set anchor 1.0 was built against.Code changes (small / mechanical)
anchor_client::solana_sdkre-export -> depend onsolana-sdkdirectly + the split-out crates forcommitment_config/system_program/bpf_loader_upgradeable.CpiContext::newnow takes aPubkey(not the programAccountInfo).#![allow(clippy::diverging_sub_expression)]on the contract (anchor's#[program]macro expansion trips the lint).Contract workspace
rust-toolchain1.87 -> 1.89 (required by solana 3.x crates)solana-rpc-clientpinned to 3.1.14 (anchor-client 1.0.2 calls a method absent before 3.1.14)proc-macro21.0.94 -> 1.0.106 (anchor-syn 1.0.2 handles >= 0.95)Verification
cargo check --workspace --locked+cargo clippy --workspace -- -D warningspass for the main workspace;cargo checkpasses for the contract sub-workspace (program + tests).Required before merge
This touches the on-chain
accounting-contractcrate (recompiled with anchor 1.0, logic unchanged, NOT redeployed) and bumps the contract's rust toolchain to 1.89. The recompiled worker should stay compatible with the already-deployed program because anchor's default 8-byte discriminators are unchanged across 0.31+, but this must be confirmed:anchor buildin CI (contract-check; the runner may need rust >= 1.89)