-
Notifications
You must be signed in to change notification settings - Fork 257
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
Stability of metadata.scale format #591
Comments
It could also be the I ran into it myself, worth a shot to test. |
Thanks for the information. I will update our repo to use the latest |
I suspect the hash change is due to an attribute of a type from the metadata, which has changed without implying a change in functionality. I remember it was part of the design discussions, mostly if we want to add the type' path: moving a type alias (ie I'll have a look after the Polkadot Decoded event and compare the metadata, Thanks for reporting this! |
The
Are you parsing by any means the metadata and feeding back the parsed metadata from your nodes? |
This is unrelated to the issue we are having. In this service we have types which are manually created and kept updated.
We use this hardcoded metadata to build a tool which queries for specific events on our parachain. This file is the I will be updating our Based on your findings this seems like a metadata or scale encoding bug as opposed to a
I do not think so. If this was the case the diffs would show more changes and the hardcoded metadata file in the repo would never be stable. The hardcoded file currently is stable on most machines. Even though the Suggestion: |
I'm in favour of being able to make an unchecked request in the case that subxt detects incompatibilities, but you are happy ignoring those and submitting the thing anyway. Offhand I've no idea where the In @alistair-singh if you'd like to test this fix locally, just remove lines 75-77 from here: Line 75 in c55b7ba
I'd love to know whether that resuled in things working for you or not! |
In our case the events we are looking for have been fairly stable and are modified with extreme care so we would be happy to ignore mismatches. The tool is read only and covered by a good test suite so it lessens the need for strong checks such as the hash checks. That being said this issue only happens on some machines and If I see it again I will try the modification you suggested above. The root cause seems to be with the metadata as opposed to If I run into another case then I will re-open this issue and post the findings. |
We have an issue where by the same build of our parachain on two different machines produced
metadata.scale
files with different hashes. This has caused our application built withsubxt-codegen
to fail due toError: Metadata(IncompatibleMetadata)
. I understand this error is produced when the hash of the metadata that was used to generate the client is not the same as the metadata on the parachain node. Getting the latest metadata from the parachain indeed shows a difference between the hashes.Originally we thought that the metadata was changed so we updated the
metadata.scale
file. This fixed the issue on our side, but on some machines the metadata was still out of date.I have attached a diff of the metadata files and the generated rust sources.
https://drive.google.com/file/d/1-TtoQkEZCTCoNWqtz1rkVv3K3GEZd7K3/view?usp=sharing
The parachain code was identical in both builds.
Code used:
Snowbridge ->
a65d9118dd4b2277eb7a8513c6f9d7273f277fc2
Polkadot ->
a7e188cd9665c735f4b9d5a58cdbc4dd1850eae0
-release-v0.9.23
Looking at the diff file
diff.xxd.1col.patch
it does not look like new metadata was added. It looks like it was scale encoded differently.Taking a look at the first difference:
ours.xxd:
theirs.xdd:
In ascii: ours
X[u8; /*..*/ 32 /*..*/]
vs theirs[u8; 32]
.Both these files produce the same rust code during code-gen but with different hashes which match their respective files. The fact that the code is the same apart from hashes shows the metadata has not changed in a meaningful way.
We need assistance with the following:
The text was updated successfully, but these errors were encountered: