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

v2.1: spl: Bump to newest SPL crates for v2.1 release (backport of #3431) #3645

Closed
wants to merge 2 commits into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Nov 14, 2024

Problem

A lot of builds are currently broken due to the incompatibility between v2.0 and v2.1. All of the SPL crates have been bumped to use the Solana v2.1 crates, but it isn't being used in the monorepo.

Summary of changes

Bump the SPL crates to their newest versions, and correctly parse the new token-2022 instructions and account types.

The trickiest changes are the confidential transfer / mint / burn instruction parsing, otherwise the changes are straightforward.

Note: this needs to be backported to v2.1 so that users can use consistent crates. Currently, things are broken because of the major version bump of curve25519-dalek between v2.0 and v2.1. Once we break the circular dependency between the monorepo and SPL, this will be much easier.


This is an automatic backport of pull request #3431 done by Mergify.

* spl: Bump to newest SPL crates for v2.1 release

#### Problem

A lot of builds are currently broken due to the incompatibility between
v2.0 and v2.1. All of the SPL crates have been bumped to use the Solana
v2.1 crates, but it isn't being used in the monorepo.

#### Summary of changes

Bump the SPL crates to their newest versions, and correctly parse the
new token-2022 instructions and account types.

The trickiest changes are the confidential transfer / mint / burn
instruction parsing, otherwise the changes are straightforward.

* Address feedback

* Improve parsing logic per discussion

* Parse initialize instructions correctly

* Add comments for parsing

* Improve account labels

* Update lockfile from rebase

(cherry picked from commit 43cf84f)

# Conflicts:
#	Cargo.lock
#	programs/sbf/Cargo.lock
#	programs/sbf/Cargo.toml
@mergify mergify bot requested a review from a team as a code owner November 14, 2024 21:29
@mergify mergify bot added the conflicts label Nov 14, 2024
Copy link
Author

mergify bot commented Nov 14, 2024

Cherry-pick of 43cf84f has failed:

On branch mergify/bp/v2.1/pr-3431
Your branch is up to date with 'origin/v2.1'.

You are currently cherry-picking commit 43cf84ff91.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cargo.toml
	modified:   account-decoder-client-types/src/token.rs
	modified:   account-decoder/src/parse_token_extension.rs
	modified:   programs/sbf/rust/curve25519/Cargo.toml
	modified:   transaction-status/src/parse_token.rs
	new file:   transaction-status/src/parse_token/extension/confidential_mint_burn.rs
	modified:   transaction-status/src/parse_token/extension/confidential_transfer.rs
	modified:   transaction-status/src/parse_token/extension/confidential_transfer_fee.rs
	modified:   transaction-status/src/parse_token/extension/mod.rs
	modified:   transaction-status/src/parse_token/extension/token_group.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cargo.lock
	both modified:   programs/sbf/Cargo.lock
	both modified:   programs/sbf/Cargo.toml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@@ -0,0 +1,256 @@
use {

Choose a reason for hiding this comment

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

why are we introducing so much new code in a "version bump" pr backport?

Choose a reason for hiding this comment

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

The new token program is deployed already (or will be deployed), but the parsers in RPC need to be updated to handle those, or we get complaints. In the case of the token-group extension, since there was a change to the data types, RPC currently returns total nonsense.

You can see solana-labs#34412 for a previous example where we bring SPL and the monorepo in line. All of the new code is exactly the same kind.

Once we break out RPC from the monorepo or even just these crates, we won't have to do this though.

@willhickey
Copy link

v2.1 is nearly ready for mainnet-beta, so closing this as stale. Re-open if you think it deserves further consideration

@willhickey willhickey closed this Jan 10, 2025
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