Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Feature flags to disable docs in metadata #9235

Closed
xlc opened this issue Jun 29, 2021 · 4 comments · Fixed by #10493
Closed

Feature flags to disable docs in metadata #9235

xlc opened this issue Jun 29, 2021 · 4 comments · Fixed by #10493
Labels
J0-enhancement An additional feature request.

Comments

@xlc
Copy link
Contributor

xlc commented Jun 29, 2021

Docs in metadata is useful for development purpose but I see no reason why it needs to be exposed for mainnet. We want to keep the wasm as small as possible while having good doc comments coverage.

Should have a way to exclude of the docs in metadata.

@bkchr bkchr added the J0-enhancement An additional feature request. label Jun 30, 2021
@bkchr bkchr added this to Backlog in Runtime via automation Jun 30, 2021
@gui1117
Copy link
Contributor

gui1117 commented Dec 15, 2021

there also was the idea of putting only the hash of the metadata in the wasm-blob instead of the full metadata. And instead distribute the metadata offchain.

The other advantage of having just the hash on chain is that currently building the metadata in wasm takes some time (it was a regression when we introduced the last metadata with full type info). So querying it takes some time. While fetching the hash would be faster.

Should we superseed this proposal with just having the hash of metadata on chain ?

Maybe @ascjones can give more opinion ?

@xlc
Copy link
Contributor Author

xlc commented Dec 15, 2021

Remove docs will be an easy and quick short term solution. And we can also discuss in parallel on what will be the right long term solution.

@ascjones
Copy link
Contributor

I agree that the docs shouldn't all be stored in the metadata. Would need to still make it easy to produce the docs for UIs cc @jacogr.

Existing work: paritytech/frame-metadata#21, and also paritytech/scale-info#120 which reduces the docs slightly.

I'm quite busy at the moment so not sure I will get around to following up on these this year though. Happy to review any contributions though.

@gui1117
Copy link
Contributor

gui1117 commented Dec 15, 2021

ok I also open this PR to allow to remove the forcing of capturing docs on some FRAME types, and also makes doc for storage and constant empty:
#10493

Runtime automation moved this from Backlog to Done Jan 17, 2022
@shawntabrizi shawntabrizi moved this from Done to Archive in Runtime Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
4 participants