diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 3bd5878940..1aea23158e 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -1963,7 +1963,6 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "srml-treasury 0.1.0", - "srml-upgrade-key 0.1.0", "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", "substrate-keyring 0.1.0", @@ -3479,19 +3478,6 @@ dependencies = [ "substrate-primitives 0.1.0", ] -[[package]] -name = "srml-upgrade-key" -version = "0.1.0" -dependencies = [ - "parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 0.1.0", - "sr-std 0.1.0", - "srml-consensus 0.1.0", - "srml-support 0.1.0", - "srml-system 0.1.0", -] - [[package]] name = "stable_deref_trait" version = "1.1.1" diff --git a/substrate/Cargo.toml b/substrate/Cargo.toml index 286e93ecae..826dc3f1fb 100644 --- a/substrate/Cargo.toml +++ b/substrate/Cargo.toml @@ -78,7 +78,6 @@ members = [ "srml/system", "srml/timestamp", "srml/treasury", - "srml/upgrade-key", "node/cli", "node/executor", "node/primitives", diff --git a/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm b/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm index 82ede85903..0059c30021 100644 Binary files a/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm and b/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm differ diff --git a/substrate/node/runtime/Cargo.toml b/substrate/node/runtime/Cargo.toml index 6a5d334687..6387fbe5b3 100644 --- a/substrate/node/runtime/Cargo.toml +++ b/substrate/node/runtime/Cargo.toml @@ -30,7 +30,6 @@ system = { package = "srml-system", path = "../../srml/system", default-features timestamp = { package = "srml-timestamp", path = "../../srml/timestamp", default-features = false } treasury = { package = "srml-treasury", path = "../../srml/treasury", default-features = false } sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = false } -srml-upgrade-key = { path = "../../srml/upgrade-key", default-features = false } fees = { package = "srml-fees", path = "../../srml/fees", default-features = false } node-primitives = { path = "../primitives", default-features = false } consensus_aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default-features = false } @@ -61,7 +60,6 @@ std = [ "timestamp/std", "treasury/std", "sudo/std", - "srml-upgrade-key/std", "fees/std", "version/std", "node-primitives/std", diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index b03d74ea0b..ea9f60afd9 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -58,7 +58,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 35, + spec_version: 36, impl_version: 39, apis: RUNTIME_API_VERSIONS, }; diff --git a/substrate/node/runtime/wasm/Cargo.lock b/substrate/node/runtime/wasm/Cargo.lock index 81ae7c45cc..50a8459160 100644 --- a/substrate/node/runtime/wasm/Cargo.lock +++ b/substrate/node/runtime/wasm/Cargo.lock @@ -804,7 +804,6 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "srml-treasury 0.1.0", - "srml-upgrade-key 0.1.0", "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", "substrate-keyring 0.1.0", @@ -1833,19 +1832,6 @@ dependencies = [ "srml-system 0.1.0", ] -[[package]] -name = "srml-upgrade-key" -version = "0.1.0" -dependencies = [ - "parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 0.1.0", - "sr-std 0.1.0", - "srml-consensus 0.1.0", - "srml-support 0.1.0", - "srml-system 0.1.0", -] - [[package]] name = "stable_deref_trait" version = "1.1.1" diff --git a/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm b/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm index 9da882e139..f3ccde68d4 100644 Binary files a/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm and b/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm differ diff --git a/substrate/srml/upgrade-key/Cargo.toml b/substrate/srml/upgrade-key/Cargo.toml deleted file mode 100644 index 4bdbd6404c..0000000000 --- a/substrate/srml/upgrade-key/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "srml-upgrade-key" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2018" - -[dependencies] -serde = { version = "1.0", optional = true } -parity-codec = { version = "3.2", default-features = false } -sr-std = { path = "../../core/sr-std", default-features = false } -sr-primitives = { path = "../../core/sr-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } -system = { package = "srml-system", path = "../system", default-features = false } -consensus = { package = "srml-consensus", path = "../consensus", default-features = false } - -[features] -default = ["std"] -std = [ - "serde", - "parity-codec/std", - "sr-std/std", - "sr-primitives/std", - "srml-support/std", - "system/std", - "consensus/std", -] diff --git a/substrate/srml/upgrade-key/src/lib.rs b/substrate/srml/upgrade-key/src/lib.rs deleted file mode 100644 index 46e757bcc9..0000000000 --- a/substrate/srml/upgrade-key/src/lib.rs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2017-2019 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -//! The Example: A simple example of a runtime module demonstrating -//! concepts, APIs and structures common to most runtime modules. - -#![cfg_attr(not(feature = "std"), no_std)] - -use sr_std::prelude::*; -use sr_primitives::traits::StaticLookup; -use srml_support::{StorageValue, decl_module, decl_event, decl_storage, ensure}; -use system::ensure_signed; - -pub trait Trait: consensus::Trait + system::Trait { - /// The overarching event type. - type Event: From> + Into<::Event>; -} - -decl_module! { - // Simple declaration of the `Module` type. Lets the macro know what its working on. - pub struct Module for enum Call where origin: T::Origin { - fn deposit_event() = default; - fn upgrade(origin, new: Vec) { - // This is a public call, so we ensure that the origin is some signed account. - let _sender = ensure_signed(origin)?; - ensure!(_sender == Self::key(), "only the current upgrade key can use the upgrade_key module"); - - >::set_code(new)?; - Self::deposit_event(RawEvent::Upgraded); - } - - fn set_key(origin, new: ::Source) { - // This is a public call, so we ensure that the origin is some signed account. - let _sender = ensure_signed(origin)?; - ensure!(_sender == Self::key(), "only the current upgrade key can use the upgrade_key module"); - let new = T::Lookup::lookup(new)?; - - Self::deposit_event(RawEvent::KeyChanged(Self::key())); - >::put(new); - } - } -} - -/// An event in this module. -decl_event!( - pub enum Event where AccountId = ::AccountId { - /// An upgrade just happened. - Upgraded, - /// An upgrade just happened; old key is supplied as an argument. - KeyChanged(AccountId), - } -); - -decl_storage! { - trait Store for Module as UpgradeKey { - Key get(key) config(): T::AccountId; - } -} diff --git a/substrate/test-utils/chain-spec-builder/Cargo.lock b/substrate/test-utils/chain-spec-builder/Cargo.lock index feccfa14ef..2d5311d502 100644 --- a/substrate/test-utils/chain-spec-builder/Cargo.lock +++ b/substrate/test-utils/chain-spec-builder/Cargo.lock @@ -1781,7 +1781,6 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "srml-treasury 0.1.0", - "srml-upgrade-key 0.1.0", "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", "substrate-keyring 0.1.0", @@ -3006,24 +3005,6 @@ dependencies = [ "substrate-primitives 0.1.0", ] -[[package]] -name = "srml-upgrade-key" -version = "0.1.0" -dependencies = [ - "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 0.1.0", - "sr-primitives 0.1.0", - "sr-std 0.1.0", - "srml-consensus 0.1.0", - "srml-support 0.1.0", - "srml-support-procedural 0.1.0", - "srml-system 0.1.0", - "substrate-primitives 0.1.0", -] - [[package]] name = "stable_deref_trait" version = "1.1.1" diff --git a/substrate/test-utils/chain-spec-builder/src/cli.yml b/substrate/test-utils/chain-spec-builder/src/cli.yml index 08c0233c31..f4b1cb7e2e 100644 --- a/substrate/test-utils/chain-spec-builder/src/cli.yml +++ b/substrate/test-utils/chain-spec-builder/src/cli.yml @@ -16,9 +16,9 @@ args: takes_value: true multiple: true required: true -- upgrade_key_seed: +- sudo_key_seed: short: u - value_name: UPGRADE_KEY_SEED - help: Upgrade key seed + value_name: SUDO_KEY_SEED + help: Sudo key seed takes_value: true required: true diff --git a/substrate/test-utils/chain-spec-builder/src/main.rs b/substrate/test-utils/chain-spec-builder/src/main.rs index b899f9c1fc..c7b4dd99d8 100644 --- a/substrate/test-utils/chain-spec-builder/src/main.rs +++ b/substrate/test-utils/chain-spec-builder/src/main.rs @@ -16,11 +16,11 @@ fn genesis_constructor() -> chain_spec::GenesisConfig { .map(chain_spec::get_authority_id_from_seed) .collect(); - let upgrade_key_seed = matches.value_of("upgrade_key_seed").unwrap(); - let upgrade_key = chain_spec::get_authority_id_from_seed(upgrade_key_seed); + let sudo_key_seed = matches.value_of("sudo_key_seed").unwrap(); + let sudo_key = chain_spec::get_authority_id_from_seed(sudo_key_seed); chain_spec::testnet_genesis( authorities, - upgrade_key.into(), + sudo_key.into(), Some(endowed_accounts), ) }