itering / substrate-api-rpc

Substrate RPC lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vec length 675315776 exceeds 50000

CryptoDavChen opened this issue · comments

Hi team, Block 6713249 has newest spec version 9090, return error when decode evnet: Recovering from panic in DecodeEvent error is: Vec length 675315776 exceeds 50000.

I tested in local, and found: 9090’s metadataV13 can't decode 6713249's evnet, but 9080's metadataV13 can decode it.

9090's metadataV13 get by state_getMetadata with 6713249's blockHash, 9080's metadataV13 use 6713248's blockHash, and 6713249 is the first block of 9090 spec.

Please have a look, Thx guys.

commented

@CryptoDavChen As you said above, the block of system(CodeUpdated) needs to be parsed using the metadata before the upgrade

@freehere107 So i can't use the metadata get by this block's hash, i should manuly specify a metadata, right? It's quite unsmart, and maybe i need often do this work when spec upgrade later. If has a smart way please share me, thanks a lot.

commented

@CryptoDavChen The method of subscan is to check whether the spec of the current block and the parent block are equal, and if they are not equal, use the spec ver of the parent block

@freehere107 Wow, it looks very greate, let me try. Thanks brother.