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

Move XCM runtime configurations into their own files #4644

Merged
merged 4 commits into from
Jan 11, 2022

Conversation

KiChjang
Copy link
Contributor

This is purely a refactoring of XCM config code.

Since misconfigured XCM settings easily causes attacks, I thought that it may be useful to move its configuration into its own file for easier auditing and maintainability.

@KiChjang KiChjang added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Dec 31, 2021
@shawntabrizi
Copy link
Member

We should do this for the runtime in general, across all the pallets.

SignedToAccountId32<Origin, AccountId, PolkadotNetwork>,
);

impl pallet_xcm::Config for Runtime {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally rather have this block in the main runtime file, and all the other noisy parameter_types! in a separate file. This allows you to quickly skim the runtime configs with 1 layer of observability and no further. For example, you will know the name of the type parameters, but not their value, and their name could already say a lot of about them.

But this format is also fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually think this content in a separate file is the more natural thing to do. I think that we should make files where configurations with one another are relevant, so all democracy / governance configs in one file. But keep separate things which are not related

@KiChjang
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 12ffb56 into master Jan 11, 2022
@paritytech-processbot paritytech-processbot bot deleted the kckyeung/refactor-xcm-config branch January 11, 2022 09:09
Wizdave97 pushed a commit to ComposableFi/polkadot that referenced this pull request Feb 3, 2022
* Move XCM runtime configurations into their own files

* Update copyright year

* Fix compilation errors

* Import XCM types in westend runtime unit tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants