-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Api augmentation fails when calling api.rpc.state.getMetadata(blockHash) #4596
Comments
This is the problematic line - The issue is that metadata retrieval also adjust the registry with the types at that point. So when reversing, it is incorrect since the metadata change only needs to kick in at the next blockHash. I have no solution to get around it atm. |
Thanks for the quick response @jacogr, I'll change block harvesting to go from genesis to current block if I can't get metadata at blockhash using an alternative method (maybe using substrate sidecar). |
@mariopino Please try this version first once in ... #4599 Basically it removes the auto-attach to a manual (still auto) process. Which would be more correct and follow the same process actually set by the Metadata itself. |
Please check the latest |
Thanks @jacogr |
Nice! It will be in the next stable release Sunday/Monday. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
I'm using polkadot-js api to harvest blocks for PolkaStats block explorer and found this issue in our crawler that's struggling me over the last days.
I created this code (https://github.com/mariopino/polkadot-js-api-augmentation-error) to reproduce the error:
NOTE: In our crawler we fill our database with blocks in reverse order from current block to the genesis, curious thing is that when you try to harvest blocks in normal order (from genesis to current block, using
range
function insteadreverseRange
), it works without errors.Output:
The text was updated successfully, but these errors were encountered: