substrate
substrate copied to clipboard
Adding CallFilter to pallet-utility.
Description
Adding CallFilter to pallet-utility.
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:
- For Root Origin, filtering is disabled.
- For Signed Origin, the frame_support::traits::Contains::contains method is used. If the result is true, then sp_runtime::traits::Dispatchable::dispatch is called, otherwise the error frame_system::Error::CallFiltered is returned.
-- Polkadot companion: https://github.com/paritytech/polkadot/pull/6827 Cumulus companion: https://github.com/paritytech/cumulus/pull/2283
User @bugrazoid, please sign the CLA here.
Can you provide some context on why this is required?
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.
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.
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
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.
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.