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

dock getblock error #6390049 #557

Closed vae520283995 closed 3 years ago

vae520283995 commented 3 years ago
2021-05-20 14:44:06 error: VEC: Unable to decode on index 1 createType(ExtrinsicV4):: createType(ExtrinsicSignatureV4):: Unable to create Enum via index 69, in Ed25519, Sr25519, Ecdsa
2021-05-20 14:44:06 error: REGISTRY: Error: Struct: failed on block: {"header":"Header","extrinsics":"Vec<Extrinsic>"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(ExtrinsicSignatureV4):: Unable to create Enum via index 69, in Ed25519, Sr25519, Ecdsa
    at /usr/src/app/node_modules/@polkadot/types/codec/Struct.cjs:70:13
    at Array.reduce (<anonymous>)
    at decodeStructFromObject (/usr/src/app/node_modules/@polkadot/types/codec/Struct.cjs:24:29)
    at decodeStruct (/usr/src/app/node_modules/@polkadot/types/codec/Struct.cjs:111:10)
    at new Struct (/usr/src/app/node_modules/@polkadot/types/codec/Struct.cjs:132:26)
    at new <anonymous> (/usr/src/app/node_modules/@polkadot/types/codec/Struct.cjs:151:9)
    at new Type (/usr/src/app/node_modules/@polkadot/types/create/registry.cjs:349:16)
    at new Type (/usr/src/app/node_modules/@polkadot/types/create/registry.cjs:349:16)
    at initType (/usr/src/app/node_modules/@polkadot/types/create/createType.cjs:44:19)
    at createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types/create/createType.cjs:63:12)
2021-05-20 14:44:06 error: RPC-CORE: getBlock(hash?: BlockHash): SignedBlock:: createType(SignedBlock):: Struct: failed on block: {"header":"Header","extrinsics":"Vec<Extrinsic>"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(ExtrinsicSignatureV4):: Unable to create Enum via index 69, in Ed25519, Sr25519, Ecdsa
2021-05-20 14:44:06 error: createType(SignedBlock):: Struct: failed on block: {"header":"Header","extrinsics":"Vec<Extrinsic>"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(ExtrinsicSignatureV4):: Unable to create Enum via index 69, in Ed25519, Sr25519, Ecdsa 
 Error: createType(SignedBlock):: Struct: failed on block: {"header":"Header","extrinsics":"Vec<Extrinsic>"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(ExtrinsicSignatureV4):: Unable to create Enum via index 69, in Ed25519, Sr25519, Ecdsa
    at createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types/create/createType.cjs:66:11)
    at RpcCore._formatOutput (/usr/src/app/node_modules/@polkadot/rpc-core/index.cjs:387:41)
    at callWithRegistry (/usr/src/app/node_modules/@polkadot/rpc-core/index.cjs:253:42)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

@lovesh This problem seems to be related to v0.14.3

lovesh commented 3 years ago

We pushed an upgrade today so the types have to change. Can you try these?

Which block number are you querying?

vae520283995 commented 3 years ago

We pushed an upgrade today so the types have to change. Can you try these?

not yet

Which block number are you querying?

Only block 6390049 is wrong, 6390048, 6390050 are all ok

vae520283995 commented 3 years ago

Only block 6390049 is wrong, 6390048, 6390050 are all ok

There is a transaction in block 6390049, but there is no transaction between 6390048 and 6390050.

lovesh commented 3 years ago

I am able to fetch this block (using version 6.2.0 of sidecar). Please try the new types

vae520283995 commented 3 years ago

Solved this issue with the new types.json