diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1caacbb28b..2c94a40686 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,10 @@ jobs: args: --target thumbv6m-none-eabi -p fuel-asm -p fuel-storage -p fuel-merkle --no-default-features - command: check args: --target wasm32-unknown-unknown -p fuel-crypto --no-default-features + - command: check + args: --target wasm32-unknown-unknown -p fuel-tx --features serde --no-default-features + - command: check + args: --target wasm32-unknown-unknown -p fuel-types --features serde --no-default-features - command: rustc args: --target wasm32-unknown-unknown -p fuel-types --features typescript --crate-type=cdylib - command: rustc diff --git a/CHANGELOG.md b/CHANGELOG.md index 75fd18323d..ee0e3115a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [#527](https://github.com/FuelLabs/fuel-vm/pull/527): The balances are empty during predicate estimation/verification. +## [Version 0.35.3] + +### Changed + +- [#542](https://github.com/FuelLabs/fuel-vm/pull/542/): Make the `fuel-tx` WASM compatible with `serde` feature enabled. ## [Version 0.35.2] diff --git a/Cargo.toml b/Cargo.toml index 10cb3480b4..c9f514607e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,15 +18,15 @@ edition = "2021" homepage = "https://fuel.network/" license = "BUSL-1.1" repository = "https://github.com/FuelLabs/fuel-vm" -version = "0.35.2" +version = "0.35.3" [workspace.dependencies] -fuel-asm = { version = "0.35.2", path = "fuel-asm", default-features = false } -fuel-crypto = { version = "0.35.2", path = "fuel-crypto", default-features = false } -fuel-merkle = { version = "0.35.2", path = "fuel-merkle", default-features = false } -fuel-storage = { version = "0.35.2", path = "fuel-storage", default-features = false } -fuel-tx = { version = "0.35.2", path = "fuel-tx", default-features = false } -fuel-types = { version = "0.35.2", path = "fuel-types", default-features = false } -fuel-vm = { version = "0.35.2", path = "fuel-vm", default-features = false } +fuel-asm = { version = "0.35.3", path = "fuel-asm", default-features = false } +fuel-crypto = { version = "0.35.3", path = "fuel-crypto", default-features = false } +fuel-merkle = { version = "0.35.3", path = "fuel-merkle", default-features = false } +fuel-storage = { version = "0.35.3", path = "fuel-storage", default-features = false } +fuel-tx = { version = "0.35.3", path = "fuel-tx", default-features = false } +fuel-types = { version = "0.35.3", path = "fuel-types", default-features = false } +fuel-vm = { version = "0.35.3", path = "fuel-vm", default-features = false } bincode = { version = "1.3", default-features = false } criterion = "0.5.0" diff --git a/ci_checks.sh b/ci_checks.sh index de34f06f81..f6017982bc 100755 --- a/ci_checks.sh +++ b/ci_checks.sh @@ -24,6 +24,10 @@ cargo check --all-targets --no-default-features && cargo check --all-targets --all-features && cargo check --target thumbv6m-none-eabi -p fuel-asm -p fuel-storage -p fuel-merkle --no-default-features && cargo check --target wasm32-unknown-unknown -p fuel-crypto --no-default-features && +cargo check --target wasm32-unknown-unknown -p fuel-types --features serde --no-default-features && +cargo check --target wasm32-unknown-unknown -p fuel-tx --features serde --no-default-features && +cargo rustc --target wasm32-unknown-unknown -p fuel-types --features typescript --crate-type=cdylib && +cargo rustc --target wasm32-unknown-unknown -p fuel-asm --features typescript --crate-type=cdylib && cargo make check && cargo test --all-targets --all-features && cargo test --all-targets --no-default-features && diff --git a/fuel-asm/src/encoding_tests.rs b/fuel-asm/src/encoding_tests.rs index 6b990a2f7a..af6c11c0a0 100644 --- a/fuel-asm/src/encoding_tests.rs +++ b/fuel-asm/src/encoding_tests.rs @@ -16,7 +16,7 @@ fn opcode() { for opcode_int in 0..64 { let Ok(op) = Opcode::try_from(opcode_int) else { - continue; + continue }; instructions.push(op.test_construct(r, r, r, r, imm12)); diff --git a/fuel-crypto/src/ed25519.rs b/fuel-crypto/src/ed25519.rs index 9b1b5f3bca..82197ac9e8 100644 --- a/fuel-crypto/src/ed25519.rs +++ b/fuel-crypto/src/ed25519.rs @@ -18,11 +18,11 @@ pub fn verify( message: &Message, ) -> Result<(), Error> { let Ok(signature) = Signature::from_bytes(&**signature) else { - return Err(Error::InvalidSignature); + return Err(Error::InvalidSignature) }; let Ok(pub_key) = ed25519_dalek::PublicKey::from_bytes(&**pub_key) else { - return Err(Error::InvalidPublicKey); + return Err(Error::InvalidPublicKey) }; if pub_key.verify_strict(&**message, &signature).is_ok() { diff --git a/fuel-tx/src/builder.rs b/fuel-tx/src/builder.rs index 086e962dee..0495381a69 100644 --- a/fuel-tx/src/builder.rs +++ b/fuel-tx/src/builder.rs @@ -40,8 +40,10 @@ use fuel_types::{ Word, }; -use alloc::vec::Vec; -use std::collections::HashMap; +use alloc::{ + collections::BTreeMap, + vec::Vec, +}; pub trait BuildableAloc where @@ -126,7 +128,7 @@ pub struct TransactionBuilder { // We take the key by reference so this lib won't have the responsibility to properly // zeroize the keys // Maps signing keys -> witness indexes - sign_keys: HashMap, + sign_keys: BTreeMap, } impl TransactionBuilder