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
245 stars 151 forks source link

Westend - Unable to Read blocks #1057

Closed lcovar closed 2 years ago

lcovar commented 2 years ago

Description

Running into some errors when trying to read some westend blocks. See steps to reproduce below.

Steps to Reproduce Substrate version 13.0.0 Polkadot fullnode version v0.9.28 Test Network: WestEnd

curl /blocks/12604391 {"code":500,"message":"createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed","stack":"Error: createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed\n at createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)\n at TypeRegistry.createType (/usr/src/app/node_modules/@polkadot/types/cjs/create/registry.js:345:46)\n at ApiPromise.createType (/usr/src/app/node_modules/@polkadot/api/cjs/base/Decorate.js:134:27)\n at BlocksService.fetchBlock (/usr/src/app/build/src/services/blocks/BlocksService.js:155:40)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async BlocksController.getBlockById (/usr/src/app/build/src/controllers/blocks/BlocksController.js:155:49)\n at async /usr/src/app/build/src/controllers/AbstractController.js:212:9","level":"error"}I have no name!@dot-fullnode-1:/usr/src/app$

curl /blocks/12604449

{"code":500,"message":"createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed","stack":"Error: createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed\n at createTypeUnsafe (/Users/luiscovarrubias/.config/yarn/global/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)\n at TypeRegistry.createTypeUnsafe (/Users/luiscovarrubias/.config/yarn/global/node_modules/@polkadot/types/cjs/create/registry.js:353:46)\n at RpcCore._formatOutput (/Users/luiscovarrubias/.config/yarn/global/node_modules/@polkadot/rpc-core/cjs/bundle.js:427:21)\n at RpcCore._formatResult (/Users/luiscovarrubias/.config/yarn/global/node_modules/@polkadot/rpc-core/cjs/bundle.js:232:27)\n at callWithRegistry (/Users/luiscovarrubias/.config/yarn/global/node_modules/@polkadot/rpc-core/cjs/bundle.js:260:19)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)","level":"error"}

TarikGul commented 2 years ago

Hey thanks for reporting this, I was able to reproduce it, and will look for a solution.

lcovar commented 2 years ago

Thanks @TarikGul

Here's another block that has the same issue:

/blocks/12604804

TarikGul commented 2 years ago

This seems to be an issue upstream and have filed: https://github.com/polkadot-js/api/issues/5218

1921Aaron commented 2 years ago

This seems to be an issue upstream and have filed: polkadot-js/api#5218

When will the new fix version be released?

TarikGul commented 2 years ago

@1921Aaron Depends on the upstream issue, and when it's fixed and released.

muratso commented 2 years ago

Somehow, it's working for us on mainnet using

Substrate version 13.0.0
Polkadot fullnode version v0.9.28

but it's failing on

Substrate version 13.0.0
Polkadot fullnode version v0.9.29
TarikGul commented 2 years ago

@muratso Yea this is an issue with 0.9.29 and change of Weight -> u64 to Weigth -> Struct { ref_time: u64 }

It has been patched in polkadot-js and will be fixed in sidecar when a new releases of @polkadot/api comes out.

LXHLeaner commented 2 years ago

@muratso Yea this is an issue with 0.9.29 and change of Weight -> u64 to Weigth -> Struct { ref_time: u64 }

It has been patched in polkadot-js and will be fixed in sidecar when a new releases of @polkadot/api comes out.

When will push new version?

TarikGul commented 2 years ago

@LXHLeaner New Version will be out by EOD today

TarikGul commented 2 years ago

Release 13.1.0 is released and contains the fix. Closing