Migrate forc-node from the sway repo#130
Merged
JoshuaBatty merged 16 commits intomainfrom Jan 6, 2026
Merged
Conversation
## 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.
## 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.
## 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.
## Description closes #7193. There was a simple bug in the mainnet setup we were still fetching testnet configuration. Which caused some syncing issues.
## 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>
## 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.
## 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.
## 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>
## 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>
## 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.
## Description Bumping the rust version to 1.90 and fixing the clippy lints along the way
## 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>
## 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 -->
|
Thanks for the contribution! Before we can merge this, we need @IGI-111 to sign the Fuel Labs Contributor License Agreement. |
PR SummaryAdds a new workspace member
Written by Cursor Bugbot for commit de23c5c. This will update automatically on new commits. Configure here. |
Contributor
kayagokalp
approved these changes
Jan 6, 2026
zees-dev
approved these changes
Jan 6, 2026
This was referenced Jan 13, 2026
JoshuaBatty
added a commit
to FuelLabs/fuel.nix
that referenced
this pull request
Jan 15, 2026
## Summary Migrates `forc-node` package support from the `sway` repository to the `forc` monorepo, effective from version 0.71.0 onwards. This follows the same pattern established in #205 for `forc-crypto`. ## Changes - **refresh-manifests.sh**: Added `pkg_forc_node` with legacy repo routing (sway < 0.71.0, forc >= 0.71.0) - **patches.nix**: - Added `forc-node` to `forc-plugins` list for openssl dependencies - Added `buildAndTestSubdir` patch for forc monorepo builds - Added clang/rocksdb dependencies required for fuel-core bindings - **packages.md**: Added forc-node to documentation ## Related PRs - forc: [FuelLabs/forc#130](FuelLabs/forc#130) - Migrate forc-node from sway repo - fuelup: [FuelLabs/fuelup#819](FuelLabs/fuelup#819) - Migrate forc-node from sway to forc monorepo - sway-nightly-binaries: [FuelLabs/sway-nightly-binaries#81](FuelLabs/sway-nightly-binaries#81) - Migrate forc-node nightly builds ## RFC [FuelLabs/sway-rfcs#49](FuelLabs/sway-rfcs#49) - Tooling Monorepo RFC --------- Co-authored-by: GitHub Action <action@github.com>
ironcev
added a commit
to FuelLabs/sway
that referenced
this pull request
Jan 16, 2026
## Summary This PR completes the sway-side of migrating `forc-node` to the [forc monorepo](https://github.com/FuelLabs/forc), as outlined in [RFC #49](FuelLabs/sway-rfcs#49). The corresponding forc repo PR: FuelLabs/forc#130 `forc-node` has already been released from the forc repo (v0.71.2). ### Changes - Remove `forc-node` crate from workspace - Update CI to no longer build/test/package `forc-node` binary (it's now built from forc repo) - Update gh-pages workflow to install `forc-node` from forc repo for documentation generation - Remove unused workspace dependencies (`fuel-core`, `fuel-core-chain-config`, `libp2p-identity`, `sha1`, `termion`) ### Distribution Going forward, `forc-node` will be built and distributed from the forc repo by: - sway-nightly-binaries - fuelup - fuel.nix ### Documentation Documentation for all tooling will continue to live in this repo. The `gh-pages` workflow now pulls `forc-node` from the forc repo rather than building it locally, so docs generation continues to work as before. Co-authored-by: Igor Rončević <ironcev@hotmail.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates
forc-nodefrom the sway repository into the forc monorepo, continuing the toolchain consolidation effort from sway-rfcs#49.Changes
New Workspace Member
forc-tracing(within monorepo)forc-utilfor CLI utilitiesfuel-corefor node functionalityNew Workspace Dependencies
fuel-core,fuel-core-chain-config,fuel-cryptodialoguer,libc,portpicker,reqwest,semver,sha1,wiremockPost-merge Tasks
forc-node-0.71.0forc-nodefrom this repoforc-nodeforc-nodefrom hereforc-nodefrom sway repoRelated
forc-tracing&forc-cryptoover from theswayrepo. #119forc-walletrepository toforcmonorepo #1