mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Final tweaks for PoC-2 runtime upgrade (#348)
* Final tweaks for PoC-2 runtime upgrade * Address grumble * Avoid slow wasm * New poc-2-era bootnodes * Fix warning * Typo * Fix for allocation in wasm * Fix & runtimes. * PoC-1 should be default. * Name testnet Krumme Lanke, update README * YML update * Use the right port
This commit is contained in:
@@ -27,8 +27,8 @@ pub enum ChainSpec {
|
||||
Development,
|
||||
/// Whatever the current runtime is, with simple Alice/Bob auths.
|
||||
LocalTestnet,
|
||||
/// The PoC-1 testnet.
|
||||
PoC1Testnet,
|
||||
/// The PoC-1 & PoC-2 era testnet.
|
||||
KrummeLanke,
|
||||
/// Whatever the current runtime is with the "global testnet" defaults.
|
||||
StagingTestnet,
|
||||
/// Custom Genesis file.
|
||||
@@ -39,7 +39,7 @@ pub enum ChainSpec {
|
||||
impl ChainSpec {
|
||||
pub(crate) fn load(self) -> Result<service::ChainSpec, String> {
|
||||
Ok(match self {
|
||||
ChainSpec::PoC1Testnet => service::chain_spec::poc_1_testnet_config()?,
|
||||
ChainSpec::KrummeLanke => service::chain_spec::poc_1_testnet_config()?,
|
||||
ChainSpec::Development => service::chain_spec::development_config(),
|
||||
ChainSpec::LocalTestnet => service::chain_spec::local_testnet_config(),
|
||||
ChainSpec::StagingTestnet => service::chain_spec::staging_testnet_config(),
|
||||
@@ -53,7 +53,8 @@ impl<'a> From<&'a str> for ChainSpec {
|
||||
match s {
|
||||
"dev" => ChainSpec::Development,
|
||||
"local" => ChainSpec::LocalTestnet,
|
||||
"poc-1" => ChainSpec::PoC1Testnet,
|
||||
"poc-1" => ChainSpec::KrummeLanke,
|
||||
"krummelanke" => ChainSpec::KrummeLanke,
|
||||
"staging" => ChainSpec::StagingTestnet,
|
||||
s => ChainSpec::Custom(s.into()),
|
||||
}
|
||||
@@ -65,7 +66,7 @@ impl From<ChainSpec> for String {
|
||||
match s {
|
||||
ChainSpec::Development => "dev".into(),
|
||||
ChainSpec::LocalTestnet => "local".into(),
|
||||
ChainSpec::PoC1Testnet => "poc-1".into(),
|
||||
ChainSpec::KrummeLanke => "krummelanke".into(),
|
||||
ChainSpec::StagingTestnet => "staging".into(),
|
||||
ChainSpec::Custom(f) => format!("custom ({})", f),
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ args:
|
||||
- chain:
|
||||
long: chain
|
||||
value_name: CHAIN_SPEC
|
||||
help: Specify the chain specification (one of poc-1, dev, local or staging)
|
||||
help: Specify the chain specification (one of krummelanke, dev, local or staging)
|
||||
takes_value: true
|
||||
- pruning:
|
||||
long: pruning
|
||||
@@ -118,7 +118,7 @@ subcommands:
|
||||
- chain:
|
||||
long: chain
|
||||
value_name: CHAIN_SPEC
|
||||
help: Specify the chain specification (one of poc-1, dev, local or staging)
|
||||
help: Specify the chain specification (one of krummelanke, dev, local or staging)
|
||||
takes_value: true
|
||||
- export-blocks:
|
||||
about: Export blocks to a file
|
||||
|
||||
@@ -111,9 +111,9 @@ impl substrate_rpc::system::SystemApi for SystemConfiguration {
|
||||
fn load_spec(matches: &clap::ArgMatches) -> Result<(service::ChainSpec, bool), String> {
|
||||
let chain_spec = matches.value_of("chain")
|
||||
.map(ChainSpec::from)
|
||||
.unwrap_or_else(|| if matches.is_present("dev") { ChainSpec::Development } else { ChainSpec::StagingTestnet });
|
||||
.unwrap_or_else(|| if matches.is_present("dev") { ChainSpec::Development } else { ChainSpec::KrummeLanke });
|
||||
let is_global = match chain_spec {
|
||||
ChainSpec::PoC1Testnet | ChainSpec::StagingTestnet => true,
|
||||
ChainSpec::KrummeLanke | ChainSpec::StagingTestnet => true,
|
||||
_ => false,
|
||||
};
|
||||
let spec = chain_spec.load()?;
|
||||
|
||||
Generated
+1
@@ -847,6 +847,7 @@ name = "substrate-runtime-primitives"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@ use polkadot_runtime::{GenesisConfig, ConsensusConfig, CouncilConfig, DemocracyC
|
||||
use service::ChainSpec;
|
||||
|
||||
pub fn poc_1_testnet_config() -> Result<ChainSpec<GenesisConfig>, String> {
|
||||
ChainSpec::from_embedded(include_bytes!("../res/poc-1.json"))
|
||||
ChainSpec::from_embedded(include_bytes!("../res/krummelanke.json"))
|
||||
}
|
||||
|
||||
fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
|
||||
Reference in New Issue
Block a user