-
Notifications
You must be signed in to change notification settings - Fork 799
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
[parachain-template] pallet configurations into mod configs
#3809
[parachain-template] pallet configurations into mod configs
#3809
Conversation
mod configs
mod configs
mod configs
mod configs
mod configs
The CI pipeline was cancelled due to failure one of the required jobs. |
@kianenigma ping :) |
/// [`ParaChainDefaultConfig`](`struct@frame_system::config_preludes::ParaChainDefaultConfig`), | ||
/// but overridden as needed. | ||
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)] | ||
impl frame_system::Config for Runtime { |
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.
Are all the ones that are mentioned here actually overwriting something? type Hash
, type BlockWeight
etc should be the same in ParachainDefaultConfig
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 is a good step, but if interested, I would suggest you to:
- provide sensible defaults for
Solochain
andParachain
for:balances
,system
,timestamp
,transaction-payment
,sudo
. - Update all 3 templates to use these defaults.
- @gupnik can provide supervision.
8d30534
This PR introduces a refactor of the parachain runtime configuration by consolidating all pallet configurations into a new module named `configs`. This change aims to improve the readability and maintainability of the runtime configuration by centralizing all configuration parameters. ## Changes - **Creation of `configs.rs`**: A new file `configs.rs` has been added under `templates/parachain/runtime/src/`, containing all the runtime configurations previously scattered across `lib.rs`. - **Refactoring of `lib.rs`**: The `lib.rs` file has been significantly slimmed down by removing the inline pallet configurations and importing them from `configs.rs` instead. - **Optimization of Import Statements**: Reorganized import statements to clarify the runtime's dependency structure. ### Benefits - **Improved Readability**: With configurations being centralized, developers can now easily locate and review runtime parameters without navigating through the `lib.rs` file. This refactor does not introduce any changes to the runtime logic but improves the project structure for better development experience. --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This PR introduces a refactor of the parachain runtime configuration by consolidating all pallet configurations into a new module named `configs`. This change aims to improve the readability and maintainability of the runtime configuration by centralizing all configuration parameters. ## Changes - **Creation of `configs.rs`**: A new file `configs.rs` has been added under `templates/parachain/runtime/src/`, containing all the runtime configurations previously scattered across `lib.rs`. - **Refactoring of `lib.rs`**: The `lib.rs` file has been significantly slimmed down by removing the inline pallet configurations and importing them from `configs.rs` instead. - **Optimization of Import Statements**: Reorganized import statements to clarify the runtime's dependency structure. ### Benefits - **Improved Readability**: With configurations being centralized, developers can now easily locate and review runtime parameters without navigating through the `lib.rs` file. This refactor does not introduce any changes to the runtime logic but improves the project structure for better development experience. --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
…tech#3809) This PR introduces a refactor of the parachain runtime configuration by consolidating all pallet configurations into a new module named `configs`. This change aims to improve the readability and maintainability of the runtime configuration by centralizing all configuration parameters. ## Changes - **Creation of `configs.rs`**: A new file `configs.rs` has been added under `templates/parachain/runtime/src/`, containing all the runtime configurations previously scattered across `lib.rs`. - **Refactoring of `lib.rs`**: The `lib.rs` file has been significantly slimmed down by removing the inline pallet configurations and importing them from `configs.rs` instead. - **Optimization of Import Statements**: Reorganized import statements to clarify the runtime's dependency structure. ### Benefits - **Improved Readability**: With configurations being centralized, developers can now easily locate and review runtime parameters without navigating through the `lib.rs` file. This refactor does not introduce any changes to the runtime logic but improves the project structure for better development experience. --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This PR introduces a refactor of the parachain runtime configuration by consolidating all pallet configurations into a new module named
configs
. This change aims to improve the readability and maintainability of the runtime configuration by centralizing all configuration parameters.Changes
configs.rs
: A new fileconfigs.rs
has been added undertemplates/parachain/runtime/src/
, containing all the runtime configurations previously scattered acrosslib.rs
.lib.rs
: Thelib.rs
file has been significantly slimmed down by removing the inline pallet configurations and importing them fromconfigs.rs
instead.Benefits
lib.rs
file.This refactor does not introduce any changes to the runtime logic but improves the project structure for better development experience.