Skip to content

refactor: extract solana-pubkey crate from solana-sdk#3889

Closed
sonicfromnewyoke wants to merge 3 commits intosolana-foundation:masterfrom
sonicfromnewyoke:sonic/extract-pubkey-from-solana-sdk
Closed

refactor: extract solana-pubkey crate from solana-sdk#3889
sonicfromnewyoke wants to merge 3 commits intosolana-foundation:masterfrom
sonicfromnewyoke:sonic/extract-pubkey-from-solana-sdk

Conversation

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor

Motivation

as a part of migration mentioned in #3884 solana-pubkey was extracted from solana-sdk and reexported in anchor-client alongside with solana-sdk for now

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 26, 2025

@sonicfromnewyoke is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@nutafrost nutafrost moved this to In Progress in Anchor 1.0 Oct 7, 2025
Copy link
Copy Markdown
Contributor

@Otter-0x4ka5h Otter-0x4ka5h left a comment

Choose a reason for hiding this comment

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

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor Author

I think the crate usage of solana_sdk::pubkey::Pubkey is still being used in some places.

1. https://github.com/sonicfromnewyoke/anchor/blob/5e782ebd793cff81819616bbdbfd6347dc062ad7/cli/src/rust_template.rs#L9

2. https://github.com/sonicfromnewyoke/anchor/blob/5e782ebd793cff81819616bbdbfd6347dc062ad7/cli/src/rust_template.rs#L760-L761

my bad, fixed

@nutafrost nutafrost moved this from In Progress to Security Review Done in Anchor 1.0 Oct 9, 2025
@nutafrost nutafrost added the Merge label Oct 9, 2025
@nutafrost nutafrost assigned jacobcreech and unassigned swaroop-osec Oct 9, 2025
@jacobcreech
Copy link
Copy Markdown
Collaborator

@sonicfromnewyoke Could you resolve the conflicts?

@swaroop-osec
Copy link
Copy Markdown
Collaborator

@sonicfromnewyoke can you please resolve the merge conflicts?

@sonicfromnewyoke sonicfromnewyoke force-pushed the sonic/extract-pubkey-from-solana-sdk branch from f702433 to 5c75543 Compare October 23, 2025 09:46
@sonicfromnewyoke
Copy link
Copy Markdown
Contributor Author

@jacobcreech sorry, i missed your message...
@swaroop-osec done

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor Author

this CI step fails because CLI generates rust test like follows:

// cli/src/lib.rs
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

// cli/sc/rust_template.rs
pub fn tests_cargo_toml(name: &str) -> String {
    format!(
        r#"[package]
name = "tests"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
rust-version = "{msrv}"

[dependencies]
anchor-client = "{version}"
{name} = {{ version = "0.1.0", path = "../programs/{name}" }}
"#,
        msrv = ANCHOR_MSRV,
        version = VERSION,
        name = name,
    )
}

that results into importing anchor-client of the previous version which doesn't contain changes from that commit/MR

to "fix" it we can use relative path to the client instead of the pinned version. What do you think about it @jacobcreech ?

@jacobcreech
Copy link
Copy Markdown
Collaborator

that results into importing anchor-client of the previous version which doesn't contain changes from that commit/MR
to "fix" it we can use relative path to the client instead of the pinned version. What do you think about it @jacobcreech?

This seems fine as it would pass the test after committed. I'll run the tests locally given this PR and see if that's true and then I think we'll be good.

@jamie-osec
Copy link
Copy Markdown
Collaborator

Closing as #4031 will handle this

@jamie-osec jamie-osec closed this Nov 22, 2025
@github-project-automation github-project-automation bot moved this from Security Review Done to Done in Anchor 1.0 Nov 22, 2025
@jamie-osec jamie-osec removed the Merge label Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants