Skip to content

Commit

Permalink
Release v0.42.0 (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx authored Nov 13, 2023
1 parent da5b9af commit c125299
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [Version 0.42.0]

### Changed

#### Breaking
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
13 changes: 4 additions & 9 deletions fuel-tx/src/transaction/types/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,17 @@ impl Witness {
pub fn recover_witness(
&self,
txhash: &TxId,
witness_index: usize,
input_index: usize,
) -> Result<fuel_types::Address, ValidityError> {
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))
}
}
Expand Down
2 changes: 1 addition & 1 deletion fuel-tx/src/transaction/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fuel-vm/src/interpreter/executors/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ where
false
}
}) {
return Err(InterpreterError::Panic(PanicReason::ContractNotFound))
return Err(InterpreterError::Panic(PanicReason::ContractNotInInputs))
}

let gas_limit;
Expand Down

0 comments on commit c125299

Please sign in to comment.