Răsfoiți Sursa

deps: Update Solana to v2.3.4 (#46)

* deps: Update Solana to v2.3.4

#### Problem

The v2.3 Solana crates are out, but this is still using v2.2

#### Summary of changes

Bump the Solana and mollusdk versions.

* Use multithreaded runtime for test
Jon C 4 luni în urmă
părinte
comite
37fa9145c7

+ 1 - 1
.github/actions/setup/action.yml

@@ -93,7 +93,7 @@ runs:
     - name: Install CLI dependencies
       if: ${{ inputs.cli == 'true' }}
       shell: bash
-      run: sudo apt update && sudo apt install libudev-dev protobuf-compiler -y
+      run: sudo apt update && sudo apt install libudev-dev protobuf-compiler libclang-dev -y
 
     - name: Cache Cargo Dependencies
       if: ${{ inputs.cargo-cache-key && !inputs.cargo-cache-fallback-key }}

Fișier diff suprimat deoarece este prea mare
+ 350 - 148
Cargo.lock


+ 1 - 1
Cargo.toml

@@ -21,7 +21,7 @@ check-cfg = [
 ]
 
 [workspace.metadata.cli]
-solana = "2.2.0"
+solana = "2.3.4"
 
 # Specify Rust toolchains for rustfmt, clippy, and build.
 # Any unprovided toolchains default to stable.

+ 7 - 5
clients/cli/Cargo.toml

@@ -12,12 +12,14 @@ edition = { workspace = true }
 [dependencies]
 clap = { version = "3", features = ["cargo"] }
 futures-util = "0.3.31"
-solana-clap-v3-utils = "2.2.0"
-solana-cli-config = "2.2.0"
-solana-client = "2.2.0"
+solana-clap-v3-utils = "2.3.4"
+solana-cli-config = "2.3.4"
+solana-client = "2.3.4"
 solana-logger = "2.2.1"
-solana-remote-wallet = "2.2.0"
+solana-remote-wallet = "2.3.4"
 solana-sdk = "2.2.1"
+solana-sdk-ids = "2.2.1"
+solana-system-interface = "1"
 spl-tlv-account-resolution = { version = "0.10.0", features = ["serde-traits"] }
 spl-transfer-hook-interface = { version = "0.10.0", path = "../../interface" }
 strum = "0.27"
@@ -28,7 +30,7 @@ serde_json = "1.0.133"
 serde_yaml = "0.9.34"
 
 [dev-dependencies]
-solana-test-validator = "2.2.0"
+solana-test-validator = "2.3.4"
 spl-token-2022 = { version = "9.0.0", features = ["no-entrypoint"] }
 spl-token-client = "0.16.1"
 spl-transfer-hook-example = { version = "0.6.0", path = "../../program" }

+ 5 - 4
clients/cli/src/main.rs

@@ -18,9 +18,9 @@ use {
         instruction::Instruction,
         pubkey::Pubkey,
         signature::{Signature, Signer},
-        system_instruction, system_program,
         transaction::Transaction,
     },
+    solana_system_interface::{instruction as system_instruction, program as system_program},
     spl_tlv_account_resolution::{account::ExtraAccountMeta, state::ExtraAccountMetaList},
     spl_transfer_hook_interface::{
         get_extra_account_metas_address,
@@ -534,9 +534,10 @@ mod test {
     use {
         super::*,
         solana_sdk::{
-            account::Account, bpf_loader_upgradeable, instruction::AccountMeta,
-            program_option::COption, signer::keypair::Keypair,
+            account::Account, instruction::AccountMeta, program_option::COption,
+            signer::keypair::Keypair,
         },
+        solana_sdk_ids::bpf_loader_upgradeable,
         solana_test_validator::{TestValidator, TestValidatorGenesis, UpgradeableProgramInfo},
         spl_token_2022::{
             extension::{ExtensionType, StateWithExtensionsMut},
@@ -589,7 +590,7 @@ mod test {
         test_validator_genesis.start_async().await
     }
 
-    #[tokio::test]
+    #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
     async fn test_create() {
         let program_id = Pubkey::new_unique();
 

+ 2 - 1
program/Cargo.toml

@@ -24,8 +24,9 @@ spl-transfer-hook-interface = { version = "0.10.0", path = "../interface" }
 spl-type-length-value = "0.8.0"
 
 [dev-dependencies]
-solana-program-test = "2.2.0"
+solana-program-test = "2.3.4"
 solana-sdk = "2.2.1"
+solana-system-interface = "1"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
program/tests/functional.rs

@@ -14,9 +14,10 @@ use {
         pubkey::Pubkey,
         signature::Signer,
         signer::keypair::Keypair,
-        system_instruction, sysvar,
+        sysvar,
         transaction::{Transaction, TransactionError},
     },
+    solana_system_interface::instruction as system_instruction,
     spl_tlv_account_resolution::{
         account::ExtraAccountMeta, error::AccountResolutionError, seeds::Seed,
         state::ExtraAccountMetaList,

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff