Skip to content

(Some) runtime calls truncate the first 2 bytes #11312

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

Open
DragonDev1906 opened this issue Feb 19, 2025 · 0 comments
Open

(Some) runtime calls truncate the first 2 bytes #11312

DragonDev1906 opened this issue Feb 19, 2025 · 0 comments

Comments

@DragonDev1906
Copy link

Tested on the Polkadot/Ajuna parachain and Polkadot

  • metadata.metadata() returns: 0x6d6574610ea10a000c1c
  • metadata.metadataAtVersion(15) returns 0x74610f250b000c1c

According to the specs the metadata starts with ascii "meta": 6d657461, followed by the version (0x0f or 0x0e)

In the first one it's not easy to notice, but 0x6d65 is not the length of the returned data (as it should be according to the type).
The second one is far easier to see, as it starts with ascii ta followed by the 0x0f version byte.

I have run the runtime code in a different environment, where it matches the Option<Vec<u8>> type and the data itself starts with "meta", which leads me to believe the first two bytes are truncated by the frontend or perhaps the node/backend.

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

No branches or pull requests

1 participant