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

Check if subxt can pull metadata from chain in execution not compile time #1213

Open
JesseAbram opened this issue Dec 11, 2024 · 4 comments
Open
Assignees

Comments

@JesseAbram
Copy link
Member

Pretty much if we can not every time we update the metadata (probably only spec and tx versions) of the chain the TSS will also have to update to a new version to reflect this.....that would suck, we should fix that

@ameba23
Copy link
Contributor

ameba23 commented Dec 12, 2024

Is it just entropy-tss that would need to pull the new metadata? I guess other clients would as well, no? Eg: the test-cli and the SDK (although maybe polkadot js already does this?)

@JesseAbram
Copy link
Member Author

so the sdk is in JS it does not need the types at compile time so it is fine it can pull it from the chain. The test cli yes but this is less of an issue since it isn't a long running process in a tdx machine so just grabbing the new meta data wouldn't be that much of an issue

@JesseAbram
Copy link
Member Author

Seems like we can make dynamic calls but it would be a huge PITA

https://github.com/paritytech/subxt/blob/master/subxt/examples/storage_fetch_dynamic.rs

@dvdplm
Copy link
Contributor

dvdplm commented Dec 12, 2024

it can pull it from the chain

It doesn't have much other option I think? If I remember correctly polkadot.js uses the get_metadata RPC at startup (I guess it caches it for subsequent calls, but the point is: the metadata is always dynamic for JS yeah?).

make dynamic calls

Yes this is possible and supported. Just how much of a PITA it is I do not know but it was a clear goal of the project to make this as easy as possible. I have no reason to think this is no longer the case.

In general, while the metadata "solves" the problem of runtime upgrades by ensuring subsequent versions always know which types are which, the problem is still there for everything outside the chain (tooling, RPC users). In some sense, the problem is "pushed" outside the chain onto the rest of the ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants