FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.37k stars 1.32k forks source link

launchTestNode on 0.90.0 ts returns _FuelError: Unknown field "alocDependentCost" on type "GasCosts". #2687

Open xpluscal opened 2 days ago

xpluscal commented 2 days ago

What version of fuels-ts are you using?

0.90.0

Steps to Reproduce

Create nodejs test script:

import { launchTestNode } from "fuels/test-utils";

(async () => {
    try {
        console.log("Starting node");
        while (true) {
            const launched = await launchTestNode();
            console.log("Launched node");
            console.log(launched);
        }
    } catch (e) {
        console.error(e);
    }
})();

And run through node --loader ts-node/esm localNode.ts

Expected Behavior

Launch a local fuel-core test node.

Actual Behavior

Errors out with

_FuelError: Unknown field "alocDependentCost" on type "GasCosts".
    at responseMiddleware (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/account/dist/test-utils.mjs:3898:19)
    at /Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/graphql-request/dist/index.js:284:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _Provider.fetchChain (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/account/dist/test-utils.mjs:3964:23)
    at async _Provider.fetchChainAndNodeInfo (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/account/dist/test-utils.mjs:3862:19)
    at async _Provider.create (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/account/dist/test-utils.mjs:3793:5)
    at async setupTestProviderAndWallets (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/account/dist/test-utils.mjs:8995:16)
    at async launchTestNode (file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/node_modules/@fuel-ts/contract/dist/test-utils.mjs:69:42)
    at async file:///Users/calvin/Documents/DO/0172_Props/projects/fuel/fuel-scripts/localNode.ts:6:30 {
  VERSIONS: { FORC: '0.60.0', FUEL_CORE: '0.30.0', FUELS: '0.90.0' },
  metadata: {},
  code: 'invalid-request'
}
nedsalk commented 2 days ago

@xpluscal Which version of fuel-core are you using? It should be 0.30.0. Please run fuel-core --version and get back to us.

xpluscal commented 2 days ago

@nedsalk interesting! My error code returned 0.30.0 but fuel-core --version returned 0.26.0! How do I separately update fuel-core? I have not seen instructions in the docs. Thx!

xpluscal commented 2 days ago

@nedsalk FYI I used the default suggested fuelup installation including fuelup update

xpluscal commented 2 days ago

@nedsalk latest toolchain in fuelup returns:

Installed:

nedsalk commented 2 days ago

@xpluscal the best way to go about this until the latest tag issue is sorted out is for you to setup a custom toolchain: fuelup toolchain new my_toolchain && fuelup component add forc@0.60.0 && fuelup component add fuel-core@0.30.0.

This will work with version 0.90.0 of the TS SDK. Version 0.91.0 will be released soon, at which point I suggest you update forc to 0.61.1: fuelup component add forc@0.61.1.

arboleya commented 2 days ago

Another option is to use the nightly toolchain:

fuelup toolchain install nightly
fuelup default nightly
fuelup show