From 6147beb47310e4008af663808f7f2298fa360782 Mon Sep 17 00:00:00 2001 From: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:50:36 +0100 Subject: [PATCH] spl: Upgrade SPL deps to latest (#3346) --- CHANGELOG.md | 1 + Cargo.lock | 293 +++++++++++++----- bench/BINARY_SIZE.md | 2 +- bench/COMPUTE_UNITS.md | 48 +-- spl/Cargo.toml | 14 +- tests/bench/bench.json | 50 +-- tests/idl/programs/new-idl/src/lib.rs | 8 +- .../programs/token-extensions/Cargo.toml | 8 +- .../programs/transfer-hook/Cargo.toml | 6 +- 9 files changed, 284 insertions(+), 146 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcea05d899..7835335486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -115,6 +115,7 @@ The minor version will be incremented upon a breaking change and the patch versi - spl: Remove `dex` feature ([#3257](https://github.com/coral-xyz/anchor/pull/3257)). - client, lang, spl: Upgrade Solana to v2 and SPL to the latest ([#3219](https://github.com/coral-xyz/anchor/pull/3219)). - cli: Install Solana from anza.xyz domain in Docker verifiable builds ([#3271](https://github.com/coral-xyz/anchor/pull/3271)). +- spl: Upgrade SPL deps to latest ([#3346](https://github.com/coral-xyz/anchor/pull/3346)). ## [0.30.1] - 2024-06-20 diff --git a/Cargo.lock b/Cargo.lock index 9ce8095830..622abc8003 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -298,12 +298,12 @@ dependencies = [ "borsh 0.10.3", "mpl-token-metadata", "spl-associated-token-account", - "spl-memo", - "spl-pod 0.4.0", - "spl-token", - "spl-token-2022 5.0.1", - "spl-token-group-interface 0.4.1", - "spl-token-metadata-interface 0.5.0", + "spl-memo 6.0.0", + "spl-pod 0.5.0", + "spl-token 7.0.0", + "spl-token-2022 6.0.0", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", ] [[package]] @@ -521,9 +521,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -3854,7 +3854,7 @@ dependencies = [ "solana-account-decoder-client-types", "solana-config-program", "solana-sdk", - "spl-token", + "spl-token 6.0.0", "spl-token-2022 4.0.0", "spl-token-group-interface 0.3.0", "spl-token-metadata-interface 0.4.0", @@ -4142,7 +4142,7 @@ dependencies = [ "solana-metrics", "solana-sdk", "solana-version", - "spl-memo", + "spl-memo 5.0.0", "thiserror", "tokio", ] @@ -5212,27 +5212,28 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78b20903ab0fa951f07eeb4e24ea6a7f6ed91f655c2d75a5675f2ba6c73d64b" +checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" dependencies = [ "borsh 1.5.1", "num-derive 0.4.0", "num-traits", "solana-program", "spl-associated-token-account-client", - "spl-token", - "spl-token-2022 5.0.1", + "spl-token 7.0.0", + "spl-token-2022 6.0.0", "thiserror", ] [[package]] name = "spl-associated-token-account-client" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c5c1e2d53941ea7ebc4be3f86302a3c6c5178baa932bbc038468429e6900d36" +checksum = "d6f8349dbcbe575f354f9a533a21f272f3eb3808a49e2fdc1c34393b88ba76cb" dependencies = [ - "solana-program", + "solana-instruction", + "solana-pubkey", ] [[package]] @@ -5246,6 +5247,18 @@ dependencies = [ "spl-discriminator-derive", ] +[[package]] +name = "spl-discriminator" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a20542d4c8264856d205c0090512f374dbf7b3124479a3d93ab6184ae3631aa" +dependencies = [ + "bytemuck", + "solana-program-error", + "solana-sha256-hasher", + "spl-discriminator-derive", +] + [[package]] name = "spl-discriminator-derive" version = "0.2.0" @@ -5270,6 +5283,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-elgamal-registry" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a157622a63a4d12fbd8b347fd75ee442cb913137fa98647824c992fb049a15b" +dependencies = [ + "bytemuck", + "solana-program", + "solana-zk-sdk", + "spl-pod 0.5.0", + "spl-token-confidential-transfer-proof-extraction", +] + [[package]] name = "spl-memo" version = "5.0.0" @@ -5279,6 +5305,20 @@ dependencies = [ "solana-program", ] +[[package]] +name = "spl-memo" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f09647c0974e33366efeb83b8e2daebb329f0420149e74d3a4bd2c08cf9f7cb" +dependencies = [ + "solana-account-info", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-pubkey", +] + [[package]] name = "spl-pod" version = "0.3.1" @@ -5290,21 +5330,27 @@ dependencies = [ "bytemuck_derive", "solana-program", "solana-zk-token-sdk", - "spl-program-error", + "spl-program-error 0.5.0", ] [[package]] name = "spl-pod" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e38c99f09d58df06ca9a29fc0211786a4c34f4d099c1df27b1abaa206569a4" +checksum = "41a7d5950993e1ff2680bd989df298eeb169367fb2f9deeef1f132de6e4e8016" dependencies = [ "borsh 1.5.1", "bytemuck", "bytemuck_derive", - "solana-program", + "num-derive 0.4.0", + "num-traits", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "solana-program-option", + "solana-pubkey", "solana-zk-sdk", - "spl-program-error", + "thiserror", ] [[package]] @@ -5320,6 +5366,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-program-error" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d39b5186f42b2b50168029d81e58e800b690877ef0b30580d107659250da1d1" +dependencies = [ + "num-derive 0.4.0", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + [[package]] name = "spl-program-error-derive" version = "0.4.1" @@ -5340,24 +5399,32 @@ checksum = "37a75a5f0fcc58126693ed78a17042e9dc53f07e357d6be91789f7d62aff61a4" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", + "spl-discriminator 0.3.0", "spl-pod 0.3.1", - "spl-program-error", - "spl-type-length-value", + "spl-program-error 0.5.0", + "spl-type-length-value 0.5.0", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87d08a5889f14d182b19d9c4d33ee4b3402b6cbc2e057e33eda4e53f6d06029d" +checksum = "cd99ff1e9ed2ab86e3fd582850d47a739fec1be9f4661cba1782d3a0f26805f3" dependencies = [ "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod 0.4.0", - "spl-program-error", - "spl-type-length-value", + "num-derive 0.4.0", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator 0.4.0", + "spl-pod 0.5.0", + "spl-program-error 0.6.0", + "spl-type-length-value 0.7.0", + "thiserror", ] [[package]] @@ -5375,6 +5442,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-token" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed320a6c934128d4f7e54fe00e16b8aeaecf215799d060ae14f93378da6dc834" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.0", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + [[package]] name = "spl-token-2022" version = "4.0.0" @@ -5389,21 +5471,21 @@ dependencies = [ "solana-program", "solana-security-txt", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 5.0.0", "spl-pod 0.3.1", - "spl-token", + "spl-token 6.0.0", "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", + "spl-type-length-value 0.5.0", "thiserror", ] [[package]] name = "spl-token-2022" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a3c55d87de79715d19991e25dd41787364af534cfe5721814b28d8e2453050" +checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" dependencies = [ "arrayref", "bytemuck", @@ -5413,24 +5495,25 @@ dependencies = [ "solana-program", "solana-security-txt", "solana-zk-sdk", - "spl-memo", - "spl-pod 0.4.0", - "spl-token", + "spl-elgamal-registry", + "spl-memo 6.0.0", + "spl-pod 0.5.0", + "spl-token 7.0.0", "spl-token-confidential-transfer-ciphertext-arithmetic", "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", - "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", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", + "spl-transfer-hook-interface 0.9.0", + "spl-type-length-value 0.7.0", "thiserror", ] [[package]] name = "spl-token-confidential-transfer-ciphertext-arithmetic" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48df72fb98b4069979aa4806d4a634ad6f08cb0358e732e6fbac231c5dc075bd" +checksum = "c1f1bf731fc65546330a7929a9735679add70f828dd076a4e69b59d3afb5423c" dependencies = [ "base64 0.22.1", "bytemuck", @@ -5440,20 +5523,23 @@ dependencies = [ [[package]] name = "spl-token-confidential-transfer-proof-extraction" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2ce92a0b9673c44207b21d99526b96d557d5a25752f36c38fae37c49129c3b" +checksum = "383937e637ccbe546f736d5115344351ebd4d2a076907582335261da58236816" dependencies = [ "bytemuck", "solana-curve25519", + "solana-program", "solana-zk-sdk", + "spl-pod 0.5.0", "thiserror", ] [[package]] name = "spl-token-confidential-transfer-proof-generation" -version = "0.1.0" -source = "git+https://github.com/solana-labs/solana-program-library?rev=8e0ed0a#8e0ed0ab0d1caeb0b8125c0879ec6ae96a0685d0" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" dependencies = [ "curve25519-dalek 4.1.3", "solana-zk-sdk", @@ -5468,22 +5554,28 @@ checksum = "df8752b85a5ecc1d9f3a43bce3dd9a6a053673aacf5deb513d1cbb88d3534ffd" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", + "spl-discriminator 0.3.0", "spl-pod 0.3.1", - "spl-program-error", + "spl-program-error 0.5.0", ] [[package]] name = "spl-token-group-interface" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7929b448f7a36d2065ae549a80883a0cf0e94215eecf59c79240eee0cce3620f" +checksum = "d595667ed72dbfed8c251708f406d7c2814a3fa6879893b323d56a10bedfc799" dependencies = [ "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod 0.4.0", - "spl-program-error", + "num-derive 0.4.0", + "num-traits", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator 0.4.0", + "spl-pod 0.5.0", + "thiserror", ] [[package]] @@ -5494,24 +5586,31 @@ checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc" dependencies = [ "borsh 1.5.1", "solana-program", - "spl-discriminator", + "spl-discriminator 0.3.0", "spl-pod 0.3.1", - "spl-program-error", - "spl-type-length-value", + "spl-program-error 0.5.0", + "spl-type-length-value 0.5.0", ] [[package]] name = "spl-token-metadata-interface" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cdf88690dc21db5a124bac7be5d2b6171c526a5bce157170afb1771238f049" +checksum = "dfb9c89dbc877abd735f05547dcf9e6e12c00c11d6d74d8817506cab4c99fdbb" dependencies = [ "borsh 1.5.1", - "solana-program", - "spl-discriminator", - "spl-pod 0.4.0", - "spl-program-error", - "spl-type-length-value", + "num-derive 0.4.0", + "num-traits", + "solana-borsh", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator 0.4.0", + "spl-pod 0.5.0", + "spl-type-length-value 0.7.0", + "thiserror", ] [[package]] @@ -5523,27 +5622,36 @@ dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", + "spl-discriminator 0.3.0", "spl-pod 0.3.1", - "spl-program-error", + "spl-program-error 0.5.0", "spl-tlv-account-resolution 0.7.0", - "spl-type-length-value", + "spl-type-length-value 0.5.0", ] [[package]] name = "spl-transfer-hook-interface" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5864c1944c24f07c2823af91b6c578e7547d82301711506451734459a42872b" +checksum = "4aa7503d52107c33c88e845e1351565050362c2314036ddf19a36cd25137c043" dependencies = [ "arrayref", "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod 0.4.0", - "spl-program-error", - "spl-tlv-account-resolution 0.8.0", - "spl-type-length-value", + "num-derive 0.4.0", + "num-traits", + "solana-account-info", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator 0.4.0", + "spl-pod 0.5.0", + "spl-program-error 0.6.0", + "spl-tlv-account-resolution 0.9.0", + "spl-type-length-value 0.7.0", + "thiserror", ] [[package]] @@ -5554,9 +5662,27 @@ checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", + "spl-discriminator 0.3.0", "spl-pod 0.3.1", - "spl-program-error", + "spl-program-error 0.5.0", +] + +[[package]] +name = "spl-type-length-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba70ef09b13af616a4c987797870122863cba03acc4284f226a4473b043923f9" +dependencies = [ + "bytemuck", + "num-derive 0.4.0", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "spl-discriminator 0.4.0", + "spl-pod 0.5.0", + "thiserror", ] [[package]] @@ -6597,3 +6723,8 @@ dependencies = [ "cc", "pkg-config", ] + +[[patch.unused]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.1.0" +source = "git+https://github.com/solana-labs/solana-program-library?rev=8e0ed0a#8e0ed0ab0d1caeb0b8125c0879ec6ae96a0685d0" diff --git a/bench/BINARY_SIZE.md b/bench/BINARY_SIZE.md index 493c99359a..d901cde7fd 100644 --- a/bench/BINARY_SIZE.md +++ b/bench/BINARY_SIZE.md @@ -18,7 +18,7 @@ Solana version: 2.1.0 | Program | Binary Size | - | | ------- | ----------- | ------------------------ | -| bench | 1,042,424 | 🔴 **+251,416 (31.78%)** | +| bench | 1,041,928 | 🔴 **+250,920 (31.72%)** | ### Notable changes diff --git a/bench/COMPUTE_UNITS.md b/bench/COMPUTE_UNITS.md index 2afed41a8d..c8ade64110 100644 --- a/bench/COMPUTE_UNITS.md +++ b/bench/COMPUTE_UNITS.md @@ -22,53 +22,53 @@ Solana version: 2.1.0 | accountInfo2 | 895 | 🟢 **-28 (3.03%)** | | accountInfo4 | 1,553 | 🟢 **-30 (1.90%)** | | accountInfo8 | 2,923 | 🟢 **-52 (1.75%)** | -| accountEmptyInit1 | 5,016 | 🟢 **-18 (0.36%)** | +| accountEmptyInit1 | 5,083 | 🔴 **+49 (0.97%)** | | accountEmpty1 | 645 | 🟢 **-7 (1.07%)** | -| accountEmptyInit2 | 9,167 | 🟢 **-520 (5.37%)** | +| accountEmptyInit2 | 9,301 | 🟢 **-386 (3.98%)** | | accountEmpty2 | 1,007 | 🟢 **-9 (0.89%)** | -| accountEmptyInit4 | 17,496 | 🟢 **-1,005 (5.43%)** | +| accountEmptyInit4 | 17,764 | 🟢 **-737 (3.98%)** | | accountEmpty4 | 1,724 | 🟢 **-13 (0.75%)** | -| accountEmptyInit8 | 34,187 | 🟢 **-1,982 (5.48%)** | +| accountEmptyInit8 | 34,723 | 🟢 **-1,446 (4.00%)** | | accountEmpty8 | 3,163 | 🟢 **-23 (0.72%)** | -| accountSizedInit1 | 5,125 | 🔴 **+19 (0.37%)** | +| accountSizedInit1 | 5,192 | 🔴 **+86 (1.68%)** | | accountSized1 | 693 | 🔴 **+25 (3.74%)** | -| accountSizedInit2 | 9,355 | 🟢 **-473 (4.81%)** | +| accountSizedInit2 | 9,489 | 🟢 **-339 (3.45%)** | | accountSized2 | 1,075 | 🔴 **+29 (2.77%)** | -| accountSizedInit4 | 17,902 | 🟢 **-935 (4.96%)** | +| accountSizedInit4 | 18,170 | 🟢 **-667 (3.54%)** | | accountSized4 | 1,848 | 🔴 **+41 (2.27%)** | -| accountSizedInit8 | 34,897 | 🟢 **-1,864 (5.07%)** | +| accountSizedInit8 | 35,433 | 🟢 **-1,328 (3.61%)** | | accountSized8 | 3,387 | 🔴 **+61 (1.83%)** | -| accountUnsizedInit1 | 5,238 | 🔴 **+39 (0.75%)** | +| accountUnsizedInit1 | 5,305 | 🔴 **+106 (2.04%)** | | accountUnsized1 | 746 | 🔴 **+44 (6.27%)** | -| accountUnsizedInit2 | 9,625 | 🟢 **-453 (4.49%)** | +| accountUnsizedInit2 | 9,759 | 🟢 **-319 (3.17%)** | | accountUnsized2 | 1,163 | 🔴 **+47 (4.21%)** | -| accountUnsizedInit4 | 18,335 | 🟢 **-924 (4.80%)** | +| accountUnsizedInit4 | 18,603 | 🟢 **-656 (3.41%)** | | accountUnsized4 | 2,002 | 🔴 **+49 (2.51%)** | -| accountUnsizedInit8 | 35,457 | 🟢 **-1,874 (5.02%)** | +| accountUnsizedInit8 | 35,993 | 🟢 **-1,338 (3.58%)** | | accountUnsized8 | 3,673 | 🔴 **+47 (1.30%)** | -| boxedAccountEmptyInit1 | 5,108 | 🔴 **+44 (0.87%)** | +| boxedAccountEmptyInit1 | 5,175 | 🔴 **+111 (2.19%)** | | boxedAccountEmpty1 | 734 | 🔴 **+63 (9.39%)** | -| boxedAccountEmptyInit2 | 9,280 | 🟢 **-441 (4.54%)** | +| boxedAccountEmptyInit2 | 9,414 | 🟢 **-307 (3.16%)** | | boxedAccountEmpty2 | 1,116 | 🔴 **+64 (6.08%)** | -| boxedAccountEmptyInit4 | 17,650 | 🟢 **-932 (5.02%)** | +| boxedAccountEmptyInit4 | 17,918 | 🟢 **-664 (3.57%)** | | boxedAccountEmpty4 | 1,872 | 🔴 **+61 (3.37%)** | -| boxedAccountEmptyInit8 | 34,417 | 🟢 **-1,912 (5.26%)** | +| boxedAccountEmptyInit8 | 34,953 | 🟢 **-1,376 (3.79%)** | | boxedAccountEmpty8 | 3,401 | 🔴 **+44 (1.31%)** | -| boxedAccountSizedInit1 | 5,204 | 🔴 **+85 (1.66%)** | +| boxedAccountSizedInit1 | 5,271 | 🔴 **+152 (2.97%)** | | boxedAccountSized1 | 783 | 🔴 **+97 (14.14%)** | -| boxedAccountSizedInit2 | 9,449 | 🟢 **-396 (4.02%)** | +| boxedAccountSizedInit2 | 9,583 | 🟢 **-262 (2.66%)** | | boxedAccountSized2 | 1,190 | 🔴 **+105 (9.68%)** | -| boxedAccountSizedInit4 | 17,962 | 🟢 **-863 (4.58%)** | +| boxedAccountSizedInit4 | 18,230 | 🟢 **-595 (3.16%)** | | boxedAccountSized4 | 1,996 | 🔴 **+122 (6.51%)** | -| boxedAccountSizedInit8 | 35,017 | 🟢 **-1,807 (4.91%)** | +| boxedAccountSizedInit8 | 35,553 | 🟢 **-1,271 (3.45%)** | | boxedAccountSized8 | 3,628 | 🔴 **+138 (3.95%)** | -| boxedAccountUnsizedInit1 | 5,304 | 🔴 **+97 (1.86%)** | +| boxedAccountUnsizedInit1 | 5,371 | 🔴 **+164 (3.15%)** | | boxedAccountUnsized1 | 836 | 🔴 **+115 (15.95%)** | -| boxedAccountUnsizedInit2 | 9,625 | 🟢 **-390 (3.89%)** | +| boxedAccountUnsizedInit2 | 9,759 | 🟢 **-256 (2.56%)** | | boxedAccountUnsized2 | 1,270 | 🔴 **+113 (9.77%)** | -| boxedAccountUnsizedInit4 | 18,290 | 🟢 **-870 (4.54%)** | +| boxedAccountUnsizedInit4 | 18,558 | 🟢 **-602 (3.14%)** | | boxedAccountUnsized4 | 2,132 | 🔴 **+113 (5.60%)** | -| boxedAccountUnsizedInit8 | 35,649 | 🟢 **-1,847 (4.93%)** | +| boxedAccountUnsizedInit8 | 36,185 | 🟢 **-1,311 (3.50%)** | | boxedAccountUnsized8 | 3,881 | 🔴 **+105 (2.78%)** | | boxedInterfaceAccountMint1 | 1,351 | 🟢 **-21 (1.53%)** | | boxedInterfaceAccountMint2 | 2,123 | 🟢 **-170 (7.41%)** | diff --git a/spl/Cargo.toml b/spl/Cargo.toml index 7d66df8fdf..29eccd4ef1 100644 --- a/spl/Cargo.toml +++ b/spl/Cargo.toml @@ -28,10 +28,10 @@ token_2022_extensions = ["spl-token-2022", "spl-token-group-interface", "spl-tok anchor-lang = { path = "../lang", version = "0.30.1", features = ["derive"] } borsh = { version = "0.10.3", optional = true } mpl-token-metadata = { version = "5.0.0-beta.0", optional = true } -spl-associated-token-account = { version = "5", features = ["no-entrypoint"], optional = true } -spl-memo = { version = "5", features = ["no-entrypoint"], optional = true } -spl-token = { version = "6", features = ["no-entrypoint"], optional = true } -spl-token-2022 = { version = "5.0.1", features = ["no-entrypoint"], optional = true } -spl-token-group-interface = { version = "0.4.1", optional = true } -spl-token-metadata-interface = { version = "0.5", optional = true } -spl-pod = { version = "0.4", optional = true } +spl-associated-token-account = { version = "6", features = ["no-entrypoint"], optional = true } +spl-memo = { version = "6", features = ["no-entrypoint"], optional = true } +spl-token = { version = "7", features = ["no-entrypoint"], optional = true } +spl-token-2022 = { version = "6", features = ["no-entrypoint"], optional = true } +spl-token-group-interface = { version = "0.5", optional = true } +spl-token-metadata-interface = { version = "0.6", optional = true } +spl-pod = { version = "0.5", optional = true } diff --git a/tests/bench/bench.json b/tests/bench/bench.json index 622e1b6be9..cb6c0edc3d 100644 --- a/tests/bench/bench.json +++ b/tests/bench/bench.json @@ -933,60 +933,60 @@ "solanaVersion": "2.1.0", "result": { "binarySize": { - "bench": 1042424 + "bench": 1041928 }, "computeUnits": { "accountInfo1": 571, "accountInfo2": 895, "accountInfo4": 1553, "accountInfo8": 2923, - "accountEmptyInit1": 5016, + "accountEmptyInit1": 5083, "accountEmpty1": 645, - "accountEmptyInit2": 9167, + "accountEmptyInit2": 9301, "accountEmpty2": 1007, - "accountEmptyInit4": 17496, + "accountEmptyInit4": 17764, "accountEmpty4": 1724, - "accountEmptyInit8": 34187, + "accountEmptyInit8": 34723, "accountEmpty8": 3163, - "accountSizedInit1": 5125, + "accountSizedInit1": 5192, "accountSized1": 693, - "accountSizedInit2": 9355, + "accountSizedInit2": 9489, "accountSized2": 1075, - "accountSizedInit4": 17902, + "accountSizedInit4": 18170, "accountSized4": 1848, - "accountSizedInit8": 34897, + "accountSizedInit8": 35433, "accountSized8": 3387, - "accountUnsizedInit1": 5238, + "accountUnsizedInit1": 5305, "accountUnsized1": 746, - "accountUnsizedInit2": 9625, + "accountUnsizedInit2": 9759, "accountUnsized2": 1163, - "accountUnsizedInit4": 18335, + "accountUnsizedInit4": 18603, "accountUnsized4": 2002, - "accountUnsizedInit8": 35457, + "accountUnsizedInit8": 35993, "accountUnsized8": 3673, - "boxedAccountEmptyInit1": 5108, + "boxedAccountEmptyInit1": 5175, "boxedAccountEmpty1": 734, - "boxedAccountEmptyInit2": 9280, + "boxedAccountEmptyInit2": 9414, "boxedAccountEmpty2": 1116, - "boxedAccountEmptyInit4": 17650, + "boxedAccountEmptyInit4": 17918, "boxedAccountEmpty4": 1872, - "boxedAccountEmptyInit8": 34417, + "boxedAccountEmptyInit8": 34953, "boxedAccountEmpty8": 3401, - "boxedAccountSizedInit1": 5204, + "boxedAccountSizedInit1": 5271, "boxedAccountSized1": 783, - "boxedAccountSizedInit2": 9449, + "boxedAccountSizedInit2": 9583, "boxedAccountSized2": 1190, - "boxedAccountSizedInit4": 17962, + "boxedAccountSizedInit4": 18230, "boxedAccountSized4": 1996, - "boxedAccountSizedInit8": 35017, + "boxedAccountSizedInit8": 35553, "boxedAccountSized8": 3628, - "boxedAccountUnsizedInit1": 5304, + "boxedAccountUnsizedInit1": 5371, "boxedAccountUnsized1": 836, - "boxedAccountUnsizedInit2": 9625, + "boxedAccountUnsizedInit2": 9759, "boxedAccountUnsized2": 1270, - "boxedAccountUnsizedInit4": 18290, + "boxedAccountUnsizedInit4": 18558, "boxedAccountUnsized4": 2132, - "boxedAccountUnsizedInit8": 35649, + "boxedAccountUnsizedInit8": 36185, "boxedAccountUnsized8": 3881, "boxedInterfaceAccountMint1": 1351, "boxedInterfaceAccountMint2": 2123, diff --git a/tests/idl/programs/new-idl/src/lib.rs b/tests/idl/programs/new-idl/src/lib.rs index 97148f14ce..7f3c9a47ab 100644 --- a/tests/idl/programs/new-idl/src/lib.rs +++ b/tests/idl/programs/new-idl/src/lib.rs @@ -1,4 +1,4 @@ -use anchor_lang::{prelude::*, solana_program::clock::UnixTimestamp}; +use anchor_lang::prelude::*; declare_id!("Newid11111111111111111111111111111111111111"); @@ -275,6 +275,12 @@ pub type AliasOptionVec = Vec>; pub type AliasGenericConst = [u32; N]; pub type AliasMultipleGenericMixed = Vec<[T; N]>; +// TODO: Remove this declaration and automatically resolve it from `solana-program`. +// Splitting `solana-program` into multiple parts in Solana v2.1 broke resolution of type +// aliases such as `UnixTimestamp` due to the resolution logic not being smart enough to figure +// out where the declaration of the type comes from. +pub type UnixTimestamp = i64; + #[derive(Accounts)] pub struct AccountAndEventArgAndField<'info> { #[account(zero)] diff --git a/tests/spl/token-extensions/programs/token-extensions/Cargo.toml b/tests/spl/token-extensions/programs/token-extensions/Cargo.toml index a3f920a937..1e98480cf1 100644 --- a/tests/spl/token-extensions/programs/token-extensions/Cargo.toml +++ b/tests/spl/token-extensions/programs/token-extensions/Cargo.toml @@ -18,7 +18,7 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] anchor-lang = { path = "../../../../../lang", features = ["init-if-needed"] } anchor-spl = { path = "../../../../../spl" } -spl-tlv-account-resolution = "0.8.0" -spl-transfer-hook-interface = "0.8.1" -spl-type-length-value = "0.6" -spl-pod = "0.4" +spl-tlv-account-resolution = "0.9" +spl-transfer-hook-interface = "0.9" +spl-type-length-value = "0.7" +spl-pod = "0.5" diff --git a/tests/spl/transfer-hook/programs/transfer-hook/Cargo.toml b/tests/spl/transfer-hook/programs/transfer-hook/Cargo.toml index 31d69b004b..9c9a149400 100644 --- a/tests/spl/transfer-hook/programs/transfer-hook/Cargo.toml +++ b/tests/spl/transfer-hook/programs/transfer-hook/Cargo.toml @@ -18,6 +18,6 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] anchor-lang = { path = "../../../../../lang", features = ["interface-instructions"] } anchor-spl = { path = "../../../../../spl" } -spl-discriminator = "0.3" -spl-tlv-account-resolution = "0.8" -spl-transfer-hook-interface = "0.8.1" +spl-discriminator = "0.4" +spl-tlv-account-resolution = "0.9" +spl-transfer-hook-interface = "0.9"