Rococo rm uneeded migrations, as network reset to "2.1" (#5115)

* rm uneeded migrations, rococo reset to "2.1"

* rm unimplimented generics
README update

* rm unused imports

* Randomness rm
This commit is contained in:
Dan Shields
2022-03-15 00:49:17 -06:00
committed by GitHub
parent 1b985c5d36
commit fa359fd1f7
2 changed files with 6 additions and 46 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
# Rococo: v1
# Rococo: v2.1
Rococo is a testnet runtime with no stability guarantees.
## How to run
## How to run `rococo-local`
> TODO: figure out how to run this properly.
The [Cumulus Tutorial](https://docs.substrate.io/tutorials/v3/cumulus/start-relay/) details building, starting, and testing `rococo-local` and parachains connecting to it.
### Alice
## How to register a parachain on the Rococo testnet
`cargo run --release -- --alice --tmp --validator --chain rococo-local`
The [parachain registration process](https://docs.substrate.io/tutorials/v3/cumulus/rococo/) on the public Rococo testnet is also outlined.
+1 -41
View File
@@ -24,7 +24,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion};
use frame_support::{
construct_runtime, parameter_types,
traits::{Contains, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
traits::{Contains, InstanceFilter, KeyOwnerProofSystem},
PalletId,
};
use frame_system::EnsureRoot;
@@ -148,50 +148,10 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(SessionHistoricalModulePrefixMigration, CrowdloanIndexMigration),
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
// Migration for crowdloan pallet to use fund index for account generation.
pub struct CrowdloanIndexMigration;
impl OnRuntimeUpgrade for CrowdloanIndexMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
crowdloan::migration::crowdloan_index_migration::migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
crowdloan::migration::crowdloan_index_migration::pre_migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
crowdloan::migration::crowdloan_index_migration::post_migrate::<Runtime>()
}
}
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
pub struct SessionHistoricalModulePrefixMigration;
impl OnRuntimeUpgrade for SessionHistoricalModulePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_session::migrations::v1::migrate::<Runtime, Historical>()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_session::migrations::v1::pre_migrate::<Runtime, Historical>();
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_session::migrations::v1::post_migrate::<Runtime, Historical>();
Ok(())
}
}
impl_opaque_keys! {
pub struct SessionKeys {
pub grandpa: Grandpa,