diff --git a/bridges/bin/rialto-parachain/node/src/service.rs b/bridges/bin/rialto-parachain/node/src/service.rs index 7e516ed56825e..f21a2f65e795b 100644 --- a/bridges/bin/rialto-parachain/node/src/service.rs +++ b/bridges/bin/rialto-parachain/node/src/service.rs @@ -502,8 +502,8 @@ pub async fn start_node( keystore, force_authoring, slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), + // We got around 1000ms for proposing + block_proposal_slot_portion: SlotProportion::new(1f32 / 12f32), telemetry, max_block_proposal_slot_portion: None, }, diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 8f45a2a19190d..8d57e99b2972b 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -495,7 +495,7 @@ construct_runtime!( Inclusion: polkadot_runtime_parachains::inclusion::{Pallet, Call, Storage, Event}, ParasInherent: polkadot_runtime_parachains::paras_inherent::{Pallet, Call, Storage, Inherent}, Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage}, - Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config}, + Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned}, Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage}, Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage}, Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event}, diff --git a/bridges/bin/rialto/runtime/src/parachains.rs b/bridges/bin/rialto/runtime/src/parachains.rs index 8ceb27140f004..f2542cf032952 100644 --- a/bridges/bin/rialto/runtime/src/parachains.rs +++ b/bridges/bin/rialto/runtime/src/parachains.rs @@ -21,7 +21,7 @@ use crate::{ RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic, }; -use frame_support::{parameter_types, traits::KeyOwnerProofSystem}; +use frame_support::{parameter_types, traits::KeyOwnerProofSystem, weights::Weight}; use frame_system::EnsureRoot; use polkadot_primitives::v4::{ValidatorId, ValidatorIndex}; use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots}; @@ -106,11 +106,57 @@ parameter_types! { impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type WeightInfo = parachains_paras::TestWeightInfo; + type WeightInfo = ParasWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; } +/// Test weight for the `Paras` pallet. +/// +/// We can't use `parachains_paras::TestWeightInfo` anymore, because it returns `Weight::MAX` +/// where we need some real-world weights. We'll use zero weights here, though to avoid +/// adding benchmarks to Rialto runtime. +pub struct ParasWeightInfo; + +impl parachains_paras::WeightInfo for ParasWeightInfo { + fn force_set_current_code(_c: u32) -> Weight { + Weight::zero() + } + fn force_set_current_head(_s: u32) -> Weight { + Weight::zero() + } + fn force_schedule_code_upgrade(_c: u32) -> Weight { + Weight::zero() + } + fn force_note_new_head(_s: u32) -> Weight { + Weight::zero() + } + fn force_queue_action() -> Weight { + Weight::zero() + } + fn add_trusted_validation_code(_c: u32) -> Weight { + Weight::zero() + } + fn poke_unused_validation_code() -> Weight { + Weight::zero() + } + fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { + Weight::zero() + } + fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { + Weight::zero() + } + fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { + Weight::zero() + } + fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { + Weight::zero() + } + fn include_pvf_check_statement() -> Weight { + Weight::zero() + } +} + impl parachains_paras_inherent::Config for Runtime { type WeightInfo = parachains_paras_inherent::TestWeightInfo; }