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

Add genesis configuration to Initializer #1208

Closed
rphmeier opened this issue Jun 6, 2020 · 3 comments
Closed

Add genesis configuration to Initializer #1208

rphmeier opened this issue Jun 6, 2020 · 3 comments
Labels
S1-implement PR/Issue is in the implementation stage
Milestone

Comments

@rphmeier
Copy link
Contributor

rphmeier commented Jun 6, 2020

The initializer module is responsible for coordinating between other modules for block initialization, finalization, and session changes.

Genesis configuration can also be managed by the initializer, calling into functions on each of its managed modules.

It should be setting:

  • Configuration: Initial config
  • Paras: Initial parachains
  • Paras: Initial parathreads
  • Scheduler: Initial validators and validator groups

This can be implemented in the Initializer by having an add_extra_genesis block in the decl_storage invocation. One viable way to implement this add_extra_genesis block is to call bookkeeping methods on modules (e.g. Paras::schedule_para_initialization and Configuration::set_* methods), then prepare a SessionChangeNotification and call initializer_on_new_session for each module.

@rphmeier rphmeier added Q2-easy S1-implement PR/Issue is in the implementation stage labels Jun 6, 2020
@rphmeier rphmeier added this to the Shady Grove milestone Jun 6, 2020
@drahnr drahnr self-assigned this Jun 8, 2020
@rphmeier
Copy link
Contributor Author

I've just noticed that session::OneSessionHandler, which the initializer implements, also provides an on_genesis_session hook, which could be used to implement this functionality as well.

That would mean less redundancy in the genesis configuration, as it would all stem from session anyway.

@rphmeier
Copy link
Contributor Author

gonna punt this a bit more since I'm not sure it's actually useful or makes sense.

@rphmeier rphmeier modified the milestones: White Flint, Grosvenor Jul 31, 2020
@drahnr drahnr removed their assignment Aug 10, 2020
@rphmeier
Copy link
Contributor Author

Not sure if or how badly we need this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S1-implement PR/Issue is in the implementation stage
Projects
None yet
Development

No branches or pull requests

2 participants