diff --git a/polkadot/runtime/common/src/attestations.rs b/polkadot/runtime/common/src/attestations.rs index b493c10cfc..58b90acce5 100644 --- a/polkadot/runtime/common/src/attestations.rs +++ b/polkadot/runtime/common/src/attestations.rs @@ -131,7 +131,7 @@ decl_module! { type Error = Error; /// Provide candidate receipts for parachains, in ascending order by id. - #[weight = frame_support::weights::SimpleDispatchInfo::default()] + #[weight = frame_support::weights::SimpleDispatchInfo::FixedMandatory(10_000)] fn more_attestations(origin, _more: MoreAttestations) -> DispatchResult { ensure_none(origin)?; ensure!(!DidUpdate::exists(), Error::::TooManyAttestations); diff --git a/polkadot/runtime/common/src/parachains.rs b/polkadot/runtime/common/src/parachains.rs index 11f1ac5e60..728277b5eb 100644 --- a/polkadot/runtime/common/src/parachains.rs +++ b/polkadot/runtime/common/src/parachains.rs @@ -399,7 +399,7 @@ decl_module! { type Error = Error; /// Provide candidate receipts for parachains, in ascending order by id. - #[weight = SimpleDispatchInfo::FixedNormal(1_000_000)] + #[weight = SimpleDispatchInfo::FixedMandatory(1_000_000)] pub fn set_heads(origin, heads: Vec) -> DispatchResult { ensure_none(origin)?; ensure!(!::exists(), Error::::TooManyHeadUpdates); diff --git a/polkadot/validation/src/block_production.rs b/polkadot/validation/src/block_production.rs index 2ba7881962..e8d6c85925 100644 --- a/polkadot/validation/src/block_production.rs +++ b/polkadot/validation/src/block_production.rs @@ -277,7 +277,16 @@ impl CreateProposalData where { let inherents = runtime_api.inherent_extrinsics(&self.parent_id, inherent_data)?; for inherent in inherents { - block_builder.push(inherent)?; + match block_builder.push(inherent) { + Err(sp_blockchain::Error::ApplyExtrinsicFailed(sp_blockchain::ApplyExtrinsicFailed::Validity(e))) + if e.exhausted_resources() => { + warn!("⚠️ Dropping non-mandatory inherent from overweight block."); + } + Err(e) => { + warn!("❗️ Inherent extrinsic returned unexpected error: {}. Dropping.", e); + } + Ok(_) => {} + } } let mut unqueue_invalid = Vec::new();