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 155 forks source link

StorageData:: Unable to decode storage system.events:: createType(Vec<EventRecord>) #701

Closed qinheqing closed 3 years ago

qinheqing commented 3 years ago

Description

Polkadot v0.9.11 substrate-api-sidecar v9.2.0

Steps to Reproduce logs:

2021-10-08 11:14:35 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage system.events:: createType(Vec):: decodeU8a: failed at 0x0002000000630100… on : {"phase":"Phase","event":"Event","topics":"Vec"}:: decodeU8a: failed at 0xa10f060200ca9a3b… on topics: Vec:: decodeU8a: failed at 0x00000000000000… on : H256:: Expected at least 32 bytes (256 bits), found 7 bytes

TarikGul commented 3 years ago

hey @qinheqing, can you provide me with a reproducible endpoint, or blocknumber where I can test this out.

qinheqing commented 3 years ago

Should be in this block: curl http://127.0.0.1:8080/blocks/7680637

qinheqing commented 3 years ago

--chain westend

TarikGul commented 3 years ago

I am using v9.2.0 of sidecar and I am not able to reproduce the issue at http://127.0.0.1:8080/blocks/7680637.

My response:

{"number":"7680637","hash":"0x05ccff947c09d09a69f972aee20078d238439c5a42033f2cf6332dcb40fe5c62","parentHash":"0x93c874400ba10819b66cb9ec3fef7ce249b61d5473327049c9b881ba470f8e69","stateRoot":"0xe179a9529e0a2e47e0a5ff17cb33d7e66091a9a9b8f81c182443e61f996777ae","extrinsicsRoot":"0x13950b91f76e466fe115f544c2323836bdd6f40344cdc46ba9f0563c6db66151","authorId":"5G1ojzh47Yt8KoYhuAjXpHcazvsoCXe3G8LZchKDvumozJJJ","logs":[{"type":"PreRuntime","index":"6","value":["0x42414245","0x030c000000ee443a10000000000c2282b5f8ce453c8683ea224f8ab91545cce9b43ce596302df7a8a653e82d776ee210a642ce905bec26f98dab876c3a780fc86e87c16d09429b813a42538d0b5bf2b49a3dcb694f89f9e495b11ab897dce58c5081981f1f7c3f74c7392c9102"]},{"type":"Seal","index":"5","value":["0x42414245","0x1058d3ea2d307f3c26607ffc23735328c152ae249c4536a59c731b496fcaab43d302de0894f4092259642945ae1b57b8eeac08291a966c464e395dd1233f7f86"]}],"onInitialize":{"events":[]},"extrinsics":[{"method":{"pallet":"timestamp","method":"set"},"signature":null,"nonce":null,"args":{"now":"1633525140007"},"tip":null,"hash":"0x577700a5d28ac0f9be94cb5f55474bd37ff08cc39ee26d3d32d657be5cf8afda","info":{},"era":{"immortalEra":"0x00"},"events":[{"method":{"pallet":"system","method":"ExtrinsicSuccess"},"data":[{"weight":"159832000","class":"Mandatory","paysFee":"Yes"}]}],"success":true,"paysFee":false},{"method":{"pallet":"paraInherent","method":"enter"},"signature":null,"nonce":null,"args":{"data":{"bitfields":[{"payload":"0x02","validatorIndex":"0","signature":"0xd262aade6b76dc1618da5bf4f7bb0580ee2cbcd3d6d242e595cc9b0fc1a01a108aaa3b65ab908af301224e84feb3992d872a223ff02e8faef593291425486789"},{"payload":"0x02","validatorIndex":"1","signature":"0x80ea55191c7fcb6bc0a8df775dd7daa07483aac2131097f228735a7086993e28d2e0b3602d20ec696428b5ab9bb20b63582152edba4569f01da76aeb93a78f8b"},{"payload":"0x02","validatorIndex":"2","signature":"0x1478e6dcf3031b5014a9da31ce8f470bbffa17c812d3a68a433f554cd97f907e0e69fed2c2f62e86de769d38fff4d546c6eca61e44968482a78719f39c5f5c8f"},{"payload":"0x02","validatorIndex":"3","signature":"0x4471a5c125d518de1fd32c0862356ef1bc53d6e4bd2bf59602b94b2eea1b652888d1e19344687a9788c80fe1d75ff1fef1158dc935e745d1ee5d0e7640dd8b8a"},{"payload":"0x02","validatorIndex":"4","signature":"0xdc0c499865fc81911d38c1cb050af4a8fc9c071f34da3ba7c8e83f423a48cc00eff21181cf7b05f51b4dbc37099a1a59364a38efc87b4f961c7c9491e0990e80"},{"payload":"0x02","validatorIndex":"5","signature":"0x4497f47d2b6abb0d6be64e2677aa5b3bb422f5452bf221f1c1700e9a5ec3bb1646e45912530424d4680dd05376c8d02a87e56021aa47c59fdf82b744ecd8358a"},{"payload":"0x02","validatorIndex":"6","signature":"0xb42ee294c9f0664268a126cdc1f2e520b1a9ca170880b4f78a9e5f354005933bd77b710bdff58213dfff720b009121f7ee3447df3d0c1a4a80353147d2a22787"},{"payload":"0x02","validatorIndex":"7","signature":"0xb6263c726c84f0abda33041b414d4ef14dc0eea0786555d23301211ef7cb68790fde696c1e6ab7764b468c57a2b53ab243ec65e532526ecdc0411cd0dc81b386"},{"payload":"0x02","validatorIndex":"8","signature":"0x24d3b0ab328d6739cc2e6c439b2b14b4308cbd6fbe24068e0bac24444507d532c061d6b203de006e455f8f64d44ba6ce50a7d68eae0e59558162fce9e5afb987"},{"payload":"0x02","validatorIndex":"9","signature":"0x02f8b11eafe97a2ff051cefe77c5d09972cac2c381cf3efd62cde1f0078a55742d6b9dc1e98000f5d086bc3e6e13154e8546c5791a8c7ed5264bea740f3c4c84"},{"payload":"0x02","validatorIndex":"10","signature":"0xd86906694bf250331486d364cebb500e21f62a23cc37ac386f2ce3af2e80e34bd8e7a91f398bab719ec6c872dfff1b239d95df63a2aef338b2220c732496108d"},{"payload":"0x02","validatorIndex":"11","signature":"0xb066b589759c4ecda0d11bf8bb2fa2c216e5fa92dbe421594484e51b73d507544a20321e02d8d2c1076e068fb9cc29e1b2dc18e4067c9757f86466530fea5c8d"},{"payload":"0x02","validatorIndex":"12","signature":"0x6aef801df8bb18c899adadd77bc049b692ac513a63544e6696d16b9420d4547e281e99d5397121b6781a5b951487c557d8dc705ac0ee9d859027d28632832189"},{"payload":"0x02","validatorIndex":"13","signature":"0x1c43d68047ec21da1b7fe9ecf7898277bbef75296114d3ca5f177c447b12a20e90ef4e3d76e053e360b80099398124b0b38830cbfaeaf6120cd9388ee67ed986"},{"payload":"0x02","validatorIndex":"14","signature":"0xf4a6fc5f18d226514767c573064dc412c340e519b6285d65b3fdfc84e77edf29daf55f36ffe26caad38e4565c0f92373b48356d5325d2e0a884930e11255568c"},{"payload":"0x02","validatorIndex":"15","signature":"0x0e691fed94b448f9524725934542ee0f45b17b7112f912ae118cc4ae659c985f55a0376a7556c48df4ffac4520d2724e8e77e506e44487413653f0cee2f67881"}],"backedCandidates":[{"candidate":{"descriptor":{"paraId":"1000","relayParent":"0x93c874400ba10819b66cb9ec3fef7ce249b61d5473327049c9b881ba470f8e69","collatorId":"0x364450834a362e499c87698ec00e2c9997be543a79fe523de9d754eb60229e54","persistedValidationDataHash":"0x874d433f6de9269f08be5f48d491675cd254265fef8c0843a8febc33e7df1fa6","povHash":"0x85b32419a31656b06c776a668e2c3a4a41933fedf2afd8d222a06ce6b7d4162b","erasureRoot":"0x137f2d5d4810eb4a3a854bf754b16e103d9caf199595174b6147d0ea19ac8fb2","signature":"0x38e52475d1668a049acdf57da890b3f5940e0dab260a920cc6c3538067c94b5fac4b9c5842e2a6ab1002ca4e7ead94e8d3982d10500078c5a3de60f76c027582","paraHead":"0xe59379480c85e6eb821c24562131b5202ef0c195e2e7f532f49af2665d68c81d","validationCodeHash":"0xcba464e7748c499fcefe48cf4c24f48761f7b1588bebabdeaa7886b3cc72da7d"},"commitments":{"upwardMessages":[],"horizontalMessages":[],"newValidationCode":null,"headData":"0xfc757173ec4bbfc8de1bcce5b825914ed3c4a119b82b571f7e0f6ffe0120eda4c2ec2c00122a609908b74e7b8381498beb4335a3b9fe75edaa6e3860674d9e899fd6d161798197ff01e00f892fa8ab026cf2b559db47a102149a2b9ad578e51f9c940e990806617572612076221d08000000000561757261010138476f3124566fa808d6cda195d04918c205a8a93e531a276ad5b59cd736866b2b1238cdba940d2dfb1fe0177e01d4f3114d529b1172d069d9aef95faff6df84","processedDownwardMessages":"0","hrmpWatermark":"7680636"}},"validityVotes":[{"explicit":"0xb0f72aa13314dca17bf47be017cc4020ab599797059edc2450cca910489ae368d84bd07ac4aa82561535fbf3120e4cafaa3ea7d576a215d82336867c8b30a687"},{"implicit":"0xd2355d307128c1df80f8c9d7109ca6532ed5528050fba4bc732b8669eb2d057fb995be269ada8a0a609f74694b9476d5b06e6865a1fcc2fc590ca0b829d72789"},{"explicit":"0xb4d3e6c9f76f1ac488e9e8f80f8873cb98c510e7e8f0506c6d3fbc52aaad795cf8d8f7b0dd3662da0de321f079b5b372dd69a287cdc835d2c47f1485a549e784"},{"explicit":"0x62768778f86079f42cf81bb91d91c4fa1c74221690a12abb80b8c24f537aae4df28299709d23e8a1e34971677f2c25a7168278d463176538cd16f8ba06e4ae83"}],"validatorIndices":"0x0f"},{"candidate":{"descriptor":{"paraId":"2096","relayParent":"0x93c874400ba10819b66cb9ec3fef7ce249b61d5473327049c9b881ba470f8e69","collatorId":"0x186d998db53e2bd0978c7bcca35b0edac701c6bd9de75f5c4425d8b1af69e76f","persistedValidationDataHash":"0xd65edaaa1e3f5f812acac758dfd10414dd378e57bf44373551e1a3f3a03b199c","povHash":"0x7a7389df5e5e98a18f544a4d698d1c7aa448bfb9ccfcf6a7e3cd7c1f4cf77344","erasureRoot":"0x241a9d2d63fa0da99a01fc4c37134f6f3e69d71d857daeeb5c6e68bee471355b","signature":"0x9e92395ba59694bceacf69de81176147b1a62770ef16456f085abe54dbf8222bc87a6a2be69c3db2ea11943cf25faddc77a6cf897adf498020e9e64d644e7a87","paraHead":"0x2324ca045796093ca63121999f204a3386079b0456aa5c13f8affa620cb3195b","validationCodeHash":"0xcf819de6afe2ba8df7eb55afa2c53a4796e6376ecb5036c719f4dc8ae9c9ba5f"},"commitments":{"upwardMessages":[],"horizontalMessages":[],"newValidationCode":null,"headData":"0x9bb2a7a2a88daaa4a72ba1dc64710c3564fb63095cb17e6215f824c3b56241f72a6c06004840d7bec4c49dd2158e018f63483cae56f813d6918d14a7be178ba8e58bf1aa7ce258f80f4ca663eb6f6b365d5007e7a07db93d40d5698e1c08c3a580247bb20c06617572612076221d08000000000466726f6e88011ddd95658bea2f0337d1bc63fda254f2705b777471930f802744e33e2895df3c000561757261010138ccf5b6c2b53e14fb7163b74f8dc7a3cfc2cab9da4e8c39bc8fbd2ec2b1803ae951b399bd211f39983ef8288fc2f833fe066623a7356f2413edba155e236a8e","processedDownwardMessages":"0","hrmpWatermark":"7680636"}},"validityVotes":[{"explicit":"0x40a7ec4f0ac3d3df3a0d2e20bc15388f27c7a646f738101d587f4240b372a44220b52228c5e6f2281954875e7ab05e5563f14140993381507c85476eebbb838e"},{"implicit":"0x828c816446662fc87048906ffd3b559fc686c6dcb38865af55b828772cec8912db965b304c129d20c84b0234598139a97ed1f7917b766225365a5e67cbf5b586"},{"implicit":"0x566322eebca44d53e8ff1c886280023f74b05139b984e4fc921df8f77010213745475bbb4ef647396391250167b790093a9484977ea390f923eb4d599e676588"},{"implicit":"0x229f97438bb712e18bce839d1d6d8118af11f380479a5ba275a9c274864e3539f84863da8e22d0afe0d46285bb0dba2d0c2a0cbda43a02c6aefd93c0e7484c81"}],"validatorIndices":"0x0f"}],"disputes":[],"parentHeader":{"parentHash":"0x834af8b65e52e953a2f568585cbb005baa3b2689b492c8cbaee4baca0db7bc23","number":"7680636","stateRoot":"0xf80c6a77ec3bdc1219f4a331371145b380312675f3c71d58660c68224e623fd7","extrinsicsRoot":"0xc066c8dc8361022bd21c7fb01c9263c23a0fdb87bc254d8110669dda5be1eae2","digest":{"logs":[{"preRuntime":["0x42414245","0x0301000000ed443a1000000000b4a24b2e19f914d70f756ba93a07f183689801dc5c4e4819723267dec313f66e4f45eb23e463affc99f376d8180ce5d47c778e56000f47f9f8f9cebdae582e0bfe30387c586141b0382ae262ae9d95422f201974a0d9548dd36c6e89dd7aa005"]},{"seal":["0x42414245","0xf20fedb28b3e0a5aa552d9cc13a5ec4400e764a2cfa47dadf0eb87cfb185ff7670cad687fbe39bf40a16359f03e984c3bcbb375c5ab761f5a492adacc6838c80"]}]}}}},"tip":null,"hash":"0x3d62e065d2788a2cfdb855eb398362a7ed9832607888e92ea151229ca5eaff45","info":{},"era":{"immortalEra":"0x00"},"events":[{"method":{"pallet":"paraInclusion","method":"CandidateIncluded"},"data":[{"descriptor":{"paraId":"2000","relayParent":"0x834af8b65e52e953a2f568585cbb005baa3b2689b492c8cbaee4baca0db7bc23","collatorId":"0x5aed1b1b689ea1d27533cadc9e2a56d2770dadea801ff31bc932c41332714a1d","persistedValidationDataHash":"0x17daf006b6fbe2954ecedb596f80e27fc311889e4cb646682709c133345e368b","povHash":"0x0b7a973c8d07a4f0c5d659279b03203a0675c11c5388e1cd606029384fcf9f7b","erasureRoot":"0x149d81c5abeeaedaeaed77f815c9f6159f492ff5b735da9f9dbdd57533e935da","signature":"0x94b831e574c13aaa94ff7f4685c8d632a97202c816125eb6966760f4ed11b352f57f073e0f3593e851fdcbcba3abecaa871d6e5df0001e4fed577b17f378ec8e","paraHead":"0x5abb6fb2dd148f78becbfac7ec834cb55d5591169af84e8d17a249fcfd33e742","validationCodeHash":"0x2f25062ba5d41990b8bb4efb9b8694ff9e38c0f91d0fd1f673f6d8e9999aa452"},"commitmentsHash":"0xb48ec9a988e3679513a2ed807f1b9e403aa286604582e98a245a55ad1f05d9ff"},"0x7af18572abcd0480cd835591499926eb11f542108a05017bbdbe4d7f9498640d7909673220f3b6ff24b6721938b2cc92d3647bd3ef9c1edfb11d57aa556c023f3f4f0fedcdd4e9dd6d120d19bea22244f4e591818fbc5031b3acf863a8a901f86a180806617572612076221d0800000000056175726101016a48569ec8fc44300fb7e2a41d15eda01062b0a2c4c384fc565f41a4acdbfa5e01aacd5b9fc8570dc3cd992d601c89150e4f548c7d874de0381e5545ac9d648f","1","3"]},{"method":{"pallet":"paraInclusion","method":"CandidateBacked"},"data":[{"descriptor":{"paraId":"1000","relayParent":"0x93c874400ba10819b66cb9ec3fef7ce249b61d5473327049c9b881ba470f8e69","collatorId":"0x364450834a362e499c87698ec00e2c9997be543a79fe523de9d754eb60229e54","persistedValidationDataHash":"0x874d433f6de9269f08be5f48d491675cd254265fef8c0843a8febc33e7df1fa6","povHash":"0x85b32419a31656b06c776a668e2c3a4a41933fedf2afd8d222a06ce6b7d4162b","erasureRoot":"0x137f2d5d4810eb4a3a854bf754b16e103d9caf199595174b6147d0ea19ac8fb2","signature":"0x38e52475d1668a049acdf57da890b3f5940e0dab260a920cc6c3538067c94b5fac4b9c5842e2a6ab1002ca4e7ead94e8d3982d10500078c5a3de60f76c027582","paraHead":"0xe59379480c85e6eb821c24562131b5202ef0c195e2e7f532f49af2665d68c81d","validationCodeHash":"0xcba464e7748c499fcefe48cf4c24f48761f7b1588bebabdeaa7886b3cc72da7d"},"commitmentsHash":"0xc24d6fd95793d652f0068b0d82d3e518570cd293ac24263ea15192e2c9c25103"},"0xfc757173ec4bbfc8de1bcce5b825914ed3c4a119b82b571f7e0f6ffe0120eda4c2ec2c00122a609908b74e7b8381498beb4335a3b9fe75edaa6e3860674d9e899fd6d161798197ff01e00f892fa8ab026cf2b559db47a102149a2b9ad578e51f9c940e990806617572612076221d08000000000561757261010138476f3124566fa808d6cda195d04918c205a8a93e531a276ad5b59cd736866b2b1238cdba940d2dfb1fe0177e01d4f3114d529b1172d069d9aef95faff6df84","0","2"]},{"method":{"pallet":"paraInclusion","method":"CandidateBacked"},"data":[{"descriptor":{"paraId":"2096","relayParent":"0x93c874400ba10819b66cb9ec3fef7ce249b61d5473327049c9b881ba470f8e69","collatorId":"0x186d998db53e2bd0978c7bcca35b0edac701c6bd9de75f5c4425d8b1af69e76f","persistedValidationDataHash":"0xd65edaaa1e3f5f812acac758dfd10414dd378e57bf44373551e1a3f3a03b199c","povHash":"0x7a7389df5e5e98a18f544a4d698d1c7aa448bfb9ccfcf6a7e3cd7c1f4cf77344","erasureRoot":"0x241a9d2d63fa0da99a01fc4c37134f6f3e69d71d857daeeb5c6e68bee471355b","signature":"0x9e92395ba59694bceacf69de81176147b1a62770ef16456f085abe54dbf8222bc87a6a2be69c3db2ea11943cf25faddc77a6cf897adf498020e9e64d644e7a87","paraHead":"0x2324ca045796093ca63121999f204a3386079b0456aa5c13f8affa620cb3195b","validationCodeHash":"0xcf819de6afe2ba8df7eb55afa2c53a4796e6376ecb5036c719f4dc8ae9c9ba5f"},"commitmentsHash":"0x799c256e8222ea884efde982a07e97c1d8ea2041dec08af5dd2ca4515acb39ef"},"0x9bb2a7a2a88daaa4a72ba1dc64710c3564fb63095cb17e6215f824c3b56241f72a6c06004840d7bec4c49dd2158e018f63483cae56f813d6918d14a7be178ba8e58bf1aa7ce258f80f4ca663eb6f6b365d5007e7a07db93d40d5698e1c08c3a580247bb20c06617572612076221d08000000000466726f6e88011ddd95658bea2f0337d1bc63fda254f2705b777471930f802744e33e2895df3c000561757261010138ccf5b6c2b53e14fb7163b74f8dc7a3cfc2cab9da4e8c39bc8fbd2ec2b1803ae951b399bd211f39983ef8288fc2f833fe066623a7356f2413edba155e236a8e","2","0"]},{"method":{"pallet":"system","method":"ExtrinsicSuccess"},"data":[{"weight":"250200000","class":"Mandatory","paysFee":"Yes"}]}],"success":true,"paysFee":false}],"onFinalize":{"events":[]},"finalized":true}

Are you running it against a node that is currently syncing?

qinheqing commented 3 years ago

Sorry for my negligence. It should be the last success in the 7680637 block, and then an error in the parsing of the 7680638 block;Can you try this block :http://127.0.0.1:8080/blocks/7680638

TarikGul commented 3 years ago

Okay sweet, I was able to reproduce it for 7680638. I'll have a look into it, thanks for reporting the issue. Currently it's 2:30 am for me, so you'll see more activity from me on this come the morning.

error

2021-10-08 02:30:28 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage system.events:: createType(Vec<EventRecord>):: decodeU8a: failed at 0x0002000000630100… on : {"phase":"Phase","event":"Event","topics":"Vec<Hash>"}:: decodeU8a: failed at 0xa10f060200ca9a3b… on topics: Vec<Hash>:: decodeU8a: failed at 0x00000000000000… on : H256:: Expected at least 32 bytes (256 bits), found 7 bytes
qinheqing commented 3 years ago

Now there are more exceptions, if you request the latest block : curl http://127.0.0.1:8080/blocks/head

2|sidecar_start  | 2021-10-11 21:15:10 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(Call):: Call: failed decoding paraInherent.enter:: Struct: failed on args: {"data":"{\"bitfields\":\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\",\"backedCandidates\":\"Vec<PolkadotPrimitivesV1BackedCandidate>\",\"disputes\":\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\",\"parentHeader\":\"{\\\"parentHash\\\":\\\"H256\\\",\\\"number\\\":\\\"Compact<u32>\\\",\\\"stateRoot\\\":\\\"H256\\\",\\\"extrinsicsRoot\\\":\\\"H256\\\",\\\"digest\\\":\\\"{\\\\\\\"logs\\\\\\\":\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\"}\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on data: {"bitfields":"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>","backedCandidates":"Vec<PolkadotPrimitivesV1BackedCandidate>","disputes":"Vec<PolkadotPrimitivesV1DisputeStatementSet>","parentHeader":"{\"parentHash\":\"H256\",\"number\":\"Compact<u32>\",\"stateRoot\":\"H256\",\"extrinsicsRoot\":\"H256\",\"digest\":\"{\\\"logs\\\":\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>:: decodeU8a: failed at 0x1005000000003277… on :: DoNotConstruct: Cannot construct unknown type PolkadotPrimitivesV1SignedUncheckedSigned
2|sidecar_start  | 2021-10-11 21:15:10 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage system.events:: createType(SpRuntimeDispatchError):: DoNotConstruct: Cannot construct unknown type SpRuntimeDispatchError
2|sidecar_start  | 2021-10-11 21:15:10 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage session.validators:: createType((u32,XcmV2TraitsError)):: decodeU8a: failed at 0x547115aca2d56792… on :: DoNotConstruct: Cannot construct unknown type XcmV2TraitsError
2|sidecar_start  | 2021-10-11 21:15:10 error: VEC: Unable to decode on index 1 createType(ExtrinsicV4):: createType(Call):: Call: failed decoding paraInherent.enter:: Struct: failed on args: {"data":"{\"bitfields\":\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\",\"backedCandidates\":\"Vec<PolkadotPrimitivesV1BackedCandidate>\",\"disputes\":\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\",\"parentHeader\":\"{\\\"parentHash\\\":\\\"H256\\\",\\\"number\\\":\\\"Compact<u32>\\\",\\\"stateRoot\\\":\\\"H256\\\",\\\"extrinsicsRoot\\\":\\\"H256\\\",\\\"digest\\\":\\\"{\\\\\\\"logs\\\\\\\":\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\"}\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on data: {"bitfields":"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>","backedCandidates":"Vec<PolkadotPrimitivesV1BackedCandidate>","disputes":"Vec<PolkadotPrimitivesV1DisputeStatementSet>","parentHeader":"{\"parentHash\":\"H256\",\"number\":\"Compact<u32>\",\"stateRoot\":\"H256\",\"extrinsicsRoot\":\"H256\",\"digest\":\"{\\\"logs\\\":\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>:: decodeU8a: failed at 0x1005000000003277… on :: DoNotConstruct: Cannot construct unknown type PolkadotPrimitivesV1SignedUncheckedSigned
2|sidecar_start  | 2021-10-11 21:15:10 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(Call):: Call: failed decoding paraInherent.enter:: Struct: failed on args: {"data":"{\"bitfields\":\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\",\"backedCandidates\":\"Vec<PolkadotPrimitivesV1BackedCandidate>\",\"disputes\":\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\",\"parentHeader\":\"{\\\"parentHash\\\":\\\"H256\\\",\\\"number\\\":\\\"Compact<u32>\\\",\\\"stateRoot\\\":\\\"H256\\\",\\\"extrinsicsRoot\\\":\\\"H256\\\",\\\"digest\\\":\\\"{\\\\\\\"logs\\\\\\\":\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\"}\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on data: {"bitfields":"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>","backedCandidates":"Vec<PolkadotPrimitivesV1BackedCandidate>","disputes":"Vec<PolkadotPrimitivesV1DisputeStatementSet>","parentHeader":"{\"parentHash\":\"H256\",\"number\":\"Compact<u32>\",\"stateRoot\":\"H256\",\"extrinsicsRoot\":\"H256\",\"digest\":\"{\\\"logs\\\":\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\"}\"}"}:: decodeU8a: failed at 0x4010050000000032… on bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>:: decodeU8a: failed at 0x1005000000003277… on :: DoNotConstruct: Cannot construct unknown type PolkadotPrimitivesV1SignedUncheckedSigned
2|sidecar_start  | 2021-10-11 21:15:10 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage system.events:: createType(SpRuntimeDispatchError):: DoNotConstruct: Cannot construct unknown type SpRuntimeDispatchError
2|sidecar_start  | 2021-10-11 21:15:10 error: RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: Unable to decode storage session.validators:: createType((u32,XcmV2TraitsError)):: decodeU8a: failed at 0x547115aca2d56792… on :: DoNotConstruct: Cannot construct unknown type XcmV2TraitsError 
TarikGul commented 3 years ago

hey @qinheqing, this should be fixed in the coming PR #699

qinheqing commented 3 years ago

hey @qinheqing, this should be fixed in the coming PR #699

Will these errors occur in the --chain polka environment?

TarikGul commented 3 years ago

when you say "--chain polka" do you mean running a local archive node, or dev node? Regardless should work for both.

TarikGul commented 3 years ago

Hey @qinheqing Is this still an issue for you? Have you tried v10.0 or v11.0

qinheqing commented 3 years ago

Hey @qinheqing Is this still an issue for you? Have you tried v10.0 or v11.0

Yesterday I tried to upgrade to the latest version, namely Sidecar v11.0.0, Polkadot v0.9.12 Today I checked the log and found an error: curl http://127.0.0.1:8080/blocks/head

{"code":500,"message":"createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding paraInherent.enter:: Struct: failed on args: {\"data\":\"{\\\"bitfields\\\":\\\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\\\",\\\"backedCandidates\\\":\\\"Vec<PolkadotPrimitivesV1BackedCandidate>\\\",\\\"disputes\\\":\\\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\\\",\\\"parentHeader\\\":\\\"{\\\\\\\"parentHash\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"number\\\\\\\":\\\\\\\"Compact<u32>\\\\\\\",\\\\\\\"stateRoot\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"extrinsicsRoot\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"digest\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"logs\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\"}\"}:: decodeU8a: failed at 0x40100500000000ca… on data: {\"bitfields\":\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\",\"backedCandidates\":\"Vec<PolkadotPrimitivesV1BackedCandidate>\",\"disputes\":\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\",\"parentHeader\":\"{\\\"parentHash\\\":\\\"H256\\\",\\\"number\\\":\\\"Compact<u32>\\\",\\\"stateRoot\\\":\\\"H256\\\",\\\"extrinsicsRoot\\\":\\\"H256\\\",\\\"digest\\\":\\\"{\\\\\\\"logs\\\\\\\":\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\"}\\\"}\"}:: decodeU8a: failed at 0x40100500000000ca… on bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>:: decodeU8a: failed at 0x100500000000caa1… on :: DoNotConstruct: Cannot construct unknown type PolkadotPrimitivesV1SignedUncheckedSigned","stack":"Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding paraInherent.enter:: Struct: failed on args: {\"data\":\"{\\\"bitfields\\\":\\\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\\\",\\\"backedCandidates\\\":\\\"Vec<PolkadotPrimitivesV1BackedCandidate>\\\",\\\"disputes\\\":\\\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\\\",\\\"parentHeader\\\":\\\"{\\\\\\\"parentHash\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"number\\\\\\\":\\\\\\\"Compact<u32>\\\\\\\",\\\\\\\"stateRoot\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"extrinsicsRoot\\\\\\\":\\\\\\\"H256\\\\\\\",\\\\\\\"digest\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"logs\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\"}\"}:: decodeU8a: failed at 0x40100500000000ca… on data: {\"bitfields\":\"Vec<PolkadotPrimitivesV1SignedUncheckedSigned>\",\"backedCandidates\":\"Vec<PolkadotPrimitivesV1BackedCandidate>\",\"disputes\":\"Vec<PolkadotPrimitivesV1DisputeStatementSet>\",\"parentHeader\":\"{\\\"parentHash\\\":\\\"H256\\\",\\\"number\\\":\\\"Compact<u32>\\\",\\\"stateRoot\\\":\\\"H256\\\",\\\"extrinsicsRoot\\\":\\\"H256\\\",\\\"digest\\\":\\\"{\\\\\\\"logs\\\\\\\":\\\\\\\"Vec<SpRuntimeGenericDigestDigestItem>\\\\\\\"}\\\"}\"}:: decodeU8a: failed at 0x40100500000000ca… on bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>:: decodeU8a: failed at 0x100500000000caa1… on :: DoNotConstruct: Cannot construct unknown type PolkadotPrimitivesV1SignedUncheckedSigned\n at createTypeUnsafe (/home/ubuntu/.nvm/versions/node/v16.3.0/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/types/create/createType.cjs:68:18)\n at TypeRegistry.createTypeUnsafe (/home/ubuntu/.nvm/versions/node/v16.3.0/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/types/create/registry.cjs:370:45)\n at RpcCore._formatOutput (/home/ubuntu/.nvm/versions/node/v16.3.0/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-core/bundle.cjs:389:21)\n at callWithRegistry (/home/ubuntu/.nvm/versions/node/v16.3.0/lib/node_modules/@substrate/api-sidecar/node_modules/@polkadot/rpc-core/bundle.cjs:255:42)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)","level":"error"}

This is happening with Polkadot westend.

qinheqing commented 3 years ago

Current Block height: 7918969 You can try curl http://127.0.0.1:8080/blocks/7918969 Will have the same result

qinheqing commented 3 years ago

I noticed that Polkadot v0.9.12 was updated after Sidecar v11.0.0. Is there any incompatibility?

TarikGul commented 3 years ago

There could always be some incompatibility like type updates/changes, decoding errors etc. I do my best to keep up and stay well tested, but things can be missed sometimes.

On Sidecar v11.0.0 the block is decoding correctly for me. Are you still getting the same error?

qinheqing commented 3 years ago

The current version is ok,thank a lot

TarikGul commented 3 years ago

Sweet thanks for letting me know. Closing, feel free to open the issue back up if this arises.