Skip to content

chore(omni-executor): upgrade solana 2.x -> 3.x + anchor 1.0#4027

Merged
Kailai-Wang merged 3 commits into
devfrom
chore/omni-executor-solana-4
May 31, 2026
Merged

chore(omni-executor): upgrade solana 2.x -> 3.x + anchor 1.0#4027
Kailai-Wang merged 3 commits into
devfrom
chore/omni-executor-solana-4

Conversation

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

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-client 2.2 → 3.x, spl-token 7 → 9, spl-associated-token-account 6 → 8
  • anchor-client / anchor-lang 0.32 → 1.0 — in both the worker client and the accounting-contract crate (the client builds instructions from the contract's generated types, so both must share the same anchor trait versions)
  • added split-out crates solana-commitment-config, solana-system-interface, solana-sdk-ids (paths solana-sdk no longer re-exports)

Why 3.x and 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 while solana-rpc-client wants 3.1, so Transaction fails the SerializableTransaction bound. solana 3.x is the coherent set anchor 1.0 was built against.

Code changes (small / mechanical)

  • anchor 1.0 dropped the anchor_client::solana_sdk re-export -> depend on solana-sdk directly + the split-out crates for commitment_config / system_program / bpf_loader_upgradeable.
  • anchor 1.0 CpiContext::new now takes a Pubkey (not the program AccountInfo).
  • #![allow(clippy::diverging_sub_expression)] on the contract (anchor's #[program] macro expansion trips the lint).

Contract workspace

  • rust-toolchain 1.87 -> 1.89 (required by solana 3.x crates)
  • solana-rpc-client pinned to 3.1.14 (anchor-client 1.0.2 calls a method absent before 3.1.14)
  • proc-macro2 1.0.94 -> 1.0.106 (anchor-syn 1.0.2 handles >= 0.95)

Verification

cargo check --workspace --locked + cargo clippy --workspace -- -D warnings pass for the main workspace; cargo check passes for the contract sub-workspace (program + tests).

Required before merge

This touches the on-chain accounting-contract crate (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:

  • a real anchor build in CI (contract-check; the runner may need rust >= 1.89)
  • devnet verification of the new worker interacting with the deployed accounting program (pay/withdraw/nonce reads)

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
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
heima-aa-demo-app Ignored Ignored May 31, 2026 11:20pm

Request Review

@Kailai-Wang Kailai-Wang enabled auto-merge (squash) May 31, 2026 23:20
@Kailai-Wang Kailai-Wang merged commit 7a2bc37 into dev May 31, 2026
15 checks passed
@Kailai-Wang Kailai-Wang deleted the chore/omni-executor-solana-4 branch May 31, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant