Conversation
Bumps workspace dependency versions in target_chains/solana to align with anchor 1.x.x requirements: - anchor-lang / anchor-client: 0.32.1 -> 1.0.2 - solana-* monolith crates: 2 -> 3 (anchor 1.0 requires solana-pubkey 3.x to avoid Pubkey type incompatibility between solana-program 2.x and anchor's internal re-exports) - solana-system-interface: 1 -> 2 - borsh: 0.10.4 -> 1.5.3 NOTE: workspace does NOT build with these dep bumps alone. Significant source code changes are required across the solana workspace AND in pythnet_sdk to complete the migration. See issue progress notes for the full scope analysis.
Build status: still WIP. pyth-solana-receiver-sdk now compiles cleanly;
wormhole-core-bridge-solana down to 21 errors (was 70+).
Changes in this commit:
pythnet_sdk
- Bump borsh dep from 0.10.3 -> 1.5.3 (with derive + unstable__schema
features). When pythnet_sdk is consumed via target_chains/solana
(anchor 1.x / borsh 1.5), the borsh trait impls now match the
consumer's borsh version. Root workspace (anchor 0.32, where the
crate continues to build cleanly) coexists because pythnet_sdk's
direct borsh dep is now 1.5 and its derives produce 1.5 impls.
pyth_sdk's transitive borsh 0.9 dep does not conflict because
pythnet_sdk does not derive borsh on any pyth-sdk-owned type.
- merkle.rs: #[borsh_skip] -> #[borsh(skip)] (rename in borsh 1.x),
BorshSerialize::try_to_vec -> borsh::to_vec (removed in 1.x).
pyth_solana_receiver_sdk
- Cargo.toml: add explicit borsh dep so the borsh 1.x derive's
proc_macro_crate resolution can find "borsh" in [dependencies].
- cpi/mod.rs: AnchorSerialize::try_to_vec -> borsh::to_vec (try_to_vec
is no longer dyn-callable on AnchorSerialize trait in anchor 1.x).
wormhole-core-bridge-solana
- Wrap sol_memcpy / sol_memset calls in unsafe blocks (now unsafe in
solana 3.x: write_encoded_vaa, finalize_message_v1, write_message_v1,
verify_encoded_vaa_v1, legacy/processor/verify_signatures).
- types.rs: keccak::Hash.0 -> .to_bytes() (Hash field is private in
solana 3.x).
- verify_encoded_vaa_v1: hashed.0 -> hashed.to_bytes() (same).
- verify_signatures.rs: import sysvar from solana_program directly
(anchor 1.x's anchor_lang::solana_program::sysvar::instructions no
longer re-exports id / load_current_index_checked /
load_instruction_at_checked).
- upgrade_contract.rs, utils/mod.rs: use
anchor_lang::solana_program::bpf_loader_upgradeable and
anchor_lang::solana_program::system_program (the direct
solana_program crate doesn't expose these in 3.x; anchor 1.x
re-exports them via solana_sdk_ids).
- utils/cpi.rs: ctx.program / ctx.program.to_account_info() ->
*ctx.program_id (CpiContext field rename + type change from
AccountInfo to &Pubkey in anchor 1.x).
target_chains/solana Cargo.lock
- solana-keypair pinned to 3.1.0 (3.1.2 has an upstream bug:
five8::DecodeError doesn't satisfy Into<Box<dyn Error>> bound
that solana-keypair 3.1.2 introduced).
Remaining work (see issue progress for full breakdown):
- wormhole-core-bridge: 21 errors left, mostly E0308 mismatched types
(probably more CpiContext / AccountMeta API changes), E0309
"Self may not live long enough" (the ProcessLegacyInstruction trait
needs Bumps: Default + lifetime work for the new bumps struct),
E0502/E0597/E0621 borrow / lifetime issues, more E0609 ctx.program
field accesses in sdk/{prepare_message,publish_message}.rs and
utils/vaa/mod.rs.
- pyth-solana-receiver, pyth-push-oracle: not yet attempted.
- program_simulator, common_test_utils, cli: blocked behind the above.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tejasbadadare
approved these changes
Jun 15, 2026
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
Migrate Solana workspace to anchor 1.0.2.
Rationale
Teams have a requested an sdk with anchor 1.0.2.
How has this been tested?