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

Adding CallFilter to pallet-utility. #13523

Closed

Conversation

bugrazoid
Copy link

@bugrazoid bugrazoid commented Mar 3, 2023

Description

Adding CallFilter to pallet-utility. Partially resolves paritytech/polkadot-sdk#197

Motivation

The current form of the pallet uses frame_system::Config::BaseCallFilter, which does not allow to disable calls that should not be used in this particular pallet.

Behavior

This PR adds call filtering at the pallet level. Filtering rules are similar to frame_system::Config::BaseCallFilter:

--
Polkadot companion: paritytech/polkadot#6827
Cumulus companion: paritytech/cumulus#2283

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Mar 3, 2023

User @bugrazoid, please sign the CLA here.

@xlc
Copy link
Contributor

xlc commented Mar 3, 2023

Can you provide some context on why this is required?

@bugrazoid
Copy link
Author

Can you provide some context on why this is required?

Similar functionality is already provided in the utility pallet itself: the batch extrinsic can't batch other batches.
It looks reasonable to provide means to prevent other calls from executing in batch, e.g., when a parachain has some other means for batching like Ethereum contracts.

@bugrazoid bugrazoid requested a review from athei as a code owner March 3, 2023 13:45
@dmitry-markin dmitry-markin 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 Mar 6, 2023
@stale
Copy link

stale bot commented Apr 26, 2023

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A3-stale label Apr 26, 2023
@stale stale bot removed the A3-stale label May 3, 2023
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2767975

@bugrazoid bugrazoid marked this pull request as draft May 10, 2023 11:05
@bugrazoid bugrazoid marked this pull request as ready for review May 11, 2023 05:56
@bugrazoid bugrazoid requested a review from a team May 11, 2023 05:56
@juangirini juangirini added the T1-runtime This PR/Issue is related to the topic “runtime”. label May 22, 2023
@stale
Copy link

stale bot commented Jun 21, 2023

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A3-stale label Jun 21, 2023
@@ -100,6 +105,9 @@ pub mod pallet {

/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;

/// Filtering calls.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be worth mentioning that this is applied to inner dispatches of certain calls, and how it related to system's base-call filter.

@stale stale bot removed the A3-stale label Jun 27, 2023
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

While I see some controversy about whether this actually solves anything, it is also harmless. Would be happy to give it a final review once it is up to date again, and CI is green.

@stale
Copy link

stale bot commented Jul 27, 2023

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A3-stale label Jul 27, 2023
@stale stale bot closed this Aug 11, 2023
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. A3-stale 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 T1-runtime This PR/Issue is related to the topic “runtime”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding CallFilter to calling pallets
6 participants