-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add app version to genesis.json #14954
Comments
I think we should create an type AppGenesis struct {
AppVersion string `json:"app_version"`
cmttypes.GenesisDoc
} However, it may be a tiny bit overkilled. |
Out of curiosity, whats the thinking wrt not editing the genesis doc? |
That works too, but we need CometBFT to update the |
Oh that makes sense, in support of getting an application maintained genesis format, rather than the Comet one! |
This seems required to me to decouple ourselves from comet. It's a larger refactor but needed |
@aaronc, in our standup, had a good point: we could store this information in a module too, such a So, does someone else sees a value in an application genesis, and if so, what extra could be stored in an application genesis? Personally, I went this way only to abstract from CometBFT, however, if there is no any use case for the abstraction, going the module way will be simpler. |
I think its a significant value add to get this abstracted away from CometBFT. It lets the SDK specify genesis in a number of different ways, unconstrained by CometBFT's single genesis.json & unmarshalling paradigm. On some potentially simple human parseability improvements that are possible:
But I think more importantly, diverging the format, lets us get more creative with how we want users to be able to specify their chain genesis, in the most natural way, or to make more "intermediary representations". For instance, we can make the chain import & export cycles work off something "minified" (e.g. removing all the string literals in every JSON key), but have easy conversion to/fro the more readable JSON. |
Summary
A frequent bug report we get in Osmosis, is "tried downloading binary + genesis.json, running start, got {very unfriendly error}".
We should add a parameter to genesis.json, indicating the App version its for. Then we can easily give a human friendly error, if it cannot be parsed correctly, and you need to sync / startup via another mechanism.
Problem Definition
Helps mitigate a frequent node operator onboarding problem.
Proposal
Add an AppVersion field in the genesis from export Genesis. Then apps can handle this better in InitGenesis.
The text was updated successfully, but these errors were encountered: