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

Allow genesis presets to be patched #7748

Open
clangenb opened this issue Feb 28, 2025 · 3 comments
Open

Allow genesis presets to be patched #7748

clangenb opened this issue Feb 28, 2025 · 3 comments
Labels
I4-refactor Code needs refactoring.

Comments

@clangenb
Copy link
Contributor

clangenb commented Feb 28, 2025

The current presets are not very flexible. The entire thing is hardcoded, it would be good if we can add minor changes on top of them like the para-id, see #7481 (comment).

In the kitchensink-node we would also benefit from tweaking the staking set up on top of the base genesis preset, see #7741 (comment).

cc @michalkucharczyk

@michalkucharczyk
Copy link
Contributor

michalkucharczyk commented Feb 28, 2025

Yeah, ideally if presets/more patches could be stacked.

To be more precise in (#7481 (comment)) I meant support for the following scenario:

GenericChainSpec::builder(...)
  .with_genesis_config_preset_name("dev")
  .with_genesis_config_patch(patch1)
  .with_genesis_config_patch(patch2)
  .with_genesis_config_patch(patch3)

Should be relatively easy to add. Internally it should use GenesisConfigBuilderRuntimeCaller::get_named_preset + json_patch::merge. Probably some refactoring around GenesisBuildAction would be needed (new action or maybe preset variant could be extended with optional patches 🤔 ).

@bkchr
Copy link
Member

bkchr commented Feb 28, 2025

@clangenb do you want to work on this?

@bkchr bkchr added the I4-refactor Code needs refactoring. label Feb 28, 2025
@clangenb
Copy link
Contributor Author

Yes, this sounds indeed like an interesting task to work on.

However, I would like to frankly mention that I will start asking for tips. My fellowship Rank I salary is miserable considering the amount of work I have been doing lately, and the tips have been scarce. ;)

github-merge-queue bot pushed a commit that referenced this issue Mar 3, 2025
Last subtask from
#5704.

Closes #5704.

The substrate-node is not 100% free of the native runtime yet, but the
code has become less convoluted and better documented. The final cleanup
needs #7748.

---------

Co-authored-by: Michal Kucharczyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-refactor Code needs refactoring.
Projects
None yet
Development

No branches or pull requests

3 participants