Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace solana_sdk::pubkey with solana_pubkey in rpc #4237

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

kevinheavey
Copy link

Problem

This crate uses solana_sdk in many places. It will take multiple PRs to replace it everywhere

Summary of Changes

Find and replace solana_sdk::pubkey with solana_pubkey

Copy link

mergify bot commented Jan 2, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/web3.js (example)

Thank you for keeping the RPC clients in sync with the server API @kevinheavey.

@kevinheavey kevinheavey requested a review from LucasSte January 3, 2025 00:41
@LucasSte
Copy link

LucasSte commented Jan 3, 2025

Looks good to me. Perhaps @steviez or @bw-solana, who are more familiar with RPC, may want to have a look as well.

Copy link

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for cleaning this up!

@bw-solana
Copy link

For posterity, solana_sdk::pubkey has been deprecated since v2.1.0, but it is still used many places as a tunnel to access these includes from solana_pubkey:

#[cfg(feature = "full")]
pub use solana_pubkey::new_rand;
#[cfg(target_os = "solana")]
pub use solana_pubkey::syscalls;
pub use solana_pubkey::{
    bytes_are_curve_point, ParsePubkeyError, Pubkey, PubkeyError, MAX_SEEDS, MAX_SEED_LEN,
    PUBKEY_BYTES,
};

If we use solana_pubkey directly, we can remove this

Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

but it is still used many places as a tunnel to access these includes from solana_pubkey:
...
If we use solana_pubkey directly, we can remove this

Agreed and I imagine this is the desired endgame for when we fully deprecate solana_sdk::pubkey (I'm guessing whenever we launch a 3.0)

@steviez steviez merged commit aa1f0c8 into anza-xyz:master Jan 3, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants