Skip to content

Commit

Permalink
Extended kickout collator period (#748)
Browse files Browse the repository at this point in the history
* Extended kickout collator period

* Compilation fixes
  • Loading branch information
akru authored Nov 13, 2022
1 parent 76b35f8 commit 62e9445
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 105 deletions.
217 changes: 128 additions & 89 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-collator"
version = "4.31.0"
version = "4.32.0"
authors = ["Stake Technologies <devops@stake.co.jp>"]
description = "Astar collator implementation in Rust."
build = "build.rs"
Expand Down
2 changes: 1 addition & 1 deletion runtime/astar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-runtime"
version = "4.31.0"
version = "4.32.0"
authors = ["Stake Technologies <devops@stake.co.jp>"]
edition = "2021"
build = "build.rs"
Expand Down
9 changes: 5 additions & 4 deletions runtime/astar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("astar"),
impl_name: create_runtime_str!("astar"),
authoring_version: 1,
spec_version: 41,
spec_version: 42,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -395,10 +395,11 @@ impl pallet_session::Config for Runtime {

parameter_types! {
pub const PotId: PalletId = PalletId(*b"PotStake");
pub const MaxCandidates: u32 = 200;
pub const MaxCandidates: u32 = 148;
pub const MinCandidates: u32 = 5;
pub const MaxInvulnerables: u32 = 20;
pub const MaxInvulnerables: u32 = 48;
pub const SlashRatio: Perbill = Perbill::from_percent(1);
pub const KickThreshold: BlockNumber = 2 * HOURS; // 2 SessionPeriod
}

impl pallet_collator_selection::Config for Runtime {
Expand All @@ -410,7 +411,7 @@ impl pallet_collator_selection::Config for Runtime {
type MinCandidates = MinCandidates;
type MaxInvulnerables = MaxInvulnerables;
// should be a multiple of session or things will get inconsistent
type KickThreshold = SessionPeriod;
type KickThreshold = KickThreshold;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
Expand Down
2 changes: 1 addition & 1 deletion runtime/shibuya/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shibuya-runtime"
version = "4.31.0"
version = "4.32.0"
authors = ["Stake Technologies <devops@stake.co.jp>"]
edition = "2021"
build = "build.rs"
Expand Down
9 changes: 5 additions & 4 deletions runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("shibuya"),
impl_name: create_runtime_str!("shibuya"),
authoring_version: 1,
spec_version: 76,
spec_version: 77,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -464,10 +464,11 @@ impl pallet_session::Config for Runtime {

parameter_types! {
pub const PotId: PalletId = PalletId(*b"PotStake");
pub const MaxCandidates: u32 = 200;
pub const MaxCandidates: u32 = 148;
pub const MinCandidates: u32 = 5;
pub const MaxInvulnerables: u32 = 20;
pub const MaxInvulnerables: u32 = 48;
pub const SlashRatio: Perbill = Perbill::from_percent(1);
pub const KickThreshold: BlockNumber = 2 * HOURS; // 2 SessionPeriod
}

impl pallet_collator_selection::Config for Runtime {
Expand All @@ -479,7 +480,7 @@ impl pallet_collator_selection::Config for Runtime {
type MinCandidates = MinCandidates;
type MaxInvulnerables = MaxInvulnerables;
// should be a multiple of session or things will get inconsistent
type KickThreshold = SessionPeriod;
type KickThreshold = KickThreshold;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
Expand Down
2 changes: 1 addition & 1 deletion runtime/shiden/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shiden-runtime"
version = "4.31.0"
version = "4.32.0"
authors = ["Stake Technologies <devops@stake.co.jp>"]
edition = "2021"
build = "build.rs"
Expand Down
9 changes: 5 additions & 4 deletions runtime/shiden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("shiden"),
impl_name: create_runtime_str!("shiden"),
authoring_version: 1,
spec_version: 77,
spec_version: 78,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -400,10 +400,11 @@ impl pallet_session::Config for Runtime {

parameter_types! {
pub const PotId: PalletId = PalletId(*b"PotStake");
pub const MaxCandidates: u32 = 200;
pub const MaxCandidates: u32 = 148;
pub const MinCandidates: u32 = 5;
pub const MaxInvulnerables: u32 = 20;
pub const MaxInvulnerables: u32 = 48;
pub const SlashRatio: Perbill = Perbill::from_percent(1);
pub const KickThreshold: BlockNumber = 2 * HOURS; // 2 SessionPeriod
}

impl pallet_collator_selection::Config for Runtime {
Expand All @@ -415,7 +416,7 @@ impl pallet_collator_selection::Config for Runtime {
type MinCandidates = MinCandidates;
type MaxInvulnerables = MaxInvulnerables;
// should be a multiple of session or things will get inconsistent
type KickThreshold = SessionPeriod;
type KickThreshold = KickThreshold;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
Expand Down

0 comments on commit 62e9445

Please sign in to comment.