update casper runtime in accordance with new functionality. not final
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
parent
d3c5380ba7
commit
e3c8e51749
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.33"
|
version = "3.5.34"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "Runtime of the Casper Network"
|
description = "Runtime of the Casper Network"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|||||||
@ -1058,10 +1058,9 @@ impl ghost_claims::Config<CultCollectiveInstance> for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
// will be used in `Perbill::from_percent()`
|
// will be used in `Perbill::from_parts()`
|
||||||
pub const ApplauseThreshold: u32 = 70;
|
pub const ApplauseThreshold: u32 = 500_000_000;
|
||||||
// will be used in `Perbill::from_percent()`
|
pub const MinAuthoritiesNumber: u32 = 5;
|
||||||
pub const OffenceThreshold: u32 = 40;
|
|
||||||
pub const SlowClapUnsignedPriority: TransactionPriority = TransactionPriority::MAX;
|
pub const SlowClapUnsignedPriority: TransactionPriority = TransactionPriority::MAX;
|
||||||
pub const SlowClapHistoryDepth: sp_staking::SessionIndex =
|
pub const SlowClapHistoryDepth: sp_staking::SessionIndex =
|
||||||
StakingHistoryDepth::get() * SessionsPerEra::get();
|
StakingHistoryDepth::get() * SessionsPerEra::get();
|
||||||
@ -1071,18 +1070,19 @@ impl ghost_slow_clap::Config for Runtime {
|
|||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type AuthorityId = SlowClapId;
|
type AuthorityId = SlowClapId;
|
||||||
|
|
||||||
type NextSessionRotation = Babe;
|
|
||||||
type ValidatorSet = Historical;
|
type ValidatorSet = Historical;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type NetworkDataHandler = GhostNetworks;
|
type NetworkDataHandler = GhostNetworks;
|
||||||
type BlockNumberProvider = System;
|
type BlockNumberProvider = System;
|
||||||
type ReportUnresponsiveness = Offences;
|
type ReportUnresponsiveness = Offences;
|
||||||
|
type DisabledValidators = Session;
|
||||||
|
|
||||||
type MaxAuthorities = MaxAuthorities;
|
type MaxAuthorities = MaxAuthorities;
|
||||||
type ApplauseThreshold = ApplauseThreshold;
|
type ApplauseThreshold = ApplauseThreshold;
|
||||||
type OffenceThreshold = OffenceThreshold;
|
type OffenceThreshold = OffenceThreshold;
|
||||||
type UnsignedPriority = SlowClapUnsignedPriority;
|
type UnsignedPriority = SlowClapUnsignedPriority;
|
||||||
type HistoryDepth = SlowClapHistoryDepth;
|
type HistoryDepth = SlowClapHistoryDepth;
|
||||||
|
type MinAuthoritiesNumber = MinAuthoritiesNumber;
|
||||||
|
|
||||||
type WeightInfo = weights::ghost_slow_clap::WeightInfo<Runtime>;
|
type WeightInfo = weights::ghost_slow_clap::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,34 +76,7 @@ impl<T: frame_system::Config> ghost_slow_clap::WeightInfo for WeightInfo<T> {
|
|||||||
.saturating_add(T::DbWeight::get().reads(10))
|
.saturating_add(T::DbWeight::get().reads(10))
|
||||||
.saturating_add(T::DbWeight::get().writes(7))
|
.saturating_add(T::DbWeight::get().writes(7))
|
||||||
}
|
}
|
||||||
/// Storage: `GhostSlowClaps::Authorities` (r:2 w:0)
|
fn commit_block()-> Weight {
|
||||||
/// Proof: `GhostSlowClaps::Authorities` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
Default::default()
|
||||||
/// Storage: `GhostSlowClaps::ReceivedClaps` (r:2 w:0)
|
|
||||||
/// Proof: `GhostSlowClaps::ReceivedClaps` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostSlowClaps::ClapsInSession` (r:1 w:0)
|
|
||||||
/// Proof: `GhostSlowClaps::ClapsInSession` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostSlowClaps::ApplausesForTransaction` (r:1 w:1)
|
|
||||||
/// Proof: `GhostSlowClaps::ApplausesForTransaction` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostNetworks::NullifyNeeded` (r:1 w:0)
|
|
||||||
/// Proof: `GhostNetworks::NullifyNeeded` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
|
|
||||||
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostNetworks::GatekeeperAmount` (r:1 w:1)
|
|
||||||
/// Proof: `GhostNetworks::GatekeeperAmount` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostNetworks::BridgedImbalance` (r:1 w:1)
|
|
||||||
/// Proof: `GhostNetworks::BridgedImbalance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `GhostNetworks::AccumulatedCommission` (r:1 w:1)
|
|
||||||
/// Proof: `GhostNetworks::AccumulatedCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
||||||
/// Storage: `System::Account` (r:1 w:1)
|
|
||||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
|
||||||
fn self_applause() -> Weight {
|
|
||||||
// Proof Size summary in bytes:
|
|
||||||
// Measured: `861`
|
|
||||||
// Estimated: `6801`
|
|
||||||
// Minimum execution time: 258_510_000 picoseconds.
|
|
||||||
Weight::from_parts(262_353_000, 0)
|
|
||||||
.saturating_add(Weight::from_parts(0, 6801))
|
|
||||||
.saturating_add(T::DbWeight::get().reads(12))
|
|
||||||
.saturating_add(T::DbWeight::get().writes(5))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user