apply last changes for the runtime
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
6b353d1169
commit
8a321ab5e1
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "4.0.4"
|
version = "4.0.5"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "Runtime of the Casper Network"
|
description = "Runtime of the Casper Network"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use pallet_staking::Forcing;
|
use pallet_staking::Forcing;
|
||||||
use sp_staking::StakerStatus;
|
use sp_staking::StakerStatus;
|
||||||
|
|
||||||
use casper_runtime_constants::currency::CSPR;
|
use casper_runtime_constants::currency::{STRH, STNK, CSPR};
|
||||||
use primitives::{AccountId, AccountPublic};
|
use primitives::{AccountId, AccountPublic};
|
||||||
|
|
||||||
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||||
@ -188,7 +188,7 @@ fn casper_staging_initial_authorities() -> Vec<AuthorityInitiation> {
|
|||||||
.with_grandpa_id(GrandpaId::unchecked_from(hex!("55446f9a7aa99ced06b317c80ce90d56b84e56526775683af2525969e8da0b64")))
|
.with_grandpa_id(GrandpaId::unchecked_from(hex!("55446f9a7aa99ced06b317c80ce90d56b84e56526775683af2525969e8da0b64")))
|
||||||
.with_authority_id(AuthorityDiscoveryId::unchecked_from(hex!("12c14850562021eb99f58f90ab624fb6cfaf3ac9228a92f8b60115fe6a6af15a")))
|
.with_authority_id(AuthorityDiscoveryId::unchecked_from(hex!("12c14850562021eb99f58f90ab624fb6cfaf3ac9228a92f8b60115fe6a6af15a")))
|
||||||
.with_weaver_id(WeaverId::unchecked_from(hex!("681cbbab1f95d0ee4183a8c60081380b59920e1a9189d872c8fc8b38dcdd020b")))
|
.with_weaver_id(WeaverId::unchecked_from(hex!("681cbbab1f95d0ee4183a8c60081380b59920e1a9189d872c8fc8b38dcdd020b")))
|
||||||
.with_exodus_id(WeaverId::unchecked_from(hex!("7277c176a3eb110ea2e259d09994c1bce303ca028b8daccc5b10d8d8f1baea40")))
|
.with_exodus_id(ExodusId::unchecked_from(hex!("7277c176a3eb110ea2e259d09994c1bce303ca028b8daccc5b10d8d8f1baea40")))
|
||||||
.build(),
|
.build(),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -259,8 +259,8 @@ pub fn testnet_config_genesis(
|
|||||||
"staking": {
|
"staking": {
|
||||||
"minNominatorBond": 42 * CSPR,
|
"minNominatorBond": 42 * CSPR,
|
||||||
"minValidatorBond": 6900 * STRH,
|
"minValidatorBond": 6900 * STRH,
|
||||||
"maxNominatorsCount": 3000u32,
|
"maxNominatorCount": 3000u32,
|
||||||
"maxValidatorsCount": 500u32,
|
"maxValidatorCount": 500u32,
|
||||||
|
|
||||||
"minimumValidatorCount": if cfg!(feature = "runtime-benchmarks") {
|
"minimumValidatorCount": if cfg!(feature = "runtime-benchmarks") {
|
||||||
1u32
|
1u32
|
||||||
|
|||||||
@ -508,7 +508,7 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type HistoryDepth = StakingHistoryDepth;
|
type HistoryDepth = StakingHistoryDepth;
|
||||||
type MaxControllersInDeprecationBatch = ConstU32<5314>;
|
type MaxControllersInDeprecationBatch = ConstU32<5314>;
|
||||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||||
type EventListeners = NominationPools;
|
type EventListeners = GhostNominationPools;
|
||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -810,7 +810,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
),
|
),
|
||||||
ProxyType::NominationPools => matches!(
|
ProxyType::NominationPools => matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::NominationPools { .. } | RuntimeCall::Utility { .. }
|
RuntimeCall::GhostNominationPools { .. } | RuntimeCall::Utility { .. }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -995,7 +995,7 @@ construct_runtime! {
|
|||||||
|
|
||||||
// Provides a semi-sorted list of nominators for staking.
|
// Provides a semi-sorted list of nominators for staking.
|
||||||
VoterList: pallet_bags_list::<Instance1> = 33,
|
VoterList: pallet_bags_list::<Instance1> = 33,
|
||||||
NominationPools: ghost_nomination_pools = 34,
|
GhostNominationPools: ghost_nomination_pools = 34,
|
||||||
|
|
||||||
// Ghosts stuff. Start indicies at 50 to leave room.
|
// Ghosts stuff. Start indicies at 50 to leave room.
|
||||||
GhostNetworks: ghost_networks = 50,
|
GhostNetworks: ghost_networks = 50,
|
||||||
@ -1141,15 +1141,15 @@ sp_api::impl_runtime_apis! {
|
|||||||
Balance,
|
Balance,
|
||||||
> for Runtime {
|
> for Runtime {
|
||||||
fn pending_rewards(member: AccountId) -> Balance {
|
fn pending_rewards(member: AccountId) -> Balance {
|
||||||
NominationPools::api_pending_rewards(member).unwrap_or_default()
|
GhostNominationPools::api_pending_rewards(member).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn points_to_balance(pool_id: ghost_nomination_pools::PoolId, points: Balance) -> Balance {
|
fn points_to_balance(pool_id: ghost_nomination_pools::PoolId, points: Balance) -> Balance {
|
||||||
NominationPools::api_points_to_balance(pool_id, points)
|
GhostNominationPools::api_points_to_balance(pool_id, points)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn balance_to_points(pool_id: ghost_nomination_pools::PoolId, new_funds: Balance) -> Balance {
|
fn balance_to_points(pool_id: ghost_nomination_pools::PoolId, new_funds: Balance) -> Balance {
|
||||||
NominationPools::api_balance_to_points(pool_id, new_funds)
|
GhostNominationPools::api_balance_to_points(pool_id, new_funds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user