Skip to content

Comments

chore: Bump @solana/kit 2.3 -> 5.4#1243

Merged
pxrl merged 8 commits intomasterfrom
pxrl/kit30
Jan 27, 2026
Merged

chore: Bump @solana/kit 2.3 -> 5.4#1243
pxrl merged 8 commits intomasterfrom
pxrl/kit30

Conversation

@pxrl
Copy link
Contributor

@pxrl pxrl commented Jan 15, 2026

Kit has moved from 2.2 to 5.4 in the past few months, so we're playing catch-up. I worked progressively through the major releases and found there weren't many changes required, so the jump from 2.3 -> 5.4 has been squashed into a single upgrade.

Change mostly facilitated by Claude.

Change mostly facilitated by Claude.
@socket-security
Copy link

socket-security bot commented Jan 15, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

# conflicts with other caching actions that might have cleaned some of cached contents.
path: svm-${{ inputs.type }}.tar
key: svm-${{ inputs.type }}-${{ runner.os }}-node-${{ steps.resolved-node.outputs.version }}-${{ hashFiles('Cargo.lock', 'programs/**/Cargo.toml', 'programs/**/Xargo.toml', 'programs/**/*.rs') }}
key: svm-${{ inputs.type }}-${{ runner.os }}-node-${{ steps.resolved-node.outputs.version }}-${{ hashFiles('yarn.lock', 'Cargo.lock', 'programs/**/Cargo.toml', 'programs/**/Xargo.toml', 'programs/**/*.rs') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yarn.lock added here to ensure that changes in codama versions will trigger a new cache key. Without this change there are type mismatches due to changes in kit between 2.3 and 3.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I preferred to drop types unless they're required. Types are resolving OK dynamically on my end.

@pxrl pxrl added the do not merge do not merge label Jan 15, 2026
@pxrl pxrl changed the title chore: Bump solana/kit 2.3 -> 3.0 chore: Bump @solana/kit 2.3 -> 3.0 Jan 15, 2026
commitment: Commitment = "confirmed"
) => {
const signedTransaction = await signTransactionMessageWithSigners(transactionMessage);
assertIsTransactionWithinSizeLimit(signedTransaction);
Copy link
Contributor

Choose a reason for hiding this comment

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

before, the TX would fail. Now, we will panic here?
Also, I forget, do downstream repos rely on contracts repo to keep production-ready utils, or are these just for testing / prototyping?

Just for the future, it's the same thing that happened with hardhat / foundry.
Hardhat used to generate artifacts, and those became ingrained into all the downstream repos. Changing that became painful.

@Reinis-FRP @md0x do you guys know if there's any way to "export some minimal artifacts" from the contracts repo that e.g. the sdk will use to define some production utils? Then the contracts repo can worry only about the contracts, and the sdk can worry about maintaining the utils

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I know sdk mainly depends on codama clients and anchor IDL/types that are generated and exported in contracts repo. Everything else is expected to be used for contracts testing and prototyping scripts here. I've seen some exceptions to this in sdk where we import some utils from contracts in sdk tests as well as some cctp decoding and some other conversion utils, but those should be agnostic to the solana/kit versioning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

before, the TX would fail. Now, we will panic here?

We have a similar situation in the v3 -> v4 migration; I left some comments here: #1245 (comment)

Copy link
Contributor

@md0x md0x Jan 16, 2026

Choose a reason for hiding this comment

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

Yeah, I think what happened is that, in a few places (sdk and possibly others down the line) we ended up reusing functions from the contracts repo simply because it was the fastest way to ship instead of reimplementing them in the sdk.

I agree with the concern: ideally, any utils living in the contracts repo should be internal and for test only, not something downstream repos should use.

Related to that, one change that could make sense is moving all codama client generation logic into the sdk, we didn't intend to use them in the contracts. In the contracts repo those clients have mainly been useful in tests to validate functional equivalence between codama clients and anchor but they don’t necessarily need to live ther.

So I agree and align with your suggestions @pxrl @grasphoper : contracts should focus on contracts + correctness, and the sdk should have the utils and client for prod with a minimal interface (if any) from the contracts repo.

grasphoper
grasphoper previously approved these changes Jan 15, 2026
Copy link
Contributor

@grasphoper grasphoper left a comment

Choose a reason for hiding this comment

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

LGTM, interested to discuss this #1243 (comment)

I.e., what repo should be maintaining the TS types and utils for contract interactions? Ideally we keep the contracts repo pure. But maybe that's impossible / impractical

@pxrl
Copy link
Contributor Author

pxrl commented Jan 16, 2026

I.e., what repo should be maintaining the TS types and utils for contract interactions? Ideally we keep the contracts repo pure. But maybe that's impossible / impractical

Yeah, it currently lives here but I'm not sure if that's out of pure necessity, practicality, or just a byproduct of the way Solana support was initially added. We can take a discussion w/ @Reinis-FRP and @md0x to confirm whether we need this all up here, or whether it could make sense to relocate. If we find a better structure then maybe that results in a project.

pxrl added 2 commits January 22, 2026 10:46
Transition kit to 4.0. This turns out to be a pretty small change
locally, so it will probably get rolled directly into a single 2.3 ->
4.0 commit.
Follow-on bump from 4.0 to the current latest release of @solana/kit
(5.4).

The changes here are also surprisingly small, given there has been a
major bump. This might just get rolled into a single update from 2.3 ->
5.4, subject to downstream testing.
@pxrl pxrl changed the title chore: Bump @solana/kit 2.3 -> 3.0 chore: Bump @solana/kit 2.3 -> 5.4 Jan 27, 2026
@pxrl pxrl marked this pull request as ready for review January 27, 2026 14:20
@pxrl pxrl removed the do not merge do not merge label Jan 27, 2026
@pxrl
Copy link
Contributor Author

pxrl commented Jan 27, 2026

@md0x @grasphoper @Reinis-FRP I've got us all the way up to Kit 5.4 in this PR. I agree that we ultimately want to move this to the SDK; I don't have the overview of the logistics of that at the moment; I think we'll plan that as a separate project.

I have tested this downstream in the sdk, relayer and frontend repos; the changes required were surprisingly few. OK to get this in as-is?

@pxrl pxrl merged commit e8a34ee into master Jan 27, 2026
11 checks passed
@pxrl pxrl deleted the pxrl/kit30 branch January 27, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants