Cannot decode storage item Staking.QueuedElected
on block 29231
#5969
Labels
Bug
Tracks issues causing errors or unintended behavior, critical to fix for reliability.
P2 - Medium
Important but not urgent. Enhances functionality and value, scheduled after higher priorities.
The error I run into is this:
To reproduce, run these commands in a temp folder somewhere (these download a script I am using to decode historic storage and runs it with the entry and block mentioned in the title):
The failure is because
Staking.QueuedElected
has the typeElectionResult
in PJS, which looks like this:I dug into old Substrate code and the correct type for this old block seems to be this:
Changing the type to the above in PJS (and in the Rust decode stuff) gets everything decoding OK without any undecoded bytes etc. What I don't know is whether newer runtimes will expect a different type (eg the one currently present). However, offhand I tried some blocks, and the last block I could find where this storage entry had a value was 326344, and it still decoded correctly there (this block is halfway into runtime spec version 10).
The text was updated successfully, but these errors were encountered: