mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 04:11:07 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user