Migrate all Anchor projects from 0.32.1 to 1.0.0-rc.5#548
Open
mikemaccana-edwardbot wants to merge 5 commits intosolana-developers:mainfrom
Open
Migrate all Anchor projects from 0.32.1 to 1.0.0-rc.5#548mikemaccana-edwardbot wants to merge 5 commits intosolana-developers:mainfrom
mikemaccana-edwardbot wants to merge 5 commits intosolana-developers:mainfrom
Conversation
Rust changes (48 Anchor programs): - anchor-lang 0.32.1 → 1.0.0-rc.5 - anchor-spl 0.32.1 → 1.0.0-rc.5 - CpiContext::new() program arg: .to_account_info() → .key() (Anchor 1.0 takes Pubkey) - Context lifetime params: 4 → 2 (transfer-fee project) - Removed interface-instructions feature (transfer-hook projects) - Removed [registry] section from all Anchor.toml files TypeScript changes: - @coral-xyz/anchor → @anchor-lang/core 1.0.0-rc.5 - TypeScript bumped to ^5.3.3 where needed Transfer-hook projects (7): - Added .map_err() wrappers on spl-tlv-account-resolution calls to bridge solana-program-error 2.x → 3.x ProgramError type gap - transmute_pubkey() helper for solana-pubkey 2.x → 3.x in transfer-cost - Fixed #[instruction] attribute mismatches in transfer-switch (stricter in 1.0) - AccountInfo → UncheckedAccount in Accounts structs Compression projects (3): - Replaced mpl-bubblegum 2.1.1 and spl-account-compression 1.0.0 CPI wrappers with raw invoke()/invoke_signed() — these crates depend on Solana 2.x types and have no Solana 3.x compatible release yet - New bubblegum_types.rs in cutils with reimplemented types using borsh 1.x - Added sha3 crate for keccak256 (solana_program::keccak removed in Solana 3.x) Why: Anchor 1.0 is the current release candidate. This migration ensures all program-examples build against the latest framework. Pin to RC until stable.
…erging_sub_expression - Regenerated root Cargo.lock to resolve solana-address version conflicts - basics/rent: replaced try_to_vec() with borsh::to_vec() (borsh 1.x compat) - clippy: allow diverging_sub_expression (false positive from Anchor 1.0 #[program] macro)
- Box large InterfaceAccount fields to avoid BPF stack frame overflow (12 accounts exceeded 4096-byte limit in Anchor 1.0's try_accounts) - Upgrade spl-discriminator 0.4.1→0.5.2, spl-tlv-account-resolution 0.9.0→0.11.1, spl-transfer-hook-interface 0.9.0→2.1.0 (now compatible with Solana 3.x) - Remove transmute_pubkey() hack (no longer needed with matching Pubkey types)
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
Migrates all 48 Anchor programs from anchor-lang 0.32.1 to 1.0.0-rc.5 (latest release candidate, published 2026-03-20).
CI fully green on fork — all Anchor tests pass, Rust lint passes.
Rust changes (48 programs)
anchor-lang0.32.1 → 1.0.0-rc.5anchor-spl0.32.1 → 1.0.0-rc.5CpiContext::new()program arg:.to_account_info()→.key()(Anchor 1.0 takesPubkey)Contextlifetime params: 4 → 2 (transfer-fee)interface-instructionsfeature (transfer-hook projects)[registry]section from all Anchor.toml filesTypeScript changes
@coral-xyz/anchor→@anchor-lang/core1.0.0-rc.5Transfer-hook projects (7)
.map_err()wrappers onspl-tlv-account-resolutioncalls for solana-program-error 2.x → 3.x bridgeBox<InterfaceAccount>for large account structs (BPF stack overflow fix)AccountInfo→UncheckedAccountin Accounts structsCompression projects (3)
mpl-bubblegum2.1.1 andspl-account-compression1.0.0 CPI wrappers with rawinvoke()/invoke_signed()(no Solana 3.x compatible releases available)bubblegum_types.rsin cutils with reimplemented types using borsh 1.xsha3crate for keccak256Why
Anchor 1.0 is the current release candidate (v1.0.0-rc.5). This migration ensures all program-examples build against the latest framework.