Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
asset-hub-rococo: genesis config presets added #3996
asset-hub-rococo: genesis config presets added #3996
Changes from all commits
b9b5455
5d1fa2b
38f67dd
9bc943c
769fc9d
f3e7e4d
0df7dc5
6db7077
7e82cae
fe71694
362d8a2
e7dac38
ccdfe51
13f411d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this comment and naming, why exactly will this change to a tuple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved that function from other place w/o thinking too much about it:
https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs#L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we not using the concrete
GenesisConfig
type here? And then transform this into a json?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A preset is meant to be patch. This is the only reason.
If
GenesisConfig
struct would be used here, then the preset would contain all the fields of the genesis config. That would be less convenient / a little harder to read when displaying presets with some external tools (e.g.chain-spec-builder
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has previously been called "Live", any reason for the change to genesis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seadanda Thanks for spotting this. I took the name from here (and I know it is far from being perfect) :
polkadot-sdk/cumulus/polkadot-parachain/src/command.rs
Lines 171 to 172 in 6daa939
But I am open to any other name. Should I call it
"live"
?I am not sure what is purpose of this particular config.
ps. I did not notice
Live
name anywhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this at all?
live
andgenesis
are really not that expressive names...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean I assume it is for generating the gensis of the live networks, but yeah we probably don't need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Live
is what I had seen along withLocal
andDevelopment
for theChainType
sI also am not too sure what that specific config is for. Is that the only place this preset will be used? Maybe my reasoning for live is actually wrong then here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually preset names here are simply reflecting the names of predefined chain-specs exported by
polkadot-parachain
binary which are:see code here:
https://github.com/paritytech/polkadot-sdk/blob/09035a7d5d14fc3f2df3db304cd0fcc8fc9ed27b/cumulus/polkadot-parachain/src/chain_spec/mod.rs#L117C1-L120C90
This one:
"asset-hub-rococo-genesis"
, actually is aChainType::Live
, so I can rename it. But it is also not very informative name. Not sure what is the purpose of each chain-spec flavor.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I propose to keep it for compatibility reasons, we can always remove them in future.
I also would prefer the keep
"genesis"
name to allow easy mapping to corresponding chain-spec name,At some point we will be removing predefined (e.g. "asset-hub-rococo-dev|local|genesis") chain spec flavors from the omni-node. We could remove unused presets at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kianenigma what are your thoughts on this?