From c1252996aafed25e2eadd5e5081dfe4e4086fb2b Mon Sep 17 00:00:00 2001 From: Green Baneling Date: Tue, 14 Nov 2023 01:09:20 +0300 Subject: [PATCH] Release v0.42.0 (#635) --- CHANGELOG.md | 2 ++ Cargo.toml | 18 +++++++++--------- fuel-tx/src/transaction/types/witness.rs | 13 ++++--------- fuel-tx/src/transaction/validity.rs | 2 +- fuel-vm/src/interpreter/executors/main.rs | 2 +- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1e32fc0b..6604854f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [Version 0.42.0] + ### Changed #### Breaking diff --git a/Cargo.toml b/Cargo.toml index 21688a74eb..569499edd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,17 +18,17 @@ edition = "2021" homepage = "https://fuel.network/" license = "BUSL-1.1" repository = "https://github.com/FuelLabs/fuel-vm" -version = "0.41.0" +version = "0.42.0" [workspace.dependencies] -fuel-asm = { version = "0.41.0", path = "fuel-asm", default-features = false } -fuel-crypto = { version = "0.41.0", path = "fuel-crypto", default-features = false } -fuel-derive = { version = "0.41.0", path = "fuel-derive", default-features = false } -fuel-merkle = { version = "0.41.0", path = "fuel-merkle", default-features = false } -fuel-storage = { version = "0.41.0", path = "fuel-storage", default-features = false } -fuel-tx = { version = "0.41.0", path = "fuel-tx", default-features = false } -fuel-types = { version = "0.41.0", path = "fuel-types", default-features = false } -fuel-vm = { version = "0.41.0", path = "fuel-vm", default-features = false } +fuel-asm = { version = "0.42.0", path = "fuel-asm", default-features = false } +fuel-crypto = { version = "0.42.0", path = "fuel-crypto", default-features = false } +fuel-derive = { version = "0.42.0", path = "fuel-derive", default-features = false } +fuel-merkle = { version = "0.42.0", path = "fuel-merkle", default-features = false } +fuel-storage = { version = "0.42.0", path = "fuel-storage", default-features = false } +fuel-tx = { version = "0.42.0", path = "fuel-tx", default-features = false } +fuel-types = { version = "0.42.0", path = "fuel-types", default-features = false } +fuel-vm = { version = "0.42.0", path = "fuel-vm", default-features = false } bitflags = "2" bincode = { version = "1.3", default-features = false } criterion = "0.5.0" diff --git a/fuel-tx/src/transaction/types/witness.rs b/fuel-tx/src/transaction/types/witness.rs index 908749e671..514e5d77d1 100644 --- a/fuel-tx/src/transaction/types/witness.rs +++ b/fuel-tx/src/transaction/types/witness.rs @@ -48,22 +48,17 @@ impl Witness { pub fn recover_witness( &self, txhash: &TxId, - witness_index: usize, + input_index: usize, ) -> Result { - let bytes = <[u8; Signature::LEN]>::try_from(self.as_ref()).map_err(|_| { - ValidityError::InputInvalidSignature { - index: witness_index, - } - })?; + let bytes = <[u8; Signature::LEN]>::try_from(self.as_ref()) + .map_err(|_| ValidityError::InputInvalidSignature { index: input_index })?; let signature = Signature::from_bytes(bytes); let message = Message::from_bytes_ref(txhash); signature .recover(message) - .map_err(|_| ValidityError::InputInvalidSignature { - index: witness_index, - }) + .map_err(|_| ValidityError::InputInvalidSignature { index: input_index }) .map(|pk| Input::owner(&pk)) } } diff --git a/fuel-tx/src/transaction/validity.rs b/fuel-tx/src/transaction/validity.rs index 6d27ca3887..9e2b92dd51 100644 --- a/fuel-tx/src/transaction/validity.rs +++ b/fuel-tx/src/transaction/validity.rs @@ -93,7 +93,7 @@ impl Input { .get(*witness_index as usize) .ok_or(ValidityError::InputWitnessIndexBounds { index })?; - witness.recover_witness(txhash, *witness_index as usize) + witness.recover_witness(txhash, index) }; // recover the address associated with a witness, using the cache if diff --git a/fuel-vm/src/interpreter/executors/main.rs b/fuel-vm/src/interpreter/executors/main.rs index c24c210018..080599f1c1 100644 --- a/fuel-vm/src/interpreter/executors/main.rs +++ b/fuel-vm/src/interpreter/executors/main.rs @@ -500,7 +500,7 @@ where false } }) { - return Err(InterpreterError::Panic(PanicReason::ContractNotFound)) + return Err(InterpreterError::Panic(PanicReason::ContractNotInInputs)) } let gas_limit;