diff --git a/bridges/bin/millau/runtime/build.rs b/bridges/bin/millau/runtime/build.rs index cc865704327d..25e220e46fc3 100644 --- a/bridges/bin/millau/runtime/build.rs +++ b/bridges/bin/millau/runtime/build.rs @@ -21,5 +21,6 @@ fn main() { .with_current_project() .import_memory() .export_heap_base() + .disable_runtime_version_section_check() .build() } diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index 887d516248b2..92dabc9407ce 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -146,6 +146,7 @@ impl_opaque_keys! { } /// This runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("millau-runtime"), impl_name: create_runtime_str!("millau-runtime"), @@ -254,17 +255,15 @@ impl pallet_grandpa::Config for Runtime { mod mmr { use super::Runtime; pub use pallet_mmr::primitives::*; - use sp_runtime::traits::Keccak256; pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hash = ::Output; pub type Hashing = ::Hashing; + pub type Hash = ::Output; } impl pallet_mmr::Config for Runtime { const INDEXING_PREFIX: &'static [u8] = b"mmr"; type Hashing = Keccak256; - type Hash = mmr::Hash; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; @@ -332,7 +331,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/bridges/bin/rialto-parachain/runtime/build.rs b/bridges/bin/rialto-parachain/runtime/build.rs index 65095bd1b7e9..692e270bbbae 100644 --- a/bridges/bin/rialto-parachain/runtime/build.rs +++ b/bridges/bin/rialto-parachain/runtime/build.rs @@ -21,5 +21,6 @@ fn main() { .with_current_project() .export_heap_base() .import_memory() + .disable_runtime_version_section_check() .build() } diff --git a/bridges/bin/rialto-parachain/runtime/src/lib.rs b/bridges/bin/rialto-parachain/runtime/src/lib.rs index d44ae22e17e7..498cdf8a58fd 100644 --- a/bridges/bin/rialto-parachain/runtime/src/lib.rs +++ b/bridges/bin/rialto-parachain/runtime/src/lib.rs @@ -304,7 +304,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/bridges/bin/rialto/node/Cargo.toml b/bridges/bin/rialto/node/Cargo.toml index 1a53acf044fa..7f28a1542632 100644 --- a/bridges/bin/rialto/node/Cargo.toml +++ b/bridges/bin/rialto/node/Cargo.toml @@ -33,7 +33,7 @@ sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot Dependencies -polkadot-node-core-pvf-worker = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-node-core-pvf = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, features = [ "full-node", "polkadot-native" ] } diff --git a/bridges/bin/rialto/node/src/chain_spec.rs b/bridges/bin/rialto/node/src/chain_spec.rs index ceb82d45b385..c5364019a0e4 100644 --- a/bridges/bin/rialto/node/src/chain_spec.rs +++ b/bridges/bin/rialto/node/src/chain_spec.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -use frame_support::weights::Weight; use polkadot_primitives::v4::{AssignmentId, ValidatorId}; use rialto_runtime::{ AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig, @@ -253,10 +252,6 @@ fn testnet_genesis( max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, max_downward_message_size: 1024 * 1024, - ump_service_total_weight: Weight::from_parts( - 100_000_000_000, - polkadot_primitives::v4::MAX_POV_SIZE as u64, - ), max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, diff --git a/bridges/bin/rialto/node/src/command.rs b/bridges/bin/rialto/node/src/command.rs index 8a7178fbd310..a21b3a88d2c2 100644 --- a/bridges/bin/rialto/node/src/command.rs +++ b/bridges/bin/rialto/node/src/command.rs @@ -164,7 +164,7 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf_worker::prepare_worker_entrypoint( + polkadot_node_core_pvf::prepare_worker_entrypoint( &cmd.socket_path, Some(&cmd.node_impl_version), ); @@ -175,7 +175,7 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf_worker::execute_worker_entrypoint( + polkadot_node_core_pvf::execute_worker_entrypoint( &cmd.socket_path, Some(&cmd.node_impl_version), ); diff --git a/bridges/bin/rialto/runtime/Cargo.toml b/bridges/bin/rialto/runtime/Cargo.toml index f687905ad634..12254010b35d 100644 --- a/bridges/bin/rialto/runtime/Cargo.toml +++ b/bridges/bin/rialto/runtime/Cargo.toml @@ -38,6 +38,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "m pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["historical"]} pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -101,6 +102,7 @@ std = [ "pallet-bridge-messages/std", "pallet-bridge-relayers/std", "pallet-grandpa/std", + "pallet-message-queue/std", "pallet-mmr/std", "pallet-xcm/std", "pallet-session/std", @@ -136,6 +138,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-bridge-messages/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/bridges/bin/rialto/runtime/build.rs b/bridges/bin/rialto/runtime/build.rs index cc865704327d..25e220e46fc3 100644 --- a/bridges/bin/rialto/runtime/build.rs +++ b/bridges/bin/rialto/runtime/build.rs @@ -21,5 +21,6 @@ fn main() { .with_current_project() .import_memory() .export_heap_base() + .disable_runtime_version_section_check() .build() } diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index 8d57e99b2972..9240314c5443 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -132,6 +132,7 @@ impl_opaque_keys! { } /// This runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("rialto-runtime"), impl_name: create_runtime_str!("rialto-runtime"), @@ -262,7 +263,6 @@ impl pallet_grandpa::Config for Runtime { impl pallet_mmr::Config for Runtime { const INDEXING_PREFIX: &'static [u8] = b"mmr"; type Hashing = Keccak256; - type Hash = ::Output; type LeafData = pallet_beefy_mmr::Pallet; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); @@ -330,7 +330,7 @@ impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -498,12 +498,12 @@ construct_runtime!( 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}, Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event, Config}, SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, ParaSessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, ParasDisputes: polkadot_runtime_parachains::disputes::{Pallet, Call, Storage, Event}, ParasSlashing: polkadot_runtime_parachains::disputes::slashing::{Pallet, Call, Storage, ValidateUnsigned}, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, // Parachain Onboarding Pallets Registrar: polkadot_runtime_common::paras_registrar::{Pallet, Call, Storage, Event}, @@ -558,8 +558,8 @@ mod mmr { pub use pallet_mmr::primitives::*; pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hash = ::Hash; pub type Hashing = ::Hashing; + pub type Hash = ::Output; } impl_runtime_apis! { diff --git a/bridges/bin/rialto/runtime/src/parachains.rs b/bridges/bin/rialto/runtime/src/parachains.rs index f2542cf03295..587cb4d93404 100644 --- a/bridges/bin/rialto/runtime/src/parachains.rs +++ b/bridges/bin/rialto/runtime/src/parachains.rs @@ -17,24 +17,30 @@ //! Parachains support in Rialto runtime. use crate::{ - AccountId, Babe, Balance, Balances, BlockNumber, Registrar, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic, + xcm_config, AccountId, Babe, Balance, Balances, BlockNumber, Registrar, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic, }; -use frame_support::{parameter_types, traits::KeyOwnerProofSystem, weights::Weight}; +use frame_support::{ + parameter_types, + traits::{KeyOwnerProofSystem, ProcessMessage, ProcessMessageError}, + weights::{Weight, WeightMeter}, +}; use frame_system::EnsureRoot; use polkadot_primitives::v4::{ValidatorId, ValidatorIndex}; use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots}; use polkadot_runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, initializer as parachains_initializer, - origin as parachains_origin, paras as parachains_paras, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use sp_core::crypto::KeyTypeId; use sp_runtime::transaction_validity::TransactionPriority; +use xcm::latest::Junction; impl frame_system::offchain::SendTransactionTypes for Runtime where @@ -70,6 +76,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RewardValidators = RewardValidators; type DisputesHandler = (); + type MessageQueue = crate::MessageQueue; + type WeightInfo = (); } impl parachains_initializer::Config for Runtime { @@ -108,6 +116,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = ParasWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type QueueFootprinter = crate::Inclusion; type NextSessionRotation = Babe; } @@ -169,12 +178,53 @@ impl parachains_session_info::Config for Runtime { impl parachains_shared::Config for Runtime {} -impl parachains_ump::Config for Runtime { +parameter_types! { + /// Amount of weight that can be spent per block to service messages. + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` + /// already uses up to 80 percent block weight. + pub MessageQueueServiceWeight: Weight = crate::Perbill::from_percent(20) * bp_rialto::BlockWeights::get().max_block; + pub const MessageQueueHeapSize: u32 = 32 * 1024; + pub const MessageQueueMaxStale: u32 = 96; +} + +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + id: &mut [u8; 32], + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter, id) + } +} + +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = (); - type FirstMessageFactorPercent = frame_support::traits::ConstU64<100>; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = parachains_ump::TestWeightInfo; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = crate::Inclusion; + type WeightInfo = (); } // required onboarding pallets. We're not going to use auctions or crowdloans, so they're missing diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index 08d102cc753a..8fe89de962ef 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -9,8 +9,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } hash-db = { version = "0.16.0", default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.6.0", default-features = false, features = ["derive"] } +log = { version = "0.4.18", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } static_assertions = { version = "1.1", optional = true } # Bridge dependencies diff --git a/bridges/bin/runtime-common/src/mock.rs b/bridges/bin/runtime-common/src/mock.rs index c17671996761..4542ad39b624 100644 --- a/bridges/bin/runtime-common/src/mock.rs +++ b/bridges/bin/runtime-common/src/mock.rs @@ -190,7 +190,7 @@ impl pallet_balances::Config for TestRuntime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/bridges/modules/beefy/src/lib.rs b/bridges/modules/beefy/src/lib.rs index 79795dd0770a..f22d8e488a2b 100644 --- a/bridges/modules/beefy/src/lib.rs +++ b/bridges/modules/beefy/src/lib.rs @@ -328,6 +328,7 @@ pub mod pallet { StorageValue<_, BasicOperatingMode, ValueQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { /// Optional module owner account. pub owner: Option, @@ -335,13 +336,6 @@ pub mod pallet { pub init_data: Option>, } - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { owner: None, init_data: None } - } - } - #[pallet::genesis_build] impl, I: 'static> GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/bridges/modules/grandpa/Cargo.toml b/bridges/modules/grandpa/Cargo.toml index 9b97b518fc5c..341434993707 100644 --- a/bridges/modules/grandpa/Cargo.toml +++ b/bridges/modules/grandpa/Cargo.toml @@ -10,8 +10,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } finality-grandpa = { version = "0.16.2", default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.6.0", default-features = false, features = ["derive"] } +log = { version = "0.4.18", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } # Bridge Dependencies diff --git a/bridges/modules/grandpa/src/lib.rs b/bridges/modules/grandpa/src/lib.rs index 50286512db89..10b60878302e 100644 --- a/bridges/modules/grandpa/src/lib.rs +++ b/bridges/modules/grandpa/src/lib.rs @@ -44,7 +44,7 @@ use bp_header_chain::{ }; use bp_runtime::{BlockNumberOf, HashOf, HasherOf, HeaderId, HeaderOf, OwnedBridgeModule}; use finality_grandpa::voter_set::VoterSet; -use frame_support::{dispatch::PostDispatchInfo, ensure}; +use frame_support::{dispatch::PostDispatchInfo, ensure, DefaultNoBound}; use sp_consensus_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID}; use sp_runtime::{ traits::{Header as HeaderT, Zero}, @@ -370,6 +370,7 @@ pub mod pallet { StorageValue<_, BasicOperatingMode, ValueQuery>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { /// Optional module owner account. pub owner: Option, @@ -377,13 +378,6 @@ pub mod pallet { pub init_data: Option>>, } - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { owner: None, init_data: None } - } - } - #[pallet::genesis_build] impl, I: 'static> GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/bridges/modules/messages/Cargo.toml b/bridges/modules/messages/Cargo.toml index 639ac9dc23ce..34120e6908a3 100644 --- a/bridges/modules/messages/Cargo.toml +++ b/bridges/modules/messages/Cargo.toml @@ -8,9 +8,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -log = { version = "0.4.17", default-features = false } +log = { version = "0.4.18", default-features = false } num-traits = { version = "0.2", default-features = false } -scale-info = { version = "2.6.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } # Bridge dependencies diff --git a/bridges/modules/messages/src/lib.rs b/bridges/modules/messages/src/lib.rs index f04e86f3a8e3..51e6857d7778 100644 --- a/bridges/modules/messages/src/lib.rs +++ b/bridges/modules/messages/src/lib.rs @@ -65,7 +65,7 @@ use bp_messages::{ }; use bp_runtime::{BasicOperatingMode, ChainId, OwnedBridgeModule, PreComputedSize, Size}; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{dispatch::PostDispatchInfo, ensure, fail, traits::Get}; +use frame_support::{dispatch::PostDispatchInfo, ensure, fail, traits::Get, DefaultNoBound}; use sp_runtime::traits::UniqueSaturatedFrom; use sp_std::{marker::PhantomData, prelude::*}; @@ -586,6 +586,7 @@ pub mod pallet { StorageMap<_, Blake2_128Concat, MessageKey, StoredMessagePayload>; #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { /// Initial pallet operating mode. pub operating_mode: MessagesOperatingMode, @@ -595,17 +596,6 @@ pub mod pallet { pub phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { - operating_mode: Default::default(), - owner: Default::default(), - phantom: Default::default(), - } - } - } - #[pallet::genesis_build] impl, I: 'static> GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/bridges/modules/messages/src/mock.rs b/bridges/modules/messages/src/mock.rs index f0516fbc23f9..8716c5bc3ac7 100644 --- a/bridges/modules/messages/src/mock.rs +++ b/bridges/modules/messages/src/mock.rs @@ -133,7 +133,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = (); type MaxReserves = (); type ReserveIdentifier = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/bridges/modules/parachains/Cargo.toml b/bridges/modules/parachains/Cargo.toml index d8c89b79991b..5ee30f594c7b 100644 --- a/bridges/modules/parachains/Cargo.toml +++ b/bridges/modules/parachains/Cargo.toml @@ -7,8 +7,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.6.0", default-features = false, features = ["derive"] } +log = { version = "0.4.18", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } # Bridge Dependencies diff --git a/bridges/modules/parachains/src/lib.rs b/bridges/modules/parachains/src/lib.rs index c2052e3d4ebe..b17b52163d85 100644 --- a/bridges/modules/parachains/src/lib.rs +++ b/bridges/modules/parachains/src/lib.rs @@ -30,7 +30,7 @@ use bp_header_chain::{HeaderChain, HeaderChainError}; use bp_parachains::{parachain_head_storage_key_at_source, ParaInfo, ParaStoredHeaderData}; use bp_polkadot_core::parachains::{ParaHash, ParaHead, ParaHeadsProof, ParaId}; use bp_runtime::{Chain, HashOf, HeaderId, HeaderIdOf, Parachain, StorageProofError}; -use frame_support::dispatch::PostDispatchInfo; +use frame_support::{dispatch::PostDispatchInfo, DefaultNoBound}; use sp_std::{marker::PhantomData, vec::Vec}; #[cfg(feature = "runtime-benchmarks")] @@ -611,6 +611,7 @@ pub mod pallet { } #[pallet::genesis_config] + #[derive(DefaultNoBound)] pub struct GenesisConfig, I: 'static = ()> { /// Initial pallet operating mode. pub operating_mode: BasicOperatingMode, @@ -620,17 +621,6 @@ pub mod pallet { pub phantom: sp_std::marker::PhantomData, } - #[cfg(feature = "std")] - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { - operating_mode: Default::default(), - owner: Default::default(), - phantom: Default::default(), - } - } - } - #[pallet::genesis_build] impl, I: 'static> GenesisBuild for GenesisConfig { fn build(&self) { diff --git a/bridges/modules/relayers/Cargo.toml b/bridges/modules/relayers/Cargo.toml index 857d47cc65a3..9fbc0996ba78 100644 --- a/bridges/modules/relayers/Cargo.toml +++ b/bridges/modules/relayers/Cargo.toml @@ -8,8 +8,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.6.0", default-features = false, features = ["derive"] } +log = { version = "0.4.18", default-features = false } +scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } # Bridge dependencies diff --git a/bridges/modules/relayers/src/mock.rs b/bridges/modules/relayers/src/mock.rs index 69d8418a0241..d8c5bd909672 100644 --- a/bridges/modules/relayers/src/mock.rs +++ b/bridges/modules/relayers/src/mock.rs @@ -102,7 +102,7 @@ impl pallet_balances::Config for TestRuntime { type WeightInfo = (); type MaxReserves = ConstU32<1>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>;