4

After the latest upgrade of Westend runtime to version 9310 the RPC call payment_queryFeeInfo fails with the following error message:

{"jsonrpc":"2.0","error":{"code":1,"message":"Unable to query dispatch info.","data":"Failed to decode return value of TransactionPaymentApi_query_info"},"id":604352276}

However, execution of state_call with the following arguments: ["TransactionPaymentApi_query_info", <Encoded extrinsic here>] successfully completes.

Also we noticed that polkadot-js uses state_call for fetching the fee. Does it mean that payment_queryFeeInfo should be considered deprectated? Or is it a bug in the 9310 runtime?

3
  • 2
    Generally (this is not the first time this happens), this indicates a mismatch between the node and runtime versions, i.e. the RPC node calls into the runtime and then cannot decode the response. Basically it means that the RPC nodes would need to be upgraded to match the runtime version (or if newer, downgraded). For the state_call question - this doesn't suffer from the same issues (no node <-> runtime encoding), hence the JS API using api.call.* to make these queries. Generally if functionality is available on the runtime calls and rpcs, you would rather use the runtime calls.
    – Jaco
    Nov 1, 2022 at 13:21
  • Thank you! That explains the issue. If you want, you can move this comment to the answers section and I will mark it as accepted one
    – Valentun
    Nov 1, 2022 at 14:43
  • Copied the answer and added some (small) clarifications.
    – Jaco
    Nov 2, 2022 at 5:59

1 Answer 1

3

Generally (this is not the first time this happens), this indicates a mismatch between the node and runtime versions, i.e. the RPC node calls into the runtime and then cannot decode the response.

Basically it means that the RPC nodes would need to be upgraded to match the runtime version (or if newer, downgraded). With this in place the node would be able to decode the responses from the runtime and provide the results over RPC.

For the state_call question - this doesn't suffer from the same issues (since there is no node <-> runtime encoding involved), hence the JS API using api.call.* to make these payment queries.

Generally if functionality is available on the runtime calls and RPCs, you would rather use the runtime calls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.