diff --git a/Cargo.lock b/Cargo.lock index cfe6899c30..8a67d85197 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1686,6 +1686,7 @@ dependencies = [ "frame-support", "frame-system", "hex-literal 0.2.1", + "impl-trait-for-tuples", "lazy_static", "log", "pallet-balances", @@ -1731,6 +1732,22 @@ dependencies = [ "sp-std", ] +[[package]] +name = "cumulus-pallet-solo-to-para" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "pallet-sudo", + "parity-scale-codec", + "polkadot-primitives", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" @@ -1790,7 +1807,6 @@ name = "cumulus-primitives-core" version = "0.1.0" dependencies = [ "frame-support", - "impl-trait-for-tuples", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", @@ -9850,6 +9866,7 @@ name = "seedling-runtime" version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", + "cumulus-pallet-solo-to-para", "cumulus-primitives-core", "frame-executive", "frame-support", diff --git a/pallets/parachain-system/Cargo.toml b/pallets/parachain-system/Cargo.toml index 25a8980dd6..ec4391cf53 100644 --- a/pallets/parachain-system/Cargo.toml +++ b/pallets/parachain-system/Cargo.toml @@ -35,6 +35,7 @@ scale-info = { version = "1.0.0", default-features = false, features = ["derive" serde = { version = "1.0.132", optional = true, features = ["derive"] } log = { version = "0.4.14", default-features = false } environmental = { version = "1.1.2", default-features = false } +impl-trait-for-tuples = "0.2.1" [dev-dependencies] # Other Dependencies diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index 795f6e29aa..cf0446f125 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -30,7 +30,7 @@ use codec::Encode; use cumulus_primitives_core::{ relay_chain, AbridgedHostConfiguration, ChannelStatus, CollationInfo, DmpMessageHandler, - GetChannelInfo, InboundDownwardMessage, InboundHrmpMessage, MessageSendError, OnValidationData, + GetChannelInfo, InboundDownwardMessage, InboundHrmpMessage, MessageSendError, OutboundHrmpMessage, ParaId, PersistedValidationData, UpwardMessage, UpwardMessageSender, XcmpMessageHandler, XcmpMessageSource, }; @@ -105,7 +105,7 @@ pub mod pallet { type Event: From> + IsType<::Event>; /// Something which can be notified when the validation data is set. - type OnValidationData: OnValidationData; + type OnSystemEvent: OnSystemEvent; /// Returns the parachain ID we are running with. type SelfParaId: Get; @@ -329,6 +329,7 @@ pub mod pallet { let validation_code = >::take(); Self::put_parachain_code(&validation_code); + ::on_validation_code_applied(); Self::deposit_event(Event::ValidationFunctionApplied(vfp.relay_parent_number)); }, Some(relay_chain::v1::UpgradeGoAhead::Abort) => { @@ -354,7 +355,7 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); - ::on_validation_data(&vfp); + ::on_validation_data(&vfp); // TODO: This is more than zero, but will need benchmarking to figure out what. let mut total_weight = 0; @@ -397,7 +398,7 @@ pub mod pallet { code: Vec, ) -> DispatchResultWithPostInfo { Self::validate_authorized_upgrade(&code[..])?; - Self::set_code_impl(code)?; + Self::schedule_code_upgrade(code)?; AuthorizedUpgrade::::kill(); Ok(Pays::No.into()) } @@ -883,7 +884,7 @@ impl Pallet { } /// The implementation of the runtime upgrade functionality for parachains. - fn set_code_impl(validation_function: Vec) -> DispatchResult { + pub fn schedule_code_upgrade(validation_function: Vec) -> DispatchResult { // Ensure that `ValidationData` exists. We do not care about the validation data per se, // but we do care about the [`UpgradeRestrictionSignal`] which arrives with the same inherent. ensure!(>::exists(), Error::::ValidationDataNotAvailable,); @@ -949,7 +950,7 @@ pub struct ParachainSetCode(sp_std::marker::PhantomData); impl frame_system::SetCode for ParachainSetCode { fn set_code(code: Vec) -> DispatchResult { - Pallet::::set_code_impl(code) + Pallet::::schedule_code_upgrade(code) } } @@ -1007,6 +1008,21 @@ pub trait CheckInherents { ) -> frame_support::inherent::CheckInherentsResult; } +/// Something that should be informed about system related events. +/// +/// This includes events like [`on_validation_data`](Self::on_validation_data) that is being +/// called when the parachain inherent is executed that contains the validation data. +/// Or like [`on_validation_code_applied`](Self::on_validation_code_applied) that is called +/// when the new validation is written to the state. This means that +/// from the next block the runtime is being using this new code. +#[impl_trait_for_tuples::impl_for_tuples(30)] +pub trait OnSystemEvent { + /// Called in each blocks once when the validation data is set by the inherent. + fn on_validation_data(data: &PersistedValidationData); + /// Called when the validation code is being applied, aka from the next block on this is the new runtime. + fn on_validation_code_applied(); +} + /// Implements [`BlockNumberProvider`] that returns relay chain block number fetched from /// validation data. /// NTOE: When validation data is not available (e.g. within on_initialize), 0 will be returned. diff --git a/pallets/parachain-system/src/tests.rs b/pallets/parachain-system/src/tests.rs index 055d8be45d..40e85f0c72 100755 --- a/pallets/parachain-system/src/tests.rs +++ b/pallets/parachain-system/src/tests.rs @@ -100,7 +100,7 @@ impl frame_system::Config for Test { } impl Config for Test { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = ParachainId; type OutboundXcmpMessageSource = FromThreadLocal; type DmpMessageHandler = SaveIntoThreadLocal; diff --git a/pallets/solo-to-para/Cargo.toml b/pallets/solo-to-para/Cargo.toml new file mode 100644 index 0000000000..521e650d35 --- /dev/null +++ b/pallets/solo-to-para/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "cumulus-pallet-solo-to-para" +version = "0.1.0" +authors = ["Parity Technologies "] +edition = "2021" +description = "Adds functionality to migrate from a Solo to a Parachain" + +[dependencies] +# Substrate dependencies +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } + +# Cumulus dependencies +cumulus-pallet-parachain-system = { default-features = false, path = "../parachain-system" } +cumulus-primitives-core = { path = "../../primitives/core", default-features = false } + +# Polkadot dependecies +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } + +# Other Dependencies +codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"]} +scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } + +[features] +default = [ "std" ] +std = [ + "codec/std", + "scale-info/std", + "pallet-sudo/std", + "cumulus-pallet-parachain-system/std", + "cumulus-primitives-core/std", + "polkadot-primitives/std", + "frame-support/std", + "sp-runtime/std", + "sp-std/std", + "frame-system/std", +] diff --git a/pallets/solo-to-para/src/lib.rs b/pallets/solo-to-para/src/lib.rs new file mode 100644 index 0000000000..1893dfb9d1 --- /dev/null +++ b/pallets/solo-to-para/src/lib.rs @@ -0,0 +1,181 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +#![cfg_attr(not(feature = "std"), no_std)] + +use codec::{Decode, Encode}; +use cumulus_pallet_parachain_system as parachain_system; +use frame_support::{dispatch::DispatchResult, pallet_prelude::*, weights::DispatchInfo}; +use frame_system::pallet_prelude::*; +pub use pallet::*; +use polkadot_primitives::v1::PersistedValidationData; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{DispatchInfoOf, Dispatchable, SignedExtension}, + transaction_validity::{ + InvalidTransaction, TransactionLongevity, TransactionPriority, TransactionValidity, + TransactionValidityError, ValidTransaction, + }, +}; +use sp_std::{prelude::*, vec::Vec}; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::config] + pub trait Config: + frame_system::Config + parachain_system::Config + pallet_sudo::Config + { + type Event: From + IsType<::Event>; + } + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + pub struct Pallet(_); + + /// In case of a scheduled migration, this storage field contains the custom head data to be applied. + #[pallet::storage] + pub(super) type PendingCustomValidationHeadData = + StorageValue<_, Vec, OptionQuery>; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// The custom validation head data has been scheduled to apply. + CustomValidationHeadDataStored, + /// The custom validation head data was applied as of the contained relay chain block number. + CustomValidationHeadDataApplied, + } + + #[pallet::error] + pub enum Error { + /// CustomHeadData is not stored in storage. + NoCustomHeadData, + } + + #[pallet::call] + impl Pallet { + #[pallet::weight(0)] + pub fn schedule_migration( + origin: OriginFor, + code: Vec, + head_data: Vec, + ) -> DispatchResult { + ensure_root(origin)?; + + parachain_system::Pallet::::schedule_code_upgrade(code)?; + Self::store_pending_custom_validation_head_data(head_data); + Ok(()) + } + } + + impl Pallet { + /// Set a custom head data that should only be applied when upgradeGoAheadSignal from + /// the Relay Chain is GoAhead + fn store_pending_custom_validation_head_data(head_data: Vec) { + PendingCustomValidationHeadData::::put(head_data); + Self::deposit_event(Event::CustomValidationHeadDataStored); + } + + /// Set pending custom head data as head data that will be returned by `validate_block`. on the relay chain. + fn set_pending_custom_validation_head_data() { + if let Some(head_data) = >::take() { + parachain_system::Pallet::::set_custom_validation_head_data(head_data); + Self::deposit_event(Event::CustomValidationHeadDataApplied); + } + } + } + + impl parachain_system::OnSystemEvent for Pallet { + fn on_validation_data(_data: &PersistedValidationData) {} + fn on_validation_code_applied() { + crate::Pallet::::set_pending_custom_validation_head_data(); + } + } + + /// Ensure that signed transactions are only valid if they are signed by root. + #[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo, Default)] + #[scale_info(skip_type_params(T))] + pub struct CheckSudo(sp_std::marker::PhantomData); + + impl CheckSudo { + pub fn new() -> Self { + Self(Default::default()) + } + } + + impl sp_std::fmt::Debug for CheckSudo { + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + write!(f, "CheckSudo") + } + + #[cfg(not(feature = "std"))] + fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + Ok(()) + } + } + + impl SignedExtension for CheckSudo + where + ::Call: Dispatchable, + { + type AccountId = T::AccountId; + type Call = ::Call; + type AdditionalSigned = (); + type Pre = (); + const IDENTIFIER: &'static str = "CheckSudo"; + + fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { + Ok(()) + } + + fn pre_dispatch( + self, + who: &Self::AccountId, + call: &Self::Call, + info: &DispatchInfoOf, + len: usize, + ) -> Result { + Ok(self.validate(who, call, info, len).map(|_| ())?) + } + + fn validate( + &self, + who: &Self::AccountId, + _call: &Self::Call, + info: &DispatchInfoOf, + _len: usize, + ) -> TransactionValidity { + let root_account = match pallet_sudo::Pallet::::key() { + Some(account) => account, + None => return Err(InvalidTransaction::BadSigner.into()), + }; + + if *who == root_account { + Ok(ValidTransaction { + priority: info.weight as TransactionPriority, + longevity: TransactionLongevity::max_value(), + propagate: true, + ..Default::default() + }) + } else { + Err(InvalidTransaction::BadSigner.into()) + } + } + } +} diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index cd0622d2f8..b94cf234e5 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -98,7 +98,7 @@ impl pallet_balances::Config for Test { impl cumulus_pallet_parachain_system::Config for Test { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = (); type OutboundXcmpMessageSource = XcmpQueue; type DmpMessageHandler = (); diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index 1949fe5e29..cb3fc6db60 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -371,7 +371,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; diff --git a/polkadot-parachains/rococo-parachain/src/lib.rs b/polkadot-parachains/rococo-parachain/src/lib.rs index 94eb03e87a..6d036e13de 100644 --- a/polkadot-parachains/rococo-parachain/src/lib.rs +++ b/polkadot-parachains/rococo-parachain/src/lib.rs @@ -258,7 +258,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; type DmpMessageHandler = DmpQueue; diff --git a/polkadot-parachains/seedling/Cargo.toml b/polkadot-parachains/seedling/Cargo.toml index 5f9c517339..ad5dd7a528 100644 --- a/polkadot-parachains/seedling/Cargo.toml +++ b/polkadot-parachains/seedling/Cargo.toml @@ -32,6 +32,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", default-fea # Cumulus dependencies cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false } +cumulus-pallet-solo-to-para = { path = "../../pallets/solo-to-para", default-features = false } cumulus-primitives-core = { path = "../../primitives/core", default-features = false } [build-dependencies] @@ -62,5 +63,6 @@ std = [ "pallet-balances/std", "parachain-info/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-solo-to-para/std", "cumulus-primitives-core/std", ] diff --git a/polkadot-parachains/seedling/src/lib.rs b/polkadot-parachains/seedling/src/lib.rs index 40d4744549..4906aa6ff7 100644 --- a/polkadot-parachains/seedling/src/lib.rs +++ b/polkadot-parachains/seedling/src/lib.rs @@ -38,7 +38,7 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ construct_runtime, match_type, parameter_types, - traits::{Contains, IsInVec, Randomness}, + traits::{IsInVec, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, DispatchClass, IdentityFee, Weight, @@ -103,23 +103,6 @@ parameter_types! { .build_or_panic(); pub const SS58Prefix: u8 = 42; } - -pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(c: &Call) -> bool { - // Disallow everything that is not set_validation_data or set_code - match c { - Call::ParachainSystem(cumulus_pallet_parachain_system::Call::set_validation_data { - .. - }) => true, - Call::Sudo(pallet_sudo::Call::sudo_unchecked_weight { call: ref x, .. }) => { - matches!(x.as_ref(), &Call::System(frame_system::Call::set_code { .. })) - }, - _ => false, - } - } -} - impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; @@ -151,7 +134,7 @@ impl frame_system::Config for Runtime { type OnNewAccount = (); type OnKilledAccount = (); type DbWeight = (); - type BaseCallFilter = BaseFilter; + type BaseCallFilter = frame_support::traits::Everything; type SystemWeightInfo = (); type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; @@ -165,9 +148,13 @@ impl pallet_sudo::Config for Runtime { type Event = Event; } +impl cumulus_pallet_solo_to_para::Config for Runtime { + type Event = Event; +} + impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = cumulus_pallet_solo_to_para::Pallet; type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = (); type DmpMessageHandler = (); @@ -186,10 +173,12 @@ construct_runtime! { { System: frame_system::{Pallet, Call, Storage, Config, Event}, Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, + ParachainSystem: cumulus_pallet_parachain_system::{ Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, }, ParachainInfo: parachain_info::{Pallet, Storage, Config}, + SoloToPara: cumulus_pallet_solo_to_para::{Pallet, Call, Storage, Event}, } } @@ -221,6 +210,7 @@ pub type SignedExtra = ( frame_system::CheckGenesis, frame_system::CheckEra, frame_system::CheckNonce, + cumulus_pallet_solo_to_para::CheckSudo, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; diff --git a/polkadot-parachains/shell/src/lib.rs b/polkadot-parachains/shell/src/lib.rs index 1580c4b5ec..a00ef0c430 100644 --- a/polkadot-parachains/shell/src/lib.rs +++ b/polkadot-parachains/shell/src/lib.rs @@ -162,7 +162,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = (); type DmpMessageHandler = cumulus_pallet_xcm::UnlimitedDmpExecution; diff --git a/polkadot-parachains/statemine/src/lib.rs b/polkadot-parachains/statemine/src/lib.rs index 0da8de2238..27bf15f88b 100644 --- a/polkadot-parachains/statemine/src/lib.rs +++ b/polkadot-parachains/statemine/src/lib.rs @@ -414,7 +414,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; diff --git a/polkadot-parachains/statemint/src/lib.rs b/polkadot-parachains/statemint/src/lib.rs index d0aedfe125..19b41af4c1 100644 --- a/polkadot-parachains/statemint/src/lib.rs +++ b/polkadot-parachains/statemint/src/lib.rs @@ -426,7 +426,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; diff --git a/polkadot-parachains/westmint/src/lib.rs b/polkadot-parachains/westmint/src/lib.rs index 9b6f179c0c..5193a98c0d 100644 --- a/polkadot-parachains/westmint/src/lib.rs +++ b/polkadot-parachains/westmint/src/lib.rs @@ -412,7 +412,7 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 659ccafdfd..7faddab1a3 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -18,7 +18,6 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default- polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } # Other dependencies -impl-trait-for-tuples = "0.2.1" codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [ "derive" ] } [features] diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 6a9b16d79a..93019c47b7 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -139,12 +139,6 @@ pub enum ServiceQuality { Fast, } -/// A trait which is called when the validation data is set. -#[impl_trait_for_tuples::impl_for_tuples(30)] -pub trait OnValidationData { - fn on_validation_data(data: &PersistedValidationData); -} - /// The parachain block that is created by a collator. /// /// This is send as PoV (proof of validity block) to the relay-chain validators. There it will be diff --git a/scripts/create_seedling_spec.sh b/scripts/create_seedling_spec.sh index 447afe92ae..4e6a8d8641 100755 --- a/scripts/create_seedling_spec.sh +++ b/scripts/create_seedling_spec.sh @@ -29,7 +29,7 @@ sudo=$8 binary="./target/release/polkadot-collator" # build the chain spec we'll manipulate -$binary build-spec --chain seedling > seedling-spec-plain.json +$binary build-spec --disable-default-bootnode --chain seedling > seedling-spec-plain.json # convert runtime to hex cat $runtime_path | od -A n -v -t x1 | tr -d ' \n' > seedling-hex.txt @@ -47,7 +47,7 @@ cat seedling-spec-plain.json | jq --rawfile code seedling-hex.txt '.genesis.runt > edited-seedling-plain.json # build a raw spec -$binary build-spec --chain edited-seedling-plain.json --raw > seedling-spec-raw.json +$binary build-spec --disable-default-bootnode --chain edited-seedling-plain.json --raw > seedling-spec-raw.json # build genesis data $binary export-genesis-state --parachain-id=$para_id --chain seedling-spec-raw.json > seedling-head-data diff --git a/test/runtime/src/lib.rs b/test/runtime/src/lib.rs index ec35f758d5..5685807120 100644 --- a/test/runtime/src/lib.rs +++ b/test/runtime/src/lib.rs @@ -259,7 +259,7 @@ impl pallet_sudo::Config for Runtime { impl cumulus_pallet_parachain_system::Config for Runtime { type SelfParaId = ParachainId; type Event = Event; - type OnValidationData = (); + type OnSystemEvent = (); type OutboundXcmpMessageSource = (); type DmpMessageHandler = (); type ReservedDmpWeight = ();