mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
fix: 🩹 add mandatory extrinsics to safe mode whitelisted calls (#265)
# Fix: Safe Mode Whitelisted Calls - enable block production
## Problem
The safe mode whitelist was missing critical runtime calls needed for
block production, generating this error:
```
2025-10-29 17:29:48 Proposing failed: Import failed: Extrinsic is not valid: TransactionValidityError::Invalid(InvalidTransaction::BadMandatory)
```
The SafeMode filter needs to include all RuntimeCalls that have
inherents marked as `DispatchClass::Mandatory`, as you can see
[here](bbc435c766/substrate/frame/executive/src/lib.rs (L806)).
If a single inherent is missing the whole block will not be valid,
causing the chain to stall.
## Solution
Bisect all the calls to find the culprit, until find it was the pallet
Randomness. I included it in `SafeModeWhitelistedCalls` and blocks are
being produced in SafeMode.
This commit is contained in:
parent
7c8227f1ab
commit
e079cdc404
3 changed files with 9 additions and 3 deletions
|
|
@ -236,7 +236,7 @@ impl Contains<RuntimeCall> for NormalCallFilter {
|
|||
}
|
||||
|
||||
/// Calls that can bypass the safe-mode pallet.
|
||||
/// These calls are essential for emergency governance and system maintenance.
|
||||
/// These calls are essential for emergency governance, system maintenance, and basic operation.
|
||||
pub struct SafeModeWhitelistedCalls;
|
||||
impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
|
|
@ -257,6 +257,8 @@ impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
|||
RuntimeCall::Referenda(_) => true,
|
||||
RuntimeCall::TechnicalCommittee(_) => true,
|
||||
RuntimeCall::TreasuryCouncil(_) => true,
|
||||
// Block production - needed to continue producing blocks in safe mode
|
||||
RuntimeCall::Randomness(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ impl Contains<RuntimeCall> for NormalCallFilter {
|
|||
}
|
||||
|
||||
/// Calls that can bypass the safe-mode pallet.
|
||||
/// These calls are essential for emergency governance and system maintenance.
|
||||
/// These calls are essential for emergency governance, system maintenance, and basic operation.
|
||||
pub struct SafeModeWhitelistedCalls;
|
||||
impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
|
|
@ -257,6 +257,8 @@ impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
|||
RuntimeCall::Referenda(_) => true,
|
||||
RuntimeCall::TechnicalCommittee(_) => true,
|
||||
RuntimeCall::TreasuryCouncil(_) => true,
|
||||
// Block production - needed to continue producing blocks in safe mode
|
||||
RuntimeCall::Randomness(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ impl Contains<RuntimeCall> for NormalCallFilter {
|
|||
}
|
||||
|
||||
/// Calls that can bypass the safe-mode pallet.
|
||||
/// These calls are essential for emergency governance and system maintenance.
|
||||
/// These calls are essential for emergency governance, system maintenance, and basic operation.
|
||||
pub struct SafeModeWhitelistedCalls;
|
||||
impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
||||
fn contains(call: &RuntimeCall) -> bool {
|
||||
|
|
@ -257,6 +257,8 @@ impl Contains<RuntimeCall> for SafeModeWhitelistedCalls {
|
|||
RuntimeCall::Referenda(_) => true,
|
||||
RuntimeCall::TechnicalCommittee(_) => true,
|
||||
RuntimeCall::TreasuryCouncil(_) => true,
|
||||
// Block production - needed to continue producing blocks in safe mode
|
||||
RuntimeCall::Randomness(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue