Skip to content

Commit

Permalink
merge dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
hal3e committed Nov 22, 2024
2 parents 51b259a + 6d66390 commit 5d2a952
Show file tree
Hide file tree
Showing 10 changed files with 1,340 additions and 44 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
FUEL_CORE_PATCH_BRANCH: ""
FUEL_CORE_PATCH_REVISION: ""
RUST_VERSION: 1.79.0
FORC_VERSION: 0.65.2
FORC_VERSION: 0.66.4
FORC_PATCH_BRANCH: ""
FORC_PATCH_REVISION: ""
NEXTEST_HIDE_PROGRESS_BAR: "true"
Expand Down Expand Up @@ -252,14 +252,15 @@ jobs:
if: ${{ matrix.command == 'test_wasm' }}
uses: actions/setup-node@v3
with:
node-version: 18

- name: Test WASM
if: ${{ matrix.command == 'test_wasm' }}
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
cd wasm-tests
wasm-pack test --node
node-version: 22.8.0

# Until we fix the "missing env error"
# - name: Test WASM
# if: ${{ matrix.command == 'test_wasm' }}
# run: |
# curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# cd wasm-tests
# wasm-pack test --node

- name: Check that fuel_core version.rs file is up to date
if: ${{ matrix.command == 'check_fuel_core_version' }}
Expand Down
19 changes: 9 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/FuelLabs/fuels-rs"
rust-version = "1.79.0"
version = "0.66.9"
version = "0.66.10"

[workspace.dependencies]
Inflector = "0.11.4"
Expand Down Expand Up @@ -105,14 +105,14 @@ fuel-types = { version = "0.58.0" }
fuel-vm = { version = "0.58.0" }

# Workspace projects
fuels = { version = "0.66.9", path = "./packages/fuels", default-features = false }
fuels-accounts = { version = "0.66.9", path = "./packages/fuels-accounts", default-features = false }
fuels-code-gen = { version = "0.66.9", path = "./packages/fuels-code-gen", default-features = false }
fuels-core = { version = "0.66.9", path = "./packages/fuels-core", default-features = false }
fuels-macros = { version = "0.66.9", path = "./packages/fuels-macros", default-features = false }
fuels-programs = { version = "0.66.9", path = "./packages/fuels-programs", default-features = false }
fuels-test-helpers = { version = "0.66.9", path = "./packages/fuels-test-helpers", default-features = false }
versions-replacer = { version = "0.66.9", path = "./scripts/versions-replacer", default-features = false }
fuels = { version = "0.66.10", path = "./packages/fuels", default-features = false }
fuels-accounts = { version = "0.66.10", path = "./packages/fuels-accounts", default-features = false }
fuels-code-gen = { version = "0.66.10", path = "./packages/fuels-code-gen", default-features = false }
fuels-core = { version = "0.66.10", path = "./packages/fuels-core", default-features = false }
fuels-macros = { version = "0.66.10", path = "./packages/fuels-macros", default-features = false }
fuels-programs = { version = "0.66.10", path = "./packages/fuels-programs", default-features = false }
fuels-test-helpers = { version = "0.66.10", path = "./packages/fuels-test-helpers", default-features = false }
versions-replacer = { version = "0.66.10", path = "./scripts/versions-replacer", default-features = false }

[patch.crates-io]
fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "hal3e/unknown-variants", package = "fuel-core"}
Expand All @@ -122,4 +122,3 @@ fuel-core-poa = { git = "https://github.com/FuelLabs/fuel-core", branch = "hal3e
fuel-core-services = { git = "https://github.com/FuelLabs/fuel-core", branch = "hal3e/unknown-variants", package = "fuel-core-services"}
fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "hal3e/unknown-variants", package = "fuel-core-types"}
fuel-core-wasm-executor = { git = "https://github.com/FuelLabs/fuel-core", branch = "hal3e/unknown-variants", package = "fuel-core-wasm-executor"}

2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[files]
extend-exclude = ["packages/fuels-accounts/src/schema/schema.sdl"]
4 changes: 2 additions & 2 deletions docs/src/connecting/short-lived.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ let wallet = launch_provider_and_get_wallet().await?;
The `fuel-core-lib` feature allows us to run a `fuel-core` node without installing the `fuel-core` binary on the local machine. Using the `fuel-core-lib` feature flag entails downloading all the dependencies needed to run the fuel-core node.

```rust,ignore
fuels = { version = "0.66.9", features = ["fuel-core-lib"] }
fuels = { version = "0.66.10", features = ["fuel-core-lib"] }
```

### RocksDB

The `rocksdb` is an additional feature that, when combined with `fuel-core-lib`, provides persistent storage capabilities while using `fuel-core` as a library.

```rust,ignore
fuels = { version = "0.66.9", features = ["rocksdb"] }
fuels = { version = "0.66.10", features = ["rocksdb"] }
```
6 changes: 4 additions & 2 deletions e2e/tests/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use fuels::{
prelude::*,
tx::Receipt,
types::{
block::Block,
coin_type::CoinType,
message::Message,
transaction_builders::{BuildableTransaction, ScriptTransactionBuilder},
Expand Down Expand Up @@ -218,6 +217,9 @@ async fn can_increase_block_height() -> Result<()> {
Ok(())
}

// debug builds are slower (20x for `fuel-core-lib`, 4x for a release-fuel-core-binary), makes for
// flaky tests
#[cfg(not(feature = "fuel-core-lib"))]
#[tokio::test]
async fn can_set_custom_block_time() -> Result<()> {
// ANCHOR: use_produce_blocks_custom_time
Expand Down Expand Up @@ -255,7 +257,7 @@ async fn can_set_custom_block_time() -> Result<()> {
results: 10,
direction: PageDirection::Forward,
};
let blocks: Vec<Block> = provider.get_blocks(req).await?.results;
let blocks: Vec<fuels::types::block::Block> = provider.get_blocks(req).await?.results;

assert_eq!(blocks[1].header.time.unwrap().timestamp(), 20);
assert_eq!(blocks[2].header.time.unwrap().timestamp(), 40);
Expand Down
4 changes: 0 additions & 4 deletions packages/fuels-accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ fuel-tx = { workspace = true, features = ["test-helpers", "random"] }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }

[build-dependencies]
cynic = { workspace = true, features = ["default"], optional = true }
fuel-core-client = { workspace = true, optional = true }

[features]
default = ["std"]
coin-cache = ["tokio?/time"]
Expand Down
15 changes: 0 additions & 15 deletions packages/fuels-accounts/build.rs

This file was deleted.

12 changes: 12 additions & 0 deletions packages/fuels-accounts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ pub use account::*;
mod coin_cache;

pub mod predicate;

#[cfg(test)]
mod test {
#[test]
fn sdl_is_the_same_as_from_fuel() {
let file_sdl = include_str!("./schema/schema.sdl");

let core_sdl = String::from_utf8(fuel_core_client::SCHEMA_SDL.to_vec()).unwrap();

assert_eq!(file_sdl, &core_sdl);
}
}
4 changes: 2 additions & 2 deletions packages/fuels-accounts/src/provider/retryable_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ mod custom_queries {
#[cynic(
graphql_type = "Query",
variables = "IsUserAccountVariables",
schema_path = "./target/fuel-core-client-schema.sdl"
schema_path = "./src/schema/schema.sdl"
)]
pub struct IsUserAccountQuery {
#[arguments(id: $blob_id)]
Expand All @@ -379,7 +379,7 @@ mod custom_queries {

#[derive(cynic::QueryFragment, Clone, Debug)]
#[cynic(
schema_path = "./target/fuel-core-client-schema.sdl",
schema_path = "./src/schema/schema.sdl",
graphql_type = "Query",
variables = "ContractByIdArgs"
)]
Expand Down
Loading

0 comments on commit 5d2a952

Please sign in to comment.