-
Notifications
You must be signed in to change notification settings - Fork 14
[Trappist on Rococo] Add pallet for maintenance mode #144
Comments
I have analyzed both pallets and my vote goes for Moonbeam since seems to be more generic and better structured. It also contains XCMP handles. |
Maintenance mode pallet specThe pallet logic itself will be very basic and it will just expose two extrinsics that will handle the on/off property for the maintenance mode. But the specific part goes in the Runtime Call Filtering (
|
@hbulgarini Looks good, thanks for spec-ing this out before. |
impl<T: Config> Contains<T::RuntimeCall> for Pallet<T> {
fn contains(call: &T::RuntimeCall) -> bool {
if MaintenanceMode::<T>::get() {
T::FilteredCalls::contains(call)
} else {
return false; // <-- should be `true` here if you are whitelisting
}
}
} |
Would it be useful to be able to select which pallets/calls are whitelisted when the Lockdown mode is active? This feature would enable us to gradually enable pallets during testing and isolate any problematic pallets for individual testing purposes. By selectively choosing which pallets are allowed in the whitelist, we can thoroughly test the node as we progressively enable more pallets. I was just thinking about it, but I'm not fully sure how much extra value it would provide to the pallet. |
We already do for this pallet: https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/impls.rs#L76 However i think that what you want to have based in your comments is the functionality of the Proxy pallet. Here you have an example: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemine/src/lib.rs#L386 |
Add a pallet to Trappist's runtime to allow for a maintenance (aka emergency) mode.
Moonbeam and Acala, among others, have a similar feature.
The text was updated successfully, but these errors were encountered: