diff --git a/node/src/chain_spec/localnet.rs b/node/src/chain_spec/localnet.rs index 1595c75ae..06ff5b755 100644 --- a/node/src/chain_spec/localnet.rs +++ b/node/src/chain_spec/localnet.rs @@ -3,7 +3,7 @@ use super::*; -pub fn localnet_config() -> Result { +pub fn localnet_config(single_authority: bool) -> Result { let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; // Give front-ends necessary data to present to users @@ -32,11 +32,15 @@ pub fn localnet_config() -> Result { .with_genesis_config_patch(localnet_genesis( // Initial PoA authorities (Validators) // aura | grandpa - vec![ - // Keys for debug - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], + if single_authority { + // single authority allows you to run the network using a single node + vec![authority_keys_from_seed("Alice")] + } else { + vec![ + authority_keys_from_seed("Alice"), + authority_keys_from_seed("Bob"), + ] + }, // Pre-funded accounts true, )) diff --git a/node/src/command.rs b/node/src/command.rs index a5a92a377..7b6d6982b 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -41,7 +41,8 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> Result, String> { Ok(match id { - "local" => Box::new(chain_spec::localnet::localnet_config()?), + "dev" => Box::new(chain_spec::localnet::localnet_config(true)?), + "local" => Box::new(chain_spec::localnet::localnet_config(false)?), "finney" => Box::new(chain_spec::finney::finney_mainnet_config()?), "devnet" => Box::new(chain_spec::devnet::devnet_config()?), "" | "test_finney" => Box::new(chain_spec::testnet::finney_testnet_config()?), diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 2455da5d0..cca99f654 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -160,7 +160,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 208, + spec_version: 209, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,