1

In the parachain template we see this snip of code:

// Collator support. The order of these 4 are important and shall not change.
        Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
        CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
        Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
        Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
        AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24,

My question is regarding the comment, why does the ordering of these pallets matter? Is this some quirk of construct_runtime!?

1 Answer 1

0

The order of your pallets in construct_runtime! defines the order in which on_initialize, on_finalize etc is being called. These pallets probably have some connection between them and require that on_initialize etc is called in this fixed order.

Edit: I just checked the code and I don't see any reason for CollatorSelection in there. For Authorship it makes sense, because it determines the current author in on_initialize and this should be done before Session may initializes a new session with new authorities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.