Repository: solana-labs/solana-program-library
Pull request #6911 (2024-06-25 09:33:53)

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


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index fc3eba1b7..e08556e0c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6890,22 +6890,22 @@ dependencies = [
 [[package]]
 name = "spl-discriminator"
 version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac"
 dependencies = [
- "borsh 1.5.1",
  "bytemuck",
  "solana-program",
- "spl-discriminator-derive 0.2.0",
+ "spl-discriminator-derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "spl-discriminator"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac"
+version = "0.3.0"
 dependencies = [
+ "borsh 1.5.1",
  "bytemuck",
  "solana-program",
- "spl-discriminator-derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator-derive 0.2.0",
 ]
 
 [[package]]
@@ -7151,7 +7151,7 @@ dependencies = [
 
 [[package]]
 name = "spl-instruction-padding"
-version = "0.1.1"
+version = "0.2.0"
 dependencies = [
  "num_enum",
  "solana-program",
@@ -7449,7 +7449,7 @@ dependencies = [
  "solana-program",
  "solana-program-test",
  "solana-sdk",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-type-length-value 0.4.3",
@@ -7463,7 +7463,7 @@ checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.2.2",
  "spl-pod 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-program-error 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-type-length-value 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -7652,7 +7652,7 @@ dependencies = [
  "solana-program",
  "solana-program-test",
  "solana-sdk",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-token-2022 3.0.2",
@@ -7670,7 +7670,7 @@ dependencies = [
  "solana-program",
  "solana-program-test",
  "solana-sdk",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-token-2022 3.0.2",
  "spl-token-client",
@@ -7685,7 +7685,7 @@ version = "0.2.3"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-type-length-value 0.4.3",
@@ -7699,7 +7699,7 @@ checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.2.2",
  "spl-pod 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-program-error 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -7760,7 +7760,7 @@ dependencies = [
  "serde",
  "serde_json",
  "solana-program",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-type-length-value 0.4.3",
@@ -7774,7 +7774,7 @@ checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee"
 dependencies = [
  "borsh 1.5.1",
  "solana-program",
- "spl-discriminator 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.2.2",
  "spl-pod 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-program-error 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-type-length-value 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -7911,7 +7911,7 @@ dependencies = [
  "arrayref",
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-tlv-account-resolution 0.6.3",
@@ -7928,7 +7928,7 @@ dependencies = [
  "arrayref",
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.2.2",
  "spl-pod 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-program-error 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-tlv-account-resolution 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -7941,7 +7941,7 @@ version = "0.4.3"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-pod 0.2.2",
  "spl-program-error 0.4.1",
  "spl-type-length-value-derive",
@@ -7955,7 +7955,7 @@ checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.2.2",
  "spl-pod 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-program-error 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -7975,7 +7975,7 @@ version = "0.1.0"
 dependencies = [
  "borsh 1.5.1",
  "solana-program",
- "spl-discriminator 0.2.2",
+ "spl-discriminator 0.3.0",
  "spl-type-length-value 0.4.3",
 ]
 
diff --git a/instruction-padding/program/Cargo.toml b/instruction-padding/program/Cargo.toml
index 6737e0134..78f3fbd9a 100644
--- a/instruction-padding/program/Cargo.toml
+++ b/instruction-padding/program/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "spl-instruction-padding"
-version = "0.1.1"
+version = "0.2.0"
 description = "Solana Program Library Instruction Padding Program"
 authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
 repository = "https://github.com/solana-labs/solana-program-library"
diff --git a/libraries/discriminator/Cargo.toml b/libraries/discriminator/Cargo.toml
index 37fa789ab..febc3a883 100644
--- a/libraries/discriminator/Cargo.toml
+++ b/libraries/discriminator/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "spl-discriminator"
-version = "0.2.2"
+version = "0.3.0"
 description = "Solana Program Library 8-Byte Discriminator Management"
 authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
 repository = "https://github.com/solana-labs/solana-program-library"
diff --git a/libraries/tlv-account-resolution/Cargo.toml b/libraries/tlv-account-resolution/Cargo.toml
index 2492aef23..cbadd6c71 100644
--- a/libraries/tlv-account-resolution/Cargo.toml
+++ b/libraries/tlv-account-resolution/Cargo.toml
@@ -15,7 +15,7 @@ test-sbf = []
 bytemuck = { version = "1.16.1", features = ["derive"] }
 serde = { version = "1.0.203", optional = true }
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../discriminator" }
 spl-program-error = { version = "0.4.0", path = "../program-error" }
 spl-type-length-value = { version = "0.4.3", path = "../type-length-value" }
 spl-pod = { version = "0.2.2", path = "../pod" }
diff --git a/libraries/type-length-value/Cargo.toml b/libraries/type-length-value/Cargo.toml
index 3ff4e5bb0..4ef7fe8d8 100644
--- a/libraries/type-length-value/Cargo.toml
+++ b/libraries/type-length-value/Cargo.toml
@@ -14,7 +14,7 @@ derive = ["dep:spl-type-length-value-derive"]
 [dependencies]
 bytemuck = { version = "1.16.1", features = ["derive"] }
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../discriminator" }
 spl-program-error = { version = "0.4.0", path = "../program-error" }
 spl-type-length-value-derive = { version = "0.1", path = "./derive", optional = true }
 spl-pod = { version = "0.2.2", path = "../pod" }
diff --git a/token-collection/program/Cargo.toml b/token-collection/program/Cargo.toml
index 6fef776b0..a5ceded21 100644
--- a/token-collection/program/Cargo.toml
+++ b/token-collection/program/Cargo.toml
@@ -24,7 +24,7 @@ spl-type-length-value = { version = "0.4.3", path = "../../libraries/type-length
 [dev-dependencies]
 solana-program-test = "2.0.0"
 solana-sdk = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../../libraries/discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../../libraries/discriminator" }
 spl-token-client = { version = "0.10.0", path = "../../token/client" }
 
 [lib]
diff --git a/token-group/example/Cargo.toml b/token-group/example/Cargo.toml
index f22c87b02..0e077fe1d 100644
--- a/token-group/example/Cargo.toml
+++ b/token-group/example/Cargo.toml
@@ -21,7 +21,7 @@ spl-type-length-value = { version = "0.4.3", path = "../../libraries/type-length
 [dev-dependencies]
 solana-program-test = "2.0.0"
 solana-sdk = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../../libraries/discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../../libraries/discriminator" }
 spl-token-client = { version = "0.10.0", path = "../../token/client" }
 spl-token-metadata-interface = { version = "0.3.3", path = "../../token-metadata/interface" }
 
diff --git a/token-group/interface/Cargo.toml b/token-group/interface/Cargo.toml
index c6c4367e0..17cc1a3c2 100644
--- a/token-group/interface/Cargo.toml
+++ b/token-group/interface/Cargo.toml
@@ -10,7 +10,7 @@ edition = "2021"
 [dependencies]
 bytemuck = "1.16.1"
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2" , path = "../../libraries/discriminator" }
+spl-discriminator = { version = "0.3.0" , path = "../../libraries/discriminator" }
 spl-pod = { version = "0.2.2" , path = "../../libraries/pod", features = ["borsh"] }
 spl-program-error = { version = "0.4.0" , path = "../../libraries/program-error" }
 
diff --git a/token-metadata/interface/Cargo.toml b/token-metadata/interface/Cargo.toml
index cd16812c2..3fd2b4e79 100644
--- a/token-metadata/interface/Cargo.toml
+++ b/token-metadata/interface/Cargo.toml
@@ -14,7 +14,7 @@ serde-traits = ["dep:serde", "spl-pod/serde-traits"]
 borsh = "1.5.1"
 serde = { version = "1.0.203", optional = true }
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../../libraries/discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../../libraries/discriminator" }
 spl-program-error = { version = "0.4.0", path = "../../libraries/program-error" }
 spl-type-length-value = { version = "0.4.3", path = "../../libraries/type-length-value" }
 spl-pod = { version = "0.2.2", path = "../../libraries/pod", features = [
diff --git a/token/js/package.json b/token/js/package.json
index 1da2f5cb8..22d3c81ff 100644
--- a/token/js/package.json
+++ b/token/js/package.json
@@ -1,7 +1,7 @@
 {
     "name": "@solana/spl-token",
     "description": "SPL Token Program JS API",
-    "version": "0.4.4",
+    "version": "0.4.7",
     "author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
     "repository": "https://github.com/solana-labs/solana-program-library",
     "license": "Apache-2.0",
diff --git a/token/transfer-hook/interface/Cargo.toml b/token/transfer-hook/interface/Cargo.toml
index 6d7e7cb66..774b84230 100644
--- a/token/transfer-hook/interface/Cargo.toml
+++ b/token/transfer-hook/interface/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2021"
 arrayref = "0.3.7"
 bytemuck = { version = "1.16.1", features = ["derive"] }
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2" , path = "../../../libraries/discriminator" }
+spl-discriminator = { version = "0.3.0" , path = "../../../libraries/discriminator" }
 spl-program-error = { version = "0.4.0" , path = "../../../libraries/program-error" }
 spl-tlv-account-resolution = { version = "0.6.3" , path = "../../../libraries/tlv-account-resolution" }
 spl-type-length-value = { version = "0.4.3" , path = "../../../libraries/type-length-value" }


Test patch:
diff --git a/libraries/type-length-value-derive-test/Cargo.toml b/libraries/type-length-value-derive-test/Cargo.toml
index 0aa1e7f16..5ab0d1b67 100644
--- a/libraries/type-length-value-derive-test/Cargo.toml
+++ b/libraries/type-length-value-derive-test/Cargo.toml
@@ -10,7 +10,7 @@ edition = "2021"
 [dev-dependencies]
 borsh = "1.5.1"
 solana-program = "2.0.0"
-spl-discriminator = { version = "0.2.2", path = "../discriminator" }
+spl-discriminator = { version = "0.3.0", path = "../discriminator" }
 spl-type-length-value = { version = "0.4.3", path = "../type-length-value", features = [
   "derive",
 ] }
diff --git a/token/program-2022-test/Cargo.toml b/token/program-2022-test/Cargo.toml
index f79625388..89e125255 100644
--- a/token/program-2022-test/Cargo.toml
+++ b/token/program-2022-test/Cargo.toml
@@ -30,7 +30,7 @@ spl-pod = { version = "0.2.2", path = "../../libraries/pod" }
 spl-token-2022 = { version = "3.0.2", path = "../program-2022", features = [
   "no-entrypoint",
 ] }
-spl-instruction-padding = { version = "0.1.1", path = "../../instruction-padding/program", 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" }