Bump generated clients and their dependencies#75
Conversation
lorisleiva
left a comment
There was a problem hiding this comment.
There is a lot of noise in this PR so allow me to highlight the changes that are significant enough to review.
| "@solana/kit": "^6.1.0" | ||
| "@solana/kit": "^6.4.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@solana/eslint-config-solana": "^6.0.0", | ||
| "@solana/kit-client-rpc": "^0.6.0", | ||
| "@solana/kit": "^6.1.0", | ||
| "@solana/kit-plugin-rpc": "^0.10.0", | ||
| "@solana/kit-plugin-signer": "^0.10.0", | ||
| "@solana/kit": "^6.4.0", |
There was a problem hiding this comment.
Bumping Kit and Kit plugins
| export const createClient = () => { | ||
| return createLocalClient().use(systemProgram()); | ||
| export const createTestClient = () => { | ||
| return createClient() | ||
| .use(generatedSigner()) | ||
| .use(solanaLocalRpc()) | ||
| .use(systemProgram()) | ||
| .use(airdropSigner(lamports(1_000_000_000n))); | ||
| }; |
There was a problem hiding this comment.
Changing the way we construct our test client to match latest Kit Plugin API.
| [features] | ||
| fetch = ["dep:solana-client", "dep:solana-sdk"] | ||
| fetch = ["dep:solana-client"] | ||
| test-sbf = [] | ||
| serde = ["dep:serde", "dep:serde_with", "kaigan/serde"] | ||
|
|
||
| [dependencies] | ||
| borsh = "^0.10" | ||
| kaigan = "^0.3" | ||
| borsh = "^1.0" | ||
| num-derive = "^0.4" | ||
| num-traits = "^0.2" | ||
| serde = { version = "^1.0", features = ["derive"], optional = true } | ||
| serde_with = { version = "^3.0", optional = true } | ||
| solana-client = { version = "2.3.4", optional = true } | ||
| solana-sdk = { version = "2.2.1", optional = true } | ||
| solana-program = "2.2.1" | ||
| solana-account = "~3.0" | ||
| solana-account-info = "~3.1" | ||
| solana-address = { version = "~2.4", features = [ | ||
| 'borsh', | ||
| 'copy', | ||
| 'curve25519', | ||
| 'decode', | ||
| ] } | ||
| solana-client = { version = "^3.0", optional = true } | ||
| solana-cpi = "~3.1" | ||
| solana-decode-error = "~2.3" | ||
| solana-instruction = "~3.2" | ||
| solana-program-error = "~3.0" | ||
| spl-collections = { version = "^0.1", features = ["borsh"] } | ||
| thiserror = "^1.0" | ||
| solana-account = "~2.2" | ||
| solana-account-info = "~2.3" | ||
| solana-instruction = "~2.3" | ||
| solana-program-error = "~2.2" | ||
| solana-pubkey = { version = "~2.4", features = ["curve25519", "borsh"] } | ||
| solana-cpi = "~2.2" |
There was a problem hiding this comment.
Update client dependencies to match latest Rust renderer code.
| "anchorTraits": false, | ||
| "formatCode": true, | ||
| "toolchain": "+nightly-2025-02-16" | ||
| "toolchain": "+nightly-2026-01-22" |
There was a problem hiding this comment.
Update Rust toolchains (matching stake program).
| "@codama/renderers-js": "^2.0.2", | ||
| "@codama/renderers-rust": "^2.0.0", | ||
| "@codama/renderers-js": "^2.2.0", | ||
| "@codama/renderers-rust": "^3.0.0", | ||
| "@solana/prettier-config-solana": "0.0.6", | ||
| "codama": "^1.5.0" | ||
| "codama": "^1.6.0" |
There was a problem hiding this comment.
Update Codama and JS/Rust renderers to the very latest stable versions.
| @@ -1,2 +1,2 @@ | |||
| [toolchain] | |||
| channel = "1.86.0" | |||
| channel = "1.93.0" | |||
There was a problem hiding this comment.
Update Rust toolchains (matching stake program).
| RUST_TOOLCHAIN_NIGHTLY="nightly-2025-02-16" | ||
| SOLANA_CLI_VERSION="2.3.4" | ||
| RUST_TOOLCHAIN_NIGHTLY="nightly-2026-01-22" | ||
| SOLANA_CLI_VERSION="3.1.8" |
There was a problem hiding this comment.
Update Rust toolchains and Solana version (matching stake program).
trevor-cortex
left a comment
There was a problem hiding this comment.
Summary
Regenerates the JS + Rust clients against newer Codama renderers and bumps the dependency surface:
Rust client (breaking)
Pubkey→Addressacross all generated accounts/instructions (SDK v3 rename;solana-pubkeyreplaced bysolana-address).borsh 0.10→borsh 1.0.solana-clientmoves to^3.0; othersolana-*sibling crates move to~3.x.kaigan::U64PrefixString→spl_collections::U64PrefixedStr;kaigandependency dropped.solana-sdkdependency dropped entirely (thefetchfeature now only pulls insolana-client).- The
serdefeature is removed. All#[cfg_attr(feature = "serde", derive(...))]attributes on generated accounts/instruction-data/enum types are gone, and theserde/serde_withdeps along with the feature declaration are stripped fromCargo.toml.
JS client
@solana/kitpeer dep^6.1.0→^6.4.0.@solana/kit-client-rpcreplaced by@solana/kit-plugin-rpc+@solana/kit-plugin-signer.- Test harness rewritten around
createClient().use(...)composition withsolanaLocalRpc,generatedSigner, andairdropSigner. systemProgram()plugin now usesextendClient(...)and returnsOmit<T, 'system'> & { system: SystemPlugin }— good change, prevents silently clobbering an existingsystemkey on the client.- Minor renderer-driven tweaks:
process.env.NODE_ENV→process.env['NODE_ENV'](stricter TS), explicitReadonlyUint8Arrayreturn type on discriminator helpers.
Toolchain
- Rust stable
1.86.0→1.93.0, nightly pinned to2026-01-22, Solana CLI2.3.4→3.1.8.
Things to watch
- Serde feature removal is a breaking API change for downstreams. Anyone consuming
solana-system-clientwithfeatures = ["serde"]will now get an unknown-feature error. Worth making sure the release notes / changelog entry for the next publish calls this out prominently alongside the borsh 1.0 and SDK v3 bumps. If droppingserdewasn't intentional (e.g. it disappeared because the newrenderers-rust@3no longer emits those attrs by default), it might be worth restoring via a renderer option so existing consumers aren't forced off. solana-address = "~2.4"alongside~3.xsiblings looks odd but is correct —solana-addressis versioned independently in the solana-sdk monorepo and2.4is the current major. Not a bug, just noting it for subsequent reviewers who might flag it.- Cargo.toml formatting: the
[dependencies]block uses a mix of 2-space indentation inside thesolana-addressfeatures array and default indentation elsewhere — minor, butcargo fmt/ rustfmt won't touchCargo.toml, so this is manual. - JS
createTestClientis no longerasync. All the test call sites stillawait createTestClient(), which works (awaiting a non-thenable is a no-op) but is now misleading. Either drop theawaits or keep the function returning a promise for forward-compat with plugins that may need async init. - Test coverage of the plugin change:
systemProgram()'s newextendClient+Omit<T, 'system'>return type isn't exercised by a test that actually has a priorsystemkey on the client, so the anti-clobber guarantee is type-checked but not runtime-verified. Probably fine given this is a thin generated wrapper.
Notes for subsequent reviewers
- The bulk of the diff is mechanical
Pubkey→Address/pubkey!→address!rewrites across generated files — safe to skim once you've spot-checked one or two instruction files. - Worth running
cargo build --all-featuresandcargo build --no-default-featureslocally (or confirming CI does) to make sure thefetchfeature still compiles cleanly withoutsolana-sdkin the tree. - Verify CI actually picks up the new nightly
2026-01-22— if the toolchain isn't cached on the runners the first build will be slow, not broken. - Confirm
@solana-program/systemconsumers downstream (other solana-program repos, spl-token-related packages, docs examples) are ready for the Kit 6.4 peer-dep bump before publishing.
See self-review below.