Skip to content
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

Ensure rpc-core can correctly decode types, even if multiple types share the same name #6089

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin-chainflip
Copy link

Currently, rpc-core tries to decode the results of a storage query by using the type name. However, it is perfectly valid to have multiple, different types in the type registry that share the same name. In this case rpc-core will fail to decode. This change uses the unique type id for decoding if available instead.
This change fixes polkadot-js/apps#10432

… avoid issues with multiple types that share the same name
@TarikGul
Copy link
Member

TarikGul commented Feb 7, 2025

Hey thanks for the PR. Were you able to check in apps if it works?

The way you can link the api with your changes is by having apps share the same root directory as the api - and running yarn polkadot-dev-copy-to apps.

@TarikGul
Copy link
Member

TarikGul commented Feb 7, 2025

I checked this blockhash: 0xf7d516bd72ee1d76903e692157fc2a5260788faa6c9b6a369c3006b19413b6d2 given in the issue and still received the same decoding error as earlier with the applied changes above.

@martin-chainflip martin-chainflip marked this pull request as draft February 7, 2025 15:19
@martin-chainflip
Copy link
Author

you are correct. this only fixes the issue that storage items with the same type name could not be decoded. for calls/extrinsics, more work is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PolkaJS unable to decode valid block
2 participants