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
238 stars 150 forks source link

Sidecar's compatibility spec number is ambiguous #1400

Open paperfrog1228 opened 4 months ago

paperfrog1228 commented 4 months ago

Description

Occur below error at block number 19550977.

"{\"code\":500,\"message\":\"Unable to decode storage session.validators:: createType(Vec<Bytes>):: decodeU8aVec: failed at 0x966d74f8027e07b43717b6876d97544f… (index 3/297): Bytes:: Bytes length 1042094949 exceeds 10485760\",\"stack\":\"Error: Unable to decode storage session.validators:: createType(Vec<Bytes>):: decodeU8aVec: failed at 0x966d74f8027e07b43717b6876d97544f… (index 3/297): Bytes:: Bytes length 1042094949 exceeds 10485760\\n at RpcCore._newType (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:403:19)\\n at RpcCore._formatStorageData (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:336:21)\\n at RpcCore._formatOutput (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:301:25)\\n at RpcCore._formatResult (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:163:20)\\n at callWithRegistry (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:184:25)\\n at runMicrotasks (<anonymous>)\\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\",\"level\":\"error\"}\""}

The offending block has a spec number of 1000001. (https://polkadot.subscan.io/block/19550977) However, the start time of the problem is , when it was upgraded from block 19551000 to 1001002. (https://polkadot.subscan.io/block/19550977)

Here's the question.

  1. when the Polkadot runtime network is upgraded to an incompatible specification in the sidecar, do blocks with earlier spec numbers not get traced?
  2. v17.3.1 is known to be compatible up to this specification number from the release notes. However, the spec number naming in Polkadot has changed recently and it is hard to recognize. How do I read the spec version of a block tested in sidecar? https://github.com/paritytech/substrate-api-sidecar/releases/tag/v17.3.1
Compatibility
Tested against:
Polkadot v10200
Kusama v10200
Westend v10200

I don't know which spec number v10200 refers to.

Thanks in advance.

bee344 commented 4 months ago

Hi @paperfrog1228 , I think there's a misunderstanding here. The compatibility refers to the client versions against which it was tested, while the spec_number refers to the runtime version and is set by the Polkadot Fellowship. You can check the difference and where you can see them in PJS/APPS here. So the version in the compatibility section refers to the node to which you connect sidecar.

Lastly, what's the request you are making that gives you that error? So that we can replicate it an see what's going on.