polkascan / polkascan-os

Polkascan Open Source
https://polkascan.io
GNU General Public License v3.0
51 stars 54 forks source link

Bug on explorer GUI and/or explorer API with error messages #23

Open VictorVicente opened 4 years ago

VictorVicente commented 4 years ago

Hi, I'm working on Polymath and we are using Polkascan to serve a block explorer for Polymesh. We've found that whenever an extrinsic fails, the error message shown in the explorer sometimes is wrong.

Looking this in deep, I found that explorer is assuming the module who thrown the error is the same target module of the extrinsic, but sometimes it is not true.

The way the ExtrinsicFailed event exposes it is a bit confusing but it is returning an index to search the corresponding module_id, but I think there is not way to use it properly with the current RuntimeModule table as it doesn't store this index.

Is there another way to solve this issue? or it will be necessary to change how the harvester stores the data?

arjanz commented 4 years ago

You are absolutely right, and as a matter of fact we already fixed this issue for polkascan.io, but we haven't pushed the fix upstream to the OS version. As you suggested we indeed introduced an module index for RuntimeModule.

We pull push this upstream anytime soon

arjanz commented 4 years ago

We have pushed a fix upstream, this should be resolved now..

VictorVicente commented 4 years ago

Thanks @arjanz. How this kind of upgrades are applied to a running system? Do I need to delete the database and to start to harvest from genesis again? Or simply updating the code and restarting the service will apply the changes?