apply changes to casper runtime; migrations are included
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
parent
c8f8ea7130
commit
cc300fefb0
9
Cargo.lock
generated
9
Cargo.lock
generated
@ -1186,7 +1186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.37"
|
version = "3.5.38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"casper-runtime-constants",
|
"casper-runtime-constants",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@ -3650,13 +3650,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-networks"
|
name = "ghost-networks"
|
||||||
version = "0.1.20"
|
version = "0.1.25"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"frame-system",
|
"frame-system",
|
||||||
"ghost-core-primitives",
|
"ghost-core-primitives",
|
||||||
"ghost-traits",
|
"ghost-traits",
|
||||||
|
"log",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"pallet-balances",
|
"pallet-balances",
|
||||||
"pallet-staking",
|
"pallet-staking",
|
||||||
@ -3837,7 +3838,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-slow-clap"
|
name = "ghost-slow-clap"
|
||||||
version = "0.4.14"
|
version = "0.4.24"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@ -3889,7 +3890,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-traits"
|
name = "ghost-traits"
|
||||||
version = "0.3.26"
|
version = "0.3.31"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"sp-runtime 31.0.1",
|
"sp-runtime 31.0.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.37"
|
version = "3.5.38"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "Runtime of the Casper Network"
|
description = "Runtime of the Casper Network"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|||||||
@ -117,11 +117,11 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
spec_name: create_runtime_str!("casper"),
|
spec_name: create_runtime_str!("casper"),
|
||||||
impl_name: create_runtime_str!("casper-svengali"),
|
impl_name: create_runtime_str!("casper-svengali"),
|
||||||
authoring_version: 0,
|
authoring_version: 0,
|
||||||
spec_version: 4,
|
spec_version: 5,
|
||||||
impl_version: 3,
|
impl_version: 4,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
transaction_version: 1,
|
transaction_version: 1,
|
||||||
state_version: 1,
|
state_version: 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The BABE epoch configuration at genesis.
|
/// The BABE epoch configuration at genesis.
|
||||||
@ -218,10 +218,7 @@ impl pallet_preimage::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const EpochDuration: u64 = prod_or_fast!(
|
pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64;
|
||||||
EPOCH_DURATION_IN_SLOTS as u64,
|
|
||||||
2 * MINUTES as u64
|
|
||||||
);
|
|
||||||
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
|
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
|
||||||
pub const ReportLongevity: u64 =
|
pub const ReportLongevity: u64 =
|
||||||
BondingDuration::get() as u64 *
|
BondingDuration::get() as u64 *
|
||||||
@ -332,14 +329,8 @@ impl pallet_session::historical::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub SignedPhase: u32 = prod_or_fast!(
|
pub SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
|
||||||
EPOCH_DURATION_IN_SLOTS / 4,
|
pub UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
|
||||||
(1 * MINUTES).min(EpochDuration::get().saturated_into::<u32>() / 2)
|
|
||||||
);
|
|
||||||
pub UnsignedPhase: u32 = prod_or_fast!(
|
|
||||||
EPOCH_DURATION_IN_SLOTS / 4,
|
|
||||||
(1 * MINUTES).min(EpochDuration::get().saturated_into::<u32>() / 2)
|
|
||||||
);
|
|
||||||
|
|
||||||
// signed config
|
// signed config
|
||||||
pub const SignedMaxSubmissions: u32 = 16;
|
pub const SignedMaxSubmissions: u32 = 16;
|
||||||
@ -1029,6 +1020,7 @@ impl ghost_networks::Config for Runtime {
|
|||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type NetworkId = u64;
|
type NetworkId = u64;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
|
type MaxNetworks = ConstU32<30>;
|
||||||
|
|
||||||
type RegisterOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Ghosts>;
|
type RegisterOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Ghosts>;
|
||||||
type UpdateOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Zombies>;
|
type UpdateOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Zombies>;
|
||||||
@ -1059,7 +1051,12 @@ impl ghost_claims::Config<CultCollectiveInstance> for Runtime {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
// will be used in `Perbill::from_parts()`
|
// will be used in `Perbill::from_parts()`
|
||||||
pub const ApplauseThreshold: u32 = 500_000_000;
|
pub const ApplauseThreshold: u32 = if cfg!(feature = "runtime-benchmarks") {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
500_000_000
|
||||||
|
};
|
||||||
|
|
||||||
pub const MinAuthoritiesNumber: u32 = 5;
|
pub const MinAuthoritiesNumber: u32 = 5;
|
||||||
pub const SlowClapUnsignedPriority: TransactionPriority = TransactionPriority::MAX;
|
pub const SlowClapUnsignedPriority: TransactionPriority = TransactionPriority::MAX;
|
||||||
pub const SlowClapHistoryDepth: sp_staking::SessionIndex =
|
pub const SlowClapHistoryDepth: sp_staking::SessionIndex =
|
||||||
@ -1083,6 +1080,7 @@ impl ghost_slow_clap::Config for Runtime {
|
|||||||
type UnsignedPriority = SlowClapUnsignedPriority;
|
type UnsignedPriority = SlowClapUnsignedPriority;
|
||||||
type HistoryDepth = SlowClapHistoryDepth;
|
type HistoryDepth = SlowClapHistoryDepth;
|
||||||
type MinAuthoritiesNumber = MinAuthoritiesNumber;
|
type MinAuthoritiesNumber = MinAuthoritiesNumber;
|
||||||
|
type EpochDuration = EpochDuration;
|
||||||
|
|
||||||
type WeightInfo = weights::ghost_slow_clap::WeightInfo<Runtime>;
|
type WeightInfo = weights::ghost_slow_clap::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
@ -1185,7 +1183,10 @@ pub type SignedExtra = (
|
|||||||
|
|
||||||
/// All migrations that will run on the next runtime upgrade.
|
/// All migrations that will run on the next runtime upgrade.
|
||||||
/// Should be cleared after release.
|
/// Should be cleared after release.
|
||||||
pub type Migrations = ();
|
pub type Migrations = (
|
||||||
|
ghost_networks::migrations::MigrateV0ToV1<Runtime>,
|
||||||
|
ghost_slow_clap::migrations::MigrateV2ToV3<Runtime>,
|
||||||
|
);
|
||||||
|
|
||||||
/// Unchecked extrinsic type as expected by this runtime.
|
/// Unchecked extrinsic type as expected by this runtime.
|
||||||
pub type UncheckedExtrinsic =
|
pub type UncheckedExtrinsic =
|
||||||
|
|||||||
@ -104,4 +104,8 @@ impl<T: frame_system::Config> ghost_slow_clap::WeightInfo for WeightInfo<T> {
|
|||||||
.saturating_add(T::DbWeight::get().reads(5))
|
.saturating_add(T::DbWeight::get().reads(5))
|
||||||
.saturating_add(T::DbWeight::get().writes(1))
|
.saturating_add(T::DbWeight::get().writes(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn try_offend_validators(_offenders_len: u32) -> Weight {
|
||||||
|
Default::default()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user