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

Fix the way we are handling metadata #1

Open
JesseAbram opened this issue Jun 5, 2024 · 1 comment
Open

Fix the way we are handling metadata #1

JesseAbram opened this issue Jun 5, 2024 · 1 comment

Comments

@JesseAbram
Copy link
Member

I hate it I hate it so much. Im open to ideas to fix it

Issue

  • need metadata for subxt calls
  • metadata is large and makes the program bloated
  • Also cuz in wasm can't use fs or other methods for getting it in core (no wasm enviroments)
  • Metadata is literally a Vec I load in as a lazy_static const

Some Pondering

  • How much of the metadata do we need to make an offline api and one call
  • If we can generalize it, it can work for all chains
@ameba23
Copy link
Contributor

ameba23 commented Jun 6, 2024

I guess one way to keep the metadata out of the program binary would be to pass it in as program configuration at the point of deploying a program. But this still means it will be stored on chain, and worse, there is no way to deduplicate it if a bunch of people use the program. So from that point of view its better to have the metadata in the program binary.

Another option would be to have entropy_programs_runtime make the chain metadata available to programs, or even a fully prepared OfflineClient. This is nice because we wouldn't need to decode the metadata and program runtime. But i would not be generic for all chains.

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

2 participants