Repository: solana-labs/solana-program-library
Pull request #7234 (2024-09-03 12:40:01)

ci: Remove all references to twoxtx
#### Problem

Now that the curve25519-dalek upgrade has landed on agave with https://github.com/anza-xyz/agave/pull/2252, the twoxtx build is failing https://github.com/solana-labs/solana-program-library/actions/runs/10682051895/job/29607007216?pr=7233, which makes sense since SPL isn't using the newest curve25519-dalek crate yet.

#### Summary of changes

As we discovered last year, all of the token-2022 tests are going through banks-client / banks-server, which doesn't take into account size limits for transactions. This means that we don't need to do a special 2xTx build at all.

Remove all references to twoxtx.


Patch:
diff --git a/.github/workflows/pull-request-token.yml b/.github/workflows/pull-request-token.yml
index 3e2c7261d..2dd92f3b1 100644
--- a/.github/workflows/pull-request-token.yml
+++ b/.github/workflows/pull-request-token.yml
@@ -209,7 +209,7 @@ jobs:
           path: "target/deploy/*.so"
           if-no-files-found: error
 
-  cargo-test-sbf-twoxtx:
+  cargo-test-sbf-token-2022:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
@@ -242,12 +242,11 @@ jobs:
           ./ci/install-program-deps.sh
           echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
 
-      - name: Build and test token-2022 twoxtx (TEMPORARY)
+      - name: Build and test token-2022
         run: |
           cargo build-sbf --manifest-path token/program-2022/Cargo.toml
           cargo build-sbf --manifest-path instruction-padding/program/Cargo.toml
-          ./token/twoxtx-setup.sh
-          ./token/twoxtx-solana/cargo-test-sbf --manifest-path token/program-2022-test/Cargo.toml -- --nocapture
+          ./ci/cargo-test-sbf.sh token/program-2022-test
 
   js-test:
     runs-on: ubuntu-latest
diff --git a/Cargo.lock b/Cargo.lock
index d3d4462d1..7747ac36b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7482,7 +7482,7 @@ dependencies = [
  "spl-discriminator 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-pod 0.3.0",
  "spl-program-error 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "spl-type-length-value 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-type-length-value 0.5.0",
 ]
 
 [[package]]
@@ -7500,7 +7500,7 @@ dependencies = [
  "spl-discriminator 0.3.0",
  "spl-pod 0.4.0",
  "spl-program-error 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -7556,7 +7556,7 @@ dependencies = [
  "spl-token-group-interface 0.3.0",
  "spl-token-metadata-interface 0.4.0",
  "spl-transfer-hook-interface 0.7.0",
- "spl-type-length-value 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-type-length-value 0.5.0",
  "thiserror",
 ]
 
@@ -7591,7 +7591,7 @@ dependencies = [
  "spl-token-group-interface 0.4.1",
  "spl-token-metadata-interface 0.5.0",
  "spl-transfer-hook-interface 0.8.1",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
  "thiserror",
 ]
 
@@ -7704,7 +7704,7 @@ dependencies = [
  "spl-token-group-example",
  "spl-token-group-interface 0.4.1",
  "spl-token-metadata-interface 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -7762,7 +7762,7 @@ dependencies = [
  "spl-token-client",
  "spl-token-group-interface 0.4.1",
  "spl-token-metadata-interface 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -7787,7 +7787,7 @@ dependencies = [
  "spl-discriminator 0.3.0",
  "spl-pod 0.4.0",
  "spl-program-error 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -7834,7 +7834,7 @@ dependencies = [
  "spl-token-2022 5.0.1",
  "spl-token-client",
  "spl-token-metadata-interface 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
  "test-case",
 ]
 
@@ -7849,7 +7849,7 @@ dependencies = [
  "spl-discriminator 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-pod 0.3.0",
  "spl-program-error 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "spl-type-length-value 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-type-length-value 0.5.0",
 ]
 
 [[package]]
@@ -7863,7 +7863,7 @@ dependencies = [
  "spl-discriminator 0.3.0",
  "spl-pod 0.4.0",
  "spl-program-error 0.5.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -7987,7 +7987,7 @@ dependencies = [
  "spl-tlv-account-resolution 0.8.0",
  "spl-token-2022 5.0.1",
  "spl-transfer-hook-interface 0.8.1",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
@@ -8003,7 +8003,7 @@ dependencies = [
  "spl-pod 0.3.0",
  "spl-program-error 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "spl-tlv-account-resolution 0.7.0",
- "spl-type-length-value 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-type-length-value 0.5.0",
 ]
 
 [[package]]
@@ -8017,33 +8017,33 @@ dependencies = [
  "spl-pod 0.4.0",
  "spl-program-error 0.5.0",
  "spl-tlv-account-resolution 0.8.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
  "tokio",
 ]
 
 [[package]]
 name = "spl-type-length-value"
 version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.3.0",
- "spl-pod 0.4.0",
- "spl-program-error 0.5.0",
- "spl-type-length-value-derive",
+ "spl-discriminator 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-pod 0.3.0",
+ "spl-program-error 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "spl-type-length-value"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c"
+version = "0.6.0"
 dependencies = [
  "bytemuck",
  "solana-program",
- "spl-discriminator 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "spl-pod 0.3.0",
- "spl-program-error 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spl-discriminator 0.3.0",
+ "spl-pod 0.4.0",
+ "spl-program-error 0.5.0",
+ "spl-type-length-value-derive",
 ]
 
 [[package]]
@@ -8062,7 +8062,7 @@ dependencies = [
  "borsh 1.5.1",
  "solana-program",
  "spl-discriminator 0.3.0",
- "spl-type-length-value 0.5.0",
+ "spl-type-length-value 0.6.0",
 ]
 
 [[package]]
diff --git a/libraries/tlv-account-resolution/Cargo.toml b/libraries/tlv-account-resolution/Cargo.toml
index 821270ce1..08489a04c 100644
--- a/libraries/tlv-account-resolution/Cargo.toml
+++ b/libraries/tlv-account-resolution/Cargo.toml
@@ -18,7 +18,7 @@ solana-program = "2.0.3"
 spl-discriminator = { version = "0.3.0", path = "../discriminator" }
 spl-program-error = { version = "0.5.0", path = "../program-error" }
 spl-pod = { version = "0.4.0", path = "../pod" }
-spl-type-length-value = { version = "0.5.0", path = "../type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../type-length-value" }
 
 [dev-dependencies]
 futures = "0.3.30"
diff --git a/libraries/type-length-value/Cargo.toml b/libraries/type-length-value/Cargo.toml
index d662ed1d5..a594a3d2d 100644
--- a/libraries/type-length-value/Cargo.toml
+++ b/libraries/type-length-value/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "spl-type-length-value"
-version = "0.5.0"
+version = "0.6.0"
 description = "Solana Program Library Type-Length-Value Management"
 authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
 repository = "https://github.com/solana-labs/solana-program-library"
diff --git a/token-collection/program/Cargo.toml b/token-collection/program/Cargo.toml
index 0b4e00504..4f893e783 100644
--- a/token-collection/program/Cargo.toml
+++ b/token-collection/program/Cargo.toml
@@ -19,7 +19,7 @@ spl-token-2022 = { version = "5.0.1", path = "../../token/program-2022", feature
 spl-token-group-example = { version = "0.2", path = "../../token-group/example", features = ["no-entrypoint"] }
 spl-token-group-interface = { version = "0.4.1", path = "../../token-group/interface" }
 spl-token-metadata-interface = { version = "0.5.0", path = "../../token-metadata/interface" }
-spl-type-length-value = { version = "0.5.0", path = "../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value" }
 
 [dev-dependencies]
 solana-program-test = "2.0.3"
diff --git a/token-group/example/Cargo.toml b/token-group/example/Cargo.toml
index 4e4b678d5..a65d945d9 100644
--- a/token-group/example/Cargo.toml
+++ b/token-group/example/Cargo.toml
@@ -16,7 +16,7 @@ solana-program = "2.0.3"
 spl-pod = { version = "0.4.0", path = "../../libraries/pod" }
 spl-token-2022 = { version = "5.0.1", path = "../../token/program-2022", features = ["no-entrypoint"] }
 spl-token-group-interface = { version = "0.4.1", path = "../interface" }
-spl-type-length-value = { version = "0.5.0", path = "../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value" }
 
 [dev-dependencies]
 solana-program-test = "2.0.3"
diff --git a/token-group/interface/Cargo.toml b/token-group/interface/Cargo.toml
index 352193497..6bf31559c 100644
--- a/token-group/interface/Cargo.toml
+++ b/token-group/interface/Cargo.toml
@@ -15,7 +15,7 @@ spl-pod = { version = "0.4.0", path = "../../libraries/pod", features = ["borsh"
 spl-program-error = { version = "0.5.0" , path = "../../libraries/program-error" }
 
 [dev-dependencies]
-spl-type-length-value = { version = "0.5.0", path = "../../libraries/type-length-value", features = ["derive"] }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value", features = ["derive"] }
 
 [lib]
 crate-type = ["cdylib", "lib"]
diff --git a/token-metadata/example/Cargo.toml b/token-metadata/example/Cargo.toml
index 85d490e93..26a26bf28 100644
--- a/token-metadata/example/Cargo.toml
+++ b/token-metadata/example/Cargo.toml
@@ -15,7 +15,7 @@ test-sbf = []
 solana-program = "2.0.3"
 spl-token-2022 = { version = "5.0.1", path = "../../token/program-2022", features = ["no-entrypoint"] }
 spl-token-metadata-interface = { version = "0.5.0", path = "../interface" }
-spl-type-length-value = { version = "0.5.0" , path = "../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value" }
 spl-pod = { version = "0.4.0", path = "../../libraries/pod" }
 
 [dev-dependencies]
diff --git a/token-metadata/interface/Cargo.toml b/token-metadata/interface/Cargo.toml
index 159bf7f8c..d2d256fd8 100644
--- a/token-metadata/interface/Cargo.toml
+++ b/token-metadata/interface/Cargo.toml
@@ -16,7 +16,7 @@ serde = { version = "1.0.209", optional = true }
 solana-program = "2.0.3"
 spl-discriminator = { version = "0.3.0", path = "../../libraries/discriminator" }
 spl-program-error = { version = "0.5.0", path = "../../libraries/program-error" }
-spl-type-length-value = { version = "0.5.0", path = "../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value" }
 spl-pod = { version = "0.4.0", path = "../../libraries/pod", features = [
   "borsh",
 ] }
diff --git a/token/.gitignore b/token/.gitignore
deleted file mode 100644
index 2a77c9090..000000000
--- a/token/.gitignore
+++ /dev/null
@@ -1,1 +0,0 @@
-/twoxtx-solana/
diff --git a/token/program-2022/Cargo.toml b/token/program-2022/Cargo.toml
index a98ff3334..6474675a4 100644
--- a/token/program-2022/Cargo.toml
+++ b/token/program-2022/Cargo.toml
@@ -32,7 +32,7 @@ spl-token-confidential-transfer-proof-extraction = { version = "0.1.0", path = "
 spl-token-group-interface = { version = "0.4.1", path = "../../token-group/interface" }
 spl-token-metadata-interface = { version = "0.5.0", path = "../../token-metadata/interface" }
 spl-transfer-hook-interface = { version = "0.8.1", path = "../transfer-hook/interface" }
-spl-type-length-value = { version = "0.5.0", path = "../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../libraries/type-length-value" }
 spl-pod = { version = "0.4.0", path = "../../libraries/pod" }
 thiserror = "1.0"
 serde = { version = "1.0.209", optional = true }
diff --git a/token/transfer-hook/example/Cargo.toml b/token/transfer-hook/example/Cargo.toml
index fb69107c0..fc3e44fd4 100644
--- a/token/transfer-hook/example/Cargo.toml
+++ b/token/transfer-hook/example/Cargo.toml
@@ -19,7 +19,7 @@ solana-program = "2.0.3"
 spl-tlv-account-resolution = { version = "0.8.0", path = "../../../libraries/tlv-account-resolution" }
 spl-token-2022 = { version = "5.0.1",  path = "../../program-2022", features = ["no-entrypoint"] }
 spl-transfer-hook-interface = { version = "0.8.1", path = "../interface" }
-spl-type-length-value = { version = "0.5.0" , path = "../../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../../libraries/type-length-value" }
 
 [dev-dependencies]
 solana-program-test = "2.0.3"
diff --git a/token/transfer-hook/interface/Cargo.toml b/token/transfer-hook/interface/Cargo.toml
index 44fa7dab5..f2834cf6f 100644
--- a/token/transfer-hook/interface/Cargo.toml
+++ b/token/transfer-hook/interface/Cargo.toml
@@ -14,7 +14,7 @@ solana-program = "2.0.3"
 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.8.0", path = "../../../libraries/tlv-account-resolution" }
-spl-type-length-value = { version = "0.5.0" , path = "../../../libraries/type-length-value" }
+spl-type-length-value = { version = "0.6.0", path = "../../../libraries/type-length-value" }
 spl-pod = { version = "0.4.0", path = "../../../libraries/pod" }
 
 [lib]
diff --git a/token/twoxtx-setup.sh b/token/twoxtx-setup.sh
deleted file mode 100755
index d20f35d49..000000000
--- a/token/twoxtx-setup.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-#
-# Patch in a Solana monorepo that supports 2x transactions for testing the
-# SPL Token 2022 Confidential Transfer extension
-#
-
-set -e
-
-here="$(dirname "$0")"
-cd "$here"
-
-if [[ ! -d twoxtx-solana ]]; then
-  if [[ -n $CI ]]; then
-    git config --global user.email "you@example.com"
-    git config --global user.name "Your Name"
-    git clone https://github.com/anza-xyz/agave.git twoxtx-solana
-  else
-    git clone git@github.com:anza-xyz/agave.git twoxtx-solana
-  fi
-fi
-
-if [[ ! -f twoxtx-solana/.twoxtx-patched ]]; then
-  git -C twoxtx-solana am -3 "$PWD"/twoxtx.patch
-  touch twoxtx-solana/.twoxtx-patched
-fi
-
-../patch.crates-io.sh twoxtx-solana
-
-exit 0
diff --git a/token/twoxtx.patch b/token/twoxtx.patch
deleted file mode 100644
index bd1ea0a90..000000000
--- a/token/twoxtx.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From e5f7a7a9584edd4eef3c06df2d33069b78770c4a Mon Sep 17 00:00:00 2001
-From: Jon Cinque <jon.cinque@gmail.com>
-Date: Wed, 31 Aug 2022 01:44:22 +0200
-Subject: [PATCH] Multiply packet size by 2
-
----
- ledger/src/shred.rs                  |  2 +-
- ledger/src/shred/legacy.rs           |  6 +++---
- ledger/src/shred/merkle.rs           |  2 +-
- ledger/src/shred/shred_code.rs       |  2 +-
- rpc/src/rpc.rs                       | 16 +++++++++++-----
- sdk/src/packet.rs                    |  3 ++-
- 6 files changed, 19 insertions(+), 12 deletions(-)
-
-diff --git a/ledger/src/shred.rs b/ledger/src/shred.rs
-index 0695236214..1c52b164a9 100644
---- a/ledger/src/shred.rs
-+++ b/ledger/src/shred.rs
-@@ -112,7 +112,7 @@ const OFFSET_OF_SHRED_INDEX: usize = OFFSET_OF_SHRED_SLOT + SIZE_OF_SHRED_SLOT;
- pub const DATA_SHREDS_PER_FEC_BLOCK: usize = 32;
-
- // For legacy tests and benchmarks.
--const_assert_eq!(LEGACY_SHRED_DATA_CAPACITY, 1051);
-+const_assert_eq!(LEGACY_SHRED_DATA_CAPACITY, 2283);
- pub const LEGACY_SHRED_DATA_CAPACITY: usize = legacy::ShredData::CAPACITY;
-
- // LAST_SHRED_IN_SLOT also implies DATA_COMPLETE_SHRED.
-diff --git a/ledger/src/shred/legacy.rs b/ledger/src/shred/legacy.rs
-index ca6310bdcb..c0ab2b1de4 100644
---- a/ledger/src/shred/legacy.rs
-+++ b/ledger/src/shred/legacy.rs
-@@ -17,12 +17,12 @@ use {
- // Code and data shreds have the same payload size.
- pub(super) const SIGNED_MESSAGE_RANGE: Range<usize> = SIZE_OF_SIGNATURE..ShredData::SIZE_OF_PAYLOAD;
- const_assert_eq!(ShredData::SIZE_OF_PAYLOAD, ShredCode::SIZE_OF_PAYLOAD);
--const_assert_eq!(ShredData::SIZE_OF_PAYLOAD, 1228);
--const_assert_eq!(ShredData::CAPACITY, 1051);
-+const_assert_eq!(ShredData::SIZE_OF_PAYLOAD, 2460);
-+const_assert_eq!(ShredData::CAPACITY, 2283);
-
- // ShredCode::SIZE_OF_HEADERS bytes at the end of data shreds
- // is never used and is not part of erasure coding.
--const_assert_eq!(SIZE_OF_ERASURE_ENCODED_SLICE, 1139);
-+const_assert_eq!(SIZE_OF_ERASURE_ENCODED_SLICE, 2371);
- pub(super) const SIZE_OF_ERASURE_ENCODED_SLICE: usize =
-     ShredCode::SIZE_OF_PAYLOAD - ShredCode::SIZE_OF_HEADERS;
-
-diff --git a/ledger/src/shred/merkle.rs b/ledger/src/shred/merkle.rs
-index 90b686f5c8..ff47c745d1 100644
---- a/ledger/src/shred/merkle.rs
-+++ b/ledger/src/shred/merkle.rs
-@@ -39,7 +39,7 @@ const_assert_eq!(SIZE_OF_MERKLE_ROOT, 20);
- const SIZE_OF_MERKLE_ROOT: usize = std::mem::size_of::<MerkleRoot>();
- const_assert_eq!(SIZE_OF_MERKLE_PROOF_ENTRY, 20);
- const SIZE_OF_MERKLE_PROOF_ENTRY: usize = std::mem::size_of::<MerkleProofEntry>();
--const_assert_eq!(ShredData::SIZE_OF_PAYLOAD, 1203);
-+const_assert_eq!(ShredData::SIZE_OF_PAYLOAD, 2435);
-
- // Defense against second preimage attack:
- // https://en.wikipedia.org/wiki/Merkle_tree#Second_preimage_attack
-diff --git a/ledger/src/shred/shred_code.rs b/ledger/src/shred/shred_code.rs
-index 3b01b8826d..3e3ebfbf78 100644
---- a/ledger/src/shred/shred_code.rs
-+++ b/ledger/src/shred/shred_code.rs
-@@ -17,7 +17,7 @@ const_assert_eq!(MAX_CODE_SHREDS_PER_SLOT, 32_768 * 17);
- pub(crate) const MAX_CODE_SHREDS_PER_SLOT: usize =
-     MAX_DATA_SHREDS_PER_SLOT * (ERASURE_BATCH_SIZE[1] - 1);
-
--const_assert_eq!(ShredCode::SIZE_OF_PAYLOAD, 1228);
-+const_assert_eq!(ShredCode::SIZE_OF_PAYLOAD, 2460);
-
- #[derive(Clone, Debug, Eq, PartialEq)]
- pub enum ShredCode {
-diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs
-index 1167b21eaf..c9689f7039 100644
---- a/rpc/src/rpc.rs
-+++ b/rpc/src/rpc.rs
-@@ -4478,8 +4478,11 @@ pub mod rpc_obsolete_v1_7 {
-     }
- }
-
--const MAX_BASE58_SIZE: usize = 1683; // Golden, bump if PACKET_DATA_SIZE changes
--const MAX_BASE64_SIZE: usize = 1644; // Golden, bump if PACKET_DATA_SIZE changes
-+// These values need to be updated if PACKET_DATA_SIZE changes. The correct values can
-+// be found by hand or by simply encoding `PACKET_DATA_SIZE` bytes and checking length.
-+// `test_max_encoded_tx_goldens` ensures these values are correct.
-+const MAX_BASE58_SIZE: usize = 3365;
-+const MAX_BASE64_SIZE: usize = 3288;
- fn decode_and_deserialize<T>(
-     encoded: String,
-     encoding: TransactionBinaryEncoding,
-@@ -8773,7 +8776,7 @@ pub mod tests {
-     }
-
-     #[test]
--    fn test_worst_case_encoded_tx_goldens() {
-+    fn test_max_encoded_tx_goldens() {
-         let ff_tx = vec![0xffu8; PACKET_DATA_SIZE];
-         let tx58 = bs58::encode(&ff_tx).into_string();
-         assert_eq!(tx58.len(), MAX_BASE58_SIZE);
-@@ -8783,8 +8786,11 @@ pub mod tests {
-
-     #[test]
-     fn test_decode_and_deserialize_too_large_payloads_fail() {
--        // +2 because +1 still fits in base64 encoded worst-case
--        let too_big = PACKET_DATA_SIZE + 2;
-+        // 4 base64 digits are generated from groups of 3 bytes; however, those 4 digits
-+        // are generated even if the group only has 1 or 2 bytes.
-+        // So, we need 4 - (PACKET_DATA_SIZE % 3) extra bytes to ensure we'll spill over
-+        let extra_bytes = 4 - (PACKET_DATA_SIZE % 3);
-+        let too_big = PACKET_DATA_SIZE + extra_bytes;
-         let tx_ser = vec![0xffu8; too_big];
-
-         let tx58 = bs58::encode(&tx_ser).into_string();
-diff --git a/sdk/src/packet.rs b/sdk/src/packet.rs
-index 08389860f9..12714028d7 100644
---- a/sdk/src/packet.rs
-+++ b/sdk/src/packet.rs
-@@ -15,7 +15,8 @@ static_assertions::const_assert_eq!(PACKET_DATA_SIZE, 1232);
- ///   1280 is IPv6 minimum MTU
- ///   40 bytes is the size of the IPv6 header
- ///   8 bytes is the size of the fragment header
--pub const PACKET_DATA_SIZE: usize = 1280 - 40 - 8;
-+/// Double the minimum to support larger than MTU transactions
-+pub const PACKET_DATA_SIZE: usize = 2 * (1280 - 40 - 8);
-
- bitflags! {
-     #[repr(C)]
---
-2.38.1
-


Test patch:
diff --git a/libraries/type-length-value-derive-test/Cargo.toml b/libraries/type-length-value-derive-test/Cargo.toml
index 2e0d858de..136147021 100644
--- a/libraries/type-length-value-derive-test/Cargo.toml
+++ b/libraries/type-length-value-derive-test/Cargo.toml
@@ -11,6 +11,6 @@ edition = "2021"
 borsh = "1.5.1"
 solana-program = "2.0.3"
 spl-discriminator = { version = "0.3.0", path = "../discriminator" }
-spl-type-length-value = { version = "0.5.0", path = "../type-length-value", features = [
+spl-type-length-value = { version = "0.6.0", path = "../type-length-value", features = [
   "derive",
 ] }
diff --git a/token/program-2022-test/build.rs b/token/program-2022-test/build.rs
index 12e0f75b2..2cde9ec62 100644
--- a/token/program-2022-test/build.rs
+++ b/token/program-2022-test/build.rs
@@ -64,13 +64,4 @@ fn main() {
             }
         }
     }
-
-    // Set the temporary `twoxtx` cfg if `../twoxtx-setup.sh` was run
-    let twoxtx_solana_dir = cwd
-        .parent()
-        .expect("Unable to get parent directory of current working dir")
-        .join("twoxtx-solana");
-    if twoxtx_solana_dir.exists() {
-        println!("cargo:rustc-cfg=twoxtx");
-    }
 }