Bläddra i källkod

chore(deps): bump solana-instruction-error from 2.0.0 to 2.1.0 (#9043)

* bump solana-instruction-error from 2.0.0 to 2.1.0

* allow using deprecated InstructionError::NotEnoughAccountKeys

* update BankSlotDelta frozen-abi hash
Yihau Chen 2 dagar sedan
förälder
incheckning
f370f916ac

+ 2 - 2
Cargo.lock

@@ -8961,9 +8961,9 @@ dependencies = [
 
 [[package]]
 name = "solana-instruction-error"
-version = "2.0.0"
+version = "2.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1f0d483b8ae387178d9210e0575b666b05cdd4bd0f2f188128249f6e454d39d"
+checksum = "b04259e03c05faf38a8c24217b5cfe4c90572ae6184ab49cddb1584fdd756d3f"
 dependencies = [
  "num-traits",
  "serde",

+ 1 - 1
Cargo.toml

@@ -469,7 +469,7 @@ solana-hard-forks = "3.0.0"
 solana-hash = "3.0.0"
 solana-inflation = "3.0.0"
 solana-instruction = "3.0.0"
-solana-instruction-error = "2.0.0"
+solana-instruction-error = "2.1.0"
 solana-instructions-sysvar = "3.0.0"
 solana-keccak-hasher = "3.0.0"
 solana-keypair = "3.0.1"

+ 1 - 0
ledger/src/blockstore_processor.rs

@@ -3455,6 +3455,7 @@ pub mod tests {
                 InstructionError::DuplicateAccountIndex,
                 InstructionError::ExecutableModified,
                 InstructionError::RentEpochModified,
+                #[allow(deprecated)]
                 InstructionError::NotEnoughAccountKeys,
                 InstructionError::AccountDataSizeChanged,
                 InstructionError::AccountNotExecutable,

+ 2 - 2
programs/sbf/Cargo.lock

@@ -7285,9 +7285,9 @@ dependencies = [
 
 [[package]]
 name = "solana-instruction-error"
-version = "2.0.0"
+version = "2.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1f0d483b8ae387178d9210e0575b666b05cdd4bd0f2f188128249f6e454d39d"
+checksum = "b04259e03c05faf38a8c24217b5cfe4c90572ae6184ab49cddb1584fdd756d3f"
 dependencies = [
  "num-traits",
  "serde",

+ 4 - 4
programs/sbf/tests/programs.rs

@@ -1768,11 +1768,11 @@ fn test_program_sbf_instruction_introspection() {
     // No accounts, should error
     let instruction = Instruction::new_with_bytes(program_id, &[0], vec![]);
     let result = bank_client.send_and_confirm_instruction(&mint_keypair, instruction);
+    #[allow(deprecated)]
+    let expected_error =
+        TransactionError::InstructionError(0, InstructionError::NotEnoughAccountKeys);
     assert!(result.is_err());
-    assert_eq!(
-        result.unwrap_err().unwrap(),
-        TransactionError::InstructionError(0, InstructionError::NotEnoughAccountKeys)
-    );
+    assert_eq!(result.unwrap_err().unwrap(), expected_error,);
     assert!(bank.get_account(&sysvar::instructions::id()).is_none());
 }
 

+ 1 - 1
runtime/src/bank.rs

@@ -221,7 +221,7 @@ pub const MAX_LEADER_SCHEDULE_STAKES: Epoch = 5;
 pub type BankStatusCache = StatusCache<Result<()>>;
 #[cfg_attr(
     feature = "frozen-abi",
-    frozen_abi(digest = "FUttxQbsCnX5VMRuj8c2sUxZKNARUTaomdgsbg8wM3D6")
+    frozen_abi(digest = "23uAyYmzMrmPvPDKf6SvF1YoojYstmEPmdkfAQDnpwsq")
 )]
 pub type BankSlotDelta = SlotDelta<Result<()>>;
 

+ 2 - 0
runtime/src/serde_snapshot/status_cache.rs

@@ -374,6 +374,7 @@ impl From<SerdeInstructionError> for InstructionError {
             SerdeInstructionError::DuplicateAccountIndex => Self::DuplicateAccountIndex,
             SerdeInstructionError::ExecutableModified => Self::ExecutableModified,
             SerdeInstructionError::RentEpochModified => Self::RentEpochModified,
+            #[allow(deprecated)]
             SerdeInstructionError::NotEnoughAccountKeys => Self::NotEnoughAccountKeys,
             SerdeInstructionError::AccountDataSizeChanged => Self::AccountDataSizeChanged,
             SerdeInstructionError::AccountNotExecutable => Self::AccountNotExecutable,
@@ -445,6 +446,7 @@ impl From<InstructionError> for SerdeInstructionError {
             InstructionError::DuplicateAccountIndex => Self::DuplicateAccountIndex,
             InstructionError::ExecutableModified => Self::ExecutableModified,
             InstructionError::RentEpochModified => Self::RentEpochModified,
+            #[allow(deprecated)]
             InstructionError::NotEnoughAccountKeys => Self::NotEnoughAccountKeys,
             InstructionError::AccountDataSizeChanged => Self::AccountDataSizeChanged,
             InstructionError::AccountNotExecutable => Self::AccountNotExecutable,

+ 3 - 0
storage-proto/src/convert.rs

@@ -769,6 +769,7 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
                     16 => InstructionError::DuplicateAccountIndex,
                     17 => InstructionError::ExecutableModified,
                     18 => InstructionError::RentEpochModified,
+                    #[allow(deprecated)]
                     19 => InstructionError::NotEnoughAccountKeys,
                     20 => InstructionError::AccountDataSizeChanged,
                     21 => InstructionError::AccountNotExecutable,
@@ -1058,6 +1059,7 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
                             InstructionError::RentEpochModified => {
                                 tx_by_addr::InstructionErrorType::RentEpochModified
                             }
+                            #[allow(deprecated)]
                             InstructionError::NotEnoughAccountKeys => {
                                 tx_by_addr::InstructionErrorType::NotEnoughAccountKeys
                             }
@@ -1770,6 +1772,7 @@ mod test {
             tx_by_addr_transaction_error.try_into().unwrap()
         );
 
+        #[allow(deprecated)]
         let transaction_error =
             TransactionError::InstructionError(10, InstructionError::NotEnoughAccountKeys);
         let tx_by_addr_transaction_error: tx_by_addr::TransactionError =