Commit c9ee8ad
* 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>
1 parent c10463b commit c9ee8ad
19 files changed
Lines changed: 7857 additions & 2136 deletions
File tree
- forc-node
- src
- ignition
- local
- testnet
- tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
| 39 | + | |
31 | 40 | | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| 45 | + | |
35 | 46 | | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
| 61 | + | |
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments