Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable cheqd migration pallet #192

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Dock.io"]
build = "build.rs"
edition = "2021"
name = "dock-node"
version = "0.30.0"
version = "0.31.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -28,7 +28,7 @@ optional = true

[dependencies.dock-runtime]
path = "../runtime"
version = "0.30.0"
version = "0.31.0"

[dependencies.beefy-primitives]
git = "https://github.com/paritytech/substrate.git"
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Dock.io"]
edition = "2021"
name = "dock-runtime"
version = "0.30.0"
version = "0.31.0"
license = "Apache-2.0"

[package.metadata.docs.rs]
Expand Down
32 changes: 4 additions & 28 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("dock-pos-dev-runtime"),
impl_name: create_runtime_str!("Dock"),
authoring_version: 1,
spec_version: 64,
spec_version: 65,
impl_version: 2,
transaction_version: 2,
apis: RUNTIME_API_VERSIONS,
Expand Down Expand Up @@ -377,29 +377,6 @@ parameter_types! {
pub const SS58Prefix: u8 = 22;
}

pub struct ChangeValidatorsConfiguration;

#[cfg(feature = "mainnet")]
impl ChangeValidatorsConfiguration {
pub const VALIDATOR_COUNT: u32 = 20;
pub const MIN_VALIDATOR_BOND: Balance = 1_000_000 * DOCK;
}

#[cfg(not(feature = "mainnet"))]
impl ChangeValidatorsConfiguration {
pub const VALIDATOR_COUNT: u32 = 2;
pub const MIN_VALIDATOR_BOND: Balance = 1_000_000 * DOCK;
}

impl OnRuntimeUpgrade for ChangeValidatorsConfiguration {
fn on_runtime_upgrade() -> Weight {
pallet_staking::ValidatorCount::<Runtime>::put(Self::VALIDATOR_COUNT);
pallet_staking::MinValidatorBond::<Runtime>::put(Self::MIN_VALIDATOR_BOND);

<Runtime as frame_system::Config>::DbWeight::get().writes(2)
}
}

#[cfg(not(any(feature = "testnet", feature = "mainnet", feature = "devnet")))]
parameter_types! {
pub const SS58Prefix: u8 = 42;
Expand Down Expand Up @@ -1778,11 +1755,11 @@ impl dock_agreement::Config for Runtime {
type Event = Event;
}

/*impl dock_cheqd_migration::Config for Runtime {
impl dock_cheqd_migration::Config for Runtime {
type Event = Event;
type Currency = Balances;
type BurnDestination = BurnDestination;
}*/
}

parameter_types! {
pub PrecompilesValue: FrontierPrecompiles<Runtime> = FrontierPrecompiles::<_>::new();
Expand Down Expand Up @@ -1840,7 +1817,7 @@ construct_runtime!(
StatusListCredential: status_list_credential::{Pallet, Call, Storage, Event} = 42,
TrustRegistry: trust_registry::{Pallet, Call, Storage, Event} = 43,
Agreement: dock_agreement::{Pallet, Call, Event} = 44,
// CheqdMigration: dock_cheqd_migration::{Pallet, Call, Event<T>} = 45
CheqdMigration: dock_cheqd_migration::{Pallet, Call, Event<T>} = 45
}
);

Expand Down Expand Up @@ -1882,7 +1859,6 @@ type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
ChangeValidatorsConfiguration,
>;

/// The address format for describing accounts.
Expand Down
Loading