polkascan / harvester

Polkascan Harvester
GNU General Public License v3.0
18 stars 11 forks source link

decoder for "sp_runtime::generic::digest::DigestItem" not found #16

Open mrseeker opened 1 year ago

mrseeker commented 1 year ago

Getting a lot of errors like this:

harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15597-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15760-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15760-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15461-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15461-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15422-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15422-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15588-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15588-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15677-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15677-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15693-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15693-1 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)
harvester_1  | 2023-02-28 18:27:27 ⌛  ⚠️  Failed to decode log 15809-0 (Decoder class for "sp_runtime::generic::digest::DigestItem" not found)

Is this normal or am I looking at something weird?

arjanz commented 1 year ago

It seems no type with this path can be found in the metadata, which network (preferable with public endpoint for debug purposes) are you connecting to?

mrseeker commented 1 year ago

I found more of these discrepancies. I am running a private node of the Nakamoto Mainnet, which can be found here: https://GitHub.com/opentensor/subtensor

I can supply you with the public facing IP of the node I am running, but the endpoint of that node is not meant to be public knowledge.

arjanz commented 1 year ago

I compiled and ran the Subtensor node with --dev and that doesn't seem to have any issues. But it could be that the runtime around genesis is pre-MetadataV14 and that could give some issues (long story, but back then manual type upkeep was a cumbersome issue) ..

You can find me in https://matrix.to/#/#polkascan:matrix.org and send me a DM so I can debug some more with the endpoint you mentioned

arjanz commented 1 year ago

What you could try is to set the TYPE_REGISTRY_PRESET to legacy, I preserved this feature for older runtimes and could be needed for the first few runtimes of Subtensor (until there was a runtime upgrade to MetadataV14).

You can set this in the environment of the docker-compose.yml file:

  harvester:
    ...
    environment:
      ...
      - TYPE_REGISTRY_PRESET=legacy
      - BLOCK_START=0
      - BLOCK_END=10

The BLOCK_START AND BLOCK_END is there so don't have to wait that long to see result..

arjanz commented 1 year ago

You will probably see it does decodes everything correctly, when you run a test with BLOCK_START around chaintip

mrseeker commented 1 year ago

Contacted you on Matrix, it seems that this goes a bit deeper since the substrate interface (https://github.com/polkascan/py-substrate-interface) is also giving errors.