Skip to content

Commit

Permalink
Merge branch 'master' into dedup-nominators
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n authored Jan 21, 2025
2 parents 5dd314f + 9edaef0 commit eb20787
Show file tree
Hide file tree
Showing 15 changed files with 757 additions and 35 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions cumulus/pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,27 @@ pub mod pallet {
type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>;

/// Account Identifier from which the internal Pot is generated.
#[pallet::constant]
type PotId: Get<PalletId>;

/// Maximum number of candidates that we should have.
///
/// This does not take into account the invulnerables.
#[pallet::constant]
type MaxCandidates: Get<u32>;

/// Minimum number eligible collators. Should always be greater than zero. This includes
/// Invulnerable collators. This ensures that there will always be one collator who can
/// produce a block.
#[pallet::constant]
type MinEligibleCollators: Get<u32>;

/// Maximum number of invulnerables.
#[pallet::constant]
type MaxInvulnerables: Get<u32>;

// Will be kicked if block is not produced in threshold.
#[pallet::constant]
type KickThreshold: Get<BlockNumberFor<Self>>;

/// A stable ID for a validator.
Expand All @@ -183,6 +188,14 @@ pub mod pallet {
type WeightInfo: WeightInfo;
}

#[pallet::extra_constants]
impl<T: Config> Pallet<T> {
/// Gets this pallet's derived pot account.
fn pot_account() -> T::AccountId {
Self::account_id()
}
}

/// Basic information about a collation candidate.
#[derive(
PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub mod genesis;
pub use bridge_hub_westend_runtime::{
self, xcm_config::XcmConfig as BridgeHubWestendXcmConfig,
ExistentialDeposit as BridgeHubWestendExistentialDeposit,
RuntimeOrigin as BridgeHubWestendRuntimeOrigin,
};

// Substrate
Expand Down Expand Up @@ -47,6 +48,8 @@ decl_test_parachains! {
PolkadotXcm: bridge_hub_westend_runtime::PolkadotXcm,
Balances: bridge_hub_westend_runtime::Balances,
EthereumSystem: bridge_hub_westend_runtime::EthereumSystem,
EthereumInboundQueue: bridge_hub_westend_runtime::EthereumInboundQueue,
EthereumOutboundQueue: bridge_hub_westend_runtime::EthereumOutboundQueue,
}
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ mod imports {
},
bridge_hub_westend_emulated_chain::{
genesis::ED as BRIDGE_HUB_WESTEND_ED, BridgeHubWestendExistentialDeposit,
BridgeHubWestendParaPallet as BridgeHubWestendPallet, BridgeHubWestendXcmConfig,
BridgeHubWestendParaPallet as BridgeHubWestendPallet, BridgeHubWestendRuntimeOrigin,
BridgeHubWestendXcmConfig,
},
penpal_emulated_chain::{
self,
penpal_runtime::xcm_config::{
CustomizableAssetFromSystemAssetHub as PenpalCustomizableAssetFromSystemAssetHub,
LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub,
Expand Down
Loading

0 comments on commit eb20787

Please sign in to comment.