Skip to content

chore: avoid duplicate crates#6955

Closed
rex4539 wants to merge 2 commits intoFuelLabs:masterfrom
rex4539:inherit
Closed

chore: avoid duplicate crates#6955
rex4539 wants to merge 2 commits intoFuelLabs:masterfrom
rex4539:inherit

Conversation

@rex4539
Copy link
Copy Markdown

@rex4539 rex4539 commented Feb 24, 2025

No description provided.

@rex4539 rex4539 requested review from a team as code owners February 24, 2025 16:23
@zees-dev
Copy link
Copy Markdown
Contributor

A lot of these are dev-dependencies from member crates - to be used in tests.
Im thinking whether it would be worthwhile having them in a dedicated dev-dependencies section within the root cargo.toml.
This way we can know at glance which crates are actually used in the project/binaries and which ones are only used for testing (hence more easy to upgrade/replace).

@rex4539
Copy link
Copy Markdown
Author

rex4539 commented Feb 26, 2025

Feel free to take over from here :)

@sdankel
Copy link
Copy Markdown
Contributor

sdankel commented Feb 27, 2025

Taking it over here: #6966

@sdankel sdankel closed this Feb 27, 2025
sdankel added a commit that referenced this pull request Feb 28, 2025
## Description

Moves dev dependencies to the workspace Cargo.toml for consistent
versions in tests.

Inspired by #6955

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
JoshuaBatty pushed a commit to FuelLabs/forc that referenced this pull request Jan 5, 2026
## Description

Moves dev dependencies to the workspace Cargo.toml for consistent
versions in tests.

Inspired by FuelLabs/sway#6955

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
JoshuaBatty added a commit to FuelLabs/forc that referenced this pull request Jan 6, 2026
* feat: add forc-node command for easily bootstrapping a node (#6473)

* chore: move dev dependencies to workspace (#6966)

## Description

Moves dev dependencies to the workspace Cargo.toml for consistent
versions in tests.

Inspired by FuelLabs/sway#6955

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

* ci: upgrade to rust 1.85.0 (#6979)

## Description


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

* Add description to forc-node (#7013)

## Description

Descriptions are required for crates.io published packages.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

* fix: ensure forc-node ignition fetches ignition chain config (#7194)

## Description
closes #7193.

There was a simple bug in the mainnet setup we were still fetching
testnet configuration. Which caused some syncing issues.

* Bump fuel deps (#7228)

## Description

Bumps fuel-vm, fuel-core fuels-rs and forc-wallet to latest versions.
Upgrades Rust to 2021 edition.

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- I believe this is non-breaking from user code perspective but I'm not
too sure about that
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>
Co-authored-by: JoshuaBatty <joshpbatty@gmail.com>
Co-authored-by: IGI-111 <igi-111@protonmail.com>

* feat: check file descriptor limits before running forc node (#7302)

## Description

Adds a check to try and set the `NOFILE` limit on Unix-based systems.
This is important for RocksDB, since we generally exceed the default
maximum number of allowed file descriptors allowed by the OS.

The idea is to attempt to raise that limit to a reasonable number, and
throw an error if we are unable to (likely due to user permission
issues).

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

* Apply Clippy's `uninlined_format_args` lint (#7361)

## Description

This PR improves the readability of `format!`, `write!`, etc. macros by
rolling out the Clippy fixes for the `uninlined_format_args` lint.
`cargo clippy` started showing this lint after locally switching to
Cargo v1.88.0.

Additionally, the PR:
- replaces a few occurrences of
`io::Error::new(std::io::ErrorKind::Other, <msg>)` with
`io::Error::other(<msg>)`.
- replaces a single occurrence of `if params.iter().any(|&p| p ==
"all")` with `if params.contains(&"all")`.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

* refactor: forc-node as lib (#7353)

## Description

This PR fundamentally refactors the `forc-node` plugin architecture by
embedding the Fuel Core node directly as an in-process library rather
than spawning it as a subprocess.
This architectural change modernizes the forc-node plugin and lays the
groundwork for advanced local development features.

## 🔄 Changes Overview

### Core Architectural Changes
- **In-Process Execution**: Fuel Core now runs within the same process
as the plugin, eliminating subprocess management overhead
- **Direct Integration**: Replaced subprocess spawning with direct
library calls to fuel-core
- **Unified Logging**: Consolidated logging and error handling across
all execution modes
- **Improved Configuration**: Enhanced configuration display and
management for better debugging

### Dependency Updates
- Added direct fuel-core dependencies
- Added fuel-core-chain-config for configuration management
- Integrated tracing and tracing-subscriber for improved logging
- Updated Cargo.lock with necessary transitive dependencies

## 💡 Motivation

### Current Limitations
- Subprocess management adds complexity and potential failure points
- Limited ability to extend node functionality
- Difficult to implement advanced features like state forking (planned
feature)

### Benefits of This Change
1. **Performance**: Eliminates IPC overhead and reduces startup time
2. **Reliability**: Direct function calls are more reliable than
subprocess communication
3. **Extensibility**: Easier to add advanced features in future PRs

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
Co-authored-by: kaya <20915464+kayagokalp@users.noreply.github.com>

* feat: forc node account funding (#7378)

## Description

This PR adds support for directly funding accounts when starting a local
Fuel node with `forc-node`, eliminating the need to manually edit
chainspec files - via specifying `--account` parameter.

## Changes

- Added `--account` flag to `forc-node local` command that supports
multiple funding formats:
  - `<account-id>` - funds account with base asset and default amount
- `<account-id>:<asset-id>` - funds account with specified asset and
default amount
- `<account-id>:<asset-id>:<amount>` - funds account with specified
asset and amount

## Usage Examples

```bash
# Fund single account with default asset and amount
forc-node local \
  --account 0x54944e5b8189827e470e5a8bacfc6c3667397dc4e1eef7ef3519d16d6d6c6610

# Fund account with custom asset
forc-node local \
  --account 0x54944e5b8189827e470e5a8bacfc6c3667397dc4e1eef7ef3519d16d6d6c6610:0x0000000000000000000000000000000000000000000000000000000000000002

# Fund account with custom asset and amount
forc-node local \
  --account 0x54944e5b8189827e470e5a8bacfc6c3667397dc4e1eef7ef3519d16d6d6c6610:0x0000000000000000000000000000000000000000000000000000000000000002:1000000

# Fund multiple accounts
forc-node local \
  --account 0x54944e5b8189827e470e5a8bacfc6c3667397dc4e1eef7ef3519d16d6d6c6610 \
  --account 0xe10f526b192593793b7a1559a391445faba82a1d669e3eb2dcd17f9c121b24b1
```

## CLI output

<img width="1304" height="254" alt="Screenshot 2025-09-10 at 11 15
41 AM"
src="https://github.com/user-attachments/assets/add420e5-a64e-4c82-8605-99aeba7e878a"
/>

- 5 Initial/funded accounts are provided by forc-node (default 5)
- Additional accounts are user provided (optional)
  - These are introduced in this PR

## Implementation Details

- Default amount uses `TESTNET_INITIAL_BALANCE` constant when not
specified
- Default asset uses the chain's base asset ID when not specified

Addresses: https://github.com/FuelLabs/sway/issues/7317

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>

* Add expressive diagnostics for `Warning::UnusedReturnValue` (#7382)

## Description

This PR adds expressive diagnostics for the `UnusedReturnValue` warning
that explains how to intentionally ignore a returned value by using `let
_ = ...`.

The reason for adding the diagnostics was an observed confusion among
novice Sway developers in the particular case of using `__dbg` intrinsic
as a statement:

```sway
__dbg("some debug message");
```

It was unclear to developers why this usage generates the warning, and
also how to remove it.

Additionally, the PR fixes some `uninlined_format_args` Clippy warnings.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

* chore: bumpt rust version to 1.90 (#7427)

## Description

Bumping the rust version to 1.90 and fixing the clippy lints along the
way

* forc-node wasm32 removal (#7436)

## Description

- Reconfigure the `forc-node` crate to drop the `wasm-executor` feature
- disable fuel-core `default features`; explicit feature-set declaration
 - `forc-node` `local` CLI configurable args:
   - DB backend
   - debug mode
   - historical execution
   - PoA trigger directly
- Adjust the local-node test harness to cover the newly surfaced CLI
knobs.
- Remove the `wasm32-unknown-unknown` build target from CI and GitHub
Pages workflows.
- Regenerate Cargo.lock after the dependency and feature changes.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>

* Update to latest `fuels-rs` dependency (#7468)

## Description

Update to latest `fuels-rs` dependency.

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Upgrade to latest Fuel/fuels versions and refactor code/tests to new
APIs (IDs, receipts, storage, wallet, node owner).
> 
> - **Dependencies**:
> - Bump `fuel-core` to `0.47.x`, `fuel-{vm,tx,types,asm,crypto}` to
`0.65`, and `fuels{,-core,-accounts}` to `0.76`; update `fuel-core-*`
crates across workspace and SDK harness.
> - **Core/API migrations**:
> - Use `Contract::id(..)` associated function (replaces instance
method); update contract ID calculations in `forc-pkg`, `forc-client`
deploy, and `forc-test`.
> - Adjust receipts handling to `Arc<Vec<_>>` and convert as needed;
update parsing/printing of `Receipt::LogData`/`ReturnData` to new byte
accessors.
> - Update `ContractsStateData` construction and storage conversions in
VM trace storage.
> - Refactor wallet account collection/types and secret key conversion
in tx utils.
> - Switch `forc-node` coin owner to `Owner` enum; update logging and
tests.
> - **Tests**:
> - Adapt E2E and client tests to new receipt/data APIs and predicate
fee assertions; update SDK harness deps and context tests (ContractIdExt
import).
> - **Misc**:
> - Update workspace `Cargo.toml` and `test/src/sdk-harness/Cargo.toml`;
extend `.typos.toml` ignores/excludes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d0541bd2ec806d10743310573edde8c85364b4ff. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

* update Cargo.toml for forc-node workspace integration

---------

Co-authored-by: Kaya Gökalp <kaya.gokalp@fuel.sh>
Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
Co-authored-by: IGI-111 <igi-111@protonmail.com>
Co-authored-by: Hannes Karppila <2204863+Dentosal@users.noreply.github.com>
Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>
Co-authored-by: Mike Christopher <mchristopher@users.noreply.github.com>
Co-authored-by: Igor Rončević <ironcev@hotmail.com>
Co-authored-by: kaya <20915464+kayagokalp@users.noreply.github.com>
Co-authored-by: João Matos <joao@tritao.eu>
JoshuaBatty pushed a commit to FuelLabs/forc that referenced this pull request Jan 21, 2026
## Description

Moves dev dependencies to the workspace Cargo.toml for consistent
versions in tests.

Inspired by FuelLabs/sway#6955

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants