Repository: solana-labs/solana-program-library
Pull request #6920 (2024-06-25 10:59:05)

tlv-account-resolution: Bump to 0.7.0 for Solana v2
#### Problem

As part of #6897, we need to release new major versions of many crates.

#### Solution

Bump spl-tlv-account-resolution for the next release


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index bf9bef4a3..7e9cedccf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7248,6 +7248,7 @@ dependencies = [
  "base64 0.22.1",
  "borsh 1.5.1",
  "bytemuck",
+ "bytemuck_derive",
  "serde",
  "serde_json",
  "solana-program",
@@ -7440,6 +7441,20 @@ dependencies = [
 [[package]]
 name = "spl-tlv-account-resolution"
 version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8"
+dependencies = [
+ "bytemuck",
+ "solana-program",
+ "spl-discriminator 0.2.2",
+ "spl-pod 0.2.2",
+ "spl-program-error 0.4.1",
+ "spl-type-length-value 0.4.3",
+]
+
+[[package]]
+name = "spl-tlv-account-resolution"
+version = "0.7.0"
 dependencies = [
  "bytemuck",
  "futures 0.3.30",
@@ -7455,20 +7470,6 @@ dependencies = [
  "spl-type-length-value 0.5.0",
 ]
 
-[[package]]
-name = "spl-tlv-account-resolution"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8"
-dependencies = [
- "bytemuck",
- "solana-program",
- "spl-discriminator 0.2.2",
- "spl-pod 0.2.2",
- "spl-program-error 0.4.1",
- "spl-type-length-value 0.4.3",
-]
-
 [[package]]
 name = "spl-token"
 version = "4.0.1"
@@ -7525,7 +7526,7 @@ dependencies = [
  "solana-zk-token-sdk",
  "spl-memo 5.0.0",
  "spl-pod 0.3.0",
- "spl-tlv-account-resolution 0.6.3",
+ "spl-tlv-account-resolution 0.7.0",
  "spl-token 6.0.0",
  "spl-token-group-interface 0.2.3",
  "spl-token-metadata-interface 0.3.3",
@@ -7572,7 +7573,7 @@ dependencies = [
  "spl-instruction-padding",
  "spl-memo 5.0.0",
  "spl-pod 0.3.0",
- "spl-tlv-account-resolution 0.6.3",
+ "spl-tlv-account-resolution 0.7.0",
  "spl-token-2022 3.0.2",
  "spl-token-client",
  "spl-token-group-interface 0.2.3",
@@ -7880,7 +7881,7 @@ dependencies = [
  "solana-remote-wallet",
  "solana-sdk",
  "solana-test-validator",
- "spl-tlv-account-resolution 0.6.3",
+ "spl-tlv-account-resolution 0.7.0",
  "spl-token-2022 3.0.2",
  "spl-token-client",
  "spl-transfer-hook-example",
@@ -7898,7 +7899,7 @@ dependencies = [
  "solana-program",
  "solana-program-test",
  "solana-sdk",
- "spl-tlv-account-resolution 0.6.3",
+ "spl-tlv-account-resolution 0.7.0",
  "spl-token-2022 3.0.2",
  "spl-transfer-hook-interface 0.6.3",
  "spl-type-length-value 0.5.0",
@@ -7914,7 +7915,7 @@ dependencies = [
  "spl-discriminator 0.3.0",
  "spl-pod 0.3.0",
  "spl-program-error 0.5.0",
- "spl-tlv-account-resolution 0.6.3",
+ "spl-tlv-account-resolution 0.7.0",
  "spl-type-length-value 0.5.0",
  "tokio",
 ]
@@ -7931,7 +7932,7 @@ dependencies = [
  "spl-discriminator 0.2.2",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
- "spl-tlv-account-resolution 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-tlv-account-resolution 0.6.3",
  "spl-type-length-value 0.4.3",
 ]
 
diff --git a/libraries/pod/Cargo.toml b/libraries/pod/Cargo.toml
index 8f6a76137..9f5057af3 100644
--- a/libraries/pod/Cargo.toml
+++ b/libraries/pod/Cargo.toml
@@ -15,6 +15,7 @@ borsh = ["dep:borsh"]
 base64 = { version = "0.22.1", optional = true }
 borsh = { version = "1.5.1", optional = true }
 bytemuck = { version = "1.16.1" }
+bytemuck_derive = { version = "1.7.0" }
 serde = { version = "1.0.203", optional = true }
 solana-program = "2.0.0"
 solana-zk-token-sdk = "2.0.0"
diff --git a/libraries/pod/src/optional_keys.rs b/libraries/pod/src/optional_keys.rs
index 6530fb251..ad71b1bcc 100644
--- a/libraries/pod/src/optional_keys.rs
+++ b/libraries/pod/src/optional_keys.rs
@@ -9,7 +9,7 @@ use {
     std::{convert::TryFrom, fmt, str::FromStr},
 };
 use {
-    bytemuck::{Pod, Zeroable},
+    bytemuck_derive::{Pod, Zeroable},
     solana_program::{program_error::ProgramError, program_option::COption, pubkey::Pubkey},
     solana_zk_token_sdk::zk_token_elgamal::pod::ElGamalPubkey,
 };
diff --git a/libraries/pod/src/primitives.rs b/libraries/pod/src/primitives.rs
index bf3e45578..07eb232bf 100644
--- a/libraries/pod/src/primitives.rs
+++ b/libraries/pod/src/primitives.rs
@@ -1,7 +1,7 @@
 //! primitive types that can be used in `Pod`s
 #[cfg(feature = "borsh")]
 use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
-use bytemuck::{Pod, Zeroable};
+use bytemuck_derive::{Pod, Zeroable};
 #[cfg(feature = "serde-traits")]
 use serde::{Deserialize, Serialize};
 
diff --git a/libraries/pod/src/slice.rs b/libraries/pod/src/slice.rs
index ac912dc30..4b4ea2b11 100644
--- a/libraries/pod/src/slice.rs
+++ b/libraries/pod/src/slice.rs
@@ -129,7 +129,11 @@ fn max_len_for_type<T>(data_len: usize) -> Result<usize, ProgramError> {
 
 #[cfg(test)]
 mod tests {
-    use {super::*, crate::bytemuck::pod_slice_to_bytes, bytemuck::Zeroable};
+    use {
+        super::*,
+        crate::bytemuck::pod_slice_to_bytes,
+        bytemuck_derive::{Pod, Zeroable},
+    };
 
     #[repr(C)]
     #[derive(Clone, Copy, Debug, Default, PartialEq, Pod, Zeroable)]
diff --git a/libraries/tlv-account-resolution/Cargo.toml b/libraries/tlv-account-resolution/Cargo.toml
index c40e3bcc8..c8e127f09 100644
--- a/libraries/tlv-account-resolution/Cargo.toml
+++ b/libraries/tlv-account-resolution/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "spl-tlv-account-resolution"
-version = "0.6.3"
+version = "0.7.0"
 description = "Solana Program Library TLV Account Resolution Interface"
 authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
 repository = "https://github.com/solana-labs/solana-program-library"
diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml
index 5d135806c..b7e4f9235 100644
--- a/token/program-2022/Cargo.toml
+++ b/token/program-2022/Cargo.toml
@@ -47,7 +47,7 @@ proptest = "1.5"
 serial_test = "3.1.1"
 solana-program-test = "2.0.0"
 solana-sdk = "2.0.0"
-spl-tlv-account-resolution = { version = "0.6.3", path = "../../libraries/tlv-account-resolution" }
+spl-tlv-account-resolution = { version = "0.7.0", path = "../../libraries/tlv-account-resolution" }
 serde_json = "1.0.117"
 
 [lib]
diff --git a/token/transfer-hook/cli/Cargo.toml b/token/transfer-hook/cli/Cargo.toml
index 43d6ea843..ab8dbb7be 100644
--- a/token/transfer-hook/cli/Cargo.toml
+++ b/token/transfer-hook/cli/Cargo.toml
@@ -18,7 +18,7 @@ solana-logger = "2.0.0"
 solana-remote-wallet = "2.0.0"
 solana-sdk = "2.0.0"
 spl-transfer-hook-interface = { version = "0.6.3", path = "../interface" }
-spl-tlv-account-resolution = { version = "0.6.3" , path = "../../../libraries/tlv-account-resolution", features = ["serde-traits"] }
+spl-tlv-account-resolution = { version = "0.7.0" , path = "../../../libraries/tlv-account-resolution", features = ["serde-traits"] }
 strum = "0.26"
 strum_macros = "0.26"
 tokio = { version = "1", features = ["full"] }
diff --git a/token/transfer-hook/example/Cargo.toml b/token/transfer-hook/example/Cargo.toml
index 171ccd132..30c93457e 100644
--- a/token/transfer-hook/example/Cargo.toml
+++ b/token/transfer-hook/example/Cargo.toml
@@ -16,7 +16,7 @@ forbid-additional-mints = []
 [dependencies]
 arrayref = "0.3.7"
 solana-program = "2.0.0"
-spl-tlv-account-resolution = { version = "0.6.3" , path = "../../../libraries/tlv-account-resolution" }
+spl-tlv-account-resolution = { version = "0.7.0" , path = "../../../libraries/tlv-account-resolution" }
 spl-token-2022 = { version = "3.0.2",  path = "../../program-2022", features = ["no-entrypoint"] }
 spl-transfer-hook-interface = { version = "0.6.3" , path = "../interface" }
 spl-type-length-value = { version = "0.5.0" , path = "../../../libraries/type-length-value" }
diff --git a/token/transfer-hook/interface/Cargo.toml b/token/transfer-hook/interface/Cargo.toml
index 3d3f47a23..7ef7aa154 100644
--- a/token/transfer-hook/interface/Cargo.toml
+++ b/token/transfer-hook/interface/Cargo.toml
@@ -13,7 +13,7 @@ bytemuck = { version = "1.16.1", features = ["derive"] }
 solana-program = "2.0.0"
 spl-discriminator = { version = "0.3.0" , path = "../../../libraries/discriminator" }
 spl-program-error = { version = "0.5.0" , path = "../../../libraries/program-error" }
-spl-tlv-account-resolution = { version = "0.6.3" , path = "../../../libraries/tlv-account-resolution" }
+spl-tlv-account-resolution = { version = "0.7.0" , path = "../../../libraries/tlv-account-resolution" }
 spl-type-length-value = { version = "0.5.0" , path = "../../../libraries/type-length-value" }
 spl-pod = { version = "0.3.0", path = "../../../libraries/pod" }
 


Test patch:
diff --git a/token/program-2022-test/Cargo.toml b/token/program-2022-test/Cargo.toml
index 1a0015ad1..73c9f8ab9 100644
--- a/token/program-2022-test/Cargo.toml
+++ b/token/program-2022-test/Cargo.toml
@@ -33,7 +33,7 @@ spl-token-2022 = { version = "3.0.2", path = "../program-2022", features = [
 spl-instruction-padding = { version = "0.2.0", path = "../../instruction-padding/program", features = [
   "no-entrypoint",
 ] }
-spl-tlv-account-resolution = { version = "0.6.3", path = "../../libraries/tlv-account-resolution" }
+spl-tlv-account-resolution = { version = "0.7.0", path = "../../libraries/tlv-account-resolution" }
 spl-token-client = { version = "0.10.0", path = "../client" }
 spl-token-group-interface = { version = "0.2.3", path = "../../token-group/interface" }
 spl-token-metadata-interface = { version = "0.3.3", path = "../../token-metadata/interface" }