Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion: Remove uncles related code #2126

Merged
merged 3 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,6 @@ pub mod pallet {
DispatchClass::Mandatory,
);
}

fn note_uncle(_author: T::AccountId, _age: T::BlockNumber) {
//TODO can we ignore this?
}
}

/// Play the role of the session manager.
Expand Down
16 changes: 7 additions & 9 deletions pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ frame_support::construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
Aura: pallet_aura::{Pallet, Storage, Config<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
CollatorSelection: collator_selection::{Pallet, Call, Storage, Event<T>},
Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent},
System: frame_system,
Timestamp: pallet_timestamp,
Session: pallet_session,
Aura: pallet_aura,
Balances: pallet_balances,
CollatorSelection: collator_selection,
Authorship: pallet_authorship,
}
);

Expand Down Expand Up @@ -110,8 +110,6 @@ impl FindAuthor<u64> for Author4 {

impl pallet_authorship::Config for Test {
type FindAuthor = Author4;
type UncleGenerations = ();
type FilterUncle = ();
type EventHandler = CollatorSelection;
}

Expand Down
2 changes: 0 additions & 2 deletions parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down
2 changes: 0 additions & 2 deletions parachains/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ mod tests {

impl pallet_authorship::Config for Test {
type FindAuthor = OneAuthor;
type UncleGenerations = ();
type FilterUncle = ();
type EventHandler = ();
}

Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/assets/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -614,7 +612,7 @@ construct_runtime!(
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,

// Collator support. the order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/assets/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -614,7 +612,7 @@ construct_runtime!(
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,

// Collator support. the order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/assets/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -624,7 +622,7 @@ construct_runtime!(
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,

// Collator support. the order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -407,7 +405,7 @@ construct_runtime!(
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. The order of these 4 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -435,7 +433,7 @@ construct_runtime!(
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. The order of these 4 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -505,7 +503,7 @@ construct_runtime!(
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. the order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/contracts/contracts-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -343,7 +341,7 @@ construct_runtime!(
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. The order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down
4 changes: 1 addition & 3 deletions parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type UncleGenerations = ConstU32<0>;
type FilterUncle = ();
type EventHandler = (CollatorSelection,);
}

Expand Down Expand Up @@ -537,7 +535,7 @@ construct_runtime!(
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,

// Collator support. The order of these 4 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Authorship: pallet_authorship::{Pallet, 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,
Expand Down