provider.getChainId() results in unknown field "maxGasPerPredicate\"

I get this error when calling provider.getChainId() running a local node.

        "Error: Unknown field \"maxGasPerPredicate\" on type \"ConsensusParameters\".: {\"response\":{\"data\":null,\"errors\":[{\"message\":\"Unknown field \\\"maxGasPerPredicate\\\" on type \\\"ConsensusParameters\\\".\",\"locations\":[{\"line\":30,\"column\":3}]}],\"status\":200,\"headers\":{}},\"request\":{\"query\":\"query getChain {\\n  chain {\\n    ...chainInfoFragment\\n  }\\n}\\n\\nfragment chainInfoFragment on ChainInfo {\\n  name\\n  baseChainHeight\\n  peerCount\\n  consensusParameters {\\n    ...consensusParametersFragment\\n  }\\n  latestBlock {\\n    ...blockFragment\\n  }\\n}\\n\\nfragment consensusParametersFragment on ConsensusParameters {\\n  contractMaxSize\\n  maxInputs\\n  maxOutputs\\n  maxWitnesses\\n  maxGasPerTx\\n  maxScriptLength\\n  maxScriptDataLength\\n  maxStorageSlots\\n  maxPredicateLength\\n  maxPredicateDataLength\\n  maxGasPerPredicate\\n  gasPriceFactor\\n  gasPerByte\\n  maxMessageDataLength\\n  chainId\\n}\\n\\nfragment blockFragment on Block {\\n  id\\n  header {\\n    height\\n    time\\n  }\\n  transactions {\\n    id\\n  }\\n}\"}}",

I downgrade node to 18.3

stumbled upon this Unknown field error during Provider::connect to beta-3 on fuels v0.42 so

use 'beta-3-aarch64-apple-darwin: with

  • forc 0.37.3
  • forc-explore 0.28.1
  • forc-index 0.18.4
  • forc-wallet 0.2.2
  • fuel-core 0.17.11
  • fuel-indexer 0.18.4

Nothing solved the issue.

Hi, is there someone that can help me with this?

Hi there, Carlos!
Your issue was handed to the client team!
I’ll share the solution a soon as possible
Thanks :palm_tree:

It seems that your sdk version is ahead of your node.
Please try to downgrade Rust SDK (fuels) to 0.39
Let me know if that works!

Hi @sandusky thank you for your help. this solves the issue partly, because it seems fuels 0.39 doesnt have the operation getchainid(). Only getchain(). Calling this doesn’t output an id, except for the block id.

1 Like