InsufficientMaxFee / max_fee_from_policies: 0

I’m running a script calling the contract on the testnet.

forc run --path $(INITIALIZER) --release -r \
--target testnet \
--contract $(CONTRACT_ID) \
--gas-price 10000 \
--max-fee 1000000000 \
$(SIGNING_KEY)

What does it mean:

error: provider: io error: warning: the fuel node version to which this provider is connected has a semver incompatible version from the one the SDK was developed against. Connected node version: 0.30.0, supported version: 0.28.0. Response errors; InsufficientMaxFee { max_fee_from_policies: 0, max_fee_from_gas_price: 326087 }
  1. Why the supported node version is 0.28.0 when I’m using fuel-core : 0.30.0+nightly.20240705.eb9c44bdd9
  2. How to convine the node to not throw the InsufficientMaxFee message. What does it mean max_fee_from_policies: 0? How to set it?

fuelup show (but same for toolchain testnet):

active toolchain
----------------
nightly-2024-07-05-aarch64-apple-darwin (override), path: /Users/lukaszkalbarczyk/Devel/redstone-oracles-monorepo/worktree-cr/packages/fuel-connector/sway/fuel-toolchain.toml
  forc : 0.61.2+nightly.20240705.acded67b3e
    - forc-client
      - forc-deploy : 0.61.2+nightly.20240705.acded67b3e
      - forc-run : 0.61.2+nightly.20240705.acded67b3e
    - forc-crypto : 0.61.2+nightly.20240705.acded67b3e
    - forc-debug : 0.61.2+nightly.20240705.acded67b3e
    - forc-doc : 0.61.2+nightly.20240705.acded67b3e
    - forc-explore : not found
    - forc-fmt : 0.61.2+nightly.20240705.acded67b3e
    - forc-lsp : 0.61.2+nightly.20240705.acded67b3e
    - forc-tx : 0.61.2+nightly.20240705.acded67b3e
    - forc-wallet : 0.8.1+nightly.20240705.ab41cd516d
  fuel-core : 0.30.0+nightly.20240705.eb9c44bdd9
  fuel-core-keygen : not found

can you install the testnet toolchain by running the command from here? also, would you share the SDK version you are using?

As I’ve mentioned:

same for toolchain testnet

error: provider: io error: warning: the fuel node version to which this provider is connected has a semver incompatible version from the one the SDK was developed against. Connected node version: 0.30.0, supported version: 0.28.0. Response errors; InsufficientMaxFee { max_fee_from_policies: 0, max_fee_from_gas_price: 326087 }
active toolchain
----------------
testnet-aarch64-apple-darwin (override) (default), path: /Users/lukaszkalbarczyk/Devel/redstone-oracles-monorepo/worktree-cr/packages/fuel-connector/sway/fuel-toolchain.toml
  forc : 0.61.2
    - forc-client
      - forc-deploy : 0.61.2
      - forc-run : 0.61.2
    - forc-crypto : 0.61.2
    - forc-debug : 0.61.2
    - forc-doc : 0.61.2
    - forc-explore : 0.28.1
    - forc-fmt : 0.61.2
    - forc-lsp : 0.61.2
    - forc-tx : 0.61.2
    - forc-wallet : 0.8.1
  fuel-core : 0.28.0
  fuel-core-keygen : 0.28.0

fuels versions
--------------
forc : 0.64.0
forc-wallet : 0.64.0

What do u mean saying “SDK version”? That’s CLI.

Can you share what script are you trying to run? It’d help me figure out if its a tooling issue or the script issue

Sure:)

Maybe I missed sth for cross-contract invocations ;/

script;

use std::logging::log;
configurable {
    CONTRACT_ID: b256 = 0xc58d1c1c00a95a02e7f363279dbc242c94b60fb7022f1dac74778b3320ce7dec,
}

abi Prices {
    #[storage(read, write)]
    fn init(signers: Vec<b256>, signer_count_threshold: u64);
}

const SIGNER_COUNT_THRESHOLD = 1;

fn main() {
    let mut signers: Vec<b256> = Vec::new();
    signers.push(0x00000000000000000000000012470f7aba85c8b81d63137dd5925d6ee114952b);
    signers.push(0x000000000000000000000000109B4a318A4F5ddcbCA6349B45f881B4137deaFB);
    signers.push(0x0000000000000000000000001ea62d73edf8ac05dfcea1a34b9796e937a29eff);
    signers.push(0x0000000000000000000000002c59617248994D12816EE1Fa77CE0a64eEB456BF);
    signers.push(0x00000000000000000000000083cba8c619fb629b81a65c2e67fe15cf3e3c9747);
    signers.push(0x000000000000000000000000f786a909d559f5dee2dc6706d8e5a81728a39ae9); // redstone-rapid-demo
    let prices = abi(Prices, CONTRACT_ID);
    let _ = prices.init(signers, SIGNER_COUNT_THRESHOLD);
}

Also changing to

let _ = prices.init {
        gas: 10000,
        coins: 0,
        asset_id: b256::zero(),
    }(signers, SIGNER_COUNT_THRESHOLD);

doesn’t help.

Have shared it with the team and will keep you posted on it :slight_smile:

1 Like

We have released a new fuel core version 0.31.0, you can read about it here. Can you try updating the toolchain to the latest and see how how it goes?

Still the same issue.

I also don’t understand, why this error is displayed:

error: provider: io error: warning: the fuel node version to which this provider is connected has a semver incompatible version from the one the SDK was developed against. Connected node version: 0.31.0, supported version: 0.28.

It seems that the node-url returns sth wrong, or it connects to another node, not to the testnet.fuel.network/v1/graphql…

Locally it works perfectly, but for testnet I cannot run the script invoking the contract.
Maybe I need to recreate the wallet or sth? I did top up both, local and remote wallets…

Default host: aarch64-apple-darwin
fuelup home: .../.fuelup

Installed toolchains
--------------------
beta-5-aarch64-apple-darwin
latest-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
nightly-2023-03-25-aarch64-apple-darwin
nightly-2024-05-10-aarch64-apple-darwin
nightly-2024-06-01-aarch64-apple-darwin
nightly-2024-06-15-aarch64-apple-darwin
nightly-2024-07-01-aarch64-apple-darwin
nightly-2024-07-03-aarch64-apple-darwin
nightly-2024-07-05-aarch64-apple-darwin
nightly-2024-07-09-aarch64-apple-darwin
nightly-2024-07-10-aarch64-apple-darwin
nightly-2024-07-11-aarch64-apple-darwin
testnet-aarch64-apple-darwin

active toolchain
----------------
latest-aarch64-apple-darwin (default)
  forc : 0.61.2
    - forc-client
      - forc-deploy : 0.61.2
      - forc-run : 0.61.2
    - forc-crypto : 0.61.2
    - forc-debug : 0.61.2
    - forc-doc : 0.61.2
    - forc-fmt : 0.61.2
    - forc-lsp : 0.61.2
    - forc-tx : 0.61.2
    - forc-wallet : 0.8.1
  fuel-core : 0.31.0
  fuel-core-keygen : 0.31.0

fuels versions
--------------
forc : 0.64.0
forc-wallet : 0.64.0

you might need to update your default toolchain. Here is the output from my terminal, see the ac†ive default toolchain in that

you can also run fuelup default nightly

Still it doesn’t help, even after changing it to nightly-2024-07-05, or latest, or testnet, or nightly

Default host: aarch64-apple-darwin
fuelup home: /Users/.../.fuelup

Installed toolchains
--------------------
beta-5-aarch64-apple-darwin
latest-aarch64-apple-darwin
nightly-aarch64-apple-darwin
nightly-2023-03-25-aarch64-apple-darwin
nightly-2024-05-10-aarch64-apple-darwin
nightly-2024-06-01-aarch64-apple-darwin
nightly-2024-06-15-aarch64-apple-darwin
nightly-2024-07-01-aarch64-apple-darwin
nightly-2024-07-03-aarch64-apple-darwin
nightly-2024-07-05-aarch64-apple-darwin (default)
nightly-2024-07-09-aarch64-apple-darwin
nightly-2024-07-10-aarch64-apple-darwin
nightly-2024-07-11-aarch64-apple-darwin
testnet-aarch64-apple-darwin

active toolchain
----------------
nightly-2024-07-05-aarch64-apple-darwin (default)
  forc : 0.61.2+nightly.20240705.acded67b3e
    - forc-client
      - forc-deploy : 0.61.2+nightly.20240705.acded67b3e
      - forc-run : 0.61.2+nightly.20240705.acded67b3e
    - forc-crypto : 0.61.2+nightly.20240705.acded67b3e
    - forc-debug : 0.61.2+nightly.20240705.acded67b3e
    - forc-doc : 0.61.2+nightly.20240705.acded67b3e
    - forc-fmt : 0.61.2+nightly.20240705.acded67b3e
    - forc-lsp : 0.61.2+nightly.20240705.acded67b3e
    - forc-tx : 0.61.2+nightly.20240705.acded67b3e
    - forc-wallet : 0.8.1+nightly.20240705.ab41cd516d
  fuel-core : 0.30.0+nightly.20240705.eb9c44bdd9
  fuel-core-keygen : not found

Thanks for confirming. I have shared with the team and will keep you posted

@Lukasz2891 Is it possible for you to share the entire codebase? I need to run it locally and reproduce it

I’ve prepared a repo for you, omitting the whole library dependency, but abstracting the issue:

1 Like

Thanks @Lukasz2891, will have a look at it in some time.