I have a running chain which was on polkadot-v0.9.30
and updated all the libraries on to polkadot-v0.9.42
No error found while uploading but got error after updating
panicked at 'Sensible defaults are tested to be valid; qed: <wasm:stripped>'
The error originates from
/// Create a sensible default weights system given only expected maximal block weight and the
/// ratio that `Normal` extrinsics should occupy.
///
/// Assumptions:
/// - Average block initialization is assumed to be `10%`.
/// - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)
pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -> Self {
let normal_weight = normal_ratio * expected_block_weight;
Self::builder()
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = normal_weight.into();
})
.for_class(DispatchClass::Operational, |weights| {
weights.max_total = expected_block_weight.into();
weights.reserved = (expected_block_weight - normal_weight).into();
})
.avg_block_initialization(Perbill::from_percent(10))
.build()
.expect("Sensible defaults are tested to be valid; qed")
2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: <wasm:stripped>', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9
2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
WASM backtrace:
0: 0xfa66b - <unknown>!rust_begin_unwind
1: 0x2df7 - <unknown>!core::panicking::panic_fmt::h6d1629d4208ae76c
2: 0x3198 - <unknown>!core::result::unwrap_failed::h8ef12658cee03bf1
3: 0xe0dc - <unknown>!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d
4: 0x70937 - <unknown>!<pallet_scheduler::pallet::Pallet<T> as frame_support::traits::hooks::OnInitialize<<T as frame_system::pallet::Config>::BlockNumber>>::on_initialize::h4b32587c5fd765a6
5: 0x91420 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::hffb3eafa82bbd60b
6: 0xa66d5 - <unknown>!Core_initialize_block
How to fix this issue ? or is there any guidance around this ?
Changes made for version updates
sp_consensus_grandpa and sc_consensus_grandpa
removed
#[pallet::generate_store(pub(super) trait Store)]
since its no longer supportingAdded #[pallet::call_index()]
Changed
fn create_verifiable_credential() -> Weight { Weight::from_ref_time(10_000_000_u64)
tofn revoke_did_document() -> Weight { Weight::from_parts(10_000_000_u64, 1600) }
In runtime/build.rs changed to
#[cfg(feature = "std")]
{
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.build();
}
Those were the some of significant changes
Did not crash the process, update went smoothly , the error message keeps popping up and blocks are not finalising
This question totally unrelated with construct_runtime_integrity_test failing. since this does not occur in tests and happens after successful runtime update