Repository navigation
chore(deps)!: update Fuel-owned dependencies and toolchains - #3977
Conversation
PR SummaryHigh Risk Overview Local test nodes now wait for a successful GraphQL Revert/panic errors decode packed ABI 1.2+ panic indices while keeping legacy 1.1 and versionless behavior; decoding is scoped to the reverting program via receipt contract ID and optional Gas snapshots default to Core 0.48.3’s V7 table; explicit V4 overrides (including partial merges onto legacy V4 defaults) remain supported. The state-transition executor fixture is generated from the bundled Core WASM (including git-branch builds), and CI gains a coverage baseline job keyed to the PR’s exact base commit for diff reporting. Reviewed by Cursor Bugbot for commit 2608579. Bugbot is set up for automated code reviews on this repo. Configure here. |
Vercel Deployment
|
4c00962
nelitow
left a comment
There was a problem hiding this comment.
1. git:<branch> Fuel Core mode breaks pretest and depcheck
buildFromGitBranch (internal/fuel-core/lib/shared.js:96-97) only copies fuel-core and VERSION into fuel-core-binaries/. The new generator (packages/fuel-gauge/scripts/generate-state-transition-bytecode.ts:4-6) reads fuel-core-binaries/fuel-core-wasm-executor.wasm. As a result, fuel-gauge pretest and root depcheck both fail with ENOENT whenever internal/fuel-core/VERSION is set to git:some/branch (the mode documented in CONTRIBUTING.md:124). That's exactly the mode used to test against an unreleased Core.
The Turbo cache has a related gap: globalDependencies: ["internal/fuel-core/VERSION"] doesn't change while a git: branch moves, so the cached .generated.ts goes stale.
Suggestion: build and copy the WASM executor in buildFromGitBranch, or at least fail fast with a clear message in the generator. Ideally key the cache on the WASM file itself rather than VERSION.
2. Node engines doesn't match the new 20.18 requirement
@solana/codecs-numbers@2.3.0 (pulled in by React/connectors 0.45.0) declares node: '>=20.18.0', and the PR description says scaffolded templates need it. But the root package.json and packages/create-fuels/package.json still declare ^20.0.0 || ^22.0.0 || ^24.0.0, and neither template declares engines. Someone on Node 20.14 can scaffold a project that then fails to install.
Suggestion: ^20.18.0 || ^22.0.0 || ^24.0.0 in create-fuels (and the root), plus a line in the changeset and create-fuels docs.
3. launchNode can orphan a node during the readiness wait
In packages/account/src/test-utils/launchNode.ts:356-360, any stderr chunk matching /error/i calls reject(...) without cleanup(), and it doesn't stop waitForGraphQL. On master this only mattered before the port bound, because the promise resolved right after. Now the window is up to 30s. If the health check succeeds after that reject, resolve is a no-op: the caller never gets a cleanup handle, so the fuel-core child and its temp dir stay alive until the test process exits.
Suggestion: route every failure through a single fail(err) that calls cleanup() and then reject, and have it stop the readiness loop. Also, when the child exits mid-wait, the error says only "did not become ready". Including child.exitCode / child.signalCode would make CI failures easier to diagnose.
4. ABI 1.2 detection is an exact string match
extract-tx-error.ts:153 checks abi.specVersion === '1.2'. Any later spec version (1.3+) would fall back to the legacy path, look up the raw 64-bit revert code in errorCodes, find nothing, and silently lose panic messages. Consider a "1.2 or later" comparison, or an explicit check against the legacy versions.
|
@nelitow Addressed all four points from your review in ea1bcf357.
Validation: 2,804 Node tests pass (3 skipped, 6 todo), 18 Chromium decoder tests pass, all 28 package build tasks pass, and full lint/typechecks, package manifest checks and formatting pass. The PR description and changeset are updated. Fresh CI is separate from these local results. |
|
Thanks, all four points look fixed. Locally on The new
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 557e550. Configure here.
|
@nelitow, both regressions are fixed in 557e55058 and 627c4c720, following up on your comment.
Added regressions for cleanup The |
nelitow
left a comment
There was a problem hiding this comment.
Re-verified on d841902f0. Both regressions are fixed: a fuel-core startup failure now rejects instead of hanging on macOS, and a failed fuels dev launch no longer exits 0 before the error handler finishes.
|
Coverage Report:
Changed Files:
|

Summary
Consume the published VM ASM WASM initialization reuse fix and update the SDK's Fuel-owned toolchain and example/template dependencies. This includes the compiler and local-node migrations required for the updated versions to build and pass the SDK tests.
@fuels/vm-asm(account, contract, program, fuels, Next.js/Vite demos)@fuels/react,@fuels/connectors(counter guide, wallet demo, Next.js/Vite templates)fuel-core, schema, supported version, template toolchainsforc,forc-fmt/std, template toolchainsfuel-asmexampleRefresh the Core schema while querying the existing script-parameter fields, keeping those queries compatible with older nodes. Decode ABI 1.2 and later panic indices/call-site bits alongside legacy error codes, retaining legacy fallback when version metadata is absent, selecting the ABI by the reverting program’s receipt ID. Preserve the primary contract’s identity across transaction/call results so contracts sharing the same panic index report their own message and source location. If the program’s ABI or panic entry is unavailable, retain the generic revert reason. Remove obsolete ASM type suppressions, compiler flags and duplicate standard-library implementations; regenerate ABI binding fixtures and update compiler/gas expectations.
The executor upgrade test derives its fixture from the installed Core WASM during pretest, including Git-branch builds, replacing a stale multi-megabyte inline literal. Its final upload subsection retains the exact bytes without padding. Template UI tests assert actual counter values, and the Next.js root layout renders the required HTML/body shell during SSR. Tests that inspect already-confirmed or reconstructed transaction responses explicitly wait for confirmation. The local-node launcher waits for a successful GraphQL health query after its port is bound, with bounded retries. Startup failures cancel readiness polling and attempt child-process cleanup while removing temporary snapshots and process handlers; early exits report their exit code and signal. Cleanup errors cannot prevent the original launch rejection. Failed launches let asynchronous CLI failure hooks finish; only unexpected exits after a successful launch propagate to the parent, and signal termination reports a nonzero status. Parent-process signals have separate handlers: the first Ctrl+C or restart signal terminates the CLI with its conventional signal status, while uncaught exceptions exit 1. Returned cleanup handles remain non-exiting. When a launcher exits, its exit handler attempts to stop any surviving processes in the detached group once, tolerates secondary signal errors, and records the stopped state. Repeated cleanup after exit does not retry the signal or throw a secondary teardown error. Disposal tests wait for graceful shutdown; block-height cache tests control block production; local message-proof examples explicitly produce their confirmation block.
Dependency checking generates the executor fixture before scanning imports. Both Core VERSION and the installed executor WASM bytes participate in Turbo’s global dependency hash, invalidating the fixture when a Git branch moves without changing its configured name. Git builds package the executor artifact produced by Cargo and fail clearly before replacing installed artifacts if the build fails or produces no WASM. CI's default test setup uses Node 20.20, matching the other CI setup action; the updated template dependency tree includes
@solana/codecs-numbersrequiring Node >=20.18, so the former Node 20.14 default cannot install it. The root, all published SDK packages, create-fuels and both templates now declare ^20.18.0 || ^22.0.0 || ^24.0.0 consistently with the repository manifest policy. The create-fuels guide, README and changeset document this requirement; .nvmrc selects the same Node 20.20.0 used by the default CI setup.Coverage comparisons now use a baseline for the PR's exact base commit. CI restores that SHA's coverage cache or builds and tests the base to generate it, then downloads the baseline from the same workflow run. Master builds seed the shared cache; expired artifacts or caches cannot permanently break the check. Missing baseline generation and failed prerequisite tests still fail the required aggregate job. Documentation links now point to the maintained template source, generated API reference, BIP32 and RustCrypto's TAI64 reference.
Breaking Changes
The declared Node.js 20 minimum is now 20.18 across published SDK packages, create-fuels and generated templates. Node.js 22 and 24 remain supported.
The default local-node snapshot uses the V7 opcode gas-cost table shipped in the Core 0.48.3 binary, retaining the SDK’s existing fee parameters.
SnapshotConfigsaccepts V4 or V7; callers readinggas_costs.V4directly must narrow the variant first. Explicit V4 snapshots remain supported, and partial V4 overrides are merged onto the SDK’s previous V4 defaults. Nested overrides and empty gas-cost overrides have live-node regression coverage. The changeset requests a minor release for this public type/default change.Recompiling Sway with Forc 0.72.1 can change bytecode, gas usage, panic encoding and dynamic-bytes hashes; older source may require the equality/storage migrations demonstrated by the fixtures. Existing deployed bytecode is not recompiled by installing this SDK update.
Validation
Node 22.13.1 / pnpm 9.4.0, Forc 0.72.1, Core 0.48.3, Chromium:
557e55058: 2,816 tests pass, 3 skipped and 6 todo, across 553 passing files and one skipped file, with four workers. A 15-second test timeout accommodates this WSL environment's loopback refusal delay; repository concurrency and timeout settings are unchanged.b422fd1cb: full Markdown link checking and lint/typechecks/formatting pass locally. The actual aggregate guard passes nine PR/master success and failure scenarios; the coverage report preserves positive/negative deltas and fails without a baseline. Fresh CI passed Lint, Node 20/22/24, 1,848 browser tests, Forc, E2E and the required aggregate test. Cold exact-base baseline generation passed 2,772 Node and 1,828 browser tests; the aggregate successfully downloaded its same-run artifact, generated the real coverage diff and published the report. A transient Ubuntu package-mirror timeout in the head browser job passed on targeted retry.overwrite: truein26085796f. Claude verified the correction and explicitly agreed with the complete scoped change. Formatting/whitespace checks pass; actionlint has no new diagnostics versus the original workflow. Fresh CI for this two-line correction is pending.d841902f0, independently repeated these focused/CLI checks and verified wrapper-descendant cleanup, with no remaining concerns. EPERM was simulated on Linux; no native macOS run is claimed.This verifies initialization reuse; it does not establish that every O2/Stork memory leak is fixed. Downstream services benefit after consuming an SDK release. React/connectors 0.45.0 declares an exact
fuels0.102.0 peer while this workspace is 0.103.0; actual workspace builds and burner-wallet browser flows were tested. Node 20/22/24, browser, Forc, E2E, Lint and the aggregate test all passed onb422fd1cb. The subsequent two-line artifact-overwrite correction is pushed as26085796f; its fresh CI results are pending. Other installed-wallet providers and Windows remain outside local validation. Earlier publication/Vercel failures stem from repository permissions/settings. The documentation-link failures are repaired; full link checking passes locally and in CI.Checklist