paritytech / substrate-api-sidecar

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
https://paritytech.github.io/substrate-api-sidecar/dist/
GNU General Public License v3.0
247 stars 152 forks source link

Sidecar version v19.2.0 for a Centrifuge node not compatible #1509

Closed jonathanudd closed 1 month ago

jonathanudd commented 1 month ago

Description

Using Sidecar version v19.2.0 for a Centrifuge node doesn't seem compatible. It works as expected with version v19.1.0.

Are there any compatibility matrix for Sidecar versions and different substrate chains? Or is there a good way to know which Sidecar version that is supported by a chain?

Steps to Reproduce

  1. Setup Sidecar version v19.2.0 for a Centrifuge node.
  2. Make the following call curl --location '<endpoint>/transaction/fee-estimate' --header 'Content-Type: application/json; charset=utf-8' --data '{"tx":"0x59028400d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f0037d848d876bf123883eb3da8c925b7a396fc659ec4a18ad21707839232b61164424ab289f756113f7e14c83acd6a5d88e8b9887ce6ed63c259b0272d41f6e10000040208af2f001403005665ef9894f68738853586822941e372b30a1e621bda3f5698effd4a5e581f31137cf0010c343237a8"}'

Expected vs. Actual Behavior

Expected response: {"weight":{"refTime":"179503000","proofSize":"3593"},"class":"Normal","partialFee":"1145798778915556"}

Actual response:

{
    "code": 400,
    "error": "Unable to fetch fee info",
    "transaction": "0x59028400d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f0037d848d876bf123883eb3da8c925b7a396fc659ec4a18ad21707839232b61164424ab289f756113f7e14c83acd6a5d88e8b9887ce6ed63c259b0272d41f6e10000040208af2f001403005665ef9894f68738853586822941e372b30a1e621bda3f5698effd4a5e581f31137cf0010c343237a8",
    "cause": "4003: Client error: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x7cb662 - <unknown>!rust_begin_unwind\n    1: 0x6cfb85 - <unknown>!core::panicking::panic_fmt::ha56089f7e617e911\n    2: 0x5b7230 - <unknown>!TransactionPaymentApi_query_info",
    "stack": "RpcError: 4003: Client error: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x7cb662 - <unknown>!rust_begin_unwind\n    1: 0x6cfb85 - <unknown>!core::panicking::panic_fmt::ha56089f7e617e911\n    2: 0x5b7230 - <unknown>!TransactionPaymentApi_query_info\n    at checkError (/usr/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:23:15)\n    at RpcCoder.decodeResponse (/usr/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:39:9)\n    at HttpProvider.__internal__send (/usr/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-provider/cjs/http/index.js:144:52)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async callWithRegistry (/usr/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-core/cjs/bundle.js:189:28)",
    "at": {
        "hash": "0xd7b3907ec3906abb20a2e563acc7b7c4d716db276ce4a9996fefa8e4ae24eb5d"
    }
}
IkerAlus commented 1 month ago

This should be fixed with the new release: https://github.com/paritytech/substrate-api-sidecar/releases/tag/v19.2.1

jonathanudd commented 1 month ago

Upgraded and confirmed that it works. Thanks :raised_hands: So in theory the latest release of Sidecar should always work on all chains?

IkerAlus commented 1 month ago

So in theory the latest release of Sidecar should always work on all chains?

Exactly, this is the objective. If not, it should be considered a bug.