Skip to content

Commit

Permalink
Merge pull request #459 from opentensor/chore/migrations
Browse files Browse the repository at this point in the history
chore: remove applied migrations
  • Loading branch information
orriin committed May 23, 2024
2 parents 1e1ba1b + 55dcbd9 commit a63bde9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 277 deletions.
68 changes: 31 additions & 37 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,40 +359,34 @@ jobs:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"

# ----
# We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
# which time all future migrations should be idempotent and won't start failing after the
# upgrade is deployed.
# ----
# check-devnet-migrations:
# name: check devnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/try-runtime-gha@v0.1.0"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://dev.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#
# check-testnet-migrations:
# name: check testnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/try-runtime-gha@v0.1.0"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://test.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#
extra-args: "--disable-spec-version-check --no-weight-warnings"

check-devnet-migrations:
name: check devnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://dev.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"

check-testnet-migrations:
name: check testnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://test.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
10 changes: 2 additions & 8 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ use frame_support::{
dispatch::DispatchResultWithPostInfo,
genesis_builder_helper::{build_config, create_default_config},
pallet_prelude::{DispatchError, Get},
traits::{fungible::HoldConsideration, LinearStoragePrice, OnRuntimeUpgrade},
traits::{fungible::HoldConsideration, LinearStoragePrice},
};
use frame_system::{EnsureNever, EnsureRoot, RawOrigin};
use migrations::{account_data_migration, init_storage_versions};
use pallet_commitments::CanCommit;
use pallet_grandpa::{
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
Expand Down Expand Up @@ -1185,12 +1184,7 @@ pub type SignedExtra = (
pallet_commitments::CommitmentsSignedExtension<Runtime>,
);

type Migrations = (
init_storage_versions::Migration,
account_data_migration::Migration,
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
pallet_grandpa::migrations::MigrateV4ToV5<Runtime>,
);
type Migrations = pallet_grandpa::migrations::MigrateV4ToV5<Runtime>;

// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
204 changes: 0 additions & 204 deletions runtime/src/migrations/account_data_migration.rs

This file was deleted.

26 changes: 0 additions & 26 deletions runtime/src/migrations/init_storage_versions.rs

This file was deleted.

3 changes: 1 addition & 2 deletions runtime/src/migrations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pub mod account_data_migration;
pub mod init_storage_versions;
//! Export migrations from here.

0 comments on commit a63bde9

Please sign in to comment.