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

Refactor for AllPalletsWithSystem #378

Open
ghzlatarev opened this issue Feb 3, 2022 · 0 comments
Open

Refactor for AllPalletsWithSystem #378

ghzlatarev opened this issue Feb 3, 2022 · 0 comments
Labels
A-runtime Area: Issues and PRs related to Runtimes C-enhancement Category: An issue proposing an enhancement or a PR with one C-experiment Category: Experimental feature or tool
Milestone

Comments

@ghzlatarev
Copy link
Contributor

ghzlatarev commented Feb 3, 2022

Currently the hook execution order in our construct_runtime! macros is System first then all pallets in reverse order of their declaration defined by AllPalletsReversedWithSystemFirst
We would like to use AllPalletsWithSystem meaning System first and then all pallets in the order they are declared in.
This means we need to shuffle some of our pallets because some of them are coupled and use each other's functions in their own on_initialize hooks. For example Authorship's on_initialize hook uses Session's implementation of find_authorsoSession's on_initializeshould be executed first. There might be other dependencies that need to be considered when shuffling the declarations inconstruct_runtime`
This is the original issue - paritytech/substrate#10043

@ghzlatarev ghzlatarev added the A-runtime Area: Issues and PRs related to Runtimes label Feb 3, 2022
@ghzlatarev ghzlatarev added this to the Future milestone Feb 3, 2022
@ghzlatarev ghzlatarev added C-enhancement Category: An issue proposing an enhancement or a PR with one C-experiment Category: Experimental feature or tool labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: Issues and PRs related to Runtimes C-enhancement Category: An issue proposing an enhancement or a PR with one C-experiment Category: Experimental feature or tool
Projects
None yet
Development

No branches or pull requests

1 participant