mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
BridgeHub Runtimes: Change registration order of MessageQueue pallet (#2230)
This PR changes the registration order of the `MessageQueue` pallet so that it is registered last. This is necessary so that the [on_initialize](https://github.com/Snowfork/snowbridge/blob/df8d5da82e517a65fb0858a4f2ead533290336b5/parachain/pallets/outbound-queue/src/lib.rs#L267) hooks for Snowbridge can run before `MessageQueue` delivers messages using its own `on_initialize`. Generally, I think this is preferable regardless of Snowbridge's particular requirements. Other pallets may want to do housekeeping before MessageQueue starts delivering messages. I'm hoping this PR, if accepted, can be included in the same release as https://github.com/paritytech/polkadot-sdk/pull/1246. As otherwise, changing the order of pallet registration is an ABI-breaking change.
This commit is contained in:
@@ -524,7 +524,6 @@ construct_runtime!(
|
|||||||
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
|
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
|
||||||
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
|
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
|
||||||
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
|
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
|
||||||
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 34,
|
|
||||||
|
|
||||||
// Handy utilities.
|
// Handy utilities.
|
||||||
Utility: pallet_utility::{Pallet, Call, Event} = 40,
|
Utility: pallet_utility::{Pallet, Call, Event} = 40,
|
||||||
@@ -564,6 +563,10 @@ construct_runtime!(
|
|||||||
BridgeWestendMessages: pallet_bridge_messages::<Instance3>::{Pallet, Call, Storage, Event<T>, Config<T>} = 51,
|
BridgeWestendMessages: pallet_bridge_messages::<Instance3>::{Pallet, Call, Storage, Event<T>, Config<T>} = 51,
|
||||||
|
|
||||||
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>} = 47,
|
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>} = 47,
|
||||||
|
|
||||||
|
// Message Queue. Importantly, is registered last so that messages are processed after
|
||||||
|
// the `on_initialize` hooks of bridging pallets.
|
||||||
|
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 250,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -500,7 +500,6 @@ construct_runtime!(
|
|||||||
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
|
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
|
||||||
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
|
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
|
||||||
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
|
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
|
||||||
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 34,
|
|
||||||
|
|
||||||
// Handy utilities.
|
// Handy utilities.
|
||||||
Utility: pallet_utility::{Pallet, Call, Event} = 40,
|
Utility: pallet_utility::{Pallet, Call, Event} = 40,
|
||||||
@@ -511,6 +510,10 @@ construct_runtime!(
|
|||||||
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 42,
|
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 42,
|
||||||
BridgeRococoParachains: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>} = 43,
|
BridgeRococoParachains: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>} = 43,
|
||||||
BridgeRococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 44,
|
BridgeRococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 44,
|
||||||
|
|
||||||
|
// Message Queue. Importantly, is registered last so that messages are processed after
|
||||||
|
// the `on_initialize` hooks of bridging pallets.
|
||||||
|
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 250,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user