From 03593eccb12acdf35bf2b70678e0359aef5a9d37 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 1 May 2020 20:17:41 -0400 Subject: [PATCH 01/38] standardize super runtime TODO How to remove the session key stuff from the runtime? --- Cargo.lock | 2 +- nodes/kitchen-node/Cargo.toml | 5 +- nodes/manual-seal/Cargo.toml | 20 ++++++- runtimes/super-runtime/src/genesis.rs | 49 +++++++---------- runtimes/super-runtime/src/lib.rs | 75 +++------------------------ 5 files changed, 48 insertions(+), 103 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a416fd55..ce2917fd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2637,7 +2637,6 @@ dependencies = [ "jsonrpc-core", "log", "parity-scale-codec", - "pow-runtime", "rand 0.7.3", "sc-basic-authorship", "sc-cli", @@ -2660,6 +2659,7 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", + "super-runtime", "vergen", ] diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 30d3afc12..50baae160 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -42,8 +42,7 @@ sc-client = '0.8.0-alpha.6' sc-basic-authorship = '0.8.0-alpha.6' sp-consensus = '0.8.0-alpha.6' -# Pick one of the runtimes below. -# Your runtime must have the necessary pallets to support consensus (Babe, Grandpa, etc). +# This node is compatible with any of the runtimes below # --- # Common runtime configured with most Recipes pallets. runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } @@ -56,7 +55,7 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } -# TODO Can't use this until the API runtime implements babe api +# Runtime with custom runtime-api (custom API only used in rpc-node) # runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 622a549cc..001fed8f1 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -27,7 +27,6 @@ sc-consensus-manual-seal = '0.8.0-alpha.6' sc-rpc = '2.0.0-alpha.6' sc-client-api = '2.0.0-alpha.6' sp-blockchain = '2.0.0-alpha.6' -runtime = { package = "pow-runtime", path = "../../runtimes/pow-runtime" } sp-timestamp = '2.0.0-alpha.6' sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' @@ -42,6 +41,25 @@ sp-inherents = '2.0.0-alpha.6' sp-runtime = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' +# This node is compatible with any of the runtimes below +# --- +# Common runtime configured with most Recipes pallets. +runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } + +# runtime = { package = "pow-runtime", path = "../../runtimes/pow-runtime" } + +# Runtime with custom weight and fee calculation. +# runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} + +# Runtime with off-chain worker enabled. +# To use this runtime, compile kitchen-node with `ocw` feature enabled, +# `cargo build --release --features ocw`. +# runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } + +# Runtime with custom runtime-api (custom API only used in rpc-node) +# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } +# --- + [build-dependencies] vergen = '3.0.4' substrate-build-script-utils = '2.0.0-alpha.6' diff --git a/runtimes/super-runtime/src/genesis.rs b/runtimes/super-runtime/src/genesis.rs index 7ee841d04..78ed17b9e 100644 --- a/runtimes/super-runtime/src/genesis.rs +++ b/runtimes/super-runtime/src/genesis.rs @@ -1,17 +1,15 @@ //! Helper module to build a genesis configuration for the super-runtime use super::{ - AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + AccountId, BalancesConfig, GenesisConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature, }; -use sp_core::{Pair, Public, sr25519}; -use sp_consensus_babe::{AuthorityId as BabeId}; -use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_core::{Pair, sr25519}; use sp_runtime::traits::{Verify, IdentifyAccount}; /// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) +fn get_from_seed(seed: &str) -> TPair::Public { + TPair::from_string(&format!("//{}", seed), None) .expect("static values are valid; qed") .public() } @@ -19,41 +17,36 @@ fn get_from_seed(seed: &str) -> ::Public type AccountPublic = ::Signer; /// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From { - AccountPublic::from(get_from_seed::(seed)).into_account() + AccountPublic::from(get_from_seed::(seed)).into_account() } /// Helper function to generate session key from seed -pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { - ( - get_from_seed::(seed), - get_from_seed::(seed), - ) -} +// pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { +// ( +// get_from_seed::(seed), +// get_from_seed::(seed), +// ) +// } pub fn dev_genesis() -> GenesisConfig { testnet_genesis( - // Initial Authorities - vec![ - authority_keys_from_seed("Alice"), - ], // Root Key - account_id_from_seed::("Alice"), + account_id_from_seed::("Alice"), // Endowed Accounts vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), ], ) } /// Helper function to build a genesis configuration pub fn testnet_genesis( - initial_authorities: Vec<(BabeId, GrandpaId)>, root_key: AccountId, endowed_accounts: Vec ) -> GenesisConfig { @@ -68,11 +61,5 @@ pub fn testnet_genesis( sudo: Some(SudoConfig { key: root_key, }), - babe: Some(BabeConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone(), 1)).collect(), - }), - grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), } } diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index 92b2f03ce..1e578b9c0 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -1,4 +1,6 @@ -//! A Super Runtime. This runtime demonstrates most the recipe pallets in a single super runtime. +//! A Super Runtime. +//! +//! This runtime demonstrates most the recipe pallets in a single super runtime. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. @@ -27,8 +29,6 @@ use sp_runtime::traits::{ }; use frame_system as system; use sp_api::impl_runtime_apis; -use babe::SameAuthoritiesForever; -use grandpa::AuthorityList as GrandpaAuthorityList; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -90,10 +90,7 @@ pub mod opaque { pub type BlockId = generic::BlockId; impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, //TODO is this order correct? I changed stuff in chainspec. - pub babe: Babe, - } + pub struct SessionKeys {} } } @@ -109,18 +106,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { pub const MILLISECS_PER_BLOCK: u64 = 6000; -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// These time units are defined in number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -// Some BABE-specific stuff -// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. -pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); -pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES; - /// The version infromation used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -182,28 +167,13 @@ impl system::Trait for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; - pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK; -} - -impl babe::Trait for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - type EpochChangeTrigger = SameAuthoritiesForever; -} - -impl grandpa::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = 1000; } impl timestamp::Trait for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; - type OnTimestampSet = Babe; + type OnTimestampSet = (); type MinimumPeriod = MinimumPeriod; } @@ -328,7 +298,8 @@ impl ringbuffer_queue::Trait for Runtime { impl randomness::Trait for Runtime { type Event = Event; type CollectiveFlipRandomnessSource = RandomnessCollectiveFlip; - type BabeRandomnessSource = Babe; + //TODO Refactor this recipe to only take one randomness source like a normal pallet would. + type BabeRandomnessSource = RandomnessCollectiveFlip; } impl simple_event::Trait for Runtime { @@ -363,8 +334,6 @@ construct_runtime!( { System: system::{Module, Call, Storage, Config, Event}, Timestamp: timestamp::{Module, Call, Storage, Inherent}, - Babe: babe::{Module, Call, Storage, Config, Inherent(Timestamp)}, - Grandpa: grandpa::{Module, Call, Storage, Config, Event}, Balances: balances::{Module, Call, Storage, Config, Event}, RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, Sudo: sudo::{Module, Call, Config, Storage, Event}, @@ -483,34 +452,6 @@ impl_runtime_apis! { } } - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - } - - impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { - // The choice of `c` parameter (where `1 - c` represents the - // probability of a slot being empty), is done in accordance to the - // slot duration and expected target block time, for safely - // resisting network delays of maximum two seconds. - // - sp_consensus_babe::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: PRIMARY_PROBABILITY, - genesis_authorities: Babe::authorities(), - randomness: Babe::randomness(), - secondary_slots: true, - } - } - - fn current_epoch_start() -> sp_consensus_babe::SlotNumber { - Babe::current_epoch_start() - } - } - impl sp_session::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { opaque::SessionKeys::generate(seed) From f8f7cd547f87b7e68b8b1c58421ca4079f65797a Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 1 May 2020 20:33:32 -0400 Subject: [PATCH 02/38] Preserve babe-grandpa node and runtime. This will be a reipe about grabbing authorities fro mthe runtime. --- Cargo.lock | 70 ++++ Cargo.toml | 2 + nodes/babe-grandpa-node/Cargo.toml | 60 +++ nodes/babe-grandpa-node/README.md | 46 +++ nodes/babe-grandpa-node/build.rs | 7 + nodes/babe-grandpa-node/src/chain_spec.rs | 68 +++ nodes/babe-grandpa-node/src/cli.rs | 11 + nodes/babe-grandpa-node/src/command.rs | 65 +++ nodes/babe-grandpa-node/src/main.rs | 14 + nodes/babe-grandpa-node/src/service.rs | 255 ++++++++++++ runtimes/babe-grandpa-runtime/Cargo.toml | 84 ++++ .../babe-grandpa-runtime/aggregate_types.js | 29 ++ runtimes/babe-grandpa-runtime/build.rs | 11 + runtimes/babe-grandpa-runtime/src/genesis.rs | 78 ++++ runtimes/babe-grandpa-runtime/src/lib.rs | 390 ++++++++++++++++++ runtimes/babe-grandpa-runtime/types.json | 28 ++ 16 files changed, 1218 insertions(+) create mode 100644 nodes/babe-grandpa-node/Cargo.toml create mode 100644 nodes/babe-grandpa-node/README.md create mode 100644 nodes/babe-grandpa-node/build.rs create mode 100644 nodes/babe-grandpa-node/src/chain_spec.rs create mode 100644 nodes/babe-grandpa-node/src/cli.rs create mode 100644 nodes/babe-grandpa-node/src/command.rs create mode 100644 nodes/babe-grandpa-node/src/main.rs create mode 100644 nodes/babe-grandpa-node/src/service.rs create mode 100644 runtimes/babe-grandpa-runtime/Cargo.toml create mode 100644 runtimes/babe-grandpa-runtime/aggregate_types.js create mode 100644 runtimes/babe-grandpa-runtime/build.rs create mode 100644 runtimes/babe-grandpa-runtime/src/genesis.rs create mode 100644 runtimes/babe-grandpa-runtime/src/lib.rs create mode 100644 runtimes/babe-grandpa-runtime/types.json diff --git a/Cargo.lock b/Cargo.lock index ce2917fd3..42a765ea9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -261,6 +261,76 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +[[package]] +name = "babe-grandpa-node" +version = "2.0.0-alpha.6" +dependencies = [ + "babe-grandpa-runtime", + "ctrlc", + "derive_more 0.15.0", + "exit-future", + "futures 0.1.29", + "futures 0.3.4", + "log", + "parking_lot 0.9.0", + "sc-basic-authorship", + "sc-cli", + "sc-client", + "sc-client-api", + "sc-consensus-babe", + "sc-executor", + "sc-finality-grandpa", + "sc-network", + "sc-service", + "sc-transaction-pool", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "tokio 0.1.22", + "trie-root 0.15.2", + "vergen", +] + +[[package]] +name = "babe-grandpa-runtime" +version = "2.0.0-alpha.6" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "safe-mix", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", +] + [[package]] name = "backtrace" version = "0.3.46" diff --git a/Cargo.toml b/Cargo.toml index 77c7c39b7..fabe18fee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,10 +30,12 @@ members = [ "pallets/vec-set", "pallets/weights", "runtimes/api-runtime", + "runtimes/babe-grandpa-runtime", "runtimes/ocw-runtime", "runtimes/pow-runtime", "runtimes/super-runtime", "runtimes/weight-fee-runtime", + "nodes/babe-grandpa-node", "nodes/basic-pow", "nodes/kitchen-node", "nodes/manual-seal", diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml new file mode 100644 index 000000000..98e0436de --- /dev/null +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -0,0 +1,60 @@ +[package] +name = "babe-grandpa-node" +version = "2.0.0-alpha.6" +edition = "2018" +authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] +homepage = 'https://substrate.dev/recipes' +repository = 'https://github.com/substrate-developer-hub/recipes' +description = 'A Substrate node with Babe and Grandpa authorities taken from the runtime.' +license = "GPL-3.0-or-later" + +[[bin]] +name = "babe-grandpa-node" +path = "src/main.rs" + +[dependencies] +derive_more = "0.15.0" +futures = "0.3.1" +structopt = "0.3.8" +futures01 = { package = "futures", version = "0.1.29" } +ctrlc = { version = "3.1.3", features = ["termination"] } +log = "0.4.8" +tokio = "0.1.22" +exit-future = "0.2.0" +parking_lot = "0.9.0" +trie-root = "0.15.2" +sp-io = '2.0.0-alpha.6' +sc-cli = '0.8.0-alpha.6' +sc-client-api = '2.0.0-alpha.6' +sp-core = '2.0.0-alpha.6' +sp-runtime = '2.0.0-alpha.6' +sc-executor = '0.8.0-alpha.6' +sc-service = '0.8.0-alpha.6' +sp-inherents = '2.0.0-alpha.6' +sc-transaction-pool = '2.0.0-alpha.6' +sp-transaction-pool = '2.0.0-alpha.6' +sc-network = '0.8.0-alpha.6' +sc-consensus-babe = '0.8.0-alpha.6' +sp-consensus-babe = '0.8.0-alpha.6' +sc-finality-grandpa = '0.8.0-alpha.6' +sp-finality-grandpa = '2.0.0-alpha.6' +sc-client = '0.8.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.6' +sp-consensus = '0.8.0-alpha.6' + +# This node only works with runtimes that can provide babe and grandpa authorities. +# No other runtimes that come with the recipes provide these APIs, but the substrate demonstration +# runtime doed. +runtime = { package = "babe-grandpa-runtime", path = "../../runtimes/babe-grandpa-runtime" } + +#TODO Test this +# This runtime is not published on crates.io so a git dependency is necessary +# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/" tag = "v2.0.0-alpha.6" } + + +[build-dependencies] +vergen = "3.0.4" +substrate-build-script-utils = '2.0.0-alpha.6' + +[features] +ocw = [] diff --git a/nodes/babe-grandpa-node/README.md b/nodes/babe-grandpa-node/README.md new file mode 100644 index 000000000..fb5f7bf58 --- /dev/null +++ b/nodes/babe-grandpa-node/README.md @@ -0,0 +1,46 @@ +# Kitchen Node +This Substrate-based node does not contain its own runtime. Rather it imports another runtime (like the ones here in the kitchen) through it's `Cargo.toml` file, and wraps them with a standard blockchain chasis including: + +* Babe block production +* Grandpa Finality +* A CLI interface +* An RPC compatible with Polkadot-js API + +## Building + +Install Rust: + +```bash +curl https://sh.rustup.rs -sSf | sh +``` + +Install required tools: + +```bash +./scripts/init.sh +``` + +Build Wasm and native code: + +```bash +cargo build --release +``` + +## Starting a Node +To start a dev node (after building) run + +```bash +./target/release/kitchen-node purge-chain --dev -y +./target/release/kitchen-node --dev +``` + +There are many other ways to use this node which can be explored by running `kitchen-node --help` or reading general [Substrate Documentation](https://substrate.dev/). + +## Swapping Runtimes +Multiple runtimes in the kitchen are compatible with this node. To swap just edit the `Cargo.toml` file. You may also use this node template to wrap your own custom runtimes. Just make sure you have Babe, Grandpa, and possibly other necessary pallets installed properly. + +```toml +# Edit these lines to point to a different runtime. +# Your runtime must have the necessary pallets to support consensus (Babe, Grandpa, etc) +runtime = { package = "super-runtime", path = "../runtimes/super-runtime" } +``` diff --git a/nodes/babe-grandpa-node/build.rs b/nodes/babe-grandpa-node/build.rs new file mode 100644 index 000000000..e3bfe3116 --- /dev/null +++ b/nodes/babe-grandpa-node/build.rs @@ -0,0 +1,7 @@ +use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; + +fn main() { + generate_cargo_keys(); + + rerun_if_git_head_changed(); +} diff --git a/nodes/babe-grandpa-node/src/chain_spec.rs b/nodes/babe-grandpa-node/src/chain_spec.rs new file mode 100644 index 000000000..51e390a33 --- /dev/null +++ b/nodes/babe-grandpa-node/src/chain_spec.rs @@ -0,0 +1,68 @@ +use sp_core::sr25519; +use sc_service; +use runtime::{ + GenesisConfig, + genesis::{ + account_id_from_seed, + authority_keys_from_seed, + testnet_genesis, + dev_genesis, + } +}; + +// Note this is the URL for the telemetry server +//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; + +/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. +pub type ChainSpec = sc_service::GenericChainSpec; + + +/// Build a Development ChainSpec +pub fn dev_config() -> ChainSpec { + ChainSpec::from_genesis( + "Development", + "dev", + sc_service::ChainType::Development, + dev_genesis, + vec![], + None, + None, + None, + None + ) +} + +/// Build a Local Chainspec +pub fn local_testnet_config() -> ChainSpec { + ChainSpec::from_genesis( + "Local Testnet", + "local_testnet", + sc_service::ChainType::Local, + || testnet_genesis( + vec![ + authority_keys_from_seed("Alice"), + authority_keys_from_seed("Bob"), + ], + account_id_from_seed::("Alice"), + vec![ + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Charlie"), + account_id_from_seed::("Dave"), + account_id_from_seed::("Eve"), + account_id_from_seed::("Ferdie"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Charlie//stash"), + account_id_from_seed::("Dave//stash"), + account_id_from_seed::("Eve//stash"), + account_id_from_seed::("Ferdie//stash"), + ] + ), + vec![], + None, + None, + None, + None + ) +} diff --git a/nodes/babe-grandpa-node/src/cli.rs b/nodes/babe-grandpa-node/src/cli.rs new file mode 100644 index 000000000..0091ef7d7 --- /dev/null +++ b/nodes/babe-grandpa-node/src/cli.rs @@ -0,0 +1,11 @@ +use sc_cli::{RunCmd, Subcommand}; +use structopt::StructOpt; + +#[derive(Debug, StructOpt)] +pub struct Cli { + #[structopt(subcommand)] + pub subcommand: Option, + + #[structopt(flatten)] + pub run: RunCmd, +} diff --git a/nodes/babe-grandpa-node/src/command.rs b/nodes/babe-grandpa-node/src/command.rs new file mode 100644 index 000000000..8b17735ed --- /dev/null +++ b/nodes/babe-grandpa-node/src/command.rs @@ -0,0 +1,65 @@ + +use crate::chain_spec; +use crate::cli::Cli; +use crate::service; +use sc_cli::SubstrateCli; + +impl SubstrateCli for Cli { + fn impl_name() -> &'static str { + "Kitchen Node" + } + + fn impl_version() -> &'static str { + env!("SUBSTRATE_CLI_IMPL_VERSION") + } + + fn description() -> &'static str { + env!("CARGO_PKG_DESCRIPTION") + } + + fn author() -> &'static str { + env!("CARGO_PKG_AUTHORS") + } + + fn support_url() -> &'static str { + "https://github.com/substrate-developer-hub/recipes/issues" + } + + fn copyright_start_year() -> i32 { + 2019 + } + + fn executable_name() -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn load_spec(&self, id: &str) -> Result, String> { + Ok(match id { + "dev" => Box::new(chain_spec::dev_config()), + "" | "local" => Box::new(chain_spec::local_testnet_config()), + path => Box::new(chain_spec::ChainSpec::from_json_file( + std::path::PathBuf::from(path), + )?), + }) + } +} + +/// Parse and run command line arguments +pub fn run() -> sc_cli::Result<()> { + let cli = Cli::from_args(); + + match &cli.subcommand { + Some(subcommand) => { + let runner = cli.create_runner(subcommand)?; + runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0)) + } + None => { + let runner = cli.create_runner(&cli.run)?; + runner.run_node( + service::new_light, + service::new_full, + runtime::VERSION + ) + } + } +} diff --git a/nodes/babe-grandpa-node/src/main.rs b/nodes/babe-grandpa-node/src/main.rs new file mode 100644 index 000000000..46373256b --- /dev/null +++ b/nodes/babe-grandpa-node/src/main.rs @@ -0,0 +1,14 @@ +//! Kitchen Node CLI library. + +#![warn(missing_docs)] +#![warn(unused_extern_crates)] + +mod chain_spec; +#[macro_use] +mod service; +mod cli; +mod command; + +fn main() -> sc_cli::Result<()> { + command::run() +} diff --git a/nodes/babe-grandpa-node/src/service.rs b/nodes/babe-grandpa-node/src/service.rs new file mode 100644 index 000000000..324b7242c --- /dev/null +++ b/nodes/babe-grandpa-node/src/service.rs @@ -0,0 +1,255 @@ +//! Service and ServiceFactory implementation. Specialized wrapper over substrate service. + +use std::sync::Arc; +use std::time::Duration; +use sc_client::LongestChain; +use sc_client_api::ExecutorProvider; +use runtime::{self, opaque::Block, RuntimeApi}; +use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; +use sp_inherents::InherentDataProviders; +use sc_executor::native_executor_instance; +pub use sc_executor::NativeExecutor; +use sc_consensus_babe; +use sc_finality_grandpa::{ + self, + FinalityProofProvider as GrandpaFinalityProofProvider, + StorageAndProofProvider +}; + +// Our native executor instance. +native_executor_instance!( + pub Executor, + runtime::api::dispatch, + runtime::native_version, +); + +/// Starts a `ServiceBuilder` for a full service. +/// +/// Use this macro if you don't actually need the full service, but just the builder in order to +/// be able to perform chain operations. +macro_rules! new_full_start { + ($config:expr) => {{ + let mut import_setup = None; + let inherent_data_providers = sp_inherents::InherentDataProviders::new(); + + let builder = sc_service::ServiceBuilder::new_full::< + runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor + >($config)? + .with_select_chain(|_config, backend| { + Ok(sc_client::LongestChain::new(backend.clone())) + })? + .with_transaction_pool(|config, client, _fetcher| { + let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); + Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) + })? + .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { + let select_chain = select_chain.take() + .ok_or_else(|| sc_service::Error::SelectChainRequired)?; + let (grandpa_block_import, grandpa_link) = + sc_finality_grandpa::block_import( + client.clone(), &(client.clone() as std::sync::Arc<_>), select_chain + )?; + let justification_import = grandpa_block_import.clone(); + + let (babe_block_import, babe_link) = sc_consensus_babe::block_import( + sc_consensus_babe::Config::get_or_compute(&*client)?, + grandpa_block_import, + client.clone(), + )?; + + let import_queue = sc_consensus_babe::import_queue( + babe_link.clone(), + babe_block_import.clone(), + Some(Box::new(justification_import)), + None, + client, + inherent_data_providers.clone(), + )?; + + import_setup = Some((babe_block_import, grandpa_link, babe_link)); + + Ok(import_queue) + })?; + + (builder, import_setup, inherent_data_providers) + }} +} + +/// Builds a new service for a full client. +pub fn new_full(config: Configuration) + -> Result +{ + let role = config.role.clone(); + let force_authoring = config.force_authoring; + let name = config.network.node_name.clone(); + let disable_grandpa = config.disable_grandpa; + + // This variable is only used when ocw feature is enabled. + // Suppress the warning when ocw feature is not enabled. + #[allow(unused_variables)] + let dev_seed = config.dev_key_seed.clone(); + + let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config); + + let (block_import, grandpa_link, babe_link) = + import_setup.take() + .expect("Link Half and Block Import are present for Full Services or setup failed before. qed"); + + let service = builder + .with_finality_proof_provider(|client, backend| { + let provider = client as Arc>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) + })? + .build()?; + + // Initialize seed for signing transaction using off-chain workers + #[cfg(feature = "ocw")] + { + if let Some(seed) = dev_seed { + service + .keystore() + .write() + .insert_ephemeral_from_seed_by_type::( + &seed, + runtime::offchain_demo::KEY_TYPE, + ) + .expect("Dev Seed should always succeed."); + } + } + + if role.is_authority() { + let proposer = sc_basic_authorship::ProposerFactory::new( + service.client(), + service.transaction_pool(), + ); + + let client = service.client(); + let select_chain = service.select_chain() + .ok_or(ServiceError::SelectChainRequired)?; + + let can_author_with = + sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); + + let babe_config = sc_consensus_babe::BabeParams { + keystore: service.keystore(), + client, + select_chain, + env: proposer, + block_import, + sync_oracle: service.network(), + inherent_data_providers: inherent_data_providers.clone(), + force_authoring, + babe_link, + can_author_with, + }; + + let babe = sc_consensus_babe::start_babe(babe_config)?; + service.spawn_essential_task("babe", babe); + } + + // if the node isn't actively participating in consensus then it doesn't + // need a keystore, regardless of which protocol we use below. + let keystore = if role.is_authority() { + Some(service.keystore()) + } else { + None + }; + + let grandpa_config = sc_finality_grandpa::Config { + gossip_duration: Duration::from_millis(333), + justification_period: 512, + name: Some(name), + observer_enabled: false, + keystore, + is_authority: role.is_network_authority(), + }; + + let enable_grandpa = !disable_grandpa; + if enable_grandpa { + // start the full GRANDPA voter + // NOTE: non-authorities could run the GRANDPA observer protocol, but at + // this point the full voter should provide better guarantees of block + // and vote data availability than the observer. The observer has not + // been tested extensively yet and having most nodes in a network run it + // could lead to finality stalls. + let grandpa_config = sc_finality_grandpa::GrandpaParams { + config: grandpa_config, + link: grandpa_link, + network: service.network(), + inherent_data_providers: inherent_data_providers.clone(), + telemetry_on_connect: Some(service.telemetry_on_connect_stream()), + voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), + prometheus_registry: service.prometheus_registry(), + }; + + // the GRANDPA voter task is considered infallible, i.e. + // if it fails we take down the service with it. + service.spawn_essential_task( + "grandpa-voter", + sc_finality_grandpa::run_grandpa_voter(grandpa_config)? + ); + } else { + sc_finality_grandpa::setup_disabled_grandpa( + service.client(), + &inherent_data_providers, + service.network(), + )?; + } + + Ok(service) +} + +/// Builds a new service for a light client. +pub fn new_light(config: Configuration) + -> Result +{ + let inherent_data_providers = InherentDataProviders::new(); + + ServiceBuilder::new_light::(config)? + .with_select_chain(|_config, backend| { + Ok(LongestChain::new(backend.clone())) + })? + .with_transaction_pool(|config, client, fetcher| { + let fetcher = fetcher + .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; + let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); + let pool = sc_transaction_pool::BasicPool::with_revalidation_type( + config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + ); + Ok(pool) + })? + .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| { + let fetch_checker = fetcher + .map(|fetcher| fetcher.checker().clone()) + .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; + let grandpa_block_import = sc_finality_grandpa::light_block_import( + client.clone(), backend, &(client.clone() as Arc<_>), Arc::new(fetch_checker) + )?; + + let finality_proof_import = grandpa_block_import.clone(); + let finality_proof_request_builder = + finality_proof_import.create_finality_proof_request_builder(); + + let (babe_block_import, babe_link) = sc_consensus_babe::block_import( + sc_consensus_babe::Config::get_or_compute(&*client)?, + grandpa_block_import, + client.clone(), + )?; + + let import_queue = sc_consensus_babe::import_queue( + babe_link, + babe_block_import, + None, + Some(Box::new(finality_proof_import)), + client.clone(), + inherent_data_providers.clone(), + )?; + + Ok((import_queue, finality_proof_request_builder)) + })? + .with_finality_proof_provider(|client, backend| { + let provider = client as Arc>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) + })? + .build() +} diff --git a/runtimes/babe-grandpa-runtime/Cargo.toml b/runtimes/babe-grandpa-runtime/Cargo.toml new file mode 100644 index 000000000..f19af4d27 --- /dev/null +++ b/runtimes/babe-grandpa-runtime/Cargo.toml @@ -0,0 +1,84 @@ +[package] +name = "babe-grandpa-runtime" +version = "2.0.0-alpha.6" +authors = ["Joshy Orndorff"] +edition = "2018" +license = "GPL-3.0-or-later" +description = "A Substrate runtime that demonstrates managing Babe and Grandpa Authorities and passing them to the client" + +[dependencies] +parity-scale-codec = { version = "1.3.0", default-features = false, features = ["derive"] } +serde = { version = "1.0", optional = true, features = ["derive"] } +safe-mix = { version = "1.0", default-features = false } +# Substrate Pallets +babe = { package = 'pallet-babe', version = '2.0.0-alpha.6', default_features = false} +balances = { package = 'pallet-balances', version = '2.0.0-alpha.6', default-features = false } +grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.6', default-features = false } +randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.6', default-features = false } +sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.6', default-features = false } +transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.6', default-features = false } +timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.6', default-features = false } + +# Recipe Pallets +#TODO Maybe include Gautam's Validator Set allet here + +# Other Substrate dependencies +frame-executive = { version = '2.0.0-alpha.6', default-features = false } +frame-support = { version = '2.0.0-alpha.6', default-features = false } +frame-system = { version = '2.0.0-alpha.6', default-features = false } +sp-api = { version = '2.0.0-alpha.6', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } +sp-core = { version = '2.0.0-alpha.6', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } +sp-inherents = { version = '2.0.0-alpha.6', default-features = false } +sp-io = { version = '2.0.0-alpha.6', default-features = false } +sp-offchain = { version = '2.0.0-alpha.6', default-features = false } +sp-runtime = { version = '2.0.0-alpha.6', default-features = false } +sp-session = { version = '2.0.0-alpha.6', default-features = false } +sp-std = { version = '2.0.0-alpha.6', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } +sp-version = { version = '2.0.0-alpha.6', default-features = false } + + +[build-dependencies] +wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.4" } + +[features] +default = ["std"] +std = [ + # External dependencies + "safe-mix/std", + "parity-scale-codec/std", + "serde", + + # Substrate dependencies alphabetically + "frame-executive/std", + "frame-support/std", + "frame-system/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-babe/std", + "sp-core/std", + "sp-finality-grandpa/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + + # Substrate Pallets + "babe/std", + "balances/std", + "grandpa/std", + "randomness-collective-flip/std", + "sudo/std", + "timestamp/std", + "transaction-payment/std", + + # Recipes pallets + # (None) +] diff --git a/runtimes/babe-grandpa-runtime/aggregate_types.js b/runtimes/babe-grandpa-runtime/aggregate_types.js new file mode 100644 index 000000000..fd9958f8b --- /dev/null +++ b/runtimes/babe-grandpa-runtime/aggregate_types.js @@ -0,0 +1,29 @@ +// Reads in the type definitions from all pallets in the runtime and the runtime's own tpes +// Naively aggregates types and writes them to disk. + +const fs = require('fs'); + +// A list of all the installed recipe pallets' folder names. +// Does not include system pallets because Apps already supports them. +// Redundant with construct_runtime! +const pallets = [] + +// Types that are native to the runtime itself (ie come from lib.rs) +// These specifics are from https://polkadot.js.org/api/start/types.extend.html#impact-on-extrinsics +const runtimeOwnTypes = { + "Address": "AccountId", + "LookupSource": "AccountId", + "Weight": "u32" +} + +// Loop through all pallets aggregating types +let finalTypes = runtimeOwnTypes; +let palletTypes; +for (let dirname of pallets) { + let path = `../../pallets/${dirname}/types.json`; + palletTypes = JSON.parse(fs.readFileSync(path, 'utf8')); + finalTypes = {...finalTypes, ...palletTypes}; +} + +// Write output to disk +fs.writeFileSync("types.json", JSON.stringify(finalTypes, null, 2), 'utf8'); diff --git a/runtimes/babe-grandpa-runtime/build.rs b/runtimes/babe-grandpa-runtime/build.rs new file mode 100644 index 000000000..63f4bc0f3 --- /dev/null +++ b/runtimes/babe-grandpa-runtime/build.rs @@ -0,0 +1,11 @@ + +use wasm_builder_runner::WasmBuilder; + +fn main() { + WasmBuilder::new() + .with_current_project() + .with_wasm_builder_from_crates("1.0.9") + .export_heap_base() + .import_memory() + .build() +} diff --git a/runtimes/babe-grandpa-runtime/src/genesis.rs b/runtimes/babe-grandpa-runtime/src/genesis.rs new file mode 100644 index 000000000..7ee841d04 --- /dev/null +++ b/runtimes/babe-grandpa-runtime/src/genesis.rs @@ -0,0 +1,78 @@ +//! Helper module to build a genesis configuration for the super-runtime + +use super::{ + AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + SudoConfig, SystemConfig, WASM_BINARY, Signature, +}; +use sp_core::{Pair, Public, sr25519}; +use sp_consensus_babe::{AuthorityId as BabeId}; +use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_runtime::traits::{Verify, IdentifyAccount}; + +/// Helper function to generate a crypto pair from seed +fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +type AccountPublic = ::Signer; + +/// Helper function to generate an account ID from seed +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From<::Public> +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +/// Helper function to generate session key from seed +pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { + ( + get_from_seed::(seed), + get_from_seed::(seed), + ) +} + +pub fn dev_genesis() -> GenesisConfig { + testnet_genesis( + // Initial Authorities + vec![ + authority_keys_from_seed("Alice"), + ], + // Root Key + account_id_from_seed::("Alice"), + // Endowed Accounts + vec![ + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), + ], + ) +} + +/// Helper function to build a genesis configuration +pub fn testnet_genesis( + initial_authorities: Vec<(BabeId, GrandpaId)>, + root_key: AccountId, + endowed_accounts: Vec +) -> GenesisConfig { + GenesisConfig { + system: Some(SystemConfig { + code: WASM_BINARY.to_vec(), + changes_trie_config: Default::default(), + }), + balances: Some(BalancesConfig { + balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(), + }), + sudo: Some(SudoConfig { + key: root_key, + }), + babe: Some(BabeConfig { + authorities: initial_authorities.iter().map(|x| (x.0.clone(), 1)).collect(), + }), + grandpa: Some(GrandpaConfig { + authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), + }), + } +} diff --git a/runtimes/babe-grandpa-runtime/src/lib.rs b/runtimes/babe-grandpa-runtime/src/lib.rs new file mode 100644 index 000000000..793e19694 --- /dev/null +++ b/runtimes/babe-grandpa-runtime/src/lib.rs @@ -0,0 +1,390 @@ +//! A Super Runtime. This runtime demonstrates most the recipe pallets in a single super runtime. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +// Include the genesis helper module when building to std +#[cfg(feature = "std")] +pub mod genesis; + +use sp_std::prelude::*; +use sp_core::{OpaqueMetadata, H256}; +use sp_runtime::{ + ApplyExtrinsicResult, + create_runtime_str, + generic, + impl_opaque_keys, + MultiSignature, + transaction_validity::{TransactionValidity, TransactionSource}, +}; +use sp_runtime::traits::{ + BlakeTwo256, Block as BlockT, IdentityLookup, ConvertInto, Verify, IdentifyAccount, +}; +use frame_system as system; +use sp_api::impl_runtime_apis; +use babe::SameAuthoritiesForever; +use grandpa::AuthorityList as GrandpaAuthorityList; + +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +// A few exports that help ease life for downstream crates. +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +pub use timestamp::Call as TimestampCall; +pub use balances::Call as BalancesCall; +pub use sp_runtime::{Perbill, Permill}; +pub use frame_support::{ + StorageValue, construct_runtime, parameter_types, + traits::Randomness, + weights::Weight, + debug, +}; + +/// An index to a block. +pub type BlockNumber = u32; + +/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. +pub type Signature = MultiSignature; + +/// Some way of identifying an account on the chain. We intentionally make it equivalent +/// to the public key of our transaction signing scheme. +pub type AccountId = <::Signer as IdentifyAccount>::AccountId; + +/// The type for looking up accounts. We don't expect more than 4 billion of them, but you +/// never know... +pub type AccountIndex = u32; + +/// Balance of an account. +pub type Balance = u128; + +/// Index of a transaction in the chain. +pub type Index = u32; + +/// A hash of some data used by the chain. +pub type Hash = H256; + +/// Digest item type. +pub type DigestItem = generic::DigestItem; + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core datastructures. +pub mod opaque { + use super::*; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; + + impl_opaque_keys! { + pub struct SessionKeys { + pub grandpa: Grandpa, //TODO is this order correct? I changed stuff in chainspec. + pub babe: Babe, + } + } +} + +/// This runtime version. +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("super-runtime"), + impl_name: create_runtime_str!("super-runtime"), + authoring_version: 1, + spec_version: 1, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, +}; + +pub const MILLISECS_PER_BLOCK: u64 = 6000; + +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// These time units are defined in number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; + +// Some BABE-specific stuff +// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. +pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); +pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES; + +/// The version infromation used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } +} + +parameter_types! { + pub const BlockHashCount: BlockNumber = 250; + pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); + pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; + pub const Version: RuntimeVersion = VERSION; +} + +impl system::Trait for Runtime { + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = IdentityLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. + type MaximumBlockWeight = MaximumBlockWeight; + /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. + type MaximumBlockLength = MaximumBlockLength; + /// Portion of the block weight that is available to all normal transactions. + type AvailableBlockRatio = AvailableBlockRatio; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type ModuleToIndex = ModuleToIndex; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = balances::AccountData; +} + +parameter_types! { + pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; + pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK; +} + +impl babe::Trait for Runtime { + type EpochDuration = EpochDuration; + type ExpectedBlockTime = ExpectedBlockTime; + type EpochChangeTrigger = SameAuthoritiesForever; +} + +impl grandpa::Trait for Runtime { + type Event = Event; +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl timestamp::Trait for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Babe; + type MinimumPeriod = MinimumPeriod; +} + +parameter_types! { + pub const ExistentialDeposit: u128 = 500; + pub const TransferFee: u128 = 0; + pub const CreationFee: u128 = 0; +} + +impl balances::Trait for Runtime { + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; +} + +parameter_types! { + pub const TransactionBaseFee: u128 = 0; + pub const TransactionByteFee: u128 = 1; +} + +impl transaction_payment::Trait for Runtime { + type Currency = balances::Module; + type OnTransactionPayment = (); + type TransactionBaseFee = TransactionBaseFee; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = ConvertInto; + type FeeMultiplierUpdate = (); +} + +impl sudo::Trait for Runtime { + type Event = Event; + type Call = Call; +} + +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = opaque::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: system::{Module, Call, Storage, Config, Event}, + Timestamp: timestamp::{Module, Call, Storage, Inherent}, + Babe: babe::{Module, Call, Storage, Config, Inherent(Timestamp)}, + Grandpa: grandpa::{Module, Call, Storage, Config, Event}, + Balances: balances::{Module, Call, Storage, Config, Event}, + RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, + Sudo: sudo::{Module, Call, Config, Storage, Event}, + TransactionPayment: transaction_payment::{Module, Storage}, + // The Recipe Pallets + // (None) + } +); + +/// The address format for describing accounts. +pub type Address = AccountId; +/// Block header type as expected by this runtime. +pub type Header = generic::Header; +/// Block type as expected by this runtime. +pub type Block = generic::Block; +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; +/// BlockId type as expected by this runtime. +pub type BlockId = generic::BlockId; +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + system::CheckVersion, + system::CheckGenesis, + system::CheckEra, + system::CheckNonce, + system::CheckWeight, + transaction_payment::ChargeTransactionPayment, +); +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +/// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = generic::CheckedExtrinsic; +/// Executive: handles dispatch to the various pallets. +pub type Executive = frame_executive::Executive, Runtime, AllModules>; + +impl_runtime_apis! { + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + Runtime::metadata().into() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + + fn random_seed() -> ::Hash { + RandomnessCollectiveFlip::random_seed() + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic + ) -> TransactionValidity { + Executive::validate_transaction(source, tx) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_finality_grandpa::GrandpaApi for Runtime { + fn grandpa_authorities() -> GrandpaAuthorityList { + Grandpa::grandpa_authorities() + } + } + + impl sp_consensus_babe::BabeApi for Runtime { + fn configuration() -> sp_consensus_babe::BabeConfiguration { + // The choice of `c` parameter (where `1 - c` represents the + // probability of a slot being empty), is done in accordance to the + // slot duration and expected target block time, for safely + // resisting network delays of maximum two seconds. + // + sp_consensus_babe::BabeConfiguration { + slot_duration: Babe::slot_duration(), + epoch_length: EpochDuration::get(), + c: PRIMARY_PROBABILITY, + genesis_authorities: Babe::authorities(), + randomness: Babe::randomness(), + secondary_slots: true, + } + } + + fn current_epoch_start() -> sp_consensus_babe::SlotNumber { + Babe::current_epoch_start() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + opaque::SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, sp_core::crypto::KeyTypeId)>> { + opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + } + } +} diff --git a/runtimes/babe-grandpa-runtime/types.json b/runtimes/babe-grandpa-runtime/types.json new file mode 100644 index 000000000..f0bbf1923 --- /dev/null +++ b/runtimes/babe-grandpa-runtime/types.json @@ -0,0 +1,28 @@ +{ + "Address": "AccountId", + "LookupSource": "AccountId", + "Weight": "u32", + "ContinuousAccountData": { + "principal": "u64", + "deposit_date": "BlockNumber" + }, + "GroupIndex": "u32", + "TaskId": "Vec", + "PriorityScore": "u32", + "RoundIndex": "u32", + "Task": { + "id": "TaskId", + "score": "PriorityScore", + "proposed_at": "BlockNumber" + }, + "ValueStruct": { + "integer": "i32", + "boolean": "bool" + }, + "BufferIndex": "u8", + "InnerThing": "InnerThingOf", + "SuperThing": { + "super_number": "u32", + "inner_thing": "InnerThing" + } +} \ No newline at end of file From b462e71b3343522f31ae2194958f6dbb52eb2040 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 1 May 2020 20:37:04 -0400 Subject: [PATCH 03/38] standardize basic-pow node and prune pow-runtime --- Cargo.lock | 34 +-- Cargo.toml | 1 - nodes/basic-pow/Cargo.toml | 18 +- runtimes/pow-runtime/Cargo.toml | 180 ------------- runtimes/pow-runtime/aggregate_types.js | 31 --- runtimes/pow-runtime/build.rs | 11 - runtimes/pow-runtime/src/genesis.rs | 59 ----- runtimes/pow-runtime/src/lib.rs | 329 ------------------------ runtimes/pow-runtime/types.json | 5 - 9 files changed, 18 insertions(+), 650 deletions(-) delete mode 100644 runtimes/pow-runtime/Cargo.toml delete mode 100644 runtimes/pow-runtime/aggregate_types.js delete mode 100644 runtimes/pow-runtime/build.rs delete mode 100644 runtimes/pow-runtime/src/genesis.rs delete mode 100644 runtimes/pow-runtime/src/lib.rs delete mode 100644 runtimes/pow-runtime/types.json diff --git a/Cargo.lock b/Cargo.lock index 42a765ea9..012d9a537 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -372,7 +372,6 @@ dependencies = [ "futures 0.3.4", "log", "parity-scale-codec", - "pow-runtime", "rand 0.7.3", "sc-basic-authorship", "sc-cli", @@ -394,6 +393,7 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", + "super-runtime", "vergen", ] @@ -3654,38 +3654,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" -[[package]] -name = "pow-runtime" -version = "2.0.0-alpha.6" -dependencies = [ - "frame-executive", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-generic-asset", - "pallet-indices", - "pallet-randomness-collective-flip", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "parity-scale-codec", - "safe-mix", - "serde", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "substrate-wasm-builder-runner", - "weights", -] - [[package]] name = "ppv-lite86" version = "0.2.6" diff --git a/Cargo.toml b/Cargo.toml index fabe18fee..166b9b1fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,6 @@ members = [ "runtimes/api-runtime", "runtimes/babe-grandpa-runtime", "runtimes/ocw-runtime", - "runtimes/pow-runtime", "runtimes/super-runtime", "runtimes/weight-fee-runtime", "nodes/babe-grandpa-node", diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index c76b4890a..3603d024d 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -23,7 +23,6 @@ sc-consensus-pow = { version = '0.8.0-alpha.6' } sp-consensus-pow = { version = '0.8.0-alpha.6' } sc-client-api = { version = '2.0.0-alpha.6' } sp-blockchain = { version = '2.0.0-alpha.6' } -runtime = { package = "pow-runtime", path = "../../runtimes/pow-runtime" } sp-timestamp = '2.0.0-alpha.6' sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' @@ -38,6 +37,23 @@ sp-inherents = '2.0.0-alpha.6' sp-runtime = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' +# This node is compatible with any of the runtimes below +# --- +# Common runtime configured with most Recipes pallets. +runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } + +# Runtime with custom weight and fee calculation. +# runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} + +# Runtime with off-chain worker enabled. +# To use this runtime, compile kitchen-node with `ocw` feature enabled, +# `cargo build --release --features ocw`. +# runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } + +# Runtime with custom runtime-api (custom API only used in rpc-node) +# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } +# --- + [build-dependencies] vergen = '3.0.4' substrate-build-script-utils = '2.0.0-alpha.6' diff --git a/runtimes/pow-runtime/Cargo.toml b/runtimes/pow-runtime/Cargo.toml deleted file mode 100644 index da27f8351..000000000 --- a/runtimes/pow-runtime/Cargo.toml +++ /dev/null @@ -1,180 +0,0 @@ -[package] -name = "pow-runtime" -version = "2.0.0-alpha.6" -authors = ["Anonymous"] -edition = "2018" -license = "GPL-3.0-or-later" - -[dependencies] -serde = { version = "1.0", optional = true, features = ["derive"] } -safe-mix = { version = "1.0", default-features = false } -weights = { path = "../../pallets/weights", default-features = false } -parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } - -[dependencies.rstd] -default-features = false - -package = "sp-std" -version = '2.0.0-alpha.6' - -[dependencies.runtime-io] -default-features = false - -package = 'sp-io' -version = '2.0.0-alpha.6' - -[dependencies.version] -default-features = false - -package = 'sp-version' -version = '2.0.0-alpha.6' - -[dependencies.frame-support] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.sp-core] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.sp-session] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.balances] -default-features = false - -package = 'pallet-balances' -version = '2.0.0-alpha.6' - -[dependencies.generic-asset] -default-features = false - -package = 'pallet-generic-asset' -version = '2.0.0-alpha.6' - -[dependencies.transaction-payment] -default-features = false - -package = 'pallet-transaction-payment' -version = '2.0.0-alpha.6' - -# [dependencies.babe] -# default-features = false -# -# package = 'pallet-babe' -# version = '2.0.0-alpha.6' -# -# [dependencies.sp-consensus-babe] -# default-features = false -# -# version = '2.0.0-alpha.6' - -[dependencies.executive] -default-features = false - -package = 'frame-executive' -version = '2.0.0-alpha.6' - -[dependencies.indices] -default-features = false - -package = 'pallet-indices' -version = '2.0.0-alpha.6' - -[dependencies.randomness-collective-flip] -default-features = false - -package = 'pallet-randomness-collective-flip' -version = '2.0.0-alpha.6' - -[dependencies.frame-system] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.timestamp] -default-features = false - -package = 'pallet-timestamp' -version = '2.0.0-alpha.6' - -[dependencies.sudo] -default-features = false - -package = 'pallet-sudo' -version = '2.0.0-alpha.6' - -[dependencies.sp-runtime] -default-features = false - -package = 'sp-runtime' -version = '2.0.0-alpha.6' - -[dependencies.sp-api] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.block-builder-api] -default-features = false - -package = 'sp-block-builder' -version = '2.0.0-alpha.6' - -[dependencies.sp-transaction-pool] -default-features = false - -version = '2.0.0-alpha.6' - -[dependencies.inherents] -default-features = false - -package = 'sp-inherents' -version = '2.0.0-alpha.6' - -[dependencies.offchain-primitives] -default-features = false - -package = 'sp-offchain' -version = '2.0.0-alpha.6' - - -[build-dependencies] -wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.4" } - -[features] -default = ["std"] -std = [ - # "babe/std", - "balances/std", - "block-builder-api/std", - "executive/std", - "generic-asset/std", - # "grandpa/std", - "indices/std", - "inherents/std", - "offchain-primitives/std", - "parity-scale-codec/std", - "randomness-collective-flip/std", - "rstd/std", - "runtime-io/std", - "safe-mix/std", - "serde", - "sp-api/std", - # "sp-consensus-babe/std", - "sp-core/std", - "sp-runtime/std", - "sp-session/std", - "sudo/std", - "frame-support/std", - "frame-system/std", - "timestamp/std", - "transaction-payment/std", - "version/std", - "weights/std", - "sp-transaction-pool/std", -] diff --git a/runtimes/pow-runtime/aggregate_types.js b/runtimes/pow-runtime/aggregate_types.js deleted file mode 100644 index 69e880dd6..000000000 --- a/runtimes/pow-runtime/aggregate_types.js +++ /dev/null @@ -1,31 +0,0 @@ -// Reads in the type definitions from all pallets in the runtime and the runtime's own tpes -// Naively aggregates types and writes them to disk. - -const fs = require('fs'); - -// A list of all the installed recipe pallets' folder names. -// Does not include system pallets because Apps already supports them. -// Redundant with construct_runtime! -const pallets = [ - "weights", -] - -// Types that are native to the runtime itself (ie come from lib.rs) -// These specifics are from https://polkadot.js.org/api/start/types.extend.html#impact-on-extrinsics -const runtimeOwnTypes = { - "Address": "AccountId", - "LookupSource": "AccountId", - "Weight": "u32" -} - -// Loop through all pallets aggregating types -let finalTypes = runtimeOwnTypes; -let palletTypes; -for (let dirname of pallets) { - let path = `../../pallets/${dirname}/types.json`; - palletTypes = JSON.parse(fs.readFileSync(path, 'utf8')); - finalTypes = {...finalTypes, ...palletTypes}; -} - -// Write output to disk -fs.writeFileSync("types.json", JSON.stringify(finalTypes, null, 2), 'utf8'); diff --git a/runtimes/pow-runtime/build.rs b/runtimes/pow-runtime/build.rs deleted file mode 100644 index 63f4bc0f3..000000000 --- a/runtimes/pow-runtime/build.rs +++ /dev/null @@ -1,11 +0,0 @@ - -use wasm_builder_runner::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .with_wasm_builder_from_crates("1.0.9") - .export_heap_base() - .import_memory() - .build() -} diff --git a/runtimes/pow-runtime/src/genesis.rs b/runtimes/pow-runtime/src/genesis.rs deleted file mode 100644 index 83fdeb87e..000000000 --- a/runtimes/pow-runtime/src/genesis.rs +++ /dev/null @@ -1,59 +0,0 @@ -//! Helper module to build a genesis configuration for the pow-runtime - -use super::{ - AccountId, BalancesConfig, GenesisConfig, - SudoConfig, SystemConfig, WASM_BINARY, Signature, -}; -use sp_core::{Pair, sr25519}; -use sp_runtime::traits::{Verify, IdentifyAccount}; - -/// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> TPair::Public { - TPair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -type AccountPublic = ::Signer; - -/// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -pub fn dev_genesis() -> GenesisConfig { - testnet_genesis( - // Root Key - account_id_from_seed::("Alice"), - // Endowed Accounts - vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), - ], - ) -} - -/// This helper function is unlike the testnet_genesis functions in other runtimes. -/// It does not accept a list of initial authorities because there is no concept of -/// authorities in a purely PoW chain. -pub fn testnet_genesis( - root_key: AccountId, - endowed_accounts: Vec, -) -> GenesisConfig { - GenesisConfig { - system: Some(SystemConfig { - code: WASM_BINARY.to_vec(), - changes_trie_config: Default::default(), - }), - balances: Some(BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(), - }), - sudo: Some(SudoConfig { - key: root_key, - }), - } -} diff --git a/runtimes/pow-runtime/src/lib.rs b/runtimes/pow-runtime/src/lib.rs deleted file mode 100644 index 1cb0f60d9..000000000 --- a/runtimes/pow-runtime/src/lib.rs +++ /dev/null @@ -1,329 +0,0 @@ -//! A Runtime for use in Proof of Work nodes. It is simpler than other runtimes -//! because it does not have session key stuff. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit="256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -// Include the genesis helper module when building to std -#[cfg(feature = "std")] -pub mod genesis; - -use rstd::prelude::*; -use sp_core::{OpaqueMetadata, H256}; -use sp_runtime::{ - ApplyExtrinsicResult, - create_runtime_str, - generic, - impl_opaque_keys, - MultiSignature, - transaction_validity::{TransactionValidity, TransactionSource}, -}; -use sp_runtime::traits::{ - BlakeTwo256, - Block as BlockT, - IdentityLookup, - ConvertInto, - Verify, - IdentifyAccount, -}; -use sp_api::impl_runtime_apis; -use frame_system as system; -#[cfg(feature = "std")] -use version::NativeVersion; -use version::RuntimeVersion; - -// A few exports that help ease life for downstream crates. -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use timestamp::Call as TimestampCall; -pub use balances::Call as BalancesCall; -pub use sp_runtime::{Permill, Perbill}; -pub use frame_support::{ - StorageValue, construct_runtime, parameter_types, - traits::Randomness, - weights::Weight, -}; - -/// An index to a block. -pub type BlockNumber = u32; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -//TODO Can this be removed? -/// The type for looking up accounts. We don't expect more than 4 billion of them, but you -/// never know... -pub type AccountIndex = u32; - -/// Balance of an account. -pub type Balance = u128; - -/// Index of a transaction in the chain. -pub type Index = u32; - -/// A hash of some data used by the chain. -pub type Hash = H256; - -/// Digest item type. -pub type DigestItem = generic::DigestItem; - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core datastructures. -pub mod opaque { - use super::*; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys {} - } -} - -/// This runtime version. -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("pow-runtime"), - impl_name: create_runtime_str!("pow-runtime"), - authoring_version: 1, - spec_version: 1, - impl_version: 1, - apis: RUNTIME_API_VERSIONS, -}; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; - pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); - pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; - pub const Version: RuntimeVersion = VERSION; -} - -impl system::Trait for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type Event = Event; - /// The ubiquitous origin type. - type Origin = Origin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. - type MaximumBlockWeight = MaximumBlockWeight; - /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. - type MaximumBlockLength = MaximumBlockLength; - /// Portion of the block weight that is available to all normal transactions. - type AvailableBlockRatio = AvailableBlockRatio; - /// Version of the runtime. - type Version = Version; - /// Converts a module to the index of the module in `construct_runtime!`. - /// - /// This type is being generated by `construct_runtime!`. - type ModuleToIndex = ModuleToIndex; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = balances::AccountData; -} - -parameter_types! { - pub const MinimumPeriod: u64 = 100; -} - -impl timestamp::Trait for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - pub const TransferFee: u128 = 0; - pub const CreationFee: u128 = 0; -} - -impl balances::Trait for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -impl sudo::Trait for Runtime { - type Event = Event; - type Call = Call; -} - -parameter_types! { - pub const TransactionBaseFee: u128 = 0; - pub const TransactionByteFee: u128 = 1; -} - -impl transaction_payment::Trait for Runtime { - type Currency = Balances; - type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; - type TransactionByteFee = TransactionByteFee; - type WeightToFee = ConvertInto; - type FeeMultiplierUpdate = (); -} - -construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: system::{Module, Call, Storage, Config, Event}, - Timestamp: timestamp::{Module, Call, Storage, Inherent}, - Balances: balances::{Module, Call, Storage, Config, Event}, - RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, - Sudo: sudo::{Module, Call, Config, Storage, Event}, - TransactionPayment: transaction_payment::{Module, Storage}, - } -); - -/// The address format for describing accounts. -pub type Address = AccountId; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - system::CheckVersion, - system::CheckGenesis, - system::CheckEra, - system::CheckNonce, - system::CheckWeight, - transaction_payment::ChargeTransactionPayment -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various pallets. -pub type Executive = executive::Executive, Runtime, AllModules>; - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() - } - } - - impl block_builder_api::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: inherents::InherentData - ) -> inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - - fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic - ) -> TransactionValidity { - Executive::validate_transaction(source, tx) - } - } - - impl offchain_primitives::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) - } - } -} diff --git a/runtimes/pow-runtime/types.json b/runtimes/pow-runtime/types.json deleted file mode 100644 index ef86d910a..000000000 --- a/runtimes/pow-runtime/types.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Address": "AccountId", - "LookupSource": "AccountId", - "Weight": "u32" -} \ No newline at end of file From 035eedb26718911fbec90f04faf35d8b9851906b Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 1 May 2020 20:49:03 -0400 Subject: [PATCH 04/38] Standardize weight-fee-runtime. --- runtimes/weight-fee-runtime/src/genesis.rs | 45 ++++-------- runtimes/weight-fee-runtime/src/lib.rs | 79 ++-------------------- 2 files changed, 19 insertions(+), 105 deletions(-) diff --git a/runtimes/weight-fee-runtime/src/genesis.rs b/runtimes/weight-fee-runtime/src/genesis.rs index 03c012627..683d85dc7 100644 --- a/runtimes/weight-fee-runtime/src/genesis.rs +++ b/runtimes/weight-fee-runtime/src/genesis.rs @@ -1,17 +1,15 @@ //! Helper module to build a genesis configuration for the weight-fee-runtime use super::{ - AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + AccountId, BalancesConfig, GenesisConfig, SudoConfig, SystemConfig, GenericAssetConfig, WASM_BINARY, Signature, }; -use sp_core::{Pair, Public, sr25519}; -use sp_consensus_babe::{AuthorityId as BabeId}; -use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_core::{Pair, sr25519}; use sp_runtime::traits::{Verify, IdentifyAccount}; /// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) +fn get_from_seed(seed: &str) -> TPair::Public { + TPair::from_string(&format!("//{}", seed), None) .expect("static values are valid; qed") .public() } @@ -19,41 +17,28 @@ fn get_from_seed(seed: &str) -> ::Public type AccountPublic = ::Signer; /// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From { - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate session key from seed -pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { - ( - get_from_seed::(seed), - get_from_seed::(seed), - ) + AccountPublic::from(get_from_seed::(seed)).into_account() } pub fn dev_genesis() -> GenesisConfig { testnet_genesis( - // Initial Authorities - vec![ - authority_keys_from_seed("Alice"), - ], // Root Key - account_id_from_seed::("Alice"), + account_id_from_seed::("Alice"), // Endowed Accounts vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), ], ) } /// Helper function to build a genesis configuration pub fn testnet_genesis( - initial_authorities: Vec<(BabeId, GrandpaId)>, root_key: AccountId, endowed_accounts: Vec, ) -> GenesisConfig { @@ -79,11 +64,5 @@ pub fn testnet_genesis( sudo: Some(SudoConfig { key: root_key, }), - babe: Some(BabeConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone(), 1)).collect(), - }), - grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), } } diff --git a/runtimes/weight-fee-runtime/src/lib.rs b/runtimes/weight-fee-runtime/src/lib.rs index 2b1d1e469..8e1216be8 100644 --- a/runtimes/weight-fee-runtime/src/lib.rs +++ b/runtimes/weight-fee-runtime/src/lib.rs @@ -1,5 +1,7 @@ -//! A Super Runtime. This runtime demonstrates all the recipes in the kitchen -//! in a single super runtime. +//! Weight Fee Runtime. +//! +//! This runtime demonstrates several ways to convert weights to fees and how to charge +//! fees in various assets. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. @@ -35,8 +37,6 @@ use frame_support::{ traits::Get, weights::Weight, }; -use babe::SameAuthoritiesForever; -use grandpa::{AuthorityId as GrandpaId, AuthorityWeight as GrandpaWeight}; use sp_api::impl_runtime_apis; use sp_version::RuntimeVersion; #[cfg(feature = "std")] @@ -100,13 +100,8 @@ pub mod opaque { /// Opaque block identifier type. pub type BlockId = generic::BlockId; - pub type SessionHandlers = (Grandpa, Babe); - impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - } + pub struct SessionKeys {} } } @@ -120,21 +115,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, }; -/// Constants for Babe. -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES; - -// These time units are defined in number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. -pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); - /// The version infromation used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -196,28 +176,13 @@ impl system::Trait for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; - pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK; -} - -impl babe::Trait for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - type EpochChangeTrigger = SameAuthoritiesForever; -} - -impl grandpa::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = 1000; } impl timestamp::Trait for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; - type OnTimestampSet = Babe; + type OnTimestampSet = (); type MinimumPeriod = MinimumPeriod; } @@ -360,8 +325,6 @@ construct_runtime!( { System: system::{Module, Call, Storage, Config, Event}, Timestamp: timestamp::{Module, Call, Storage, Inherent}, - Babe: babe::{Module, Call, Storage, Config, Inherent(Timestamp)}, - Grandpa: grandpa::{Module, Call, Storage, Config, Event}, Balances: balances::{Module, Call, Storage, Config, Event}, GenericAsset: generic_asset::{Module, Call, Storage, Config, Event}, RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, @@ -459,34 +422,6 @@ impl_runtime_apis! { } } - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn grandpa_authorities() -> Vec<(GrandpaId, GrandpaWeight)> { - Grandpa::grandpa_authorities() - } - } - - impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { - // The choice of `c` parameter (where `1 - c` represents the - // probability of a slot being empty), is done in accordance to the - // slot duration and expected target block time, for safely - // resisting network delays of maximum two seconds. - // - sp_consensus_babe::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: PRIMARY_PROBABILITY, - genesis_authorities: Babe::authorities(), - randomness: Babe::randomness(), - secondary_slots: true, - } - } - - fn current_epoch_start() -> sp_consensus_babe::SlotNumber { - Babe::current_epoch_start() - } - } - impl sp_session::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { opaque::SessionKeys::generate(seed) From 8062554581e57a743bdd97571d0e6b2602640b23 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 10:12:19 -0400 Subject: [PATCH 05/38] Move sum-storage to super-runtime and prune api-runtime --- Cargo.lock | 62 +--- Cargo.toml | 1 - nodes/basic-pow/Cargo.toml | 3 - nodes/kitchen-node/Cargo.toml | 3 - nodes/manual-seal/Cargo.toml | 3 - nodes/rpc-node/Cargo.toml | 5 +- runtimes/api-runtime/Cargo.toml | 75 ----- runtimes/api-runtime/aggregate_types.js | 31 -- runtimes/api-runtime/build.rs | 11 - runtimes/api-runtime/src/genesis.rs | 78 ----- runtimes/api-runtime/src/lib.rs | 380 ---------------------- runtimes/api-runtime/types.json | 5 - runtimes/super-runtime/Cargo.toml | 4 + runtimes/super-runtime/aggregate_types.js | 1 + runtimes/super-runtime/src/lib.rs | 18 + 15 files changed, 30 insertions(+), 650 deletions(-) delete mode 100644 runtimes/api-runtime/Cargo.toml delete mode 100644 runtimes/api-runtime/aggregate_types.js delete mode 100644 runtimes/api-runtime/build.rs delete mode 100644 runtimes/api-runtime/src/genesis.rs delete mode 100644 runtimes/api-runtime/src/lib.rs delete mode 100644 runtimes/api-runtime/types.json diff --git a/Cargo.lock b/Cargo.lock index 012d9a537..538c7b485 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,42 +81,6 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" -[[package]] -name = "api-runtime" -version = "2.0.0-alpha.6" -dependencies = [ - "frame-executive", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-balances", - "pallet-grandpa", - "pallet-indices", - "pallet-randomness-collective-flip", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "parity-scale-codec", - "safe-mix", - "serde", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-finality-grandpa", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "substrate-wasm-builder-runner", - "sum-storage", - "sum-storage-rpc-runtime-api", -] - [[package]] name = "app_dirs" version = "1.2.1" @@ -3156,28 +3120,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "pallet-aura" -version = "2.0.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9757d44df3ff0372ea313703736e69ba361b158a58b7c9677b54be11a777da81" -dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "serde", - "sp-application-crypto", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-timestamp", -] - [[package]] name = "pallet-babe" version = "2.0.0-alpha.6" @@ -4232,7 +4174,6 @@ dependencies = [ name = "rpc-node" version = "2.0.0-alpha.6" dependencies = [ - "api-runtime", "ctrlc", "futures 0.1.29", "futures 0.3.4", @@ -4263,6 +4204,7 @@ dependencies = [ "structopt", "substrate-build-script-utils", "sum-storage-rpc", + "super-runtime", "tokio 0.1.22", "trie-root 0.15.2", "vergen", @@ -6372,6 +6314,8 @@ dependencies = [ "storage-cache", "struct-storage", "substrate-wasm-builder-runner", + "sum-storage", + "sum-storage-rpc-runtime-api", "vec-set", ] diff --git a/Cargo.toml b/Cargo.toml index 166b9b1fc..3ea63ebef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,6 @@ members = [ "pallets/sum-storage", "pallets/vec-set", "pallets/weights", - "runtimes/api-runtime", "runtimes/babe-grandpa-runtime", "runtimes/ocw-runtime", "runtimes/super-runtime", diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index 3603d024d..d551b7dd2 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -49,9 +49,6 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # To use this runtime, compile kitchen-node with `ocw` feature enabled, # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } - -# Runtime with custom runtime-api (custom API only used in rpc-node) -# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 50baae160..162e90473 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -54,9 +54,6 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # To use this runtime, compile kitchen-node with `ocw` feature enabled, # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } - -# Runtime with custom runtime-api (custom API only used in rpc-node) -# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 001fed8f1..4840a61cd 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -55,9 +55,6 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # To use this runtime, compile kitchen-node with `ocw` feature enabled, # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } - -# Runtime with custom runtime-api (custom API only used in rpc-node) -# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index 56efd96fc..d1837d851 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -20,7 +20,6 @@ parking_lot = '0.9.0' tokio = '0.1.22' trie-root = '0.15.2' structopt = "0.3.8" -runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" @@ -47,6 +46,10 @@ sp-io = '2.0.0-alpha.6' sp-runtime = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' +# This node requires its runtime to implement the sum-storage-runtime-api. +# Only the super-runtime provides this API. +runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } + [build-dependencies] vergen = '3.0.4' substrate-build-script-utils = '2.0.0-alpha.6' diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml deleted file mode 100644 index 4ae4a2ec8..000000000 --- a/runtimes/api-runtime/Cargo.toml +++ /dev/null @@ -1,75 +0,0 @@ -[package] -name = "api-runtime" -version = "2.0.0-alpha.6" -authors = ["Joshy Orndorff"] -edition = "2018" -license = "GPL-3.0-or-later" - -[dependencies] -aura = { package = "pallet-aura", version = '2.0.0-alpha.6', default_features = false} -balances = { package = "pallet-balances", version = '2.0.0-alpha.6', default_features = false} -frame-support = { version = '2.0.0-alpha.6', default_features = false} -grandpa = { package = "pallet-grandpa", version = '2.0.0-alpha.6', default_features = false} -indices = { package = "pallet-indices", version = '2.0.0-alpha.6', default_features = false} -sudo = { package = "pallet-sudo", version = '2.0.0-alpha.6', default_features = false} -frame-system = { version = '2.0.0-alpha.6', default_features = false} -timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.6', default_features = false} -transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.6', default_features = false} -randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.6', default_features = false} - -parity-scale-codec = { version = "1.3.0", default-features = false, features = ["derive"] } -frame-executive = { version = '2.0.0-alpha.6', default_features = false} -safe-mix = { version = "1.0.0", default-features = false } -serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = '2.0.0-alpha.6', default_features = false} -sp-block-builder = { version = '2.0.0-alpha.6', default_features = false} -sp-consensus-aura = { version = '0.8.0-alpha.6', default_features = false} -sp-core = { version = '2.0.0-alpha.6', default_features = false} -sp-finality-grandpa = { version = '2.0.0-alpha.6', default_features = false} -sp-inherents = { version = '2.0.0-alpha.6', default_features = false} -sp-io = { version = '2.0.0-alpha.6', default_features = false} -sp-offchain = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -sp-session = { version = '2.0.0-alpha.6', default_features = false} -sp-std = { version = '2.0.0-alpha.6', default_features = false} -sp-transaction-pool = { version = '2.0.0-alpha.6', default_features = false} -sp-version = { version = '2.0.0-alpha.6', default_features = false} -sum-storage = { default-features = false, path = "../../pallets/sum-storage" } -sum-storage-rpc-runtime-api = { default-features = false, path = "../../pallets/sum-storage/rpc/runtime-api" } - -[build-dependencies] -wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner" } - -[features] -default = ["std"] -std = [ - "aura/std", - "balances/std", - "parity-scale-codec/std", - "frame-executive/std", - "frame-support/std", - "frame-system/std", - "grandpa/std", - "indices/std", - "randomness-collective-flip/std", - "safe-mix/std", - "serde", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-finality-grandpa/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "sudo/std", - "sum-storage/std", - "sum-storage-rpc-runtime-api/std", - "timestamp/std", - "transaction-payment/std", -] diff --git a/runtimes/api-runtime/aggregate_types.js b/runtimes/api-runtime/aggregate_types.js deleted file mode 100644 index 5ca26e236..000000000 --- a/runtimes/api-runtime/aggregate_types.js +++ /dev/null @@ -1,31 +0,0 @@ -// Reads in the type definitions from all pallets in the runtime and the runtime's own tpes -// Naively aggregates types and writes them to disk. - -const fs = require('fs'); - -// A list of all the installed recipe pallets' folder names. -// Does not include system pallets because Apps already supports them. -// Redundant with construct_runtime! -const pallets = [ - "sum-storage", -] - -// Types that are native to the runtime itself (ie come from lib.rs) -// These specifics are from https://polkadot.js.org/api/start/types.extend.html#impact-on-extrinsics -const runtimeOwnTypes = { - "Address": "AccountId", - "LookupSource": "AccountId", - "Weight": "u32" -} - -// Loop through all pallets aggregating types -let finalTypes = runtimeOwnTypes; -let palletTypes; -for (let dirname of pallets) { - let path = `../../pallets/${dirname}/types.json`; - palletTypes = JSON.parse(fs.readFileSync(path, 'utf8')); - finalTypes = {...finalTypes, ...palletTypes}; -} - -// Write output to disk -fs.writeFileSync("types.json", JSON.stringify(finalTypes, null, 2), 'utf8'); diff --git a/runtimes/api-runtime/build.rs b/runtimes/api-runtime/build.rs deleted file mode 100644 index 63f4bc0f3..000000000 --- a/runtimes/api-runtime/build.rs +++ /dev/null @@ -1,11 +0,0 @@ - -use wasm_builder_runner::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .with_wasm_builder_from_crates("1.0.9") - .export_heap_base() - .import_memory() - .build() -} diff --git a/runtimes/api-runtime/src/genesis.rs b/runtimes/api-runtime/src/genesis.rs deleted file mode 100644 index ffbc2f205..000000000 --- a/runtimes/api-runtime/src/genesis.rs +++ /dev/null @@ -1,78 +0,0 @@ -//! Helper module to build a genesis configuration for the api-runtime - -use super::{ - AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, - SudoConfig, SystemConfig, WASM_BINARY, Signature, -}; -use sp_core::{Pair, Public, sr25519}; -use sp_consensus_aura::sr25519::{AuthorityId as AuraId}; -use sp_finality_grandpa::{AuthorityId as GrandpaId}; -use sp_runtime::traits::{Verify, IdentifyAccount}; - -/// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -type AccountPublic = ::Signer; - -/// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate session key from seed -pub fn authority_keys_from_seed(seed: &str) -> (AuraId, GrandpaId) { - ( - get_from_seed::(seed), - get_from_seed::(seed), - ) -} - -pub fn dev_genesis() -> GenesisConfig { - testnet_genesis( - // Initial Authorities - vec![ - authority_keys_from_seed("Alice"), - ], - // Root Key - account_id_from_seed::("Alice"), - // Endowed Accounts - vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), - ], - ) -} - -/// Helper function to build a genesis configuration -pub fn testnet_genesis( - initial_authorities: Vec<(AuraId, GrandpaId)>, - root_key: AccountId, - endowed_accounts: Vec, -) -> GenesisConfig { - GenesisConfig { - system: Some(SystemConfig { - code: WASM_BINARY.to_vec(), - changes_trie_config: Default::default(), - }), - balances: Some(BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(), - }), - sudo: Some(SudoConfig { - key: root_key, - }), - aura: Some(AuraConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), - }), - grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), - } -} diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs deleted file mode 100644 index df255113c..000000000 --- a/runtimes/api-runtime/src/lib.rs +++ /dev/null @@ -1,380 +0,0 @@ -//! A Runtime that demonstrates a custom runtime API. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit="256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -// Include the genesis helper module when building to std -#[cfg(feature = "std")] -pub mod genesis; - -use sp_std::prelude::*; -use sp_core::{OpaqueMetadata, H256}; -use sp_runtime::{ - ApplyExtrinsicResult, - create_runtime_str, - generic, - impl_opaque_keys, - MultiSignature, - transaction_validity::{TransactionValidity, TransactionSource}, -}; -use sp_runtime::traits::{ - BlakeTwo256, - Block as BlockT, - IdentityLookup, - Verify, - ConvertInto, - IdentifyAccount, -}; -use sp_api::impl_runtime_apis; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use grandpa::AuthorityList as GrandpaAuthorityList; -use frame_system as system; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; - -// A few exports that help ease life for downstream crates. -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use timestamp::Call as TimestampCall; -pub use balances::Call as BalancesCall; -pub use sp_runtime::{Permill, Perbill}; -pub use frame_support::{ - StorageValue, construct_runtime, parameter_types, - traits::Randomness, - weights::Weight, -}; - -/// An index to a block. -pub type BlockNumber = u32; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// Balance of an account. -pub type Balance = u128; - -/// Index of a transaction in the chain. -pub type Index = u32; - -/// A hash of some data used by the chain. -pub type Hash = H256; - -/// Digest item type. -pub type DigestItem = generic::DigestItem; - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core datastructures. -pub mod opaque { - use super::*; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - pub grandpa: Grandpa, - } - } -} - -/// This runtime version. -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("api-runtime"), - impl_name: create_runtime_str!("api-runtime"), - authoring_version: 1, - spec_version: 1, - impl_version: 1, - apis: RUNTIME_API_VERSIONS, -}; - -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// These time units are defined in number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -/// The version infromation used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { - runtime_version: VERSION, - can_author_with: Default::default(), - } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; - pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); - pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; - pub const Version: RuntimeVersion = VERSION; -} - -impl system::Trait for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type Event = Event; - /// The ubiquitous origin type. - type Origin = Origin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Maximum weight of each block. - type MaximumBlockWeight = MaximumBlockWeight; - /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. - type MaximumBlockLength = MaximumBlockLength; - /// Portion of the block weight that is available to all normal transactions. - type AvailableBlockRatio = AvailableBlockRatio; - /// Version of the runtime. - type Version = Version; - /// Converts a module to the index of the module in `construct_runtime!`. - /// - /// This type is being generated by `construct_runtime!`. - type ModuleToIndex = ModuleToIndex; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = balances::AccountData; -} - -impl aura::Trait for Runtime { - type AuthorityId = AuraId; -} - -impl grandpa::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl timestamp::Trait for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - pub const TransferFee: u128 = 0; - pub const CreationFee: u128 = 0; -} - -impl balances::Trait for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -impl sudo::Trait for Runtime { - type Event = Event; - type Call = Call; -} - -parameter_types! { - pub const TransactionBaseFee: Balance = 0; - pub const TransactionByteFee: Balance = 1; -} - -impl transaction_payment::Trait for Runtime { - type Currency = balances::Module; - type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; - type TransactionByteFee = TransactionByteFee; - type WeightToFee = ConvertInto; - type FeeMultiplierUpdate = (); -} - -// ---------------------- Recipe Pallet Configurations ---------------------- -impl sum_storage::Trait for Runtime { - type Event = Event; -} - -construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: system::{Module, Call, Storage, Config, Event}, - Timestamp: timestamp::{Module, Call, Storage, Inherent}, - Aura: aura::{Module, Config, Inherent(Timestamp)}, - Grandpa: grandpa::{Module, Call, Storage, Config, Event}, - Balances: balances::{Module, Call, Storage, Config, Event}, - RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, - Sudo: sudo::{Module, Call, Config, Storage, Event}, - TransactionPayment: transaction_payment::{Module, Storage}, - SumStorage: sum_storage::{Module, Call, Storage, Event}, - } -); - -/// The address format for describing accounts. -pub type Address = AccountId; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - system::CheckVersion, - system::CheckGenesis, - system::CheckEra, - system::CheckNonce, - system::CheckWeight, - transaction_payment::ChargeTransactionPayment -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive, Runtime, AllModules>; - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - - fn random_seed() -> ::Hash { - RandomnessCollectiveFlip::random_seed() - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic - ) -> TransactionValidity { - Executive::validate_transaction(source, tx) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> u64 { - Aura::slot_duration() - } - - fn authorities() -> Vec { - Aura::authorities() - } - } - - // Here we implement our custom runtime API. - impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { - fn get_sum() -> u32 { - // This Runtime API calls into a specific pallet. Calling a pallet is a common - // design pattern. You can see most other APIs in this file do the same. - // It is also possible to write your logic right here in the runtime - // amalgamator file - SumStorage::get_sum() - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - } -} diff --git a/runtimes/api-runtime/types.json b/runtimes/api-runtime/types.json deleted file mode 100644 index ef86d910a..000000000 --- a/runtimes/api-runtime/types.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Address": "AccountId", - "LookupSource": "AccountId", - "Weight": "u32" -} \ No newline at end of file diff --git a/runtimes/super-runtime/Cargo.toml b/runtimes/super-runtime/Cargo.toml index 1527e1ec3..e72300e2c 100644 --- a/runtimes/super-runtime/Cargo.toml +++ b/runtimes/super-runtime/Cargo.toml @@ -39,6 +39,8 @@ simple-map = { path = "../../pallets/simple-map", default-features = false } single-value = { path = "../../pallets/single-value", default-features = false } storage-cache = { path = "../../pallets/storage-cache", default-features = false } struct-storage = { path = "../../pallets/struct-storage", default-features = false } +sum-storage = { default-features = false, path = "../../pallets/sum-storage" } +sum-storage-rpc-runtime-api = { default-features = false, path = "../../pallets/sum-storage/rpc/runtime-api" } vec-set = { path = "../../pallets/vec-set", default-features = false } # Other Substrate dependencies @@ -119,5 +121,7 @@ std = [ "single-value/std", "storage-cache/std", "struct-storage/std", + "sum-storage/std", + "sum-storage-rpc-runtime-api/std", "vec-set/std", ] diff --git a/runtimes/super-runtime/aggregate_types.js b/runtimes/super-runtime/aggregate_types.js index 950e6c36f..d2a9da657 100644 --- a/runtimes/super-runtime/aggregate_types.js +++ b/runtimes/super-runtime/aggregate_types.js @@ -29,6 +29,7 @@ const pallets = [ "single-value", "storage-cache", "struct-storage", + "sum_storage", "vec-set", ] diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index 1e578b9c0..67065e5d2 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -320,6 +320,10 @@ impl struct_storage::Trait for Runtime { type Event = Event; } +impl sum_storage::Trait for Runtime { + type Event = Event; +} + impl vec_set::Trait for Runtime { type Event = Event; } @@ -361,6 +365,7 @@ construct_runtime!( SingleValue: single_value::{Module, Call, Storage}, StorageCache: storage_cache::{Module, Call, Storage, Event}, StructStorage: struct_storage::{Module, Call, Storage, Event}, + SumStorage: sum_storage::{Module, Call, Storage, Event}, VecSet: vec_set::{Module, Call, Storage, Event}, } ); @@ -463,4 +468,17 @@ impl_runtime_apis! { opaque::SessionKeys::decode_into_raw_public_keys(&encoded) } } + + + + // Here we implement our custom runtime API. + impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { + fn get_sum() -> u32 { + // This Runtime API calls into a specific pallet. Calling a pallet is a common + // design pattern. You can see most other APIs in this file do the same. + // It is also possible to write your logic right here in the runtime + // amalgamator file + SumStorage::get_sum() + } + } } From 10fa739947fe1ac77e6f3b39d76d037fd8ecb630 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 13:46:47 -0400 Subject: [PATCH 06/38] Convert kitchen node to instant seal --- Cargo.lock | 7 +- nodes/kitchen-node/Cargo.toml | 25 ++- nodes/kitchen-node/README.md | 46 ----- nodes/kitchen-node/src/chain_spec.rs | 31 ++-- nodes/kitchen-node/src/command.rs | 2 +- nodes/kitchen-node/src/service.rs | 254 ++++++++------------------- nodes/manual-seal/src/service.rs | 2 +- 7 files changed, 99 insertions(+), 268 deletions(-) delete mode 100644 nodes/kitchen-node/README.md diff --git a/Cargo.lock b/Cargo.lock index 538c7b485..5134ac035 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2148,19 +2148,18 @@ dependencies = [ "sc-cli", "sc-client", "sc-client-api", - "sc-consensus-babe", + "sc-client-db", + "sc-consensus-manual-seal", "sc-executor", - "sc-finality-grandpa", "sc-network", "sc-service", "sc-transaction-pool", "sp-consensus", - "sp-consensus-babe", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-runtime", + "sp-timestamp", "sp-transaction-pool", "structopt", "substrate-build-script-utils", diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 162e90473..6c488e2bf 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' repository = 'https://github.com/substrate-developer-hub/recipes' -description = 'A Substrate node that houses many recipe pallets' +description = 'An instant-sealing Substrate node. Can be used with most recipe runtimes.' license = "GPL-3.0-or-later" [[bin]] @@ -23,24 +23,23 @@ tokio = "0.1.22" exit-future = "0.2.0" parking_lot = "0.9.0" trie-root = "0.15.2" -sp-io = '2.0.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' +sc-client = '0.8.0-alpha.6' sc-client-api = '2.0.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' +sc-client-db = '0.8.0-alpha.6' +sc-consensus-manual-seal = '0.8.0-alpha.6' sc-executor = '0.8.0-alpha.6' +sc-network = '0.8.0-alpha.6' sc-service = '0.8.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' sc-transaction-pool = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-consensus-babe = '0.8.0-alpha.6' -sp-consensus-babe = '0.8.0-alpha.6' -sc-finality-grandpa = '0.8.0-alpha.6' -sp-finality-grandpa = '2.0.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' sp-consensus = '0.8.0-alpha.6' +sp-core = '2.0.0-alpha.6' +sp-inherents = '2.0.0-alpha.6' +sp-io = '2.0.0-alpha.6' +sp-runtime = '2.0.0-alpha.6' +sp-timestamp = '2.0.0-alpha.6' +sp-transaction-pool = '2.0.0-alpha.6' # This node is compatible with any of the runtimes below # --- diff --git a/nodes/kitchen-node/README.md b/nodes/kitchen-node/README.md deleted file mode 100644 index fb5f7bf58..000000000 --- a/nodes/kitchen-node/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Kitchen Node -This Substrate-based node does not contain its own runtime. Rather it imports another runtime (like the ones here in the kitchen) through it's `Cargo.toml` file, and wraps them with a standard blockchain chasis including: - -* Babe block production -* Grandpa Finality -* A CLI interface -* An RPC compatible with Polkadot-js API - -## Building - -Install Rust: - -```bash -curl https://sh.rustup.rs -sSf | sh -``` - -Install required tools: - -```bash -./scripts/init.sh -``` - -Build Wasm and native code: - -```bash -cargo build --release -``` - -## Starting a Node -To start a dev node (after building) run - -```bash -./target/release/kitchen-node purge-chain --dev -y -./target/release/kitchen-node --dev -``` - -There are many other ways to use this node which can be explored by running `kitchen-node --help` or reading general [Substrate Documentation](https://substrate.dev/). - -## Swapping Runtimes -Multiple runtimes in the kitchen are compatible with this node. To swap just edit the `Cargo.toml` file. You may also use this node template to wrap your own custom runtimes. Just make sure you have Babe, Grandpa, and possibly other necessary pallets installed properly. - -```toml -# Edit these lines to point to a different runtime. -# Your runtime must have the necessary pallets to support consensus (Babe, Grandpa, etc) -runtime = { package = "super-runtime", path = "../runtimes/super-runtime" } -``` diff --git a/nodes/kitchen-node/src/chain_spec.rs b/nodes/kitchen-node/src/chain_spec.rs index 51e390a33..dc7a2aa4b 100644 --- a/nodes/kitchen-node/src/chain_spec.rs +++ b/nodes/kitchen-node/src/chain_spec.rs @@ -4,7 +4,6 @@ use runtime::{ GenesisConfig, genesis::{ account_id_from_seed, - authority_keys_from_seed, testnet_genesis, dev_genesis, } @@ -39,24 +38,20 @@ pub fn local_testnet_config() -> ChainSpec { "local_testnet", sc_service::ChainType::Local, || testnet_genesis( + account_id_from_seed::("Alice"), vec![ - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], - account_id_from_seed::("Alice"), - vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Charlie"), - account_id_from_seed::("Dave"), - account_id_from_seed::("Eve"), - account_id_from_seed::("Ferdie"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), - account_id_from_seed::("Charlie//stash"), - account_id_from_seed::("Dave//stash"), - account_id_from_seed::("Eve//stash"), - account_id_from_seed::("Ferdie//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Charlie"), + account_id_from_seed::("Dave"), + account_id_from_seed::("Eve"), + account_id_from_seed::("Ferdie"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Charlie//stash"), + account_id_from_seed::("Dave//stash"), + account_id_from_seed::("Eve//stash"), + account_id_from_seed::("Ferdie//stash"), ] ), vec![], diff --git a/nodes/kitchen-node/src/command.rs b/nodes/kitchen-node/src/command.rs index 8b17735ed..6775a7f34 100644 --- a/nodes/kitchen-node/src/command.rs +++ b/nodes/kitchen-node/src/command.rs @@ -51,7 +51,7 @@ pub fn run() -> sc_cli::Result<()> { match &cli.subcommand { Some(subcommand) => { let runner = cli.create_runner(subcommand)?; - runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0)) + runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config))) } None => { let runner = cli.create_runner(&cli.run)?; diff --git a/nodes/kitchen-node/src/service.rs b/nodes/kitchen-node/src/service.rs index 324b7242c..40454ceae 100644 --- a/nodes/kitchen-node/src/service.rs +++ b/nodes/kitchen-node/src/service.rs @@ -1,20 +1,13 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use std::sync::Arc; -use std::time::Duration; -use sc_client::LongestChain; -use sc_client_api::ExecutorProvider; -use runtime::{self, opaque::Block, RuntimeApi}; -use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; +// use std::sync::Arc; +// use sc_client::LongestChain; +// use sc_client_api::ExecutorProvider; +use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; -use sc_consensus_babe; -use sc_finality_grandpa::{ - self, - FinalityProofProvider as GrandpaFinalityProofProvider, - StorageAndProofProvider -}; +// use sc_network::config::DummyFinalityProofRequestBuilder; // Our native executor instance. native_executor_instance!( @@ -29,9 +22,6 @@ native_executor_instance!( /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ - let mut import_setup = None; - let inherent_data_providers = sp_inherents::InherentDataProviders::new(); - let builder = sc_service::ServiceBuilder::new_full::< runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? @@ -42,36 +32,11 @@ macro_rules! new_full_start { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) })? - .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { - let select_chain = select_chain.take() - .ok_or_else(|| sc_service::Error::SelectChainRequired)?; - let (grandpa_block_import, grandpa_link) = - sc_finality_grandpa::block_import( - client.clone(), &(client.clone() as std::sync::Arc<_>), select_chain - )?; - let justification_import = grandpa_block_import.clone(); - - let (babe_block_import, babe_link) = sc_consensus_babe::block_import( - sc_consensus_babe::Config::get_or_compute(&*client)?, - grandpa_block_import, - client.clone(), - )?; - - let import_queue = sc_consensus_babe::import_queue( - babe_link.clone(), - babe_block_import.clone(), - Some(Box::new(justification_import)), - None, - client, - inherent_data_providers.clone(), - )?; - - import_setup = Some((babe_block_import, grandpa_link, babe_link)); - - Ok(import_queue) + .with_import_queue(|_config, client, _select_chain, _transaction_pool| { + Ok(sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>(Box::new(client))) })?; - (builder, import_setup, inherent_data_providers) + builder }} } @@ -79,29 +44,23 @@ macro_rules! new_full_start { pub fn new_full(config: Configuration) -> Result { - let role = config.role.clone(); - let force_authoring = config.force_authoring; - let name = config.network.node_name.clone(); - let disable_grandpa = config.disable_grandpa; - // This variable is only used when ocw feature is enabled. // Suppress the warning when ocw feature is not enabled. #[allow(unused_variables)] let dev_seed = config.dev_key_seed.clone(); - let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config); - - let (block_import, grandpa_link, babe_link) = - import_setup.take() - .expect("Link Half and Block Import are present for Full Services or setup failed before. qed"); + //TODO This isn't great. It includes the timestamp inherent in all blocks + // regardless of runtime. + let inherent_data_providers = InherentDataProviders::new(); + inherent_data_providers + .register_provider(sp_timestamp::InherentDataProvider) + .map_err(Into::into) + .map_err(sp_consensus::error::Error::InherentData)?; - let service = builder - .with_finality_proof_provider(|client, backend| { - let provider = client as Arc>; - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) - })? - .build()?; + let builder = new_full_start!(config); + let service = builder.build()?; + //TODO make sure this still works with the ocw runtime // Initialize seed for signing transaction using off-chain workers #[cfg(feature = "ocw")] { @@ -117,139 +76,64 @@ pub fn new_full(config: Configuration) } } - if role.is_authority() { - let proposer = sc_basic_authorship::ProposerFactory::new( - service.client(), - service.transaction_pool(), - ); - - let client = service.client(); - let select_chain = service.select_chain() - .ok_or(ServiceError::SelectChainRequired)?; - - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - - let babe_config = sc_consensus_babe::BabeParams { - keystore: service.keystore(), - client, - select_chain, - env: proposer, - block_import, - sync_oracle: service.network(), - inherent_data_providers: inherent_data_providers.clone(), - force_authoring, - babe_link, - can_author_with, - }; - - let babe = sc_consensus_babe::start_babe(babe_config)?; - service.spawn_essential_task("babe", babe); - } - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. - let keystore = if role.is_authority() { - Some(service.keystore()) - } else { - None - }; - - let grandpa_config = sc_finality_grandpa::Config { - gossip_duration: Duration::from_millis(333), - justification_period: 512, - name: Some(name), - observer_enabled: false, - keystore, - is_authority: role.is_network_authority(), - }; - - let enable_grandpa = !disable_grandpa; - if enable_grandpa { - // start the full GRANDPA voter - // NOTE: non-authorities could run the GRANDPA observer protocol, but at - // this point the full voter should provide better guarantees of block - // and vote data availability than the observer. The observer has not - // been tested extensively yet and having most nodes in a network run it - // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { - config: grandpa_config, - link: grandpa_link, - network: service.network(), - inherent_data_providers: inherent_data_providers.clone(), - telemetry_on_connect: Some(service.telemetry_on_connect_stream()), - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry: service.prometheus_registry(), - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - service.spawn_essential_task( - "grandpa-voter", - sc_finality_grandpa::run_grandpa_voter(grandpa_config)? - ); - } else { - sc_finality_grandpa::setup_disabled_grandpa( - service.client(), - &inherent_data_providers, - service.network(), - )?; - } + let proposer = sc_basic_authorship::ProposerFactory::new( + service.client().clone(), + service.transaction_pool(), + ); + + let authorship_future = sc_consensus_manual_seal::run_instant_seal( + Box::new(service.client()), + proposer, + service.client().clone(), + service.transaction_pool().pool().clone(), + service.select_chain().ok_or(ServiceError::SelectChainRequired)?, + inherent_data_providers + ); + + service.spawn_essential_task("instant-seal", authorship_future); Ok(service) } /// Builds a new service for a light client. -pub fn new_light(config: Configuration) +pub fn new_light(_config: Configuration) -> Result { - let inherent_data_providers = InherentDataProviders::new(); - ServiceBuilder::new_light::(config)? - .with_select_chain(|_config, backend| { - Ok(LongestChain::new(backend.clone())) - })? - .with_transaction_pool(|config, client, fetcher| { - let fetcher = fetcher - .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; - let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); - let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, - ); - Ok(pool) - })? - .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| { - let fetch_checker = fetcher - .map(|fetcher| fetcher.checker().clone()) - .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; - let grandpa_block_import = sc_finality_grandpa::light_block_import( - client.clone(), backend, &(client.clone() as Arc<_>), Arc::new(fetch_checker) - )?; - - let finality_proof_import = grandpa_block_import.clone(); - let finality_proof_request_builder = - finality_proof_import.create_finality_proof_request_builder(); - - let (babe_block_import, babe_link) = sc_consensus_babe::block_import( - sc_consensus_babe::Config::get_or_compute(&*client)?, - grandpa_block_import, - client.clone(), - )?; - - let import_queue = sc_consensus_babe::import_queue( - babe_link, - babe_block_import, - None, - Some(Box::new(finality_proof_import)), - client.clone(), - inherent_data_providers.clone(), - )?; - - Ok((import_queue, finality_proof_request_builder)) - })? - .with_finality_proof_provider(|client, backend| { - let provider = client as Arc>; - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) - })? - .build() + //TODO How can I get the light client working? + // I had the same problem with the manual seal node. + unimplemented!("No light client for manual seal"); + #[allow(unreachable_code)] + new_full(_config) + + // let inherent_data_providers = InherentDataProviders::new(); + // + // ServiceBuilder::new_light::(config)? + // .with_select_chain(|_config, backend| { + // Ok(LongestChain::new(backend.clone())) + // })? + // .with_transaction_pool(|config, client, fetcher| { + // let fetcher = fetcher + // .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; + // let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); + // let pool = sc_transaction_pool::BasicPool::with_revalidation_type( + // config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + // ); + // Ok(pool) + // })? + // .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool| { + // let finality_proof_request_builder = + // Box::new(DummyFinalityProofRequestBuilder::default()) as Box<_>; + // + // let import_queue = sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>( + // Box::new(client) + // ); + // + // Ok((import_queue, finality_proof_request_builder)) + // })? + // .with_finality_proof_provider(|client, backend| { + // Ok(Arc::new(()) as _) + // })? + // .build() } diff --git a/nodes/manual-seal/src/service.rs b/nodes/manual-seal/src/service.rs index a85827661..c3b921187 100644 --- a/nodes/manual-seal/src/service.rs +++ b/nodes/manual-seal/src/service.rs @@ -86,7 +86,7 @@ pub fn new_full(config: Configuration, instant_seal: bool) -> Result Date: Mon, 4 May 2020 14:33:28 -0400 Subject: [PATCH 07/38] Add comment with hint about light client problem --- nodes/kitchen-node/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 6c488e2bf..64488b85d 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -27,7 +27,7 @@ sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' sc-client = '0.8.0-alpha.6' sc-client-api = '2.0.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' +sc-client-db = '0.8.0-alpha.6' # This because necessary when converting to instant seal sc-consensus-manual-seal = '0.8.0-alpha.6' sc-executor = '0.8.0-alpha.6' sc-network = '0.8.0-alpha.6' From 8305406abdff61ec2a1c42998023a178943be8e5 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 14:42:22 -0400 Subject: [PATCH 08/38] Fix minor type aggregation issue --- runtimes/super-runtime/aggregate_types.js | 2 +- runtimes/super-runtime/types.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtimes/super-runtime/aggregate_types.js b/runtimes/super-runtime/aggregate_types.js index d2a9da657..55a3f44ac 100644 --- a/runtimes/super-runtime/aggregate_types.js +++ b/runtimes/super-runtime/aggregate_types.js @@ -29,7 +29,7 @@ const pallets = [ "single-value", "storage-cache", "struct-storage", - "sum_storage", + "sum-storage", "vec-set", ] diff --git a/runtimes/super-runtime/types.json b/runtimes/super-runtime/types.json index 871363ed3..f8616e770 100644 --- a/runtimes/super-runtime/types.json +++ b/runtimes/super-runtime/types.json @@ -31,4 +31,4 @@ "inner_thing": "InnerThing" }, "InnerThingOf": "InnerThing" -} \ No newline at end of file +} From 86bc846f314e3fd891f711cbfe64939f2ee22bff Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 14:42:35 -0400 Subject: [PATCH 09/38] Convert rpc-node to instant seal --- Cargo.lock | 54 +--- nodes/rpc-node/Cargo.toml | 7 +- nodes/rpc-node/js/index.js | 31 ++- nodes/rpc-node/js/package.json | 2 +- nodes/rpc-node/js/yarn.lock | 442 ++++++++++++------------------- nodes/rpc-node/src/chain_spec.rs | 31 +-- nodes/rpc-node/src/command.rs | 2 +- nodes/rpc-node/src/service.rs | 256 +++++------------- 8 files changed, 285 insertions(+), 540 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5134ac035..f790cbaa1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4185,20 +4185,19 @@ dependencies = [ "sc-cli", "sc-client", "sc-client-api", - "sc-consensus-aura", + "sc-client-db", + "sc-consensus-manual-seal", "sc-executor", - "sc-finality-grandpa", "sc-network", "sc-rpc", "sc-service", "sc-transaction-pool", "sp-consensus", - "sp-consensus-aura", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-runtime", + "sp-timestamp", "sp-transaction-pool", "structopt", "substrate-build-script-utils", @@ -4498,38 +4497,6 @@ dependencies = [ "substrate-prometheus-endpoint", ] -[[package]] -name = "sc-consensus-aura" -version = "0.8.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a476e0650893a4e8c086c14f1ea5fde4a3de9f654a75c706f2c362406ee4d588" -dependencies = [ - "derive_more 0.99.5", - "futures 0.3.4", - "futures-timer 3.0.2", - "log", - "parity-scale-codec", - "parking_lot 0.10.2", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sc-consensus-slots", - "sc-keystore", - "sc-telemetry", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-timestamp", - "sp-version", -] - [[package]] name = "sc-consensus-babe" version = "0.8.0-alpha.6" @@ -5625,21 +5592,6 @@ dependencies = [ "sp-version", ] -[[package]] -name = "sp-consensus-aura" -version = "0.8.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5ffbc4aca29fe7a0f0c419445e34758210dba6418eeb101d60c1e15b27797a" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-application-crypto", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", -] - [[package]] name = "sp-consensus-babe" version = "0.8.0-alpha.6" diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index d1837d851..a80d1e5e4 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -25,25 +25,24 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" sc-rpc = { version = '2.0.0-alpha.6' } sc-client-api = '2.0.0-alpha.6' +sc-client-db = '0.8.0-alpha.6' sum-storage-rpc = { path = "../../pallets/sum-storage/rpc" } ctrlc = { features = ['termination'], version = '3.1.3' } futures01 = { package = 'futures', version = '0.1.29'} -sc-finality-grandpa = '0.8.0-alpha.6' -sp-finality-grandpa = '2.0.0-alpha.6' sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' sc-client = '0.8.0-alpha.6' -sc-consensus-aura = '0.8.0-alpha.6' +sc-consensus-manual-seal = '0.8.0-alpha.6' sc-executor = '0.8.0-alpha.6' sc-network = '0.8.0-alpha.6' sc-service = '0.8.0-alpha.6' sc-transaction-pool = '2.0.0-alpha.6' sp-consensus = '0.8.0-alpha.6' -sp-consensus-aura = '0.8.0-alpha.6' sp-core = '2.0.0-alpha.6' sp-inherents = '2.0.0-alpha.6' sp-io = '2.0.0-alpha.6' sp-runtime = '2.0.0-alpha.6' +sp-timestamp = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' # This node requires its runtime to implement the sum-storage-runtime-api. diff --git a/nodes/rpc-node/js/index.js b/nodes/rpc-node/js/index.js index e5fcc4f82..f14fa527b 100644 --- a/nodes/rpc-node/js/index.js +++ b/nodes/rpc-node/js/index.js @@ -1,33 +1,36 @@ // A demonstration of interacting with custom RPCs using Polkadot js API const { ApiPromise, WsProvider } = require('@polkadot/api'); +const { readFileSync } = require('fs'); // Construct parameters for API instance const wsProvider = new WsProvider('ws://localhost:9944'); -const types = {}; +const types = JSON.parse(readFileSync('../../../runtimes/super-runtime/types.json', 'utf8')); const rpc = { - silly: [ - { + silly: { + seven: { description: "Always returns 7", - name: "seven", params: [], type: "u32", }, - { + double: { description: "Doubles the parameter", - name: "double", - params: ["u32"], + params: [ + { + name: "val", + type: "u32", + } + ], type: "u32", } - ], - sumStorage: [ - { + }, + sumStorage: { + getSum: { description: "Gets the sum of the two storage values in sum-storage pallet via a runtime api.", - name: "getSum", params: [], type: "u32", } - ] + } } async function main() { @@ -45,8 +48,8 @@ async function main() { console.log(`The double of 7 according to silly_double is ${silly14}\n`); // Query raw storage values, the oldschool way - const v1 = ( await api.query.sumStorage.thing1() ).unwrap().toNumber(); - const v2 = ( await api.query.sumStorage.thing2() ).unwrap().toNumber(); + const v1 = ( await api.query.sumStorage.thing1() ).toNumber(); + const v2 = ( await api.query.sumStorage.thing2() ).toNumber(); console.log(`The individual storage values are ${v1}, and ${v2}.`); console.log(`The sum calculated in javascript is ${v1 + v2}\n`); diff --git a/nodes/rpc-node/js/package.json b/nodes/rpc-node/js/package.json index dbf3e96ed..82d56d868 100644 --- a/nodes/rpc-node/js/package.json +++ b/nodes/rpc-node/js/package.json @@ -7,6 +7,6 @@ "license": "GPL-3.0-or-later", "private": false, "dependencies": { - "@polkadot/api": "^1.0.0-beta.4" + "@polkadot/api": "^1.12.1" } } diff --git a/nodes/rpc-node/js/yarn.lock b/nodes/rpc-node/js/yarn.lock index 6a6fea3a0..92053032b 100644 --- a/nodes/rpc-node/js/yarn.lock +++ b/nodes/rpc-node/js/yarn.lock @@ -2,145 +2,156 @@ # yarn lockfile v1 -"@babel/runtime@^7.7.7": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.3.tgz#0811944f73a6c926bb2ad35e918dcc1bfab279f1" - integrity sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w== - dependencies: - regenerator-runtime "^0.13.2" - -"@polkadot/api-derive@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-1.0.0-beta.4.tgz#f80907ac2d016e2492969f8e12c404a2e013b8bf" - integrity sha512-VqPpI7jSRELZKBHSJV4xTR8p+L411FPVgLHk1fqMF7okO2X3IX6JP3VUvZAYd1zlj8gVQrvxXqGztIciAPSl9w== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/api" "^1.0.0-beta.4" - "@polkadot/types" "^1.0.0-beta.4" - -"@polkadot/api@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.0.0-beta.4.tgz#5c150810e94644d7704d54a7abef2fe10abd6d0b" - integrity sha512-1NliTU/p9w0ny3NNQb2iEODcCwMWqhcRjFZOHPfhurjQ+9Fb6PbzaCG7xqp+s4Cnru3xOV0JoZ6ZCvZLBcDUsg== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/api-derive" "^1.0.0-beta.4" - "@polkadot/keyring" "^2.0.0-beta.1" - "@polkadot/metadata" "^1.0.0-beta.4" - "@polkadot/rpc-core" "^1.0.0-beta.4" - "@polkadot/rpc-provider" "^1.0.0-beta.4" - "@polkadot/types" "^1.0.0-beta.4" - "@polkadot/util-crypto" "^2.0.0-beta.1" - -"@polkadot/jsonrpc@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-1.0.0-beta.4.tgz#a2d5834725e9119c2641b5a6eb80e790821dc75b" - integrity sha512-UgozoV5j6mmNbOFvg19L+R3Kjk+DvVzTKLJr5V5NTTTOu53FZiXPiESv1AdY6BRmZxlDvUHWOn50pxtOFBeOEA== - dependencies: - "@babel/runtime" "^7.7.7" - -"@polkadot/keyring@^2.0.0-beta.1": - version "2.0.0-beta.2" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.0.0-beta.2.tgz#fbe171e1a07693a2a30c8a041adad0f258044cc8" - integrity sha512-joP1S5GzbQvhCyVqn/XRPuiN94H0bvtm0Nn2G4ZlAbSU78zyPDYpBtB29sITdv1dcRg/RQp1UjjKclBt1azcoA== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/util" "^2.0.0-beta.2" - "@polkadot/util-crypto" "^2.0.0-beta.2" - -"@polkadot/metadata@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-1.0.0-beta.4.tgz#d7cfd511540fdaf425f4cfc8b306cf4c6fb5e6dc" - integrity sha512-r54Yuxm1Xqqr8ZD30WwNJCiULbJSkUnYArl9mmgmAGOTjEZsr2CMZ9NuROy6oSUNt4dl9rd7zv8aTVTLGmfSog== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/types" "^1.0.0-beta.4" - "@polkadot/util" "^2.0.0-beta.1" - "@polkadot/util-crypto" "^2.0.0-beta.1" - -"@polkadot/rpc-core@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-1.0.0-beta.4.tgz#f54fe0f50cb1caab99f68857c7251d1f29f30220" - integrity sha512-ezcgpS28RwYoEb3Zc32ZJQmephq4Gv+FWEhD31STjNNDkSvvsKxAlciltJ1EVUcP8+0SEiGliRx3voUPtL1C0A== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/jsonrpc" "^1.0.0-beta.4" - "@polkadot/rpc-provider" "^1.0.0-beta.4" - "@polkadot/types" "^1.0.0-beta.4" - "@polkadot/util" "^2.0.0-beta.1" - rxjs "^6.5.4" - -"@polkadot/rpc-provider@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-1.0.0-beta.4.tgz#8db8d8d6f1989deab975f651597468c26905c710" - integrity sha512-9IjZTEXyJ1j1AZLiY0zraupBkSDcUEfvszCasN135LgPdCBqyjpCbFoVuzIuHFJRSk4IR3re25LCd9A+t1rqtA== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/metadata" "^1.0.0-beta.4" - "@polkadot/util" "^2.0.0-beta.1" - "@polkadot/util-crypto" "^2.0.0-beta.1" +"@babel/runtime@^7.9.2": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" + integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== + dependencies: + regenerator-runtime "^0.13.4" + +"@polkadot/api-derive@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-1.12.2.tgz#a3da610dd2e391b3430e80dc558d28f0a5a15cc1" + integrity sha512-mLJF9Bia4ryXQxcLrkZ/EKNuJKPeYoq580gW90lbVpA/6EmVuEtxYWZir4NQ+befPVXupwK5bNHVYCqda357iQ== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/api" "1.12.2" + "@polkadot/rpc-core" "1.12.2" + "@polkadot/rpc-provider" "1.12.2" + "@polkadot/types" "1.12.2" + "@polkadot/util" "^2.9.1" + "@polkadot/util-crypto" "^2.9.1" + bn.js "^5.1.1" + memoizee "^0.4.14" + rxjs "^6.5.5" + +"@polkadot/api@1.12.2", "@polkadot/api@^1.12.1": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.12.2.tgz#973d883efcfeed67d5994b7036ee51ea4ae66bbf" + integrity sha512-T1K+VayhEGn5R/0XBbNZh3NBTKoglWtRfDfvuIt4TBas2E2EQiNpEfQJ9GNdUGUyItAGIYw4AW20n9XSRfx/jw== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/api-derive" "1.12.2" + "@polkadot/keyring" "^2.9.1" + "@polkadot/metadata" "1.12.2" + "@polkadot/rpc-core" "1.12.2" + "@polkadot/rpc-provider" "1.12.2" + "@polkadot/types" "1.12.2" + "@polkadot/types-known" "1.12.2" + "@polkadot/util" "^2.9.1" + "@polkadot/util-crypto" "^2.9.1" + bn.js "^5.1.1" + eventemitter3 "^4.0.0" + rxjs "^6.5.5" + +"@polkadot/keyring@^2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.9.1.tgz#637aa5f4af4fd90065c3cb66e45d0e60928819a6" + integrity sha512-r1jcgV7SQCpc5r2twUxGLqOeQ2tqkfCFVcl877lEolCn+xrASx5rXqO+YyHDKgRnft3RK9z9/k407R+2DjVF9w== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/util" "2.9.1" + "@polkadot/util-crypto" "2.9.1" + +"@polkadot/metadata@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-1.12.2.tgz#cd372c72bbad0aeff41e88fa586c28cc565b3174" + integrity sha512-L0JtjRLvsqNMKnhtZyacJZCdrzvXz3K2R5Gr7pHGI9EDWpxcp7w2oKIBhLfzLm5TZzx9mGq7TjR9bc80fdj07g== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/types" "1.12.2" + "@polkadot/types-known" "1.12.2" + "@polkadot/util" "^2.9.1" + "@polkadot/util-crypto" "^2.9.1" + bn.js "^5.1.1" + +"@polkadot/rpc-core@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-1.12.2.tgz#8c7a70ecfbab9d79def63933e45b880edad6bef5" + integrity sha512-sVH3MeaGKfpHC04gxuxq72JJv2wgiNLvqQ5sEkgQCnvNlVDJTt9mxGstLWcW8PPUH7EA9Df/7L6mAAlm1W2Ttg== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/metadata" "1.12.2" + "@polkadot/rpc-provider" "1.12.2" + "@polkadot/types" "1.12.2" + "@polkadot/util" "^2.9.1" + memoizee "^0.4.14" + rxjs "^6.5.5" + +"@polkadot/rpc-provider@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-1.12.2.tgz#3afc07a45d236f42f4f0ef668990b6ebf85057af" + integrity sha512-AuyRv7bVBexocl2mtV3BuuwIIJH0+TFHlzfSEkKbYGGdxB5fGRjHa5SFzXXKTfbP33iC6apHTBgyTI9W882fZg== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/metadata" "1.12.2" + "@polkadot/types" "1.12.2" + "@polkadot/util" "^2.9.1" + "@polkadot/util-crypto" "^2.9.1" + bn.js "^5.1.1" eventemitter3 "^4.0.0" isomorphic-fetch "^2.2.1" websocket "^1.0.31" -"@polkadot/types@^1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.0.0-beta.4.tgz#d3df6b5e36d60f039034f4491c5d9c3ab7adc1f0" - integrity sha512-XktBsBRuXYm1vx070bT7l9ZMhuHEotxMjOXxRzOD9GlIfeZfIFfV7uw/D1j3uzKxQ9M6wcRV7j9Y91Z4WgtzAg== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/metadata" "^1.0.0-beta.4" - "@polkadot/util" "^2.0.0-beta.1" - "@polkadot/util-crypto" "^2.0.0-beta.1" - "@types/memoizee" "^0.4.3" +"@polkadot/types-known@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-1.12.2.tgz#e662412d4640d2db238ed7127e65c546f667396f" + integrity sha512-GYkPTmBdp4cFXu9XbxyYNQ4hDrDacFQfIgd40mQrSYUVEOA+7yULuJSQftosaSci7pqIX+M7SLj8q3fnBMk4vg== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/types" "1.12.2" + "@polkadot/util" "^2.9.1" + bn.js "^5.1.1" + +"@polkadot/types@1.12.2": + version "1.12.2" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.12.2.tgz#83644ccd7776fee0183aa90acc60d96c2152ae7d" + integrity sha512-wJ0XTKy8ZpYPNdcK7jUVu29nThtqW5LfgCLbXLV7DSpyEL1s0P/XYqb0Eqw4YZLiIL8Z8LwuGL0RDLWU86UMAA== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/metadata" "1.12.2" + "@polkadot/util" "^2.9.1" + "@polkadot/util-crypto" "^2.9.1" + "@types/bn.js" "^4.11.6" + bn.js "^5.1.1" memoizee "^0.4.14" - -"@polkadot/util-crypto@^2.0.0-beta.1", "@polkadot/util-crypto@^2.0.0-beta.2": - version "2.0.0-beta.2" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.0.0-beta.2.tgz#b080e7f369faf026f5940a37021fd4a413ef1388" - integrity sha512-7QMyuHo3lWDFdLqGBxRJUk4caVLvouFYK516mMgWTle6btZyYHTAuuqHsj2d/7gWq3/qfginaByfPtHkdoMO6A== - dependencies: - "@babel/runtime" "^7.7.7" - "@polkadot/util" "^2.0.0-beta.2" - "@polkadot/wasm-crypto" "^0.20.0-beta.1" - "@types/bip39" "^2.4.2" - "@types/bs58" "^4.0.0" - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^3.5.0" - "@types/xxhashjs" "^0.2.1" - base-x "3.0.5" - bip39 "^2.5.0" + rxjs "^6.5.5" + +"@polkadot/util-crypto@2.9.1", "@polkadot/util-crypto@^2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.9.1.tgz#a09aa507a2a09a034acb2f764efff40f90a078b1" + integrity sha512-agPZyW1XJH0vpbwLh3khZ5txBMSjWtyflmpTJeYSVinrDqs4EFkcN3IOVqQEL+SEpLPXUHxNXYNQM7Ls7poZ6Q== + dependencies: + "@babel/runtime" "^7.9.2" + "@polkadot/util" "2.9.1" + "@polkadot/wasm-crypto" "^1.2.1" + base-x "^3.0.8" + bip39 "^3.0.2" blakejs "^1.1.0" + bn.js "^5.1.1" bs58 "^4.0.1" + elliptic "^6.5.2" js-sha3 "^0.8.0" - secp256k1 "^3.8.0" - tweetnacl "^1.0.1" + pbkdf2 "^3.0.17" + tweetnacl "^1.0.3" xxhashjs "^0.2.2" -"@polkadot/util@^2.0.0-beta.1", "@polkadot/util@^2.0.0-beta.2": - version "2.0.0-beta.2" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.0.0-beta.2.tgz#9d2370c1c4b17ace4006820345ee904c331202c7" - integrity sha512-qzfPGeSnhd6soFDxmZH5ytcuB0/XlhxLFi0P1yWiAmTff8+Hu48E/edW5JW76aDcoZL0/BQ1jk4Db7ulcgSQqw== +"@polkadot/util@2.9.1", "@polkadot/util@^2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.9.1.tgz#841105eef98c9689cc369bc5eeb7a09a98ec14b2" + integrity sha512-7E/bl9B8hNPb3gnuH8IDAqpsdQ6Z+Y8RgPIJNY9l20FJ1W1ST0UpZgB0BCurrL9kTf4TTg4Lt8iFVwcq8MHRjg== dependencies: - "@babel/runtime" "^7.7.7" + "@babel/runtime" "^7.9.2" "@types/bn.js" "^4.11.6" - bn.js "^4.11.8" + bn.js "^5.1.1" camelcase "^5.3.1" - chalk "^3.0.0" + chalk "^4.0.0" ip-regex "^4.1.0" - moment "^2.24.0" - -"@polkadot/wasm-crypto@^0.20.0-beta.1": - version "0.20.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.20.0-beta.1.tgz#f60bcda641e69124dbc7353f72db8a4207a4431b" - integrity sha512-t3XUiyk74eMccDsoOBPkxiP/sfZjU8fsB6CHD/wABbrDfLZwYfLnzQ5u8ci3qUAoV4X1/f3H+PYoR2h9AqS+MA== -"@types/bip39@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.2.tgz#f5d6617212be496bb998d3969f657f77a10c5287" - integrity sha512-Vo9lqOIRq8uoIzEVrV87ZvcIM0PN9t0K3oYZ/CS61fIYKCBdOIM7mlWzXuRvSXrDtVa1uUO2w1cdfufxTC0bzg== - dependencies: - "@types/node" "*" +"@polkadot/wasm-crypto@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-1.2.1.tgz#2189702447acd28d763886359576c87562241767" + integrity sha512-nckIoZBV4nBZdeKwFwH5t7skS7L7GO5EFUl5B1F6uCjUfdNpDz3DtqbYQHcLdCZNmG4TDLg6w/1J+rkl2SiUZw== "@types/bn.js@^4.11.6": version "4.11.6" @@ -149,48 +160,20 @@ dependencies: "@types/node" "*" -"@types/bs58@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.1.tgz#3d51222aab067786d3bc3740a84a7f5a0effaa37" - integrity sha512-yfAgiWgVLjFCmRv8zAcOIHywYATEwiTVccTLnRp6UxTNavT55M9d/uhK3T03St/+8/z/wW+CRjGKUNmEqoHHCA== - dependencies: - base-x "^3.0.6" - "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/memoizee@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@types/memoizee/-/memoizee-0.4.3.tgz#f48270d19327c1709620132cf54d598650f98492" - integrity sha512-N6QT0c9ZbEKl33n1wyoTxZs4cpN+YXjs0Aqy5Qim8ipd9PBNIPqOh/p5Pixc4601tqr5GErsdxUbfqviDfubNw== - "@types/node@*": version "13.1.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.6.tgz#076028d0b0400be8105b89a0a55550c86684ffec" integrity sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg== -"@types/pbkdf2@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.0.0.tgz#5d9ca5f12a78a08cc89ad72883ad4a30af359229" - integrity sha512-6J6MHaAlBJC/eVMy9jOwj9oHaprfutukfW/Dyt0NEnpQ/6HN6YQrpvLwzWdWDeWZIdenjGHlbYDzyEODO5Z+2Q== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-3.5.0.tgz#0f3baf16b07488c6da2633a63b4160bcf8d0fd5b" - integrity sha512-ZE39QhkIaNK6xbKIp1VLN5O36r97LuslLmRnjAcT0sVDxcfvrk3zqp/VnIfmGza7J6jDxR8dIai3hsCxPYglPA== - dependencies: - "@types/node" "*" - -"@types/xxhashjs@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@types/xxhashjs/-/xxhashjs-0.2.1.tgz#6cd06b2eca5228765ff45960cf2c2a557ddf109a" - integrity sha512-Akm13wkwsQylVnBokl/aiKLtSxndSjfgTjdvmSxXNehYy4NymwdfdJHwGhpV54wcYfmOByOp3ak8AGdUlvp0sA== - dependencies: - "@types/node" "*" +"@types/node@11.11.6": + version "11.11.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" + integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== ansi-styles@^4.1.0: version "4.2.1" @@ -200,72 +183,50 @@ ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" -base-x@3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.5.tgz#d3ada59afed05b921ab581ec3112e6444ba0795a" - integrity sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA== - dependencies: - safe-buffer "^5.0.1" - -base-x@^3.0.2, base-x@^3.0.6: +base-x@^3.0.2: version "3.0.7" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.7.tgz#1c5a7fafe8f66b4114063e8da102799d4e7c408f" integrity sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw== dependencies: safe-buffer "^5.0.1" -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== +base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== dependencies: - file-uri-to-path "1.0.0" + safe-buffer "^5.0.1" -bip39@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.6.0.tgz#9e3a720b42ec8b3fbe4038f1e445317b6a99321c" - integrity sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg== +bip39@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.2.tgz#2baf42ff3071fc9ddd5103de92e8f80d9257ee32" + integrity sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ== dependencies: + "@types/node" "11.11.6" create-hash "^1.1.0" pbkdf2 "^3.0.9" randombytes "^2.0.1" - safe-buffer "^5.0.1" - unorm "^1.3.3" - -bip66@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" - integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= - dependencies: - safe-buffer "^5.0.1" blakejs@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= -bn.js@^4.11.8, bn.js@^4.4.0: +bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= -browserify-aes@^1.0.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -273,25 +234,20 @@ bs58@^4.0.1: dependencies: base-x "^3.0.2" -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== +chalk@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -311,7 +267,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -354,15 +310,6 @@ debug@^2.2.0: dependencies: ms "2.0.0" -drbg.js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" - integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= - dependencies: - browserify-aes "^1.0.6" - create-hash "^1.1.2" - create-hmac "^1.1.4" - elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" @@ -432,14 +379,6 @@ eventemitter3@^4.0.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - ext@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" @@ -447,11 +386,6 @@ ext@^1.1.2: dependencies: type "^2.0.0" -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -567,11 +501,6 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -moment@^2.24.0: - version "2.24.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" - integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -595,7 +524,7 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -pbkdf2@^3.0.9: +pbkdf2@^3.0.17, pbkdf2@^3.0.9: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== @@ -613,10 +542,10 @@ randombytes@^2.0.1: dependencies: safe-buffer "^5.1.0" -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" @@ -626,14 +555,14 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rxjs@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" - integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== +rxjs@^6.5.5: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -643,20 +572,6 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -secp256k1@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" - integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== - dependencies: - bindings "^1.5.0" - bip66 "^1.1.5" - bn.js "^4.11.8" - create-hash "^1.2.0" - drbg.js "^1.0.1" - elliptic "^6.5.2" - nan "^2.14.0" - safe-buffer "^5.1.2" - sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -685,10 +600,10 @@ tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tweetnacl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.1.tgz#2594d42da73cd036bd0d2a54683dd35a6b55ca17" - integrity sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A== +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== type@^1.0.1: version "1.2.0" @@ -707,11 +622,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -unorm@^1.3.3: - version "1.6.0" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" - integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== - websocket@^1.0.31: version "1.0.31" resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" diff --git a/nodes/rpc-node/src/chain_spec.rs b/nodes/rpc-node/src/chain_spec.rs index 442c08dc3..c975f7727 100644 --- a/nodes/rpc-node/src/chain_spec.rs +++ b/nodes/rpc-node/src/chain_spec.rs @@ -4,7 +4,6 @@ use runtime::{ GenesisConfig, genesis::{ account_id_from_seed, - authority_keys_from_seed, testnet_genesis, dev_genesis, } @@ -36,24 +35,20 @@ pub fn local_testnet_config() -> ChainSpec { "local_testnet", sc_service::ChainType::Local, || testnet_genesis( + account_id_from_seed::("Alice"), vec![ - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], - account_id_from_seed::("Alice"), - vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Charlie"), - account_id_from_seed::("Dave"), - account_id_from_seed::("Eve"), - account_id_from_seed::("Ferdie"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), - account_id_from_seed::("Charlie//stash"), - account_id_from_seed::("Dave//stash"), - account_id_from_seed::("Eve//stash"), - account_id_from_seed::("Ferdie//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Charlie"), + account_id_from_seed::("Dave"), + account_id_from_seed::("Eve"), + account_id_from_seed::("Ferdie"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Charlie//stash"), + account_id_from_seed::("Dave//stash"), + account_id_from_seed::("Eve//stash"), + account_id_from_seed::("Ferdie//stash"), ], ), vec![], diff --git a/nodes/rpc-node/src/command.rs b/nodes/rpc-node/src/command.rs index b193ceec3..cdb45b736 100644 --- a/nodes/rpc-node/src/command.rs +++ b/nodes/rpc-node/src/command.rs @@ -51,7 +51,7 @@ pub fn run() -> sc_cli::Result<()> { match &cli.subcommand { Some(subcommand) => { let runner = cli.create_runner(subcommand)?; - runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0)) + runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config))) } None => { let runner = cli.create_runner(&cli.run)?; diff --git a/nodes/rpc-node/src/service.rs b/nodes/rpc-node/src/service.rs index b5f68a6e8..302235430 100644 --- a/nodes/rpc-node/src/service.rs +++ b/nodes/rpc-node/src/service.rs @@ -1,20 +1,13 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use std::sync::Arc; -use std::time::Duration; -use sc_client::LongestChain; -use sc_client_api::ExecutorProvider; -use runtime::{self, opaque::Block, RuntimeApi}; -use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; +// use std::sync::Arc; +// use sc_client::LongestChain; +// use sc_client_api::ExecutorProvider; +use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; -use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; -use sc_finality_grandpa::{ - self, - FinalityProofProvider as GrandpaFinalityProofProvider, - StorageAndProofProvider, -}; +// use sc_network::config::DummyFinalityProofRequestBuilder; // Our native executor instance. native_executor_instance!( @@ -29,13 +22,8 @@ native_executor_instance!( /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ - use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; - // A type alias we'll use for adding our RPC extension type RpcExtension = jsonrpc_core::IoHandler; - - let mut import_setup = None; - let inherent_data_providers = sp_inherents::InherentDataProviders::new(); let builder = sc_service::ServiceBuilder::new_full::< runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor @@ -47,31 +35,8 @@ macro_rules! new_full_start { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) })? - .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { - let select_chain = select_chain.take() - .ok_or_else(|| sc_service::Error::SelectChainRequired)?; - - let (grandpa_block_import, grandpa_link) = - sc_finality_grandpa::block_import( - client.clone(), &(client.clone() as std::sync::Arc<_>), select_chain - )?; - - let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( - grandpa_block_import.clone(), client.clone(), - ); - - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair>( - sc_consensus_aura::slot_duration(&*client)?, - aura_block_import, - Some(Box::new(grandpa_block_import.clone())), - None, - client, - inherent_data_providers.clone(), - )?; - - import_setup = Some((grandpa_block_import, grandpa_link)); - - Ok(import_queue) + .with_import_queue(|_config, client, _select_chain, _transaction_pool| { + Ok(sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>(Box::new(client))) })? .with_rpc_extensions(|builder| -> Result { // Make an io handler to be extended with individual RPCs @@ -88,7 +53,7 @@ macro_rules! new_full_start { Ok(io) })?; - (builder, import_setup, inherent_data_providers) + builder }} } @@ -96,153 +61,74 @@ macro_rules! new_full_start { pub fn new_full(config: Configuration) -> Result { - let role = config.role.clone(); - let force_authoring = config.force_authoring; - let name = config.network.node_name.clone(); - let disable_grandpa = config.disable_grandpa; - - let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config); - - let (block_import, grandpa_link) = - import_setup.take() - .expect("Link Half and Block Import are present for Full Services or setup failed before. qed"); - - let service = builder - .with_finality_proof_provider(|client, backend| { - let provider = client as Arc>; - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) - })? - .build()?; - - if role.is_authority() { - let proposer = sc_basic_authorship::ProposerFactory::new( - service.client(), - service.transaction_pool(), - ); - - let client = service.client(); - let select_chain = service.select_chain() - .ok_or(ServiceError::SelectChainRequired)?; - - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - - let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>( - sc_consensus_aura::slot_duration(&*client)?, - client, - select_chain, - block_import, - proposer, - service.network(), - inherent_data_providers.clone(), - force_authoring, - service.keystore(), - can_author_with, - )?; - - // the AURA authoring task is considered essential, i.e. if it - // fails we take down the service with it. - service.spawn_essential_task("aura", aura); - } - - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. - let keystore = if role.is_authority() { - Some(service.keystore()) - } else { - None - }; - - let grandpa_config = sc_finality_grandpa::Config { - // FIXME #1578 make this available through chainspec - gossip_duration: Duration::from_millis(333), - justification_period: 512, - name: Some(name), - observer_enabled: false, - keystore, - is_authority: role.is_network_authority(), - }; - - let enable_grandpa = !disable_grandpa; - if enable_grandpa { - // start the full GRANDPA voter - // NOTE: non-authorities could run the GRANDPA observer protocol, but at - // this point the full voter should provide better guarantees of block - // and vote data availability than the observer. The observer has not - // been tested extensively yet and having most nodes in a network run it - // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { - config: grandpa_config, - link: grandpa_link, - network: service.network(), - inherent_data_providers: inherent_data_providers.clone(), - telemetry_on_connect: Some(service.telemetry_on_connect_stream()), - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry: service.prometheus_registry(), - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - service.spawn_essential_task( - "grandpa-voter", - sc_finality_grandpa::run_grandpa_voter(grandpa_config)? - ); - } else { - sc_finality_grandpa::setup_disabled_grandpa( - service.client(), - &inherent_data_providers, - service.network(), - )?; - } + //TODO This isn't great. It includes the timestamp inherent in all blocks + // regardless of runtime. + let inherent_data_providers = InherentDataProviders::new(); + inherent_data_providers + .register_provider(sp_timestamp::InherentDataProvider) + .map_err(Into::into) + .map_err(sp_consensus::error::Error::InherentData)?; + + let builder = new_full_start!(config); + let service = builder.build()?; + + let proposer = sc_basic_authorship::ProposerFactory::new( + service.client(), + service.transaction_pool(), + ); + + let authorship_future = sc_consensus_manual_seal::run_instant_seal( + Box::new(service.client()), + proposer, + service.client().clone(), + service.transaction_pool().pool().clone(), + service.select_chain().ok_or(ServiceError::SelectChainRequired)?, + inherent_data_providers + ); + + service.spawn_essential_task("instant-seal", authorship_future); Ok(service) } /// Builds a new service for a light client. -pub fn new_light(config: Configuration) +pub fn new_light(_config: Configuration) -> Result { - let inherent_data_providers = InherentDataProviders::new(); - - ServiceBuilder::new_light::(config)? - .with_select_chain(|_config, backend| { - Ok(LongestChain::new(backend.clone())) - })? - .with_transaction_pool(|config, client, fetcher| { - let fetcher = fetcher - .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; - - let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); - let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, - ); - Ok(pool) - })? - .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| { - let fetch_checker = fetcher - .map(|fetcher| fetcher.checker().clone()) - .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; - let grandpa_block_import = sc_finality_grandpa::light_block_import( - client.clone(), backend, &(client.clone() as std::sync::Arc<_>), Arc::new(fetch_checker), - )?; - let finality_proof_import = grandpa_block_import.clone(); - let finality_proof_request_builder = - finality_proof_import.create_finality_proof_request_builder(); - - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair>( - sc_consensus_aura::slot_duration(&*client)?, - grandpa_block_import, - None, - Some(Box::new(finality_proof_import)), - client, - inherent_data_providers.clone(), - )?; - - Ok((import_queue, finality_proof_request_builder)) - })? - .with_finality_proof_provider(|client, backend| { - let provider = client as Arc>; - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) - })? - .build() + //TODO How can I get the light client working? + // I had the same problem with the manual seal node. + unimplemented!("No light client for manual seal"); + #[allow(unreachable_code)] + new_full(_config) + + // let inherent_data_providers = InherentDataProviders::new(); + // + // ServiceBuilder::new_light::(config)? + // .with_select_chain(|_config, backend| { + // Ok(LongestChain::new(backend.clone())) + // })? + // .with_transaction_pool(|config, client, fetcher| { + // let fetcher = fetcher + // .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; + // + // let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); + // let pool = sc_transaction_pool::BasicPool::with_revalidation_type( + // config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + // ); + // Ok(pool) + // })? + // .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool| { + // let finality_proof_request_builder = + // Box::new(DummyFinalityProofRequestBuilder::default()) as Box<_>; + // + // let import_queue = sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>( + // Box::new(client) + // ); + // + // Ok((import_queue, finality_proof_request_builder)) + // })? + // .with_finality_proof_provider(|client, backend| { + // Ok(Arc::new(()) as _) + // })? + // .build() } From 88711309a8ae924b0c86404f1ecfe0b47cd727ab Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 14:45:04 -0400 Subject: [PATCH 10/38] Only kitchen node supports ocw-runtime --- nodes/basic-pow/Cargo.toml | 4 ---- nodes/kitchen-node/Cargo.toml | 2 +- nodes/manual-seal/Cargo.toml | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index d551b7dd2..55a6efe2a 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -45,10 +45,6 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} -# Runtime with off-chain worker enabled. -# To use this runtime, compile kitchen-node with `ocw` feature enabled, -# `cargo build --release --features ocw`. -# runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } # --- [build-dependencies] diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 64488b85d..36176c40c 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -50,7 +50,7 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} # Runtime with off-chain worker enabled. -# To use this runtime, compile kitchen-node with `ocw` feature enabled, +# To use this runtime, compile the node with `ocw` feature enabled, # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } # --- diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 4840a61cd..7609ca7ab 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -51,10 +51,6 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} -# Runtime with off-chain worker enabled. -# To use this runtime, compile kitchen-node with `ocw` feature enabled, -# `cargo build --release --features ocw`. -# runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } # --- [build-dependencies] From 2d91bdee1f071c6993b34bea0eec585bb9668ec1 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 15:24:33 -0400 Subject: [PATCH 11/38] Properly prune session keys from runtime --- runtimes/super-runtime/src/lib.rs | 13 ++++--------- runtimes/weight-fee-runtime/src/lib.rs | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index 67065e5d2..dfe037ea1 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -20,7 +20,6 @@ use sp_runtime::{ ApplyExtrinsicResult, create_runtime_str, generic, - impl_opaque_keys, MultiSignature, transaction_validity::{TransactionValidity, TransactionSource}, }; @@ -88,10 +87,6 @@ pub mod opaque { pub type Block = generic::Block; /// Opaque block identifier type. pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys {} - } } /// This runtime version. @@ -458,14 +453,14 @@ impl_runtime_apis! { } impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) + fn generate_session_keys(_seed: Option>) -> Vec { + Vec::new() } fn decode_session_keys( - encoded: Vec, + _encoded: Vec, ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + None } } diff --git a/runtimes/weight-fee-runtime/src/lib.rs b/runtimes/weight-fee-runtime/src/lib.rs index 8e1216be8..20385be6e 100644 --- a/runtimes/weight-fee-runtime/src/lib.rs +++ b/runtimes/weight-fee-runtime/src/lib.rs @@ -22,7 +22,6 @@ use sp_runtime::{ ApplyExtrinsicResult, create_runtime_str, generic, - impl_opaque_keys, transaction_validity::{TransactionValidity, TransactionSource}, }; use sp_runtime::traits::{ @@ -99,10 +98,6 @@ pub mod opaque { pub type Block = generic::Block; /// Opaque block identifier type. pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys {} - } } /// This runtime version. @@ -423,14 +418,14 @@ impl_runtime_apis! { } impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) + fn generate_session_keys(_seed: Option>) -> Vec { + Vec::new() } fn decode_session_keys( - encoded: Vec, + _encoded: Vec, ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + None } } } From 00002f016be5189a05eadbdaa1d226dfae1756d2 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 15:35:03 -0400 Subject: [PATCH 12/38] Standardize ocw-runtime --- Cargo.lock | 4 -- runtimes/ocw-runtime/Cargo.toml | 8 --- runtimes/ocw-runtime/src/genesis.rs | 45 ++++----------- runtimes/ocw-runtime/src/lib.rs | 81 ++------------------------- runtimes/super-runtime/src/genesis.rs | 8 --- 5 files changed, 18 insertions(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f790cbaa1..cf91c3b6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3035,9 +3035,7 @@ dependencies = [ "frame-support", "frame-system", "offchain-demo", - "pallet-babe", "pallet-balances", - "pallet-grandpa", "pallet-indices", "pallet-randomness-collective-flip", "pallet-sudo", @@ -3048,9 +3046,7 @@ dependencies = [ "serde", "sp-api", "sp-block-builder", - "sp-consensus-babe", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-offchain", diff --git a/runtimes/ocw-runtime/Cargo.toml b/runtimes/ocw-runtime/Cargo.toml index d331083bd..8508322bd 100644 --- a/runtimes/ocw-runtime/Cargo.toml +++ b/runtimes/ocw-runtime/Cargo.toml @@ -14,9 +14,7 @@ parity-scale-codec = { version = "1.3.0", features = ["derive"], default-feature frame-executive = { version = '2.0.0-alpha.6', default-features = false } frame-support = { version = '2.0.0-alpha.6', default-features = false } frame-system = { version = '2.0.0-alpha.6', default-features = false } -pallet-babe = { version = '2.0.0-alpha.6', default-features = false } pallet-balances = { version = '2.0.0-alpha.6', default-features = false } -pallet-grandpa = { version = '2.0.0-alpha.6', default-features = false } pallet-indices = { version = '2.0.0-alpha.6', default-features = false } pallet-randomness-collective-flip = { version = '2.0.0-alpha.6', default-features = false } pallet-sudo = { version = '2.0.0-alpha.6', default-features = false } @@ -24,9 +22,7 @@ pallet-timestamp = { version = '2.0.0-alpha.6', default-features = false } pallet-transaction-payment = { version = '2.0.0-alpha.6', default-features = false } sp-api = { version = '2.0.0-alpha.6', default-features = false } sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } sp-inherents = { version = '2.0.0-alpha.6', default-features = false } sp-io = { version = '2.0.0-alpha.6', default-features = false } sp-offchain = { version = '2.0.0-alpha.6', default-features = false } @@ -49,9 +45,7 @@ std = [ "frame-executive/std", "frame-support/std", "frame-system/std", - "pallet-babe/std", "pallet-balances/std", - "pallet-grandpa/std", "pallet-indices/std", "pallet-randomness-collective-flip/std", "pallet-sudo/std", @@ -62,9 +56,7 @@ std = [ "serde", "sp-api/std", "sp-block-builder/std", - "sp-consensus-babe/std", "sp-core/std", - "sp-finality-grandpa/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", diff --git a/runtimes/ocw-runtime/src/genesis.rs b/runtimes/ocw-runtime/src/genesis.rs index a4f8436ce..d8b507bb3 100644 --- a/runtimes/ocw-runtime/src/genesis.rs +++ b/runtimes/ocw-runtime/src/genesis.rs @@ -1,17 +1,15 @@ //! Helper module to build a genesis configuration for the Offchain Worker use super::{ - AccountId, BabeConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + AccountId, BalancesConfig, GenesisConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature, }; -use sp_core::{Pair, Public, sr25519}; -use sp_consensus_babe::{AuthorityId as BabeId}; -use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_core::{Pair, sr25519}; use sp_runtime::traits::{Verify, IdentifyAccount}; /// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) +fn get_from_seed(seed: &str) -> TPair::Public { + TPair::from_string(&format!("//{}", seed), None) .expect("static values are valid; qed") .public() } @@ -19,41 +17,28 @@ fn get_from_seed(seed: &str) -> ::Public type AccountPublic = ::Signer; /// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From { - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate session key from seed -pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { - ( - get_from_seed::(seed), - get_from_seed::(seed), - ) + AccountPublic::from(get_from_seed::(seed)).into_account() } pub fn dev_genesis() -> GenesisConfig { testnet_genesis( - // Initial Authorities - vec![ - authority_keys_from_seed("Alice"), - ], // Root Key - account_id_from_seed::("Alice"), + account_id_from_seed::("Alice"), // Endowed Accounts vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), ], ) } /// Helper function to build a genesis configuration pub fn testnet_genesis( - initial_authorities: Vec<(BabeId, GrandpaId)>, root_key: AccountId, endowed_accounts: Vec, ) -> GenesisConfig { @@ -68,11 +53,5 @@ pub fn testnet_genesis( pallet_sudo: Some(SudoConfig { key: root_key, }), - pallet_babe: Some(BabeConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone(), 1)).collect(), - }), - pallet_grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), } } diff --git a/runtimes/ocw-runtime/src/lib.rs b/runtimes/ocw-runtime/src/lib.rs index f02be39f9..9940cba68 100644 --- a/runtimes/ocw-runtime/src/lib.rs +++ b/runtimes/ocw-runtime/src/lib.rs @@ -19,7 +19,6 @@ use sp_runtime::{ ApplyExtrinsicResult, create_runtime_str, generic, - impl_opaque_keys, MultiSignature, transaction_validity::{TransactionValidity, TransactionSource}, }; @@ -28,8 +27,6 @@ use sp_runtime::traits::{ SaturatedConversion }; use sp_api::impl_runtime_apis; -use pallet_babe::SameAuthoritiesForever; -use pallet_grandpa::AuthorityList as GrandpaAuthorityList; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -91,13 +88,6 @@ pub mod opaque { pub type Block = generic::Block; /// Opaque block identifier type. pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, //TODO is this order correct? I changed stuff in chainspec. - pub babe: Babe, - } - } } /// This runtime version. @@ -110,20 +100,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, }; -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// These time units are defined in number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -// Some BABE-specific stuff -// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. -pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); -pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES; - /// The version infromation used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -185,28 +161,13 @@ impl frame_system::Trait for Runtime { } parameter_types! { - pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64; - pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK; -} - -impl pallet_babe::Trait for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - type EpochChangeTrigger = SameAuthoritiesForever; -} - -impl pallet_grandpa::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = 1000; } impl pallet_timestamp::Trait for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; - type OnTimestampSet = Babe; + type OnTimestampSet = (); type MinimumPeriod = MinimumPeriod; } @@ -309,8 +270,6 @@ construct_runtime!( { System: frame_system::{Module, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Babe: pallet_babe::{Module, Call, Storage, Config, Inherent(Timestamp)}, - Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event}, Balances: pallet_balances::{Module, Call, Storage, Config, Event}, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, @@ -407,43 +366,15 @@ impl_runtime_apis! { } } - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - } - - impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { - // The choice of `c` parameter (where `1 - c` represents the - // probability of a slot being empty), is done in accordance to the - // slot duration and expected target block time, for safely - // resisting network delays of maximum two seconds. - // - sp_consensus_babe::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: PRIMARY_PROBABILITY, - genesis_authorities: Babe::authorities(), - randomness: Babe::randomness(), - secondary_slots: true, - } - } - - fn current_epoch_start() -> sp_consensus_babe::SlotNumber { - Babe::current_epoch_start() - } - } - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) + fn generate_session_keys(_seed: Option>) -> Vec { + Vec::new() } fn decode_session_keys( - encoded: Vec, + _encoded: Vec, ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + None } } } diff --git a/runtimes/super-runtime/src/genesis.rs b/runtimes/super-runtime/src/genesis.rs index 78ed17b9e..7b9e7fed9 100644 --- a/runtimes/super-runtime/src/genesis.rs +++ b/runtimes/super-runtime/src/genesis.rs @@ -23,14 +23,6 @@ pub fn account_id_from_seed(seed: &str) -> AccountId where AccountPublic::from(get_from_seed::(seed)).into_account() } -/// Helper function to generate session key from seed -// pub fn authority_keys_from_seed(seed: &str) -> (BabeId, GrandpaId) { -// ( -// get_from_seed::(seed), -// get_from_seed::(seed), -// ) -// } - pub fn dev_genesis() -> GenesisConfig { testnet_genesis( // Root Key From 383b0f1c90a3f078ccfaf772494fdf55cd9f49ab Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 15:48:09 -0400 Subject: [PATCH 13/38] Restore api-runtime --- Cargo.lock | 62 +++- Cargo.toml | 1 + nodes/basic-pow/Cargo.toml | 2 + nodes/kitchen-node/Cargo.toml | 3 + nodes/manual-seal/Cargo.toml | 2 + nodes/rpc-node/Cargo.toml | 5 +- runtimes/api-runtime/Cargo.toml | 75 +++++ runtimes/api-runtime/aggregate_types.js | 31 ++ runtimes/api-runtime/build.rs | 11 + runtimes/api-runtime/src/genesis.rs | 78 +++++ runtimes/api-runtime/src/lib.rs | 380 ++++++++++++++++++++++ runtimes/api-runtime/types.json | 5 + runtimes/super-runtime/Cargo.toml | 4 - runtimes/super-runtime/aggregate_types.js | 1 - runtimes/super-runtime/src/lib.rs | 18 - 15 files changed, 648 insertions(+), 30 deletions(-) create mode 100644 runtimes/api-runtime/Cargo.toml create mode 100644 runtimes/api-runtime/aggregate_types.js create mode 100644 runtimes/api-runtime/build.rs create mode 100644 runtimes/api-runtime/src/genesis.rs create mode 100644 runtimes/api-runtime/src/lib.rs create mode 100644 runtimes/api-runtime/types.json diff --git a/Cargo.lock b/Cargo.lock index cf91c3b6f..6ca9bb164 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,6 +81,42 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" +[[package]] +name = "api-runtime" +version = "2.0.0-alpha.6" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-balances", + "pallet-grandpa", + "pallet-indices", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "safe-mix", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", + "sum-storage", + "sum-storage-rpc-runtime-api", +] + [[package]] name = "app_dirs" version = "1.2.1" @@ -3115,6 +3151,28 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "pallet-aura" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9757d44df3ff0372ea313703736e69ba361b158a58b7c9677b54be11a777da81" +dependencies = [ + "frame-support", + "frame-system", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + [[package]] name = "pallet-babe" version = "2.0.0-alpha.6" @@ -4169,6 +4227,7 @@ dependencies = [ name = "rpc-node" version = "2.0.0-alpha.6" dependencies = [ + "api-runtime", "ctrlc", "futures 0.1.29", "futures 0.3.4", @@ -4198,7 +4257,6 @@ dependencies = [ "structopt", "substrate-build-script-utils", "sum-storage-rpc", - "super-runtime", "tokio 0.1.22", "trie-root 0.15.2", "vergen", @@ -6261,8 +6319,6 @@ dependencies = [ "storage-cache", "struct-storage", "substrate-wasm-builder-runner", - "sum-storage", - "sum-storage-rpc-runtime-api", "vec-set", ] diff --git a/Cargo.toml b/Cargo.toml index 3ea63ebef..166b9b1fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ members = [ "pallets/sum-storage", "pallets/vec-set", "pallets/weights", + "runtimes/api-runtime", "runtimes/babe-grandpa-runtime", "runtimes/ocw-runtime", "runtimes/super-runtime", diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index 55a6efe2a..599b047d9 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -45,6 +45,8 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} +# Runtime with custom runtime-api (custom API only used in rpc-node) +# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 36176c40c..0ef5d3530 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -53,6 +53,9 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # To use this runtime, compile the node with `ocw` feature enabled, # `cargo build --release --features ocw`. # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } + +# Runtime with custom runtime-api (custom API only used in rpc-node) +# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 7609ca7ab..5a4714847 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -51,6 +51,8 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} +# Runtime with custom runtime-api (custom API only used in rpc-node) +# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index a80d1e5e4..46707eec4 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -20,6 +20,7 @@ parking_lot = '0.9.0' tokio = '0.1.22' trie-root = '0.15.2' structopt = "0.3.8" +runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" @@ -45,10 +46,6 @@ sp-runtime = '2.0.0-alpha.6' sp-timestamp = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' -# This node requires its runtime to implement the sum-storage-runtime-api. -# Only the super-runtime provides this API. -runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } - [build-dependencies] vergen = '3.0.4' substrate-build-script-utils = '2.0.0-alpha.6' diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml new file mode 100644 index 000000000..4ae4a2ec8 --- /dev/null +++ b/runtimes/api-runtime/Cargo.toml @@ -0,0 +1,75 @@ +[package] +name = "api-runtime" +version = "2.0.0-alpha.6" +authors = ["Joshy Orndorff"] +edition = "2018" +license = "GPL-3.0-or-later" + +[dependencies] +aura = { package = "pallet-aura", version = '2.0.0-alpha.6', default_features = false} +balances = { package = "pallet-balances", version = '2.0.0-alpha.6', default_features = false} +frame-support = { version = '2.0.0-alpha.6', default_features = false} +grandpa = { package = "pallet-grandpa", version = '2.0.0-alpha.6', default_features = false} +indices = { package = "pallet-indices", version = '2.0.0-alpha.6', default_features = false} +sudo = { package = "pallet-sudo", version = '2.0.0-alpha.6', default_features = false} +frame-system = { version = '2.0.0-alpha.6', default_features = false} +timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.6', default_features = false} +transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.6', default_features = false} +randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.6', default_features = false} + +parity-scale-codec = { version = "1.3.0", default-features = false, features = ["derive"] } +frame-executive = { version = '2.0.0-alpha.6', default_features = false} +safe-mix = { version = "1.0.0", default-features = false } +serde = { version = "1.0.101", optional = true, features = ["derive"] } +sp-api = { version = '2.0.0-alpha.6', default_features = false} +sp-block-builder = { version = '2.0.0-alpha.6', default_features = false} +sp-consensus-aura = { version = '0.8.0-alpha.6', default_features = false} +sp-core = { version = '2.0.0-alpha.6', default_features = false} +sp-finality-grandpa = { version = '2.0.0-alpha.6', default_features = false} +sp-inherents = { version = '2.0.0-alpha.6', default_features = false} +sp-io = { version = '2.0.0-alpha.6', default_features = false} +sp-offchain = { version = '2.0.0-alpha.6', default_features = false} +sp-runtime = { version = '2.0.0-alpha.6', default_features = false} +sp-session = { version = '2.0.0-alpha.6', default_features = false} +sp-std = { version = '2.0.0-alpha.6', default_features = false} +sp-transaction-pool = { version = '2.0.0-alpha.6', default_features = false} +sp-version = { version = '2.0.0-alpha.6', default_features = false} +sum-storage = { default-features = false, path = "../../pallets/sum-storage" } +sum-storage-rpc-runtime-api = { default-features = false, path = "../../pallets/sum-storage/rpc/runtime-api" } + +[build-dependencies] +wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner" } + +[features] +default = ["std"] +std = [ + "aura/std", + "balances/std", + "parity-scale-codec/std", + "frame-executive/std", + "frame-support/std", + "frame-system/std", + "grandpa/std", + "indices/std", + "randomness-collective-flip/std", + "safe-mix/std", + "serde", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-finality-grandpa/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "sudo/std", + "sum-storage/std", + "sum-storage-rpc-runtime-api/std", + "timestamp/std", + "transaction-payment/std", +] diff --git a/runtimes/api-runtime/aggregate_types.js b/runtimes/api-runtime/aggregate_types.js new file mode 100644 index 000000000..5ca26e236 --- /dev/null +++ b/runtimes/api-runtime/aggregate_types.js @@ -0,0 +1,31 @@ +// Reads in the type definitions from all pallets in the runtime and the runtime's own tpes +// Naively aggregates types and writes them to disk. + +const fs = require('fs'); + +// A list of all the installed recipe pallets' folder names. +// Does not include system pallets because Apps already supports them. +// Redundant with construct_runtime! +const pallets = [ + "sum-storage", +] + +// Types that are native to the runtime itself (ie come from lib.rs) +// These specifics are from https://polkadot.js.org/api/start/types.extend.html#impact-on-extrinsics +const runtimeOwnTypes = { + "Address": "AccountId", + "LookupSource": "AccountId", + "Weight": "u32" +} + +// Loop through all pallets aggregating types +let finalTypes = runtimeOwnTypes; +let palletTypes; +for (let dirname of pallets) { + let path = `../../pallets/${dirname}/types.json`; + palletTypes = JSON.parse(fs.readFileSync(path, 'utf8')); + finalTypes = {...finalTypes, ...palletTypes}; +} + +// Write output to disk +fs.writeFileSync("types.json", JSON.stringify(finalTypes, null, 2), 'utf8'); diff --git a/runtimes/api-runtime/build.rs b/runtimes/api-runtime/build.rs new file mode 100644 index 000000000..63f4bc0f3 --- /dev/null +++ b/runtimes/api-runtime/build.rs @@ -0,0 +1,11 @@ + +use wasm_builder_runner::WasmBuilder; + +fn main() { + WasmBuilder::new() + .with_current_project() + .with_wasm_builder_from_crates("1.0.9") + .export_heap_base() + .import_memory() + .build() +} diff --git a/runtimes/api-runtime/src/genesis.rs b/runtimes/api-runtime/src/genesis.rs new file mode 100644 index 000000000..ffbc2f205 --- /dev/null +++ b/runtimes/api-runtime/src/genesis.rs @@ -0,0 +1,78 @@ +//! Helper module to build a genesis configuration for the api-runtime + +use super::{ + AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + SudoConfig, SystemConfig, WASM_BINARY, Signature, +}; +use sp_core::{Pair, Public, sr25519}; +use sp_consensus_aura::sr25519::{AuthorityId as AuraId}; +use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_runtime::traits::{Verify, IdentifyAccount}; + +/// Helper function to generate a crypto pair from seed +fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +type AccountPublic = ::Signer; + +/// Helper function to generate an account ID from seed +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From<::Public> +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +/// Helper function to generate session key from seed +pub fn authority_keys_from_seed(seed: &str) -> (AuraId, GrandpaId) { + ( + get_from_seed::(seed), + get_from_seed::(seed), + ) +} + +pub fn dev_genesis() -> GenesisConfig { + testnet_genesis( + // Initial Authorities + vec![ + authority_keys_from_seed("Alice"), + ], + // Root Key + account_id_from_seed::("Alice"), + // Endowed Accounts + vec![ + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), + ], + ) +} + +/// Helper function to build a genesis configuration +pub fn testnet_genesis( + initial_authorities: Vec<(AuraId, GrandpaId)>, + root_key: AccountId, + endowed_accounts: Vec, +) -> GenesisConfig { + GenesisConfig { + system: Some(SystemConfig { + code: WASM_BINARY.to_vec(), + changes_trie_config: Default::default(), + }), + balances: Some(BalancesConfig { + balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(), + }), + sudo: Some(SudoConfig { + key: root_key, + }), + aura: Some(AuraConfig { + authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), + }), + grandpa: Some(GrandpaConfig { + authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), + }), + } +} diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs new file mode 100644 index 000000000..df255113c --- /dev/null +++ b/runtimes/api-runtime/src/lib.rs @@ -0,0 +1,380 @@ +//! A Runtime that demonstrates a custom runtime API. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit="256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +// Include the genesis helper module when building to std +#[cfg(feature = "std")] +pub mod genesis; + +use sp_std::prelude::*; +use sp_core::{OpaqueMetadata, H256}; +use sp_runtime::{ + ApplyExtrinsicResult, + create_runtime_str, + generic, + impl_opaque_keys, + MultiSignature, + transaction_validity::{TransactionValidity, TransactionSource}, +}; +use sp_runtime::traits::{ + BlakeTwo256, + Block as BlockT, + IdentityLookup, + Verify, + ConvertInto, + IdentifyAccount, +}; +use sp_api::impl_runtime_apis; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use grandpa::AuthorityList as GrandpaAuthorityList; +use frame_system as system; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +// A few exports that help ease life for downstream crates. +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +pub use timestamp::Call as TimestampCall; +pub use balances::Call as BalancesCall; +pub use sp_runtime::{Permill, Perbill}; +pub use frame_support::{ + StorageValue, construct_runtime, parameter_types, + traits::Randomness, + weights::Weight, +}; + +/// An index to a block. +pub type BlockNumber = u32; + +/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. +pub type Signature = MultiSignature; + +/// Some way of identifying an account on the chain. We intentionally make it equivalent +/// to the public key of our transaction signing scheme. +pub type AccountId = <::Signer as IdentifyAccount>::AccountId; + +/// Balance of an account. +pub type Balance = u128; + +/// Index of a transaction in the chain. +pub type Index = u32; + +/// A hash of some data used by the chain. +pub type Hash = H256; + +/// Digest item type. +pub type DigestItem = generic::DigestItem; + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core datastructures. +pub mod opaque { + use super::*; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; + + impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + pub grandpa: Grandpa, + } + } +} + +/// This runtime version. +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("api-runtime"), + impl_name: create_runtime_str!("api-runtime"), + authoring_version: 1, + spec_version: 1, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, +}; + +pub const MILLISECS_PER_BLOCK: u64 = 6000; + +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// These time units are defined in number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; + +/// The version infromation used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } +} + +parameter_types! { + pub const BlockHashCount: BlockNumber = 250; + pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); + pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; + pub const Version: RuntimeVersion = VERSION; +} + +impl system::Trait for Runtime { + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = IdentityLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// Maximum weight of each block. + type MaximumBlockWeight = MaximumBlockWeight; + /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. + type MaximumBlockLength = MaximumBlockLength; + /// Portion of the block weight that is available to all normal transactions. + type AvailableBlockRatio = AvailableBlockRatio; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type ModuleToIndex = ModuleToIndex; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = balances::AccountData; +} + +impl aura::Trait for Runtime { + type AuthorityId = AuraId; +} + +impl grandpa::Trait for Runtime { + type Event = Event; +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl timestamp::Trait for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; +} + +parameter_types! { + pub const ExistentialDeposit: u128 = 500; + pub const TransferFee: u128 = 0; + pub const CreationFee: u128 = 0; +} + +impl balances::Trait for Runtime { + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; +} + +impl sudo::Trait for Runtime { + type Event = Event; + type Call = Call; +} + +parameter_types! { + pub const TransactionBaseFee: Balance = 0; + pub const TransactionByteFee: Balance = 1; +} + +impl transaction_payment::Trait for Runtime { + type Currency = balances::Module; + type OnTransactionPayment = (); + type TransactionBaseFee = TransactionBaseFee; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = ConvertInto; + type FeeMultiplierUpdate = (); +} + +// ---------------------- Recipe Pallet Configurations ---------------------- +impl sum_storage::Trait for Runtime { + type Event = Event; +} + +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = opaque::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: system::{Module, Call, Storage, Config, Event}, + Timestamp: timestamp::{Module, Call, Storage, Inherent}, + Aura: aura::{Module, Config, Inherent(Timestamp)}, + Grandpa: grandpa::{Module, Call, Storage, Config, Event}, + Balances: balances::{Module, Call, Storage, Config, Event}, + RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, + Sudo: sudo::{Module, Call, Config, Storage, Event}, + TransactionPayment: transaction_payment::{Module, Storage}, + SumStorage: sum_storage::{Module, Call, Storage, Event}, + } +); + +/// The address format for describing accounts. +pub type Address = AccountId; +/// Block header type as expected by this runtime. +pub type Header = generic::Header; +/// Block type as expected by this runtime. +pub type Block = generic::Block; +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; +/// BlockId type as expected by this runtime. +pub type BlockId = generic::BlockId; +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + system::CheckVersion, + system::CheckGenesis, + system::CheckEra, + system::CheckNonce, + system::CheckWeight, + transaction_payment::ChargeTransactionPayment +); +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +/// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = generic::CheckedExtrinsic; +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive, Runtime, AllModules>; + +impl_runtime_apis! { + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + Runtime::metadata().into() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + + fn random_seed() -> ::Hash { + RandomnessCollectiveFlip::random_seed() + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic + ) -> TransactionValidity { + Executive::validate_transaction(source, tx) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> u64 { + Aura::slot_duration() + } + + fn authorities() -> Vec { + Aura::authorities() + } + } + + // Here we implement our custom runtime API. + impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { + fn get_sum() -> u32 { + // This Runtime API calls into a specific pallet. Calling a pallet is a common + // design pattern. You can see most other APIs in this file do the same. + // It is also possible to write your logic right here in the runtime + // amalgamator file + SumStorage::get_sum() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + opaque::SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, sp_core::crypto::KeyTypeId)>> { + opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl sp_finality_grandpa::GrandpaApi for Runtime { + fn grandpa_authorities() -> GrandpaAuthorityList { + Grandpa::grandpa_authorities() + } + } +} diff --git a/runtimes/api-runtime/types.json b/runtimes/api-runtime/types.json new file mode 100644 index 000000000..ef86d910a --- /dev/null +++ b/runtimes/api-runtime/types.json @@ -0,0 +1,5 @@ +{ + "Address": "AccountId", + "LookupSource": "AccountId", + "Weight": "u32" +} \ No newline at end of file diff --git a/runtimes/super-runtime/Cargo.toml b/runtimes/super-runtime/Cargo.toml index e72300e2c..1527e1ec3 100644 --- a/runtimes/super-runtime/Cargo.toml +++ b/runtimes/super-runtime/Cargo.toml @@ -39,8 +39,6 @@ simple-map = { path = "../../pallets/simple-map", default-features = false } single-value = { path = "../../pallets/single-value", default-features = false } storage-cache = { path = "../../pallets/storage-cache", default-features = false } struct-storage = { path = "../../pallets/struct-storage", default-features = false } -sum-storage = { default-features = false, path = "../../pallets/sum-storage" } -sum-storage-rpc-runtime-api = { default-features = false, path = "../../pallets/sum-storage/rpc/runtime-api" } vec-set = { path = "../../pallets/vec-set", default-features = false } # Other Substrate dependencies @@ -121,7 +119,5 @@ std = [ "single-value/std", "storage-cache/std", "struct-storage/std", - "sum-storage/std", - "sum-storage-rpc-runtime-api/std", "vec-set/std", ] diff --git a/runtimes/super-runtime/aggregate_types.js b/runtimes/super-runtime/aggregate_types.js index 55a3f44ac..950e6c36f 100644 --- a/runtimes/super-runtime/aggregate_types.js +++ b/runtimes/super-runtime/aggregate_types.js @@ -29,7 +29,6 @@ const pallets = [ "single-value", "storage-cache", "struct-storage", - "sum-storage", "vec-set", ] diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index dfe037ea1..cd8f21cfc 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -315,10 +315,6 @@ impl struct_storage::Trait for Runtime { type Event = Event; } -impl sum_storage::Trait for Runtime { - type Event = Event; -} - impl vec_set::Trait for Runtime { type Event = Event; } @@ -360,7 +356,6 @@ construct_runtime!( SingleValue: single_value::{Module, Call, Storage}, StorageCache: storage_cache::{Module, Call, Storage, Event}, StructStorage: struct_storage::{Module, Call, Storage, Event}, - SumStorage: sum_storage::{Module, Call, Storage, Event}, VecSet: vec_set::{Module, Call, Storage, Event}, } ); @@ -463,17 +458,4 @@ impl_runtime_apis! { None } } - - - - // Here we implement our custom runtime API. - impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { - fn get_sum() -> u32 { - // This Runtime API calls into a specific pallet. Calling a pallet is a common - // design pattern. You can see most other APIs in this file do the same. - // It is also possible to write your logic right here in the runtime - // amalgamator file - SumStorage::get_sum() - } - } } From 3037691a985c544e4531548c65defa7133b58b1d Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 15:54:07 -0400 Subject: [PATCH 14/38] Standardize API Runtime --- Cargo.lock | 28 +------------- nodes/kitchen-node/Cargo.toml | 4 +- runtimes/api-runtime/Cargo.toml | 8 ---- runtimes/api-runtime/src/genesis.rs | 45 ++++++----------------- runtimes/api-runtime/src/lib.rs | 57 +++-------------------------- 5 files changed, 21 insertions(+), 121 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ca9bb164..923d5c884 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "pallet-aura", "pallet-balances", - "pallet-grandpa", "pallet-indices", "pallet-randomness-collective-flip", "pallet-sudo", @@ -101,9 +99,7 @@ dependencies = [ "serde", "sp-api", "sp-block-builder", - "sp-consensus-aura", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-offchain", @@ -2173,6 +2169,7 @@ dependencies = [ name = "kitchen-node" version = "2.0.0-alpha.6" dependencies = [ + "api-runtime", "ctrlc", "derive_more 0.15.0", "exit-future", @@ -2199,7 +2196,6 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", - "super-runtime", "tokio 0.1.22", "trie-root 0.15.2", "vergen", @@ -3151,28 +3147,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "pallet-aura" -version = "2.0.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9757d44df3ff0372ea313703736e69ba361b158a58b7c9677b54be11a777da81" -dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "serde", - "sp-application-crypto", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-timestamp", -] - [[package]] name = "pallet-babe" version = "2.0.0-alpha.6" diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 0ef5d3530..b0074b8b6 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -44,7 +44,7 @@ sp-transaction-pool = '2.0.0-alpha.6' # This node is compatible with any of the runtimes below # --- # Common runtime configured with most Recipes pallets. -runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } +# runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} @@ -55,7 +55,7 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } # Runtime with custom runtime-api (custom API only used in rpc-node) -# runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } +runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml index 4ae4a2ec8..c5c2118a3 100644 --- a/runtimes/api-runtime/Cargo.toml +++ b/runtimes/api-runtime/Cargo.toml @@ -6,10 +6,8 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] -aura = { package = "pallet-aura", version = '2.0.0-alpha.6', default_features = false} balances = { package = "pallet-balances", version = '2.0.0-alpha.6', default_features = false} frame-support = { version = '2.0.0-alpha.6', default_features = false} -grandpa = { package = "pallet-grandpa", version = '2.0.0-alpha.6', default_features = false} indices = { package = "pallet-indices", version = '2.0.0-alpha.6', default_features = false} sudo = { package = "pallet-sudo", version = '2.0.0-alpha.6', default_features = false} frame-system = { version = '2.0.0-alpha.6', default_features = false} @@ -23,9 +21,7 @@ safe-mix = { version = "1.0.0", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-api = { version = '2.0.0-alpha.6', default_features = false} sp-block-builder = { version = '2.0.0-alpha.6', default_features = false} -sp-consensus-aura = { version = '0.8.0-alpha.6', default_features = false} sp-core = { version = '2.0.0-alpha.6', default_features = false} -sp-finality-grandpa = { version = '2.0.0-alpha.6', default_features = false} sp-inherents = { version = '2.0.0-alpha.6', default_features = false} sp-io = { version = '2.0.0-alpha.6', default_features = false} sp-offchain = { version = '2.0.0-alpha.6', default_features = false} @@ -43,22 +39,18 @@ wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-run [features] default = ["std"] std = [ - "aura/std", "balances/std", "parity-scale-codec/std", "frame-executive/std", "frame-support/std", "frame-system/std", - "grandpa/std", "indices/std", "randomness-collective-flip/std", "safe-mix/std", "serde", "sp-api/std", "sp-block-builder/std", - "sp-consensus-aura/std", "sp-core/std", - "sp-finality-grandpa/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", diff --git a/runtimes/api-runtime/src/genesis.rs b/runtimes/api-runtime/src/genesis.rs index ffbc2f205..d347dfd08 100644 --- a/runtimes/api-runtime/src/genesis.rs +++ b/runtimes/api-runtime/src/genesis.rs @@ -1,17 +1,15 @@ //! Helper module to build a genesis configuration for the api-runtime use super::{ - AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, + AccountId, BalancesConfig, GenesisConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature, }; -use sp_core::{Pair, Public, sr25519}; -use sp_consensus_aura::sr25519::{AuthorityId as AuraId}; -use sp_finality_grandpa::{AuthorityId as GrandpaId}; +use sp_core::{Pair, sr25519}; use sp_runtime::traits::{Verify, IdentifyAccount}; /// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) +fn get_from_seed(seed: &str) -> TPair::Public { + TPair::from_string(&format!("//{}", seed), None) .expect("static values are valid; qed") .public() } @@ -19,41 +17,28 @@ fn get_from_seed(seed: &str) -> ::Public type AccountPublic = ::Signer; /// Helper function to generate an account ID from seed -pub fn account_id_from_seed(seed: &str) -> AccountId where - AccountPublic: From<::Public> +pub fn account_id_from_seed(seed: &str) -> AccountId where + AccountPublic: From { - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate session key from seed -pub fn authority_keys_from_seed(seed: &str) -> (AuraId, GrandpaId) { - ( - get_from_seed::(seed), - get_from_seed::(seed), - ) + AccountPublic::from(get_from_seed::(seed)).into_account() } pub fn dev_genesis() -> GenesisConfig { testnet_genesis( - // Initial Authorities - vec![ - authority_keys_from_seed("Alice"), - ], // Root Key - account_id_from_seed::("Alice"), + account_id_from_seed::("Alice"), // Endowed Accounts vec![ - account_id_from_seed::("Alice"), - account_id_from_seed::("Bob"), - account_id_from_seed::("Alice//stash"), - account_id_from_seed::("Bob//stash"), + account_id_from_seed::("Alice"), + account_id_from_seed::("Bob"), + account_id_from_seed::("Alice//stash"), + account_id_from_seed::("Bob//stash"), ], ) } /// Helper function to build a genesis configuration pub fn testnet_genesis( - initial_authorities: Vec<(AuraId, GrandpaId)>, root_key: AccountId, endowed_accounts: Vec, ) -> GenesisConfig { @@ -68,11 +53,5 @@ pub fn testnet_genesis( sudo: Some(SudoConfig { key: root_key, }), - aura: Some(AuraConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), - }), - grandpa: Some(GrandpaConfig { - authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), - }), } } diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs index df255113c..c66f95bb2 100644 --- a/runtimes/api-runtime/src/lib.rs +++ b/runtimes/api-runtime/src/lib.rs @@ -18,7 +18,6 @@ use sp_runtime::{ ApplyExtrinsicResult, create_runtime_str, generic, - impl_opaque_keys, MultiSignature, transaction_validity::{TransactionValidity, TransactionSource}, }; @@ -31,8 +30,6 @@ use sp_runtime::traits::{ IdentifyAccount, }; use sp_api::impl_runtime_apis; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use grandpa::AuthorityList as GrandpaAuthorityList; use frame_system as system; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -87,13 +84,6 @@ pub mod opaque { pub type Block = generic::Block; /// Opaque block identifier type. pub type BlockId = generic::BlockId; - - impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - pub grandpa: Grandpa, - } - } } /// This runtime version. @@ -106,15 +96,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { apis: RUNTIME_API_VERSIONS, }; -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// These time units are defined in number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - /// The version infromation used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -175,22 +156,14 @@ impl system::Trait for Runtime { type AccountData = balances::AccountData; } -impl aura::Trait for Runtime { - type AuthorityId = AuraId; -} - -impl grandpa::Trait for Runtime { - type Event = Event; -} - parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + pub const MinimumPeriod: u64 = 1000; } impl timestamp::Trait for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; - type OnTimestampSet = Aura; + type OnTimestampSet = (); type MinimumPeriod = MinimumPeriod; } @@ -242,8 +215,6 @@ construct_runtime!( { System: system::{Module, Call, Storage, Config, Event}, Timestamp: timestamp::{Module, Call, Storage, Inherent}, - Aura: aura::{Module, Config, Inherent(Timestamp)}, - Grandpa: grandpa::{Module, Call, Storage, Config, Event}, Balances: balances::{Module, Call, Storage, Config, Event}, RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, Sudo: sudo::{Module, Call, Config, Storage, Event}, @@ -339,16 +310,6 @@ impl_runtime_apis! { } } - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> u64 { - Aura::slot_duration() - } - - fn authorities() -> Vec { - Aura::authorities() - } - } - // Here we implement our custom runtime API. impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { fn get_sum() -> u32 { @@ -361,20 +322,14 @@ impl_runtime_apis! { } impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - opaque::SessionKeys::generate(seed) + fn generate_session_keys(_seed: Option>) -> Vec { + Vec::new() } fn decode_session_keys( - encoded: Vec, + _encoded: Vec, ) -> Option, sp_core::crypto::KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() + None } } } From 099484c2d9f1d4c11400a2876b9720688bbb4b7a Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 16:00:41 -0400 Subject: [PATCH 15/38] rename sum-storage-runtime-api It isn't _necessarily_ related to the rpc --- Cargo.lock | 6 +++--- nodes/rpc-node/Cargo.toml | 5 ++++- pallets/sum-storage/rpc/Cargo.toml | 4 ++-- pallets/sum-storage/rpc/src/lib.rs | 2 +- pallets/sum-storage/{rpc => }/runtime-api/Cargo.toml | 2 +- pallets/sum-storage/{rpc => }/runtime-api/src/lib.rs | 0 runtimes/api-runtime/Cargo.toml | 4 ++-- runtimes/api-runtime/src/lib.rs | 2 +- 8 files changed, 14 insertions(+), 11 deletions(-) rename pallets/sum-storage/{rpc => }/runtime-api/Cargo.toml (88%) rename pallets/sum-storage/{rpc => }/runtime-api/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 923d5c884..c97165160 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,7 +110,7 @@ dependencies = [ "sp-version", "substrate-wasm-builder-runner", "sum-storage", - "sum-storage-rpc-runtime-api", + "sum-storage-runtime-api", ] [[package]] @@ -6231,11 +6231,11 @@ dependencies = [ "sp-blockchain", "sp-rpc", "sp-runtime", - "sum-storage-rpc-runtime-api", + "sum-storage-runtime-api", ] [[package]] -name = "sum-storage-rpc-runtime-api" +name = "sum-storage-runtime-api" version = "2.0.0" dependencies = [ "serde_json", diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index 46707eec4..c93c0e6c3 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -20,7 +20,6 @@ parking_lot = '0.9.0' tokio = '0.1.22' trie-root = '0.15.2' structopt = "0.3.8" -runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" @@ -46,6 +45,10 @@ sp-runtime = '2.0.0-alpha.6' sp-timestamp = '2.0.0-alpha.6' sp-transaction-pool = '2.0.0-alpha.6' +# RPC Node only works with Runtime's that provide the sum-storage-runtime-api +# That means it only works with the api-runtime +runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } + [build-dependencies] vergen = '3.0.4' substrate-build-script-utils = '2.0.0-alpha.6' diff --git a/pallets/sum-storage/rpc/Cargo.toml b/pallets/sum-storage/rpc/Cargo.toml index cea08d8d2..c114084a8 100644 --- a/pallets/sum-storage/rpc/Cargo.toml +++ b/pallets/sum-storage/rpc/Cargo.toml @@ -17,7 +17,7 @@ sp-runtime = { version = '2.0.0-alpha.6', default_features = false} sp-blockchain = { version = '2.0.0-alpha.6', default_features = false} sp-api = { version = '2.0.0-alpha.6', default_features = false } -sum-storage-rpc-runtime-api = { version = "2.0.0", path = "./runtime-api", default_features = false } +sum-storage-runtime-api = { version = "2.0.0", path = "../runtime-api", default_features = false } [features] default = ["std"] @@ -25,5 +25,5 @@ std = [ "serde", "sp-runtime/std", "sp-api/std", - "sum-storage-rpc-runtime-api/std" + "sum-storage-runtime-api/std" ] diff --git a/pallets/sum-storage/rpc/src/lib.rs b/pallets/sum-storage/rpc/src/lib.rs index 66a20f6f4..af58d6340 100644 --- a/pallets/sum-storage/rpc/src/lib.rs +++ b/pallets/sum-storage/rpc/src/lib.rs @@ -9,7 +9,7 @@ use sp_runtime::{ traits::{Block as BlockT}, }; use sp_api::ProvideRuntimeApi; -use sum_storage_rpc_runtime_api::SumStorageApi as SumStorageRuntimeApi; +use sum_storage_runtime_api::SumStorageApi as SumStorageRuntimeApi; #[rpc] pub trait SumStorageApi { diff --git a/pallets/sum-storage/rpc/runtime-api/Cargo.toml b/pallets/sum-storage/runtime-api/Cargo.toml similarity index 88% rename from pallets/sum-storage/rpc/runtime-api/Cargo.toml rename to pallets/sum-storage/runtime-api/Cargo.toml index 2aa258146..a3f475735 100644 --- a/pallets/sum-storage/rpc/runtime-api/Cargo.toml +++ b/pallets/sum-storage/runtime-api/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sum-storage-rpc-runtime-api" +name = "sum-storage-runtime-api" version = "2.0.0" authors = ["Joshy Orndorff"] edition = "2018" diff --git a/pallets/sum-storage/rpc/runtime-api/src/lib.rs b/pallets/sum-storage/runtime-api/src/lib.rs similarity index 100% rename from pallets/sum-storage/rpc/runtime-api/src/lib.rs rename to pallets/sum-storage/runtime-api/src/lib.rs diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml index c5c2118a3..06b02a88b 100644 --- a/runtimes/api-runtime/Cargo.toml +++ b/runtimes/api-runtime/Cargo.toml @@ -31,7 +31,7 @@ sp-std = { version = '2.0.0-alpha.6', default_features = false} sp-transaction-pool = { version = '2.0.0-alpha.6', default_features = false} sp-version = { version = '2.0.0-alpha.6', default_features = false} sum-storage = { default-features = false, path = "../../pallets/sum-storage" } -sum-storage-rpc-runtime-api = { default-features = false, path = "../../pallets/sum-storage/rpc/runtime-api" } +sum-storage-runtime-api = { default-features = false, path = "../../pallets/sum-storage/runtime-api" } [build-dependencies] wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner" } @@ -61,7 +61,7 @@ std = [ "sp-version/std", "sudo/std", "sum-storage/std", - "sum-storage-rpc-runtime-api/std", + "sum-storage-runtime-api/std", "timestamp/std", "transaction-payment/std", ] diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs index c66f95bb2..93e3dda6b 100644 --- a/runtimes/api-runtime/src/lib.rs +++ b/runtimes/api-runtime/src/lib.rs @@ -311,7 +311,7 @@ impl_runtime_apis! { } // Here we implement our custom runtime API. - impl sum_storage_rpc_runtime_api::SumStorageApi for Runtime { + impl sum_storage_runtime_api::SumStorageApi for Runtime { fn get_sum() -> u32 { // This Runtime API calls into a specific pallet. Calling a pallet is a common // design pattern. You can see most other APIs in this file do the same. From 021037be8c40b4a6e4efd6371275626c51f47515 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 4 May 2020 16:06:54 -0400 Subject: [PATCH 16/38] Update runtime API writeup to reflect refactorings. --- text/3-entrees/runtime-api.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/text/3-entrees/runtime-api.md b/text/3-entrees/runtime-api.md index 51e0f6145..c3be62630 100644 --- a/text/3-entrees/runtime-api.md +++ b/text/3-entrees/runtime-api.md @@ -2,7 +2,7 @@ *[`pallets/sum-storage`](https://github.com/substrate-developer-hub/recipes/tree/master/pallets/sum-storage)* *[`runtimes/api-runtime`](https://github.com/substrate-developer-hub/recipes/tree/master/runtimes/api-runtime)* -Each Substrate node contains a runtime. The runtime contains the business logic of the chain. It defines what transactions are valid and invalid and determines how the chain's state changes in response to transactions. The runtime is compiled to Wasm to facilitate runtime upgrades. The "outer node", everything other than the runtime, does not compile to Wasm, only to native. The outer node is responsible for handling peer discovery, transaction pooling, block and transaction gossiping, consensus, and answering RPC calls from the outside world. While performing these tasks, the outer node sometimes needs to query the runtime for information, or provide information to the runtime. A Runtime API facilitates this communication between the outer node and the runtime. In this recipe, we will write our own minimal runtime API. +Each Substrate node contains a runtime. The runtime contains the business logic of the chain. It defines what transactions are valid and invalid and determines how the chain's state changes in response to transactions. The runtime is compiled to Wasm to facilitate runtime upgrades. The "outer node", everything other than the runtime, does not compile to Wasm, only to native. The outer node is responsible for handling peer discovery, transaction pooling, block and transaction gossiping, consensus, and answering RPC calls from the outside world. While performing these tasks, the outer node sometimes needs to query the runtime for information, or provide information to the runtime. A Runtime API facilitates this kind of communication between the outer node and the runtime. In this recipe, we will write our own minimal runtime API. ## Our Example For this example, we will write a pallet called `sum-storage` with two storage items, both `u32`s. @@ -16,7 +16,7 @@ decl_storage! { } ``` -Substrate already comes with a runtime API for querying storage values, which is why we can easily query our two storage values from a front-end. In this example we imagine that the outer node is interested in knowing the _sum_ of the two values, rather than either individual value. Our runtime API will provide a way for the outer node to query the inner node for this sum. Before we define the actual runtime API, let's write a public helper function to do the summing. +Substrate already comes with a runtime API for querying storage values, which is why we can easily query our two storage values from a front-end. In this example we imagine that the outer node is interested in knowing the _sum_ of the two values, rather than either individual value. Our runtime API will provide a way for the outer node to query the runtime for this sum. Before we define the actual runtime API, let's write a public helper function in the pallet to do the summing. ```rust impl Module { @@ -29,9 +29,7 @@ impl Module { So far, nothing we've done is specific to runtime APIs. In the coming sections, we will use this helper function in our runtime API's implementation. ## Defining the API -The first step in adding a runtime API to your runtime is defining its interface using a Rust trait. This is done in the `sum-storage/rpc/runtime-api/src/lib.rs` file. This file can live anywhere you like, but because it defines an API that is closely related to a particular pallet, it makes sense to include the API definition in the pallet's directory. - -> The `rpc` in the path is not relevant in _this_ recipe, but it is explained in the recipe on [custom RPCs](./custom-rpc.md). +The first step in adding a runtime API to your runtime is defining its interface using a Rust trait. This is done in the `sum-storage/runtime-api/src/lib.rs` file. This file can live anywhere you like, but because it defines an API that is closely related to a particular pallet, it makes sense to include the API definition in the pallet's directory. The code to define the API is quite simple, and looks almost like any old Rust trait. The one addition is that it must be placed in the [`decl_runtime_apis!` macro](https://substrate.dev/rustdocs/master/sp_api/macro.decl_runtime_apis.html). This macro allows the outer node to query the runtime API at specific blocks. Although this runtime API only provides a single function, you may write as many as you like. @@ -44,9 +42,9 @@ sp_api::decl_runtime_apis! { ``` ## Implementing the API -With our pallet written and our runtime API defined, we may now implement the API. This happens in the main runtime aggregation file. In our case we've provided the `api-runtime` in `runtimes/api-runtime/src/lib.rs`. +With our pallet written and our runtime API defined, we may now implement the API for our runtime. This happens in the main runtime aggregation file. In our case we've provided the `api-runtime` in `runtimes/api-runtime/src/lib.rs`. -As with defining the API, implementing a runtime API looks similar to implementing any old Rust trait with the exception that the implementation must go inside of the [`impl_runtime_apis!` macro](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). If you've started by copying an existing runtime like the [node template](https://github.com/substrate-developer-hub/substrate-node-template/) you likely already have this block. We will add an implementation for our API to the existing block. Our implementation is straight-forward as it merely calls the pallet's helper function that we wrote previously. +As with defining the API, implementing a runtime API looks similar to implementing any old Rust trait with the exception that the implementation must go inside of the [`impl_runtime_apis!` macro](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). Every runtime has this block present because several such runtime APIs are required. We will add an implementation for our API to the existing block. Our implementation is straight-forward as it merely calls the pallet's helper function that we wrote previously. ```rust impl_runtime_apis! { @@ -60,7 +58,7 @@ impl_runtime_apis! { } ``` -You may be wondering about the `Block` type parameter which is present here, but not in our definition. This type parameter is added by the macros along with a few other features. All runtime APIs have the type parameter to facilitate querying the runtime at arbitrary blocks. Read more about this in the docs for [`impl_runtime_apis!`](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). +You may be wondering about the `Block` type parameter which is present here, but not in our definition. This type parameter is added by the macros along with a few other features. All runtime APIs have this type parameter to facilitate querying the runtime at arbitrary blocks. Read more about this in the docs for [`impl_runtime_apis!`](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). ## Calling the Runtime API We've now successfully added a runtime API to our runtime. The outer node can now call this API to query the runtime for the sum of two storage values. Given a reference to a ['client'](https://substrate.dev/rustdocs/master/sc_client/struct.Client.html) we can make the call like this. @@ -68,4 +66,5 @@ We've now successfully added a runtime API to our runtime. The outer node can no ```rust let sum_at_block_fifty = client.runtime_api().get_sum(&50); ``` -Calling this runtime API is described with much more detail and context in the recipe on [custom RPCs](./custom-rpc.md). + +This recipe was about defining and implementing a custom runtime API. To see an example of calling this API in practice, see the recipe on [custom RPCs](./custom-rpc.md), where we connect this runtime API to an RPC that can be called by an end user. From 36a3382cfe7e053ae913ef81938cb106aa0ba066 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Thu, 7 May 2020 10:31:52 -0400 Subject: [PATCH 17/38] Update nodes/babe-grandpa-node/Cargo.toml Co-authored-by: David --- nodes/babe-grandpa-node/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml index 98e0436de..b6c129dcf 100644 --- a/nodes/babe-grandpa-node/Cargo.toml +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -44,7 +44,7 @@ sp-consensus = '0.8.0-alpha.6' # This node only works with runtimes that can provide babe and grandpa authorities. # No other runtimes that come with the recipes provide these APIs, but the substrate demonstration -# runtime doed. +# runtime does. runtime = { package = "babe-grandpa-runtime", path = "../../runtimes/babe-grandpa-runtime" } #TODO Test this From 9083d0c9bec3b894ff0d0f0a504d2d74ac07c1ae Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Thu, 7 May 2020 10:36:53 -0400 Subject: [PATCH 18/38] Update runtimes/super-runtime/src/lib.rs Co-authored-by: David --- runtimes/super-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index cd8f21cfc..40ac69544 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -1,6 +1,6 @@ //! A Super Runtime. //! -//! This runtime demonstrates most the recipe pallets in a single super runtime. +//! This runtime demonstrates most of the recipe pallets in a single super runtime. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. From cc01394c45ebd325c8790f1de2be350e0736b968 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Thu, 7 May 2020 10:43:46 -0400 Subject: [PATCH 19/38] Update nodes/babe-grandpa-node/Cargo.toml --- nodes/babe-grandpa-node/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml index b6c129dcf..c669919ea 100644 --- a/nodes/babe-grandpa-node/Cargo.toml +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' repository = 'https://github.com/substrate-developer-hub/recipes' -description = 'A Substrate node with Babe and Grandpa authorities taken from the runtime.' +description = 'A Substrate node where consensus authorities are determined by the runtime and passed to the consensus engine via a runtime API.' license = "GPL-3.0-or-later" [[bin]] From edcfee261f4f5dd70b7cb4ef56c0905d6ff81fc7 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Thu, 7 May 2020 22:56:47 -0400 Subject: [PATCH 20/38] Add fixme annotation to light clients. --- nodes/kitchen-node/src/service.rs | 4 ++-- nodes/manual-seal/src/service.rs | 2 ++ nodes/rpc-node/src/service.rs | 35 ++----------------------------- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/nodes/kitchen-node/src/service.rs b/nodes/kitchen-node/src/service.rs index 40454ceae..4786b8c28 100644 --- a/nodes/kitchen-node/src/service.rs +++ b/nodes/kitchen-node/src/service.rs @@ -101,8 +101,8 @@ pub fn new_light(_config: Configuration) -> Result { - //TODO How can I get the light client working? - // I had the same problem with the manual seal node. + // FIXME The light client can work after an upstream change in Substrate + // see: https://github.com/substrate-developer-hub/recipes/pull/238 unimplemented!("No light client for manual seal"); #[allow(unreachable_code)] new_full(_config) diff --git a/nodes/manual-seal/src/service.rs b/nodes/manual-seal/src/service.rs index c3b921187..4e0b7af73 100644 --- a/nodes/manual-seal/src/service.rs +++ b/nodes/manual-seal/src/service.rs @@ -114,6 +114,8 @@ pub fn new_full(config: Configuration, instant_seal: bool) -> Result Result { + // FIXME The light client can work after an upstream change in Substrate + // see: https://github.com/substrate-developer-hub/recipes/pull/238 unimplemented!("No light client for manual seal"); // This needs to be here or it won't compile. diff --git a/nodes/rpc-node/src/service.rs b/nodes/rpc-node/src/service.rs index 302235430..d48661212 100644 --- a/nodes/rpc-node/src/service.rs +++ b/nodes/rpc-node/src/service.rs @@ -95,40 +95,9 @@ pub fn new_full(config: Configuration) pub fn new_light(_config: Configuration) -> Result { - //TODO How can I get the light client working? - // I had the same problem with the manual seal node. + // FIXME The light client can work after an upstream change in Substrate + // see: https://github.com/substrate-developer-hub/recipes/pull/238 unimplemented!("No light client for manual seal"); #[allow(unreachable_code)] new_full(_config) - - // let inherent_data_providers = InherentDataProviders::new(); - // - // ServiceBuilder::new_light::(config)? - // .with_select_chain(|_config, backend| { - // Ok(LongestChain::new(backend.clone())) - // })? - // .with_transaction_pool(|config, client, fetcher| { - // let fetcher = fetcher - // .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; - // - // let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); - // let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - // config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, - // ); - // Ok(pool) - // })? - // .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool| { - // let finality_proof_request_builder = - // Box::new(DummyFinalityProofRequestBuilder::default()) as Box<_>; - // - // let import_queue = sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>( - // Box::new(client) - // ); - // - // Ok((import_queue, finality_proof_request_builder)) - // })? - // .with_finality_proof_provider(|client, backend| { - // Ok(Arc::new(()) as _) - // })? - // .build() } From 2c459ee2ca472dcb3befde263ccb78ff13fe7344 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 00:10:12 -0400 Subject: [PATCH 21/38] Clean kitchen node Cargo.toml --- nodes/kitchen-node/Cargo.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index b0074b8b6..d75fc2edf 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -26,14 +26,13 @@ trie-root = "0.15.2" sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' sc-client = '0.8.0-alpha.6' -sc-client-api = '2.0.0-alpha.6' sc-client-db = '0.8.0-alpha.6' # This because necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.6' sc-consensus-manual-seal = '0.8.0-alpha.6' sc-executor = '0.8.0-alpha.6' sc-network = '0.8.0-alpha.6' sc-service = '0.8.0-alpha.6' sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' sp-core = '2.0.0-alpha.6' sp-inherents = '2.0.0-alpha.6' sp-io = '2.0.0-alpha.6' @@ -44,7 +43,7 @@ sp-transaction-pool = '2.0.0-alpha.6' # This node is compatible with any of the runtimes below # --- # Common runtime configured with most Recipes pallets. -# runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } +runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. # runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} @@ -55,7 +54,7 @@ sp-transaction-pool = '2.0.0-alpha.6' # runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } # Runtime with custom runtime-api (custom API only used in rpc-node) -runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } +#runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } # --- [build-dependencies] From 9d5f61a58c81550fa776af40445b83fcc1b04cf4 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 00:10:38 -0400 Subject: [PATCH 22/38] Strip instant seal code from manual seal node --- Cargo.lock | 3 +- nodes/manual-seal/src/cli.rs | 4 --- nodes/manual-seal/src/command.rs | 3 +- nodes/manual-seal/src/service.rs | 57 +++++++++++--------------------- 4 files changed, 21 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c97165160..3e6f46271 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2169,7 +2169,6 @@ dependencies = [ name = "kitchen-node" version = "2.0.0-alpha.6" dependencies = [ - "api-runtime", "ctrlc", "derive_more 0.15.0", "exit-future", @@ -2180,7 +2179,6 @@ dependencies = [ "sc-basic-authorship", "sc-cli", "sc-client", - "sc-client-api", "sc-client-db", "sc-consensus-manual-seal", "sc-executor", @@ -2196,6 +2194,7 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", + "super-runtime", "tokio 0.1.22", "trie-root 0.15.2", "vergen", diff --git a/nodes/manual-seal/src/cli.rs b/nodes/manual-seal/src/cli.rs index 2cdb784a1..0091ef7d7 100644 --- a/nodes/manual-seal/src/cli.rs +++ b/nodes/manual-seal/src/cli.rs @@ -8,8 +8,4 @@ pub struct Cli { #[structopt(flatten)] pub run: RunCmd, - - /// Custom flag to enable instant-seal mode - #[structopt(long)] - pub instant_seal: bool, } diff --git a/nodes/manual-seal/src/command.rs b/nodes/manual-seal/src/command.rs index 50d26e84e..f49c645f5 100644 --- a/nodes/manual-seal/src/command.rs +++ b/nodes/manual-seal/src/command.rs @@ -54,13 +54,12 @@ pub fn run() -> sc_cli::Result<()> { runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config))) } None => { - let instant_seal = cli.instant_seal; let runner = cli.create_runner(&cli.run)?; runner.run_node( // The light client is not implemented. Calling it will panic. service::new_light, - move |config: _| service::new_full(config, instant_seal), + move |config: _| service::new_full(config), runtime::VERSION ) } diff --git a/nodes/manual-seal/src/service.rs b/nodes/manual-seal/src/service.rs index 4e0b7af73..7abf44bb8 100644 --- a/nodes/manual-seal/src/service.rs +++ b/nodes/manual-seal/src/service.rs @@ -8,7 +8,6 @@ use sp_inherents::InherentDataProviders; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; use sc_consensus_manual_seal::{rpc, self as manual_seal}; -use futures::future::Either; // Our native executor instance. native_executor_instance!( @@ -40,9 +39,11 @@ macro_rules! new_full_start { builder }} } + type RpcExtension = jsonrpc_core::IoHandler; + /// Builds a new service for a full client. -pub fn new_full(config: Configuration, instant_seal: bool) -> Result { +pub fn new_full(config: Configuration) -> Result { let inherent_data_providers = InherentDataProviders::new(); inherent_data_providers .register_provider(sp_timestamp::InherentDataProvider) @@ -54,22 +55,18 @@ pub fn new_full(config: Configuration, instant_seal: bool) -> Result Result { - let mut io = jsonrpc_core::IoHandler::default(); - io.extend_with( - // We provide the rpc handler with the sending end of the channel to allow the rpc - // send EngineCommands to the background block authorship task. - rpc::ManualSealApi::to_delegate(rpc::ManualSeal::new(command_sink)), - ); - Ok(io) - })? - .build()? - }; + let service = builder + // manual-seal relies on receiving sealing requests aka EngineCommands over rpc. + .with_rpc_extensions(|_| -> Result { + let mut io = jsonrpc_core::IoHandler::default(); + io.extend_with( + // We provide the rpc handler with the sending end of the channel to allow the rpc + // send EngineCommands to the background block authorship task. + rpc::ManualSealApi::to_delegate(rpc::ManualSeal::new(command_sink)), + ); + Ok(io) + })? + .build()?; // Proposer object for block authorship. @@ -79,19 +76,7 @@ pub fn new_full(config: Configuration, instant_seal: bool) -> Result Result Result Date: Fri, 8 May 2020 00:10:56 -0400 Subject: [PATCH 23/38] Update manual seal writeup --- text/3-entrees/manual-seal.md | 122 +++++++++++++--------------------- 1 file changed, 47 insertions(+), 75 deletions(-) diff --git a/text/3-entrees/manual-seal.md b/text/3-entrees/manual-seal.md index 0bcda3915..e2d66d8f6 100644 --- a/text/3-entrees/manual-seal.md +++ b/text/3-entrees/manual-seal.md @@ -1,12 +1,17 @@ # Manual Seal *[`nodes/manual-seal`](https://github.com/substrate-developer-hub/recipes/tree/master/nodes/manual-seal)* -This recipe demonstrates a Substrate node using the [Manual Seal consensus](https://substrate.dev/rustdocs/master/sc_consensus_manual_seal/index.html). Unlike the other consensus engines included with Substrate, manual seal does not create blocks on a regular basis. Rather, it waits for an RPC call telling to create a block. This recipe also demonstrates the Instant Seal engine which creates a block as soon as a transaction is ready in the pool. +This recipe demonstrates a Substrate node using the [Manual Seal consensus](https://substrate.dev/rustdocs/master/sc_consensus_manual_seal/index.html). Unlike the other consensus engines included with Substrate, manual seal does not create blocks on a regular basis. Rather, it waits for an RPC call telling to create a block. ## Using Manual Seal Before we explore the code, let's begin by seeing how to use the manual-seal node. Build and start the node in the usual way. +```bash +cargo build --release -p manual-seal +./target/release/manual-seal +``` + ## Manually Sealing Blocks Once your node is running, you will see that it just sits there idly. It will accept transactions to the pool, but it will not author blocks on its own. In manual seal, the node does not author a block until we explicitly tell it to. We can tell it to author a block by calling the `engine_createBlock` RPC. @@ -46,89 +51,77 @@ The two parameters are: * The hash of the block to finalize. * A Justification. TODO what is the justification and why might I want to use it? -## Using Instant Seal - -In addition to the manual seal mechanism we've explored so far, this node also provides an option to seal blocks instantly when transactions are received into the pool. To run the node in this mode use the `--instant-seal` flag like so. - -```bash -./target/release/manual-seal --instant-seal -``` - -When running in this mode, there is no need (or ability) to issue the RPC commands provided by manual seal. Rather, blocks are instantly created and sealed when a transaction arrives in the pool. - -This mode is extremely useful for testing runtime logic. It is equivalent to [ganache](https://www.trufflesuite.com/ganache) in the ethereum ecosystem. - ## Building the Service So far we've learned how to use the manual seal node and why it might be useful. Let's now turn our attention to how the service is built in the nodes `src/service.rs` file. ### The Import Queue -We begin by creating a manual-seal import queue. This process is similar, but simpler, to that described in the [basic-pow recipe](./basic-pow.md). - -Although this `import_queue` function comes from the [`sc_consensus_manual_seal` crate](https://substrate.dev/rustdocs/master/sc_consensus_manual_seal/index.html), it contains the logic for both manual and instant seal, and this import queue can be used for both. +We begin by creating a manual-seal import queue. This process is identical to creating the import queue used in the [Kitchen Node](./kitchen-node.md). It is also similar to, but simpler than, the [basic-pow](./basic-pow.md) import queue. ```rust, ignore - .with_import_queue(|_config, client, _select_chain, _transaction_pool| { Ok(sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>(Box::new(client))) })?; ``` +### What about the Light Client? + +The light client is not yet supported in this node, but it likely will be in the future (See [issue #238](https://github.com/substrate-developer-hub/recipes/pull/238).) Because it will typically be used for learning, experimenting, and testing in a single-node environment this restriction should not cause many problems.. Instead we mark it as `unimplemented!`. + +```rust, ignore +/// Builds a new service for a light client. +pub fn new_light(_config: Configuration) -> Result +{ + unimplemented!("No light client for manual seal"); + + // This needs to be here or it won't compile. + #[allow(unreachable_code)] + new_full(_config, false) +} +``` + +Because the return type of this function contains `impl AbstractService`, Rust's typechecker is unable to infer the concrete type. We give it a hand by calling `new_full` at the end, but don't worry, this code will never actually be executed. `unimplemented!` will panic first. + + ### The Manual Seal RPC -If the node is being run in manual seal mode, we need to write up the RPC commands that we explored earlier. This process is nearly identical to those described in the [custom rpc recipe](./custom-rpc.md). +Because the node runs in manual seal mode, we need to wire up the RPC commands that we explored earlier. This process is nearly identical to those described in the [custom rpc recipe](./custom-rpc.md). As prep work, we make a type alias, ```rust, ignore type RpcExtension = jsonrpc_core::IoHandler; ``` -Then we implement the wiring. The very first task is to check whether we're running in instant seal mode or manual seal mode. If it is instant seal mode, then no RPC extensions are necessary. +Next we create a channel over which the rpc handler and the authorship task can communicate with one another. The RPC handler will send messages asking to create or finalize a block and the import queue will receive the message and do so. ```rust, ignore // channel for the rpc handler to communicate with the authorship task. let (command_sink, commands_stream) = futures::channel::mpsc::channel(1000); - -let service = if instant_seal { - builder.build()? -} else { - builder - // manual-seal relies on receiving sealing requests aka EngineCommands over rpc. - .with_rpc_extensions(|_| -> Result { - let mut io = jsonrpc_core::IoHandler::default(); - io.extend_with( - // We provide the rpc handler with the sending end of the channel to allow the rpc - // send EngineCommands to the background block authorship task. - rpc::ManualSealApi::to_delegate(rpc::ManualSeal::new(command_sink)), - ); - Ok(io) - })? - .build()? -}; ``` -The command stream created at the beginning is the means by which the RPC handler communicates with the authorship task that we will create next. +```rust, ignore +let service = builder + // manual-seal relies on receiving sealing requests aka EngineCommands over rpc. + .with_rpc_extensions(|_| -> Result { + let mut io = jsonrpc_core::IoHandler::default(); + io.extend_with( + // We provide the rpc handler with the sending end of the channel to allow the rpc + // send EngineCommands to the background block authorship task. + rpc::ManualSealApi::to_delegate(rpc::ManualSeal::new(command_sink)), + ); + Ok(io) + })? + .build()?; +``` ### The Authorship Task -As with every authoring engine, manual and instant seal need to be run as async authoring tasks. Again we check whether this is in manual or instant seal mode and create the correct kind of future. Creating the two authorship tasks is nearly identical. The only difference is that the manual seal task requires the command stream we created earlier. +As with every authoring engine, manual seal needs to be run as an `async` authoring tasks. Here we provide the receiving end of the channel we created earlier. ```rust, ignore // Background authorship future. -let future = if instant_seal { - log::info!("Running Instant Sealing Engine"); - Either::Right(manual_seal::run_instant_seal( - Box::new(service.client()), - proposer, - service.client().clone(), - service.transaction_pool().pool().clone(), - service.select_chain().unwrap(), - inherent_data_providers - )) -} else { - log::info!("Running Manual Sealing Engine"); - Either::Left(manual_seal::run_manual_seal( +let authorship_future = manual_seal::run_manual_seal( Box::new(service.client()), proposer, service.client().clone(), @@ -136,33 +129,12 @@ let future = if instant_seal { commands_stream, service.select_chain().unwrap(), inherent_data_providers - )) -}; + ); ``` With the future created, we can now kick it off using the service's [`spawn_essential_task` method](https://substrate.dev/rustdocs/master/sc_service/struct.Service.html#method.spawn_essential_task). ```rust, ignore -service.spawn_essential_task( - if instant_seal { "instant-seal" } else { "manual-seal" }, - future -); -``` - -### What about the Light Client? - -We've chosen not to support the light client in this node because it will typically be used for learning, experimenting, and testing in a single-node environment. Instead we mark it as `unimplemented!`. - -```rust, ignore -/// Builds a new service for a light client. -pub fn new_light(_config: Configuration) -> Result -{ - unimplemented!("No light client for manual seal"); - - // This needs to be here or it won't compile. - #[allow(unreachable_code)] - new_full(_config, false) -} +// we spawn the future on a background thread managed by service. +service.spawn_essential_task("manual-seal", authorship_future); ``` - -Because the return type of this function contains `impl AbstractService`, Rust's typechecker is unable to infer the concrete type. We give it a hand by calling `new_full` at the end, but don't worry, this code will never actually be executed. `unimplemented!` will panic first. From ebffaeb44cf83c64ab86fcd8156e44f2174c6a59 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 00:12:44 -0400 Subject: [PATCH 24/38] Write up kitchen node --- text/3-entrees/kitchen-node.md | 129 +++++++++++++++++++++++++++++++++ text/SUMMARY.md | 1 + 2 files changed, 130 insertions(+) create mode 100644 text/3-entrees/kitchen-node.md diff --git a/text/3-entrees/kitchen-node.md b/text/3-entrees/kitchen-node.md new file mode 100644 index 000000000..d9241531e --- /dev/null +++ b/text/3-entrees/kitchen-node.md @@ -0,0 +1,129 @@ +# Manual Seal +*[`nodes/kitchen-node`](https://github.com/substrate-developer-hub/recipes/tree/master/nodes/kitchen-node)* + +This recipe demonstrates a general purpose Substrate node that supports most of the recipes' runtimes, and uses [Instant Seal consensus](https://substrate.dev/rustdocs/master/sc_consensus_manual_seal/index.html). + +The kitchen node serves as the first point of entry for most aspiring chefs when they first encounter the recipes. By default it builds with the super-runtime, but it can be used with most of the runtimes in the recipes. Changing the runtime is described below. It features the instant seal consensus which is perfect for testing and iterating on a runtime. + +## Installing a Runtime + +### Cargo Dependency + +The `Cargo.toml` file specifies the runtime as a dependency. The file imports the super-runtime, and has dependencies on other runtimes commented out. + +```toml +# Common runtime configured with most Recipes pallets. +runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } + +# Runtime with custom weight and fee calculation. +# runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} + +# Runtime with off-chain worker enabled. +# To use this runtime, compile the node with `ocw` feature enabled, +# `cargo build --release --features ocw`. +# runtime = { package = "ocw-runtime", path = "../../runtimes/ocw-runtime" } + +# Runtime with custom runtime-api (custom API only used in rpc-node) +#runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } +``` + +Installing a different runtime in the node is just a matter of commenting out the super-runtime line, and enabling another one. Try the weight-fee runtime for example. Of course cargo will complain if you try to import two crates under the name `runtime`. + +It is worth noting that this node does not work with _all_ of the recipes' runtimes. In particular, it is not compatible with the babe-grandpa runtime. That runtime uses the babe pallet which requires a node that will include a special [`PreRuntime` `DigestItem`](https://substrate.dev/rustdocs/master/sp_runtime/enum.DigestItem.html#variant.PreRuntime). + +### Building a Service with the Runtime + +With a runtime of our choosing listed among our dependencies, we can provide the runtime to the [`ServiceBuilder`](https://substrate.dev/rustdocs/master/sc_service/struct.ServiceBuilder.html). The `ServiceBuilder` is responsible for assembling all of the necessary pieces that a node will need, and creating a [`Substrate Service`](https://substrate.dev/rustdocs/master/sc_service/struct.Service.html) which will manage the communication between them. + +We begin by invoking the [`native_executor_instance!` macro](https://substrate.dev/rustdocs/master/sc_executor/macro.native_executor_instance.html). This creates an executor which is responsible for executing transactions in the runtime and determining whether to run the native of wasm version of the runtime. + +```rust_ignore +native_executor_instance!( + pub Executor, + runtime::api::dispatch, + runtime::native_version, +); +``` + +Finally, we create a new `ServiceBuilder` for a full node. (The `$` in the syntax is because we are in a [macro definition](https://doc.rust-lang.org/book/ch19-06-macros.html). + +```rust, ignore +let builder = sc_service::ServiceBuilder::new_full::< + runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor +>($config)? +// --snip-- +``` + +## Instant Seal Consensus + +The instant seal consensus engine, and its cousin the manual seal consensus engine, are both included in the same [`sc-consensus-manual-seal` crate](https://substrate.dev/rustdocs/master/sc_consensus_manual_seal/index.html). The recipes has a recipe dedicated to using [manual seal](./manual-seal.md). Instant seal is a very convenient tool for when you are developing or experimenting with a runtime. The consensus engine simply authors a new block whenever a new transaction is available in the queue. This is similar to [Truffle Suite's Ganache](https://www.trufflesuite.com/ganache) in the Ethereum ecosystem, but without the UI. + +### The Cargo Dependencies + +Installing the instant seal engine has several dependencies whereas the runtime had only one. + +```toml +sc-client-db = '0.8.0-alpha.6' # This because necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.6' +sc-consensus-manual-seal = '0.8.0-alpha.6' +``` + +The dependency on `sc-client-db` will become unnecessary once [issue #238](https://github.com/substrate-developer-hub/recipes/pull/238) is merged. + +### The Proposer + +We begin by creating a [`Proposer`](https://substrate.dev/rustdocs/master/sc_basic_authorship/struct.Proposer.html) which will be responsible for creating proposing blocks in the chain. + +```rust, ignore +let proposer = sc_basic_authorship::ProposerFactory::new( + service.client().clone(), + service.transaction_pool(), +); +``` + +### The Import Queue + +Next we make a manual-seal import queue. This process is identical to creating the import queue used in the [Manual Seal Node](./manual-seal.md). It is also similar to, but simpler than, the [basic-pow](./basic-pow.md) import queue. + +```rust, ignore +.with_import_queue(|_config, client, _select_chain, _transaction_pool| { + Ok(sc_consensus_manual_seal::import_queue::<_, sc_client_db::Backend<_>>(Box::new(client))) +})?; +``` + +### The Authorship Task + +As with every authoring engine, instant seal needs to be run as an `async` authoring task. + +```rust, ignore +let authorship_future = sc_consensus_manual_seal::run_instant_seal( + Box::new(service.client()), + proposer, + service.client().clone(), + service.transaction_pool().pool().clone(), + service.select_chain().ok_or(ServiceError::SelectChainRequired)?, + inherent_data_providers +); +``` + +With the future created, we can now kick it off using the service's [`spawn_essential_task` method](https://substrate.dev/rustdocs/master/sc_service/struct.Service.html#method.spawn_essential_task). + +```rust, ignore +service.spawn_essential_task("instant-seal", authorship_future); +``` + +### What about the Light Client? + +The light client is not yet supported in this node, but it likely will be in the future (See [issue #238](https://github.com/substrate-developer-hub/recipes/pull/238).) Because it will typically be used for learning, experimenting, and testing in a single-node environment this restriction should not cause many problems.. Instead we mark it as `unimplemented!`. + +```rust, ignore +/// Builds a new service for a light client. +pub fn new_light(_config: Configuration) -> Result +{ + unimplemented!("No light client for manual seal"); + + // This needs to be here or it won't compile. + #[allow(unreachable_code)] + new_full(_config, false) +} +``` diff --git a/text/SUMMARY.md b/text/SUMMARY.md index adac795af..be104d16f 100644 --- a/text/SUMMARY.md +++ b/text/SUMMARY.md @@ -33,6 +33,7 @@ - [Custom RPCs](./3-entrees/custom-rpc.md) - [Basic Proof of Work](./3-entrees/basic-pow.md) - [Manual Seal Consensus](./3-entrees/manual-seal.md) + - [Kitchen Node - An reusable instant seal node](./3-entrees/kitchen-node.md) - [Currency Types](./3-entrees/currency.md) - [Generating Randomness](./3-entrees/randomness.md) - [Execution Schedule](./3-entrees/execution-schedule.md) From 6bcfa86f39ab47d40e2bddad40bf114633acc2d0 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 00:36:21 -0400 Subject: [PATCH 25/38] Clarify language in api-runtime writeup --- text/3-entrees/runtime-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/3-entrees/runtime-api.md b/text/3-entrees/runtime-api.md index c3be62630..49cf28219 100644 --- a/text/3-entrees/runtime-api.md +++ b/text/3-entrees/runtime-api.md @@ -44,7 +44,7 @@ sp_api::decl_runtime_apis! { ## Implementing the API With our pallet written and our runtime API defined, we may now implement the API for our runtime. This happens in the main runtime aggregation file. In our case we've provided the `api-runtime` in `runtimes/api-runtime/src/lib.rs`. -As with defining the API, implementing a runtime API looks similar to implementing any old Rust trait with the exception that the implementation must go inside of the [`impl_runtime_apis!` macro](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). Every runtime has this block present because several such runtime APIs are required. We will add an implementation for our API to the existing block. Our implementation is straight-forward as it merely calls the pallet's helper function that we wrote previously. +As with defining the API, implementing a runtime API looks similar to implementing any old Rust trait with the exception that the implementation must go inside of the [`impl_runtime_apis!` macro](https://substrate.dev/rustdocs/master/sp_api/macro.impl_runtime_apis.html). Every runtime must use `iml_runtime_apis!` because the [`Core` API](https://substrate.dev/rustdocs/master/sp_api/trait.Core.html) is required. We will add an implementation for our own API alongside the others in this macro. Our implementation is straight-forward as it merely calls the pallet's helper function that we wrote previously. ```rust impl_runtime_apis! { From 087f441cf0f7d6a8900f8bed204297d7c976a386 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 00:44:08 -0400 Subject: [PATCH 26/38] typo: because -> became --- nodes/kitchen-node/Cargo.toml | 2 +- text/3-entrees/kitchen-node.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index d75fc2edf..2276a3c5a 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -26,7 +26,7 @@ trie-root = "0.15.2" sc-basic-authorship = '0.8.0-alpha.6' sc-cli = '0.8.0-alpha.6' sc-client = '0.8.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' # This because necessary when converting to instant seal +sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal sp-consensus = '0.8.0-alpha.6' sc-consensus-manual-seal = '0.8.0-alpha.6' sc-executor = '0.8.0-alpha.6' diff --git a/text/3-entrees/kitchen-node.md b/text/3-entrees/kitchen-node.md index d9241531e..498f1cd05 100644 --- a/text/3-entrees/kitchen-node.md +++ b/text/3-entrees/kitchen-node.md @@ -63,7 +63,7 @@ The instant seal consensus engine, and its cousin the manual seal consensus engi Installing the instant seal engine has several dependencies whereas the runtime had only one. ```toml -sc-client-db = '0.8.0-alpha.6' # This because necessary when converting to instant seal +sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal sp-consensus = '0.8.0-alpha.6' sc-consensus-manual-seal = '0.8.0-alpha.6' ``` From a8522cb39fdca876b46b0a5afc8611ab7ee38925 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 01:06:44 -0400 Subject: [PATCH 27/38] Replace TODO with comment in babe-grandpa node Cargo.toml --- nodes/babe-grandpa-node/Cargo.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml index c669919ea..eaee66547 100644 --- a/nodes/babe-grandpa-node/Cargo.toml +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -47,9 +47,10 @@ sp-consensus = '0.8.0-alpha.6' # runtime does. runtime = { package = "babe-grandpa-runtime", path = "../../runtimes/babe-grandpa-runtime" } -#TODO Test this -# This runtime is not published on crates.io so a git dependency is necessary -# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/" tag = "v2.0.0-alpha.6" } +# In theory the main Substrate node's runtime should work, but it is not published on crates.io +# so a git dependency is necessary which leads to: +# `perhaps two different versions of crate `sp_runtime` are being used?` +# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/", tag = "v2.0.0-alpha.6" } [build-dependencies] From 285d2ffaeda453ee57a06746078caaef471ab5d3 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 01:15:49 -0400 Subject: [PATCH 28/38] Remove some TODOs --- nodes/kitchen-node/src/service.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nodes/kitchen-node/src/service.rs b/nodes/kitchen-node/src/service.rs index 4786b8c28..a5091e94d 100644 --- a/nodes/kitchen-node/src/service.rs +++ b/nodes/kitchen-node/src/service.rs @@ -49,7 +49,7 @@ pub fn new_full(config: Configuration) #[allow(unused_variables)] let dev_seed = config.dev_key_seed.clone(); - //TODO This isn't great. It includes the timestamp inherent in all blocks + // This isn't great. It includes the timestamp inherent in all blocks // regardless of runtime. let inherent_data_providers = InherentDataProviders::new(); inherent_data_providers @@ -60,7 +60,6 @@ pub fn new_full(config: Configuration) let builder = new_full_start!(config); let service = builder.build()?; - //TODO make sure this still works with the ocw runtime // Initialize seed for signing transaction using off-chain workers #[cfg(feature = "ocw")] { From b46796108f5be1419aec6d8975a6453fcdb44e54 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 01:48:08 -0400 Subject: [PATCH 29/38] bump deps, LongestChain, default weights --- Cargo.lock | 937 +++++++++++++----------- nodes/babe-grandpa-node/src/service.rs | 4 +- nodes/basic-pow/src/service.rs | 4 +- nodes/kitchen-node/src/service.rs | 4 +- nodes/manual-seal/src/service.rs | 2 +- nodes/rpc-node/src/service.rs | 4 +- pallets/adding-machine/src/lib.rs | 7 +- pallets/basic-token/src/lib.rs | 5 +- pallets/charity/src/lib.rs | 5 +- pallets/check-membership/src/lib.rs | 5 +- pallets/compounding-interest/src/lib.rs | 9 +- pallets/constant-config/src/lib.rs | 5 +- pallets/currency-imbalances/src/lib.rs | 5 +- pallets/default-instance/src/lib.rs | 3 +- pallets/double-map/src/lib.rs | 9 +- pallets/execution-schedule/src/lib.rs | 6 +- pallets/fixed-point/src/lib.rs | 7 +- pallets/generic-event/src/lib.rs | 3 +- pallets/hello-substrate/src/lib.rs | 3 +- pallets/last-caller/src/lib.rs | 3 +- pallets/lockable-currency/src/lib.rs | 7 +- pallets/offchain-demo/src/lib.rs | 5 +- pallets/randomness/src/lib.rs | 5 +- pallets/reservable-currency/src/lib.rs | 9 +- pallets/ringbuffer-queue/src/lib.rs | 7 +- pallets/simple-event/src/lib.rs | 3 +- pallets/simple-map/src/lib.rs | 9 +- pallets/single-value/src/lib.rs | 5 +- pallets/storage-cache/src/lib.rs | 15 +- pallets/struct-storage/src/lib.rs | 7 +- pallets/sum-storage/src/lib.rs | 5 +- pallets/vec-set/src/lib.rs | 9 +- text/2-appetizers/1-hello-substrate.md | 4 +- 33 files changed, 575 insertions(+), 545 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e6f46271..3682ccd9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -176,8 +176,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "backtrace-sys" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78848718ee1255a2485d1309ad9cdecfc2e7d0362dd11c6829364c6b35ae1bc7" +checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" dependencies = [ "cc", "libc", @@ -421,8 +421,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2 1.0.10", - "quote 1.0.3", + "proc-macro2 1.0.12", + "quote 1.0.4", "regex", "rustc-hash", "shlex", @@ -952,9 +952,9 @@ version = "0.99.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -1052,33 +1052,6 @@ dependencies = [ "serde", ] -[[package]] -name = "ethbloom" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7abcddbdd5db30aeed4deb586adc4824e6c247e2f7238d1187f752893f096b" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde 0.3.0", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964c23cdee0ca07d5be2a628b46d5c11a2134ce554a8c16d8dbc2db647e4fd4d" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde 0.3.0", - "primitive-types", - "uint", -] - [[package]] name = "execution-schedule" version = "2.0.0-alpha.6" @@ -1104,9 +1077,9 @@ dependencies = [ [[package]] name = "failure" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ "backtrace", "failure_derive", @@ -1114,13 +1087,13 @@ dependencies = [ [[package]] name = "failure_derive" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "synstructure", ] @@ -1141,10 +1114,11 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.11.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024517816630be5204eba201e8d1d405042b1255a5e0e3f298b054fc24d59e1d" +checksum = "1f4682570188cd105606e621b9992e580f717c15f8cd1b7d106b59f1c6e54680" dependencies = [ + "either", "futures 0.3.4", "futures-timer 2.0.2", "log", @@ -1155,9 +1129,9 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32529fc42e86ec06e5047092082aab9ad459b070c5d2a76b14f4f5ce70bf2e84" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" dependencies = [ "byteorder", "rand 0.7.3", @@ -1207,18 +1181,18 @@ checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "fork-tree" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4492b78f0aec7271d261e0f1025297012c7853c263e036d15790f9ca99e72" +checksum = "00caa7b4d3f6b29b211cd82dfceb1fbe30281fdf6f05e95f1d519837f92443a6" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2fc91a6a976ce87b105722d8d9cdc44d4cb03ad24493d34cbfb64bbaacb7ee" +checksum = "b22054d77cb9377dcb9660f9634e79b2e50fcd4129fae7921e98ca30dc5c12e7" dependencies = [ "frame-support", "frame-system", @@ -1234,23 +1208,25 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2941cd59682f596645d54b0e84c02e98f9be53a346841c720ead60cdbadb3463" +checksum = "76692e90be57adc50ca89c08ff92b6d501a1ec9e0800aedd67f3c9eb9cd26b37" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "serde", + "sp-io", "sp-runtime", "sp-std", + "sp-tracing", ] [[package]] name = "frame-metadata" -version = "11.0.0-alpha.6" +version = "11.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5eaf1cd17755f099188d76995520a3179fedf0cb631264b8759dea0cd2e981" +checksum = "d4ed1031c3ab5fd338d4922380ecaa1784d96c4670b5e329838c1be9821f1596" dependencies = [ "parity-scale-codec", "serde", @@ -1260,9 +1236,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4058dce75ae1d45b469a8cbbe0c9dc3083e5546936b60e4647e73584e0f7ba7" +checksum = "bdd5a22a0c3e66a82b4ca1965e21373d3e0d29266313130d04a5045906c81dc4" dependencies = [ "bitmask", "frame-metadata", @@ -1280,50 +1256,50 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", - "tracing", + "sp-tracing", ] [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eefa7eb42406f732f87f8331aaaa787a65abe0f5f681a59fac1737ba4e81d89e" +checksum = "1a6b4279196725ff56647d12a285328a79685a7d05be6c507f55a11e00f492c0" dependencies = [ "frame-support-procedural-tools", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0fce760be3b164dd44ba5826f6a504c485020f6813604d4c73b42b50797d71" +checksum = "d9135714a5cd9e01b9839c16433d5f075706ef87f8f2fc412944ff826fc8ccd1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c453b69522957f835e3679e8a98a90a3859481423bf5a2c570397c416339dcf5" +checksum = "ab73d20fca63196489400b98b71aa96a8709968d83dc26e7c99aa135ba1eaf4f" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "frame-system" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c97e7168ca4cd7b2358ca30da4c5aba4a2b9b5eef45df67ca85b3dd59069a5" +checksum = "eb202b187ce580c0414d9c7608478377bd2fe90bb15a5777e8c6b746d4c9519a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1473,9 +1449,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -1645,9 +1621,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377038bf3c89d18d6ca1431e7a5027194fbd724ca10592b9487ede5e8e144f42" +checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" dependencies = [ "bytes 0.5.4", "fnv", @@ -1658,7 +1634,7 @@ dependencies = [ "indexmap", "log", "slab", - "tokio 0.2.18", + "tokio 0.2.20", "tokio-util", ] @@ -1710,9 +1686,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" +checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" dependencies = [ "libc", ] @@ -1862,7 +1838,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.2.4", + "h2 0.2.5", "http 0.2.1", "http-body 0.3.1", "httparse", @@ -1871,7 +1847,7 @@ dependencies = [ "net2", "pin-project", "time", - "tokio 0.2.18", + "tokio 0.2.20", "tower-service", "want 0.3.0", ] @@ -1889,7 +1865,7 @@ dependencies = [ "log", "rustls", "rustls-native-certs", - "tokio 0.2.18", + "tokio 0.2.20", "tokio-rustls", "webpki", ] @@ -1925,15 +1901,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" -dependencies = [ - "rlp", -] - [[package]] name = "impl-serde" version = "0.2.3" @@ -1945,9 +1912,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" dependencies = [ "serde", ] @@ -1958,9 +1925,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2003,6 +1970,12 @@ dependencies = [ "libc", ] +[[package]] +name = "ip_network" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" + [[package]] name = "ipnet" version = "2.3.0" @@ -2035,9 +2008,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" +checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7" dependencies = [ "wasm-bindgen", ] @@ -2087,9 +2060,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2378,8 +2351,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "329127858e4728db5ab60c33d5ae352a999325fdf190ed022ec7d3a4685ae2e6" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -2630,9 +2603,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "linked_hash_set" @@ -2754,6 +2727,16 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi 0.3.8", +] + [[package]] name = "memoffset" version = "0.5.4" @@ -2804,9 +2787,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" dependencies = [ "cfg-if", "fuchsia-zircon", @@ -2835,9 +2818,9 @@ dependencies = [ [[package]] name = "mio-uds" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", @@ -2919,9 +2902,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" dependencies = [ "cfg-if", "libc", @@ -3148,9 +3131,9 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166dabc0bb0e4db44a4b0dd2489549d72a9549ec331a53028b7f5d19f12b2507" +checksum = "cd1d74c4e2175fccdf649463e4def9cc2d69a6a55cd192d96ad73774752e8a39" dependencies = [ "frame-support", "frame-system", @@ -3158,6 +3141,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "serde", + "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", "sp-inherents", @@ -3170,9 +3154,9 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef08001886d3747220630337f7afbb8f1d7cbfacaa3a8a13317e1cb3e8e366" +checksum = "5933eed290294f48ae9c6ca9b83c48f73c0e50eb2d86532a388d2076806f9d37" dependencies = [ "frame-benchmarking", "frame-support", @@ -3186,9 +3170,9 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d89d58fe723cc05bdfc5f237a51e275bf58dcafb493ad68211c27ecd8f1afd" +checksum = "99b6aaf467788f82d9f18c940f57b6773e6114988120c63630ec1a30ef6af73d" dependencies = [ "frame-support", "frame-system", @@ -3203,9 +3187,9 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704f7b13a66b3ba76f260d1e1a4c7aefaf02c1e817eb7cf7a59f99ae1c62f96" +checksum = "7360a50e10a05e9835c4ee53dc6227221399af150712ab68ae09300b67876087" dependencies = [ "frame-support", "frame-system", @@ -3217,9 +3201,9 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed9f0fe5149552a1f1f26f4ed8999d692e0e209c54314c4f28a9bd8a1a1161d" +checksum = "0be9854b7b21a8ab2d14bc323d08b18b6d57d1bbdba1657f37169a02ac198162" dependencies = [ "frame-support", "frame-system", @@ -3236,9 +3220,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d153675f7ac1d8490e2e7db46b376edee52936edfa082f4d29831e6a19470b2" +checksum = "6941e40c29068970666b5737cc274d1a05ba9cabdb5b02059f585c69c4f96b4c" dependencies = [ "frame-support", "frame-system", @@ -3253,9 +3237,9 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1139a9bf489b947a677574ee8ade27c7b710ce25a07f1630b80c20af8f682f91" +checksum = "e6f06234e000e7b7554d75d62280e953f902981196d6dcde0d084ad5c7df4809" dependencies = [ "frame-support", "frame-system", @@ -3267,9 +3251,9 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdeb41738a79d3247b2a7fd9ce8ae5a7d9e92ca2de198e006f891240c8dcacc" +checksum = "6aace05f197abe3905182ec817e6fadc3c985b3c2ec41bfc74bb9918d1585e9e" dependencies = [ "frame-support", "frame-system", @@ -3286,9 +3270,9 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b15e01796c9d2791cbd9ae2d7c9b59c8eccc3682afbb1189f6ebe7b07f4d71" +checksum = "246c9c0b5c29baff01d925ebadee6c0c642fa4c56ba8de1957f1ecc1438cc7dc" dependencies = [ "frame-support", "frame-system", @@ -3301,9 +3285,9 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9de9af5f5ed3377a6108eed436791bfe18bc3e4e2e416854d0074d31b1be00" +checksum = "4c90b652dfb8796d657a2df5fa6200ada33b9784554b81a32efd73de2fe00575" dependencies = [ "frame-benchmarking", "frame-support", @@ -3319,9 +3303,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54768f5959e0bef53218b91f289d6807c0786d93fb90a3c7e39ab7ff9f018f23" +checksum = "52333b8598b2bcb3af5e158c61cb2d30821220a5034e92a74c6a4ef116d82a7f" dependencies = [ "frame-support", "frame-system", @@ -3333,9 +3317,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7323ef565470b51bb79fc65d3c3a1bff0ecb317485acc66a64406309c25f1b77" +checksum = "40f6cc2ebdaff949b9f38cc03f19e541bd22773ce32e84532ac1d85a481cb112" dependencies = [ "frame-support", "parity-scale-codec", @@ -3345,6 +3329,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "parity-db" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d595e372d119261593297debbe4193811a4dc811d2a1ccbb8caaa6666ad7ab" +dependencies = [ + "blake2-rfc", + "crc32fast", + "libc", + "log", + "memmap", + "parking_lot 0.10.2", +] + [[package]] name = "parity-multiaddr" version = "0.7.3" @@ -3416,9 +3414,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3434,10 +3432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c" dependencies = [ "cfg-if", - "ethereum-types", - "hashbrown", "impl-trait-for-tuples", - "lru", "parity-util-mem-derive", "parking_lot 0.10.2", "primitive-types", @@ -3451,8 +3446,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.10", - "syn 1.0.18", + "proc-macro2 1.0.12", + "syn 1.0.19", "synstructure", ] @@ -3514,9 +3509,9 @@ dependencies = [ [[package]] name = "paste" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a" +checksum = "0a229b1c58c692edcaa5b9b0948084f130f55d2dcc15b02fcc5340b2b4521476" dependencies = [ "paste-impl", "proc-macro-hack", @@ -3524,14 +3519,14 @@ dependencies = [ [[package]] name = "paste-impl" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a" +checksum = "2e0bf239e447e67ff6d16a8bb5e4d4bd2343acf5066061c0e8e06ac5ba8ca68c" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3580,29 +3575,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2" +checksum = "82c3bfbfb5bb42f99498c7234bbd768c220eb0cea6818259d0d18a1aa3d2595d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a" +checksum = "ccbf6449dcfb18562c015526b085b8df1aa3cdab180af8ec2ebd300a3bd28f63" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "pin-project-lite" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" [[package]] name = "pin-utils" @@ -3630,14 +3625,13 @@ checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "primitive-types" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5e4b9943a2da369aec5e96f7c10ebc74fcf434d39590d974b0a3460e6f67fbb" +checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde 0.3.0", + "impl-serde 0.3.1", "uint", ] @@ -3657,9 +3651,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "version_check", ] @@ -3669,9 +3663,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "syn-mid", "version_check", ] @@ -3699,9 +3693,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" +checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" dependencies = [ "unicode-xid 0.2.0", ] @@ -3771,9 +3765,9 @@ checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -3826,11 +3820,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" +checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" dependencies = [ - "proc-macro2 1.0.10", + "proc-macro2 1.0.12", ] [[package]] @@ -4093,6 +4087,26 @@ version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +[[package]] +name = "ref-cast" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a214c7875e1b63fc1618db7c80efc0954f6156c9ff07699fd9039e255accdd1" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602eb59cda66fcb9aec25841fb76bc01d2b34282dcdd705028da297db6f3eec8" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + [[package]] name = "regex" version = "1.3.7" @@ -4135,13 +4149,13 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.12" +version = "0.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" +checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196" dependencies = [ "cc", - "lazy_static", "libc", + "once_cell", "spin", "untrusted", "web-sys", @@ -4167,15 +4181,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" -[[package]] -name = "rlp" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7d3f9bed94764eac15b8f14af59fac420c236adaff743b7bcc88e265cb4345" -dependencies = [ - "rustc-hex", -] - [[package]] name = "rocksdb" version = "0.13.0" @@ -4315,9 +4320,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eeea19615c22c30accd79ca751b7db8642a3a88572432624a88c6754b6c7d33" +checksum = "606bb1a659f6d10c9d6d1b1520d81b07df6cca26008c865ca4a1eb957841ebfb" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4338,9 +4343,9 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7b45adef0526ef295a9b7da4af933322df7119385a78c2e96c99b5d54fcc35" +checksum = "ad86d3862ea0507e4ab26581b64ac902508f5e91f2bdae618327db12d70840c9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -4355,9 +4360,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d37957c58cb0cf1fa9fe1187447d16e4708a7a0541ee2c1226b2536f4241742" +checksum = "95ab12f5eabca6fd4e16c202f045dc8e7542b9049294b92747cfcabf037586a4" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -4372,21 +4377,21 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2703f02f31f53601ed0408df76939a2e1911ff64a146e7b15ed1be56193e91ba" +checksum = "a11bc26f24e234d61e708f92339efe51ad3d299e0e11d368ee9b3bf94787076f" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sc-cli" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46513d8e34913e19ffb8663ff211528f5590712c3c4e69bfa41ca748120a2001" +checksum = "e0cd2a720cc286c964f011f94cd54eb32c9d612883e88b4df2a07902bd6d7822" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -4422,7 +4427,7 @@ dependencies = [ "structopt", "substrate-prometheus-endpoint", "time", - "tokio 0.2.18", + "tokio 0.2.20", ] [[package]] @@ -4463,9 +4468,9 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a2271c80a792efffc4abfe9be8b87c9747721cfa4426f3b707283a431bbacd" +checksum = "4242f40585bfd1375bbde27f169e2ecaaa40ef1b60b44294c454bc97d5048cdd" dependencies = [ "derive_more 0.99.5", "fnv", @@ -4483,6 +4488,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-database", "sp-externalities", "sp-inherents", "sp-keyring", @@ -4494,41 +4500,56 @@ dependencies = [ "sp-trie", "sp-utils", "sp-version", + "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1ae5b4c8333cb751cd9bbc7ecf0eb1c55d4865fca6651066844febcec71618" +checksum = "b3395df025dfa8edf1be099a2ac941082b953707ea536cffeda5d3e51b23e896" dependencies = [ + "blake2-rfc", "hash-db", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", "linked-hash-map", "log", + "parity-db", "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.2", - "sc-client", "sc-client-api", "sc-executor", "sc-state-db", "sp-blockchain", "sp-consensus", "sp-core", + "sp-database", "sp-runtime", "sp-state-machine", "sp-trie", "substrate-prometheus-endpoint", ] +[[package]] +name = "sc-consensus" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f7378c44bc005807c427fe3f342fb3a851ff2fe82289e73a10e794ab1a33eee" +dependencies = [ + "sc-client-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", +] + [[package]] name = "sc-consensus-babe" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c656cb92d387f3c402118b44113de78c04d090a931638da29c8af4aeca1ca5" +checksum = "092fc2604c71a2deb9464d4b9780d6a7238e379566e530b206b7a4557e299f9a" dependencies = [ "derive_more 0.99.5", "fork-tree", @@ -4543,7 +4564,6 @@ dependencies = [ "parking_lot 0.10.2", "pdqselect", "rand 0.7.3", - "sc-client", "sc-client-api", "sc-consensus-epochs", "sc-consensus-slots", @@ -4569,9 +4589,9 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba501b3709df95d511377ad6e91d490678a7bcea73a359a3d2f72630793f4c" +checksum = "a194e3025fe8bd0e54b126c1cf85a19ed186c9b325184dd34ee622e7d1a68ee1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -4583,9 +4603,9 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972c170186ea1fcc1b18c285487636755d6b1ed9e04f490fc4a694b901b61d0d" +checksum = "38e24894732dc4aa31546f2b8c329bf7caef143edbf7d4b50269b1581771237a" dependencies = [ "assert_matches", "derive_more 0.99.5", @@ -4595,12 +4615,12 @@ dependencies = [ "jsonrpc-derive", "log", "parking_lot 0.10.2", - "sc-client", "sc-client-api", "sc-transaction-pool", "serde", "sp-blockchain", "sp-consensus", + "sp-core", "sp-inherents", "sp-runtime", "sp-transaction-pool", @@ -4608,9 +4628,9 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8b0f98a158006147808adfa3d5822dd41a33a6d561b130b9e42a4d3afa7f5c" +checksum = "41fb7e3e5ee46d419a171d8b56efb60d210dcaf1911cdec984e2a2adefc9766f" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -4630,9 +4650,9 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec4ede5a5b469f5cc1ac9fd304c7683f1e57638e5d9f8f23df6a98758b9cc24" +checksum = "d21cdecefdce1abe0fab714c2850f067093a2eed46422d748879a09e66aa2ecf" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4652,9 +4672,9 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cd8315b774db6c11b8efb43686a68243e9a100b8f48d2f1b537a8d42925399" +checksum = "0445485b65ecf90d85caa7de51fa2297072050a687822a8f583bcae32fcc8d78" dependencies = [ "log", "sc-client-api", @@ -4667,9 +4687,9 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f238a411de5e1cfe3b104f287aad0a48e4a39d9157171b7761d91d6d4a76610a" +checksum = "2cba18b495c2959a9bfed031f4df4175dfebbbc827ff3524d6eeae05de1f4530" dependencies = [ "derive_more 0.99.5", "lazy_static", @@ -4680,6 +4700,7 @@ dependencies = [ "parking_lot 0.10.2", "sc-executor-common", "sc-executor-wasmi", + "sp-api", "sp-core", "sp-externalities", "sp-io", @@ -4694,9 +4715,9 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549d94ce1316c168a72c26abf0bf3390ae76b1645030e2aac9ecf0542b04fa85" +checksum = "7b92cabca9418211b63c407c939523672fae62051f0dd8088c3068ab3e883dae" dependencies = [ "derive_more 0.99.5", "log", @@ -4712,9 +4733,9 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7efc6978b59884e1593ec172fe5b1a909c980b0e495897c904da50616c3a7a" +checksum = "8a8f35b44090ffdb0bbc4350dcf686ee649099ac7dc3ca0608d513018d4c84ae" dependencies = [ "log", "parity-scale-codec", @@ -4728,11 +4749,12 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bcf9e6787b6b421c2152e3d876105dec0c4cfa9fdac6bca54bec404d79a8593" +checksum = "32a0e197ef12caf06b0d01d922dbe24d018e99a62d723da1df4a303efe9d86be" dependencies = [ "assert_matches", + "derive_more 0.99.5", "finality-grandpa", "fork-tree", "futures 0.3.4", @@ -4743,8 +4765,8 @@ dependencies = [ "pin-project", "rand 0.7.3", "sc-block-builder", - "sc-client", "sc-client-api", + "sc-consensus", "sc-keystore", "sc-network", "sc-network-gossip", @@ -4765,9 +4787,9 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a03ec9890c64668809ac230921c504f18dc79bec75addf02da197b437d740dda" +checksum = "7560120ce244b775d755e8550f894b6b57bed6bbb20cb12164e2ceb25e1fc9c6" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -4783,9 +4805,9 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd2f3cb18368d58af4946e277b9e4bea605feb65872116130c1dd0905f341e3" +checksum = "e1e44f10a561c72a7fa604cb1a356564ef496609b8306a330b4185840231fe9d" dependencies = [ "derive_more 0.99.5", "hex", @@ -4799,9 +4821,9 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda92d4930bd77f3d215504ce16a3715585d8fc7c3d7be3c6f6891ee841f5686" +checksum = "4ef69b5eb4ed887f9b4a02227f922412d814085023f38bc395ad194713f73749" dependencies = [ "bitflags", "bytes 0.5.4", @@ -4814,6 +4836,7 @@ dependencies = [ "futures-timer 3.0.2", "futures_codec", "hex", + "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", @@ -4827,7 +4850,6 @@ dependencies = [ "prost-build", "rand 0.7.3", "sc-block-builder", - "sc-client", "sc-client-api", "sc-peerset", "serde", @@ -4838,7 +4860,6 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-babe", "sp-core", "sp-runtime", "sp-utils", @@ -4852,9 +4873,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a61f954d0ce6279fe48df2d3d20d3e5589964d501509f85b323cb0fde37b1b90" +checksum = "4002e0430151434a6039e3187b84267cf89e04214de6f677d9ddd89e6a31dafd" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -4869,9 +4890,9 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3544cf74f21323eac40c965a3ccda06d828875127e7966c0a05db9686460bf34" +checksum = "31712efd8cb5ff149885bc19c752555c696e95d27c8a075d1cc58ebb5d6cc957" dependencies = [ "bytes 0.5.4", "fnv", @@ -4897,9 +4918,9 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b85bec68c3c1b4495b6eabdf14d1c4140a6d569b61af9c4f721f23eae42ed7" +checksum = "6c6d53c1c8de2f896ac3dec705285a216ea50b9b387a631362ae2635f6b6fe74" dependencies = [ "futures 0.3.4", "libp2p", @@ -4911,9 +4932,9 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f8136a2d703b2f4aeb970707ec83d55ae584c3c0af7aa10b3bd93b227a6fd0" +checksum = "f02f88a10ad3271bc0da9e70d30fcfa182f33226b5e5e9af1b0e0dbeaab032bb" dependencies = [ "futures 0.3.4", "hash-db", @@ -4923,7 +4944,6 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.10.2", "sc-block-builder", - "sc-client", "sc-client-api", "sc-executor", "sc-keystore", @@ -4945,9 +4965,9 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c681fed8a6aab250f1fbb0848dee73c199bbcf94dc03f27edb57d2c50f0cff3" +checksum = "a27aa7d70aec2be0967110b5df9a11ac3aa76fe4c8576455c266d3135d8fe63a" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -4970,9 +4990,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d090ab799eaf3e41f36cdd9c79c2f5d1b0eeefc5f3422bc273084badd7ff62" +checksum = "40b5547f9bb330a6d4273f471b44f8f2b12791abb9cb8557135f372075c42372" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -4986,16 +5006,16 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6863666dc415a261bb21dfe599403fb977720feb5bc6ebacf078f5f78c165b" +checksum = "361410fc964e1cc77435f4c3bd1c724b39ad518bdf145c40f7c80701782e6e78" dependencies = [ "derive_more 0.99.5", "exit-future", "futures 0.1.29", "futures 0.3.4", - "futures-diagnose", "futures-timer 3.0.2", + "hash-db", "lazy_static", "log", "netstat2", @@ -5003,9 +5023,11 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.2", + "pin-project", "procfs", + "rand 0.7.3", + "sc-block-builder", "sc-chain-spec", - "sc-client", "sc-client-api", "sc-client-db", "sc-executor", @@ -5022,14 +5044,19 @@ dependencies = [ "slog", "sp-api", "sp-application-crypto", + "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-core", + "sp-externalities", "sp-io", "sp-runtime", "sp-session", + "sp-state-machine", "sp-transaction-pool", + "sp-trie", "sp-utils", + "sp-version", "substrate-prometheus-endpoint", "sysinfo", "tracing", @@ -5038,9 +5065,9 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31877c85414ed8e19a480940d7ae340832e7616208072cb43982fdcdd176021" +checksum = "2f18e23f3d774df943bbd8a9fbe90140263de6dcae46aabb702a354198a7e3b4" dependencies = [ "log", "parity-scale-codec", @@ -5053,9 +5080,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdaddc5a9aaeabbe68599ae2bfa4f247fa1617e8a119f4665884757052697035" +checksum = "0c9db676096e46d39083d9cccb62437234b515a085d77488a23b24443b6182ad" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -5076,9 +5103,9 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a0c0eecadf7c89b09e4e7290b301ffd8c3b30af4d1aa47d147f32f9d9e0b33" +checksum = "6d3da8fdeb53322e32e8576c62170cbeea78a0417238b6bd510f7584a6e411fb" dependencies = [ "erased-serde", "log", @@ -5092,9 +5119,9 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7f1ad6be774288fd73818271d3041442956a149a461de22f97f12210fdc776" +checksum = "48864c813861c919d5c167c11dce9875d74019d633384d66a3ae97ed7db17857" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5113,9 +5140,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9c7db165344a2d45dc1b7d0a52e1028198b25adba8406e05055f4c5e5626b8" +checksum = "3f59734238f19b1d8c3dd1fa0afa9569ee438ae0296a83417c5c9bdd0c6f2d24" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5131,8 +5158,10 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", + "sp-tracing", "sp-transaction-pool", "sp-utils", + "substrate-prometheus-endpoint", "wasm-timer", ] @@ -5182,9 +5211,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572dfa3a0785509e7a44b5b4bebcf94d41ba34e9ed9eb9df722545c3b3c4144a" +checksum = "3f331b9025654145cd425b9ded0caf8f5ae0df80d418b326e2dc1c3dc5eb0620" dependencies = [ "bitflags", "core-foundation", @@ -5195,9 +5224,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb15a5fec93b7021b8a9e96009c5d8d51c15673569f7c0f6b7204e5b7b404f" +checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" dependencies = [ "core-foundation-sys", "libc", @@ -5239,16 +5268,16 @@ version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "serde_json" -version = "1.0.51" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" +checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd" dependencies = [ "itoa", "ryu", @@ -5415,9 +5444,9 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -5475,9 +5504,9 @@ dependencies = [ [[package]] name = "sp-allocator" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532c396c2d6727d9b0d3eee3edbcaf939e78a6ce944fa34c2b98d6a02a2485e" +checksum = "1cdb45d1695a4b2004ce17681387bfbeb7ef9ae370c7903de9333f7bf905fbb9" dependencies = [ "derive_more 0.99.5", "log", @@ -5488,9 +5517,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a4df52a0c56d742fc75f4da486627c1b050be2ac87cc042c2c0246756f22d2" +checksum = "4e34c770de3ada5729a094ed0e594a94fe03f4d6bfffd5d27f40e00778d20998" dependencies = [ "hash-db", "parity-scale-codec", @@ -5504,22 +5533,22 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff834a833fd8beda20cd588341cdae52336f02f60aa6f0a34d9fd4d91975b369" +checksum = "53f6276132fc841a61e38d6eaa3a89acd10ccec1d8167cedf453c2fff0513b93" dependencies = [ "blake2-rfc", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5dec618ed8ea85fd767358185a412440c02a0adce569c2aa92ee355550d678" +checksum = "f2997e5072ef4fa6ac54658b0e79149095ececd89e3bd693f8fed90ad69862e8" dependencies = [ "parity-scale-codec", "serde", @@ -5530,9 +5559,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b413966b541aadf8725dddc29daeefa950f45b17208f33302890484c56009bd3" +checksum = "35ee0e06a6d46a3d6fb8706dfa2ca593b60a06c248fbd5173ab56070c209612e" dependencies = [ "integer-sqrt", "num-traits 0.2.11", @@ -5545,9 +5574,9 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d686e832e745c3aa2d55e303d46ccd41d64c02916bb40c64cfbb7456840664d" +checksum = "1787b702a5b1fbb2b172f94d8bc2aaa2f2eed21e0ff35a06d515d75425add4dd" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5557,9 +5586,9 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70049c389c66c4c9207149e2579ce6d752788dee8c596fbda76059f2ddde968f" +checksum = "e4b654cf89dd73ad85848b2c7e60812f231ba2785aeec9c4708a434323fecf9a" dependencies = [ "parity-scale-codec", "sp-api", @@ -5570,9 +5599,9 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db268602314a0f3a028ef6073185a6a5e0b8e7703da306e72e8a1fcbd2a0c05" +checksum = "40b9c16247ff5ddd2b5aae78c51ffb49eddd804492be6182442281afff391e1e" dependencies = [ "derive_more 0.99.5", "log", @@ -5587,9 +5616,9 @@ dependencies = [ [[package]] name = "sp-chain-spec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d73d557c214577b64a396e54f337403e251339a6599387747ae3570a19bb27" +checksum = "2997456fa5b605fec06c5f2267a0e7cb44708b210548b1a557ce89b07bc04211" dependencies = [ "serde", "serde_json", @@ -5597,13 +5626,12 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4eec34198eb14fc2ef129df522e28df5ce6aeea886369ef2eafaaec6bc4fc7" +checksum = "dff4f5824b4d69bbe0db4e67018abadf76acad541b12b58b6880f67fdd6ecc53" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", - "futures-diagnose", "futures-timer 3.0.2", "libp2p", "log", @@ -5621,10 +5649,11 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6108fbecddd95ce8151f09e8ecb0941b3eddcfeefb4c996f27a8a8b4827abd" +checksum = "16a8789e70d9c821572a8365b688200dec01442d3086130ce701f101485cf5fa" dependencies = [ + "merlin", "parity-scale-codec", "sp-api", "sp-application-crypto", @@ -5638,9 +5667,9 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a867278824cd9f90b606231e2ca2acee18e7093d4bcf95cd7ffe2e15bb164fae" +checksum = "00ef4315aa2b48dde5d6130390e7eaafb48640233e32a880abfb565c6adc5cae" dependencies = [ "parity-scale-codec", "sp-api", @@ -5651,9 +5680,9 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba3eef8ab960eb88307f1c4eda1c36dfd95dc933bd6a277d2e26a503a6e5a71" +checksum = "ae850e7f455f312155d28623f2d910a37861d639bf8b3d16222823322c88c02a" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -5664,9 +5693,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0589a2e394a3dcd5dfd258c5f5bf22e6d0f28ffbd5e6d3a09ad702a6dc1c0152" +checksum = "a4d4e7309949c9ce65a0347b20bbc89cc09efee55b1918c3253392286dab0df9" dependencies = [ "base58", "blake2-rfc", @@ -5676,10 +5705,11 @@ dependencies = [ "hash-db", "hash256-std-hasher", "hex", - "impl-serde 0.3.0", + "impl-serde 0.3.1", "lazy_static", "libsecp256k1", "log", + "merlin", "num-traits 0.2.11", "parity-scale-codec", "parity-util-mem", @@ -5703,33 +5733,44 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-database" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96e050dc3b7a9119e78254bdde9365a27d951a810f7afdcb58fc5799f8bddbb" +dependencies = [ + "kvdb", + "parking_lot 0.10.2", +] + [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df968a922a9d3b3f65d37e91e30904876efce88d017d4448c4babc990a738134" +checksum = "b2c4cb00ba7694df96793cf024418e6a75d5f224716460961b5c9dbfa621c0e8" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-externalities" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06b8ac80a03205205426ae9ef3200133a8ffab4f4f0eeecd3b858034f9e5b02" +checksum = "93a826d5f8f0085804f5e7174885958611955a904ff184ae0ad289d6b83d8a3e" dependencies = [ "environmental", + "parity-scale-codec", "sp-std", "sp-storage", ] [[package]] name = "sp-finality-grandpa" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7107d11f07fb400a0d71838225865e2bf27f79241751ef9ff1501980dd63b3" +checksum = "c91cc8d9e62f28d3dd90c3e4291f26147c5094f6f2587aeea4301bf3731d4a3c" dependencies = [ "parity-scale-codec", "serde", @@ -5741,9 +5782,9 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5f718fb1e75fd137b01b539a200cf5e3cd1e0f1d21dc55a03341d7e25c81624" +checksum = "8f050f19f1e07b63f61a872552fecf7239c75e77dc133a5f5ae00dac0e7b348d" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -5752,9 +5793,9 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a14f699ab5cac6c9e80197774f06a4aa38211cb8acdb8660e328775efa2599e1" +checksum = "8367b0e285f8c3ab00400a5f5b53ff0dba263005d2458fdc3e9652f824205f0b" dependencies = [ "derive_more 0.99.5", "parity-scale-codec", @@ -5765,14 +5806,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20758b1831f75d58c20ca735d34b96dc792ef8264bf4d4a8c476964d90a6aea7" +checksum = "ede88516c08b2070ad2b49f5e4ebff896910b11c0a63184eb5c20b0b604b8655" dependencies = [ + "futures 0.3.4", "hash-db", "libsecp256k1", "log", "parity-scale-codec", + "parking_lot 0.10.2", "sp-core", "sp-externalities", "sp-runtime-interface", @@ -5784,9 +5827,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f71e65eb13d8a4d320d3785558ac8fc12f8b2bdbfc5268c0e8a5a143d68686e" +checksum = "509e39a8b8c8c6532fcbea3140e3f92ec6712ee028bdc968f4ccb90181205c24" dependencies = [ "lazy_static", "sp-core", @@ -5796,19 +5839,20 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc02ea51f7abe7e8999658a8a41693426f14e66cff6cc5af989888289ad0fc" +checksum = "e63092c0ecd8fc90971a14a169f62337b78d885873e55dee87f33fe5f76d6591" dependencies = [ "sp-api", + "sp-core", "sp-runtime", ] [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef909e5ea664bce0bca723baf352c75125e4ed017843240e91d718df4720e1e4" +checksum = "acec634cd613519673edad420f56d5bbd087da9923c05aa66708882ee9676d20" dependencies = [ "backtrace", "log", @@ -5816,9 +5860,9 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d29a58ef51317f96eec408b40c604ccfe8c7c3b9ecc2636e2a9c84a79fae53a" +checksum = "7bd0ae1f6a934590356ce844ce9d0ef71993cab223f6c9371c2fdea98b23c334" dependencies = [ "serde", "sp-core", @@ -5826,9 +5870,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1f98caf8bb20c7d69ba3097f3283ebc615f4a33e79ae0ca5934364be5776ac" +checksum = "0d37f6a2e111dd82dd194fa9ef77ba49b17e70162afc237f99e7c5dc6f95834f" dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", @@ -5848,37 +5892,38 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "289491386162a8d867d219f4f4dd3a7c11181c8ee9957e41b8747b555a9f4433" +checksum = "bc743ea280556cbaf82203ec63ade39f4167402cb571aaf012c6c43f092ccf33" dependencies = [ "parity-scale-codec", "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", + "sp-tracing", "sp-wasm-interface", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609529717f6c9cdd5bb6329c4ca9ddb1d36f698bd1f5dd2bdf0e94c064d7cc5b" +checksum = "be673dffcf1084e6a0da85712866afde7bbdefa152e9e3e5dbf4a04f1994a673" dependencies = [ "Inflector", "proc-macro-crate", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] name = "sp-serializer" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b306e15eb54af25aef9d752c22778da3fa115945e47bf047545be2847cf814" +checksum = "747ed260860bde3b6b098caf3091905b1fcea95135fb73fb7fded7a7662ae622" dependencies = [ "serde", "serde_json", @@ -5886,9 +5931,9 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fca3ff8ddd14c5928536483d4b393bb795d55dcb5b576b1dceb3f5829216c76" +checksum = "fd4f193d095bb211ea75c14d924b97e03163e6807185b2ab45ff49a51d259fa8" dependencies = [ "sp-api", "sp-core", @@ -5898,9 +5943,9 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d7105e78848b8a8f6af3539a0cf7d9627b78a8776f61f43769da6406937ea9" +checksum = "d87f659f9742c456a35382af6ed58160cd1f23e0ddb51c38180b2cf80d5ac8a1" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -5909,9 +5954,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5de28eb08ce52f45ed32257b324766183dfe4d74a29242b934365ff80911ca" +checksum = "bd342d0b85891ea0e69c34483651df4e05420989b6fa74eb1982994118482985" dependencies = [ "hash-db", "log", @@ -5929,17 +5974,18 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca806523d5df8082c89da042e31292f0c8f6e6ad9c3cfc312edfffde6a08490" +checksum = "6e32241a20350ba20f445c73fec53b4c904559756b922ca2c3dda87ab2c1be9e" [[package]] name = "sp-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2cb515df8b37fbdbb6769d2e992748b6134d592ec3b795b8e672621d754f94b" +checksum = "645dcf4a75d63a5494eabdc076d19a834c3cc46df65d84506fc40e67bd0bdd40" dependencies = [ "impl-serde 0.2.3", + "ref-cast", "serde", "sp-debug-derive", "sp-std", @@ -5947,9 +5993,9 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd289fc7dbbae54cfe4db93a204df6371d6f3b5b8d5819fa7287e7d44a83eb86" +checksum = "f981570875b33311c4ae95a721511951689d4d89e2f58bd0933dcbfe67230364" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5960,11 +6006,20 @@ dependencies = [ "wasm-timer", ] +[[package]] +name = "sp-tracing" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11a4caabab12ba64d7e5d3ff6d2d5a698425227eb8c697f8b3dcac67813a192b" +dependencies = [ + "tracing", +] + [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62c89a439db3f248980da189811e45666b758bc3cb8a9eb587d73d2e91b3403" +checksum = "008ceb7db9fe134ced1e67226edb36db783e5f9434ca3544efcc94d8db9e1c99" dependencies = [ "derive_more 0.99.5", "futures 0.3.4", @@ -5978,9 +6033,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4194817027eb92525e9279ec651160d709340d74b707f7648654c8eb2a626be3" +checksum = "1620f438771be44e7aee5445c348623c40bc32a15c875689ac9f2e3aecdc3aa3" dependencies = [ "hash-db", "memory-db", @@ -5993,9 +6048,9 @@ dependencies = [ [[package]] name = "sp-utils" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3cd7ac8f6d105dd1d9483f7d2d20e0e77cecdfe0a7fe6d0bd0616cebb80ce3" +checksum = "e3aa5acc361bb7ccab3940584d9c032a587b8b4414cd949a92a7b391e6f39384" dependencies = [ "futures 0.3.4", "futures-core", @@ -6005,9 +6060,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319c37fa4aa91ee9ee9c20a3fab0d5b6b1bbe1dea997319c303f28a62f49765d" +checksum = "d032c1e5c3b484c0e88486a1a6e9bfb736cbe6cb68b074cf0436b2935d38372a" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -6018,9 +6073,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7584168f2785f6676727545a31a3cd97159d7023d968540b4881a98d73991900" +checksum = "0154beac23726c550f7fd68b9aad2fd97369221d5aa4b4e18d937e2eddc4246b" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6115,9 +6170,9 @@ checksum = "d239ca4b13aee7a2142e6795cbd69e457665ff8037aed33b3effdc430d2f927a" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6136,9 +6191,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" dependencies = [ "heck", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6155,9 +6210,9 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0abd8ab46d560d0d5cffd8d016c6b75eb5df91885b1b226b819ab600f02237c" +checksum = "19b350e0eacbf0f7a5d6394417e3371e6f29b412ce95b4df02bab46db16d66a5" dependencies = [ "platforms", ] @@ -6173,9 +6228,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.0-alpha.6" +version = "0.8.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cad984ef1fec55fe46843630566f98cde0ad3de07efbbf8a4f857b36fedf30" +checksum = "2d0d8bbb7ede14a1d0212218945b83606e358878eac510685819d5c6394bcad9" dependencies = [ "async-std", "derive_more 0.99.5", @@ -6183,14 +6238,14 @@ dependencies = [ "hyper 0.13.5", "log", "prometheus", - "tokio 0.2.18", + "tokio 0.2.20", ] [[package]] name = "substrate-wasm-builder-runner" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30c70de7e7d5fd404fe26db1e7a4d6b553e2760b1ac490f249c04a960c483b8" +checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a" [[package]] name = "subtle" @@ -6319,12 +6374,12 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213" +checksum = "e8e5aa70697bb26ee62214ae3288465ecec0000f05182f039b477001f08f5ae7" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", + "proc-macro2 1.0.12", + "quote 1.0.4", "unicode-xid 0.2.0", ] @@ -6334,9 +6389,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6354,17 +6409,17 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "unicode-xid 0.2.0", ] [[package]] name = "sysinfo" -version = "0.12.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccb41798287e8e299a701b5560d886d6ca2c3e7115e9ea2cb68c123aec339b7" +checksum = "1cac193374347e7c263c5f547524f36ff8ec6702d56c8799c8331d26dffe8c1e" dependencies = [ "cfg-if", "doc-comment", @@ -6415,22 +6470,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b3d3d2ff68104100ab257bb6bb0cb26c901abe4bd4ba15961f3bf867924012" +checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca972988113b7715266f91250ddb98070d033c62a011fa0fcc57434a649310dd" +checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6444,9 +6499,9 @@ dependencies = [ [[package]] name = "threadpool" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" +checksum = "e8dae184447c15d5a6916d973c642aec485105a13cd238192a6927ae3e077d66" dependencies = [ "num_cpus", ] @@ -6512,9 +6567,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ef16d072d2b6dc8b4a56c70f5c5ced1a37752116f8e7c1e80c659aa7cb6713" +checksum = "05c1d570eb1a36f0345a5ce9c6c6e665b70b73d11236912c0b477616aeec47b1" dependencies = [ "bytes 0.5.4", "fnv", @@ -6634,7 +6689,7 @@ checksum = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" dependencies = [ "futures-core", "rustls", - "tokio 0.2.18", + "tokio 0.2.20", "webpki", ] @@ -6746,7 +6801,7 @@ dependencies = [ "futures-sink", "log", "pin-project-lite", - "tokio 0.2.18", + "tokio 0.2.20", ] [[package]] @@ -6781,8 +6836,8 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b" dependencies = [ - "quote 1.0.3", - "syn 1.0.18", + "quote 1.0.4", + "syn 1.0.19", ] [[package]] @@ -6848,9 +6903,9 @@ checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "uint" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" +checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681" dependencies = [ "byteorder", "crunchy", @@ -6929,9 +6984,9 @@ dependencies = [ [[package]] name = "untrusted" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" @@ -6976,9 +7031,9 @@ dependencies = [ [[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" @@ -7031,9 +7086,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f" +checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -7041,24 +7096,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd" +checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94" dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a" +checksum = "8a369c5e1dfb7569e14d62af4da642a3cbc2f9a3652fe586e26ac22222aa4b04" dependencies = [ "cfg-if", "js-sys", @@ -7068,32 +7123,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" +checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776" dependencies = [ - "quote 1.0.3", + "quote 1.0.4", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" +checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.60" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" +checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" [[package]] name = "wasm-timer" @@ -7136,9 +7191,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" +checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" dependencies = [ "js-sys", "wasm-bindgen", @@ -7343,8 +7398,8 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ - "proc-macro2 1.0.10", - "quote 1.0.3", - "syn 1.0.18", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", "synstructure", ] diff --git a/nodes/babe-grandpa-node/src/service.rs b/nodes/babe-grandpa-node/src/service.rs index 324b7242c..575cdf72d 100644 --- a/nodes/babe-grandpa-node/src/service.rs +++ b/nodes/babe-grandpa-node/src/service.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use std::time::Duration; -use sc_client::LongestChain; +use sc_consensus::LongestChain; use sc_client_api::ExecutorProvider; use runtime::{self, opaque::Block, RuntimeApi}; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; @@ -36,7 +36,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/basic-pow/src/service.rs b/nodes/basic-pow/src/service.rs index 6d5880805..9c9a0a0c6 100644 --- a/nodes/basic-pow/src/service.rs +++ b/nodes/basic-pow/src/service.rs @@ -1,7 +1,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. use std::sync::Arc; -use sc_client::LongestChain; +use sc_consensus::LongestChain; use sc_client_api::ExecutorProvider; use runtime::{self, opaque::Block, RuntimeApi}; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; @@ -42,7 +42,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/kitchen-node/src/service.rs b/nodes/kitchen-node/src/service.rs index a5091e94d..a6f683ef9 100644 --- a/nodes/kitchen-node/src/service.rs +++ b/nodes/kitchen-node/src/service.rs @@ -1,7 +1,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // use std::sync::Arc; -// use sc_client::LongestChain; +// use sc_consensus::LongestChain; // use sc_client_api::ExecutorProvider; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; @@ -26,7 +26,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/manual-seal/src/service.rs b/nodes/manual-seal/src/service.rs index 7abf44bb8..8a8bc5a68 100644 --- a/nodes/manual-seal/src/service.rs +++ b/nodes/manual-seal/src/service.rs @@ -26,7 +26,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/nodes/rpc-node/src/service.rs b/nodes/rpc-node/src/service.rs index d48661212..75558a0b7 100644 --- a/nodes/rpc-node/src/service.rs +++ b/nodes/rpc-node/src/service.rs @@ -1,7 +1,7 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // use std::sync::Arc; -// use sc_client::LongestChain; +// use sc_consensus::LongestChain; // use sc_client_api::ExecutorProvider; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration}; use sp_inherents::InherentDataProviders; @@ -29,7 +29,7 @@ macro_rules! new_full_start { runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(sc_client::LongestChain::new(backend.clone())) + Ok(sc_consensus::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); diff --git a/pallets/adding-machine/src/lib.rs b/pallets/adding-machine/src/lib.rs index 481c7fcd9..9d991c421 100644 --- a/pallets/adding-machine/src/lib.rs +++ b/pallets/adding-machine/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_error, decl_module, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -36,7 +35,7 @@ decl_module! { /// Adds the supplies value to the stored value. /// Checks for unlucky number 13. /// Checks for addition overflow using an explicit match - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -58,7 +57,7 @@ decl_module! { /// Adds the supplies value to the stored value. /// Checks for unlucky number 13. /// Checks for addition overflow concisely using `ok_or` - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_alternate(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -73,7 +72,7 @@ decl_module! { } /// Resets the stoage value to zero - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn reset(origin) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/basic-token/src/lib.rs b/pallets/basic-token/src/lib.rs index c8ff9d910..92528cf24 100644 --- a/pallets/basic-token/src/lib.rs +++ b/pallets/basic-token/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ decl_event, decl_module, decl_error, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -55,7 +54,7 @@ decl_module! { /// Initialize the token /// transfers the total_supply amout to the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn init(origin) -> DispatchResult { let sender = ensure_signed(origin)?; ensure!(Self::is_init() == false, >::AlreadyInitialized); @@ -67,7 +66,7 @@ decl_module! { } /// Transfer tokens from one account to another - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn transfer(_origin, to: T::AccountId, value: u64) -> DispatchResult { let sender = ensure_signed(_origin)?; let sender_balance = Self::get_balance(&sender); diff --git a/pallets/charity/src/lib.rs b/pallets/charity/src/lib.rs index 09398655e..8007c6930 100644 --- a/pallets/charity/src/lib.rs +++ b/pallets/charity/src/lib.rs @@ -20,7 +20,6 @@ use frame_support::{ decl_storage, dispatch::{DispatchResult, DispatchError}, traits::{Currency, ExistenceRequirement::AllowDeath, OnUnbalanced, Imbalance}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed, ensure_root}; @@ -78,7 +77,7 @@ decl_module! { fn deposit_event() = default; /// Donate some funds to the charity - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn donate( origin, amount: BalanceOf @@ -96,7 +95,7 @@ decl_module! { /// /// Take funds from the Charity's pot and send them somewhere. This call requires root origin, /// which means it must come from a governance mechanism such as Substrate's Democracy pallet. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn allocate( origin, dest: T::AccountId, diff --git a/pallets/check-membership/src/lib.rs b/pallets/check-membership/src/lib.rs index 826f14d65..c94639fb8 100644 --- a/pallets/check-membership/src/lib.rs +++ b/pallets/check-membership/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, ensure, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use sp_std::vec::Vec; @@ -39,7 +38,7 @@ decl_module! { fn deposit_event() = default; /// Adds the caller to the membership set unless the caller is already present - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_member(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; @@ -52,7 +51,7 @@ decl_module! { } /// Removes the caller from the membership set - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let old_member = ensure_signed(origin)?; ensure!(Self::is_member(&old_member), "not a member so can't be taken out of the set"); diff --git a/pallets/compounding-interest/src/lib.rs b/pallets/compounding-interest/src/lib.rs index 535e3d9d6..b95001f8d 100644 --- a/pallets/compounding-interest/src/lib.rs +++ b/pallets/compounding-interest/src/lib.rs @@ -17,7 +17,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use substrate_fixed::{ @@ -72,7 +71,7 @@ decl_module! { fn deposit_event() = default; /// Deposit some funds into the compounding interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn deposit_continuous(origin, val_to_add: u64) -> DispatchResult { ensure_signed(origin)?; @@ -93,7 +92,7 @@ decl_module! { } /// Withdraw some funds from the compounding interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn withdraw_continuous(origin, val_to_take: u64) -> DispatchResult { ensure_signed(origin)?; @@ -114,7 +113,7 @@ decl_module! { } /// Deposit some funds into the discrete interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn deposit_discrete(origin, val_to_add: u64) -> DispatchResult { ensure_signed(origin)?; @@ -129,7 +128,7 @@ decl_module! { } /// Withdraw some funds from the discrete interest account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn withdraw_discrete(origin, val_to_take: u64) -> DispatchResult { ensure_signed(origin)?; diff --git a/pallets/constant-config/src/lib.rs b/pallets/constant-config/src/lib.rs index 45f377f5d..144ec8aa1 100644 --- a/pallets/constant-config/src/lib.rs +++ b/pallets/constant-config/src/lib.rs @@ -16,7 +16,6 @@ use frame_support::{ dispatch::{DispatchResult, DispatchError}, ensure, traits::Get, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -58,7 +57,7 @@ decl_module! { const ClearFrequency: T::BlockNumber = T::ClearFrequency::get(); /// Add to the stored value. The `val_to_add` parameter cannot exceed the specified manimum. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_value(origin, val_to_add: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ensure!(val_to_add <= T::MaxAddend::get(), "value must be <= maximum add amount constant"); @@ -78,7 +77,7 @@ decl_module! { /// For testing purposes /// Sets the stored value to a given value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_value(origin, value: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ::put(value); diff --git a/pallets/currency-imbalances/src/lib.rs b/pallets/currency-imbalances/src/lib.rs index 3fb12ea56..87399e61a 100644 --- a/pallets/currency-imbalances/src/lib.rs +++ b/pallets/currency-imbalances/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, traits::{Currency, OnUnbalanced, Imbalance, ReservableCurrency}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -46,7 +45,7 @@ decl_module! { fn deposit_event() = default; /// Slashes the specified amount of funds from the specified account - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn slash_funds(origin, to_punish: T::AccountId, collateral: BalanceOf) { let _ = ensure_signed(origin)?; @@ -58,7 +57,7 @@ decl_module! { } /// Awards the specified amount of funds to the specified accoutn - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn reward_funds(origin, to_reward: T::AccountId, reward: BalanceOf) { let _ = ensure_signed(origin)?; diff --git a/pallets/default-instance/src/lib.rs b/pallets/default-instance/src/lib.rs index 95803905e..6a22b4e82 100644 --- a/pallets/default-instance/src/lib.rs +++ b/pallets/default-instance/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -47,7 +46,7 @@ decl_module! { /// The only dispatchable call, updates the single storage item, /// and emits an event. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call(origin) -> DispatchResult { let caller = ensure_signed(origin)?; diff --git a/pallets/double-map/src/lib.rs b/pallets/double-map/src/lib.rs index 08e08039e..237c06378 100644 --- a/pallets/double-map/src/lib.rs +++ b/pallets/double-map/src/lib.rs @@ -15,7 +15,6 @@ use frame_support::{ dispatch::DispatchResult, ensure, storage::{StorageDoubleMap, StorageMap, StorageValue}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -58,7 +57,7 @@ decl_module! { fn deposit_event() = default; /// Join the `AllMembers` vec before joining a group - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn join_all_members(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "already a member, can't join"); @@ -69,7 +68,7 @@ decl_module! { } /// Put MemberScore (for testing purposes) - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn join_a_group(origin, index: GroupIndex, score: u32) -> DispatchResult { let member = ensure_signed(origin)?; ensure!(Self::is_member(&member), "not a member, can't remove"); @@ -81,7 +80,7 @@ decl_module! { } /// Remove a member - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let member_to_remove = ensure_signed(origin)?; ensure!(Self::is_member(&member_to_remove), "not a member, can't remove"); @@ -93,7 +92,7 @@ decl_module! { } /// Remove group score - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_group_score(origin, group: GroupIndex) -> DispatchResult { let member = ensure_signed(origin)?; diff --git a/pallets/execution-schedule/src/lib.rs b/pallets/execution-schedule/src/lib.rs index fbb58cf77..111c6b3f4 100644 --- a/pallets/execution-schedule/src/lib.rs +++ b/pallets/execution-schedule/src/lib.rs @@ -10,7 +10,7 @@ use frame_support::{ dispatch::{DispatchResult, DispatchError}, ensure, traits::Get, - weights::{SimpleDispatchInfo, Weight}, + weights::Weight, }; use frame_system::{self as system, ensure_signed}; @@ -125,7 +125,7 @@ decl_module! { /// /// - the task initially has no priority /// - only council members can schedule tasks - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn schedule_task(origin, data: Vec) -> DispatchResult { let proposer = ensure_signed(origin)?; ensure!(Self::is_on_council(&proposer), "only members of the council can schedule tasks"); @@ -154,7 +154,7 @@ decl_module! { /// /// - members of the council have limited voting power to increase the priority /// of tasks - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn signal_priority(origin, id: TaskId, signal: PriorityScore) -> DispatchResult { let voter = ensure_signed(origin)?; ensure!(Self::is_on_council(&voter), "The voting member must be on the council"); diff --git a/pallets/fixed-point/src/lib.rs b/pallets/fixed-point/src/lib.rs index 3a62134c7..ea0adb399 100644 --- a/pallets/fixed-point/src/lib.rs +++ b/pallets/fixed-point/src/lib.rs @@ -21,7 +21,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use substrate_fixed::types::U16F16; @@ -74,7 +73,7 @@ decl_module! { /// Update the Permill accumulator implementation's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_permill(origin, new_factor: Permill) -> DispatchResult { ensure_signed(origin)?; @@ -94,7 +93,7 @@ decl_module! { /// Update the Substrate-fixed accumulator implementation's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_fixed(origin, new_factor: U16F16) -> DispatchResult { ensure_signed(origin)?; @@ -114,7 +113,7 @@ decl_module! { /// Update the manually-implemented accumulator's value by multiplying it /// by the new factor given in the extrinsic - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn update_manual(origin, new_factor: u32) -> DispatchResult { ensure_signed(origin)?; diff --git a/pallets/generic-event/src/lib.rs b/pallets/generic-event/src/lib.rs index 6ae214849..d4743e002 100644 --- a/pallets/generic-event/src/lib.rs +++ b/pallets/generic-event/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -21,7 +20,7 @@ decl_module! { fn deposit_event() = default; /// A simple call that does little more than emit an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn do_something(origin, input: u32) -> DispatchResult { let user = ensure_signed(origin)?; diff --git a/pallets/hello-substrate/src/lib.rs b/pallets/hello-substrate/src/lib.rs index 7504d5f6d..a7692fc29 100644 --- a/pallets/hello-substrate/src/lib.rs +++ b/pallets/hello-substrate/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ decl_module, dispatch::DispatchResult, debug, - weights::SimpleDispatchInfo, }; use frame_system::{ self as system, ensure_signed }; use sp_runtime::print; @@ -21,7 +20,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// A function that says hello to the user by printing messages to the node log - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn say_hello(origin) -> DispatchResult { // Ensure that the caller is a regular keypair account let caller = ensure_signed(origin)?; diff --git a/pallets/last-caller/src/lib.rs b/pallets/last-caller/src/lib.rs index 933db58e7..01b735206 100644 --- a/pallets/last-caller/src/lib.rs +++ b/pallets/last-caller/src/lib.rs @@ -5,7 +5,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -45,7 +44,7 @@ decl_module! { // The only dispatchable call, updates the single storage item, // and emits an event. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call(origin) -> DispatchResult { let caller = ensure_signed(origin)?; diff --git a/pallets/lockable-currency/src/lib.rs b/pallets/lockable-currency/src/lib.rs index 3e1e3a4e6..4b92e9c29 100644 --- a/pallets/lockable-currency/src/lib.rs +++ b/pallets/lockable-currency/src/lib.rs @@ -7,7 +7,6 @@ use frame_support::{ traits::{ Currency, LockIdentifier, LockableCurrency, WithdrawReason, WithdrawReasons, }, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -40,7 +39,7 @@ decl_module! { fn deposit_event() = default; /// Locks the specified amount of tokens from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn lock_capital(origin, amount: BalanceOf) -> DispatchResult { let user = ensure_signed(origin)?; @@ -56,7 +55,7 @@ decl_module! { } /// Extends the lock period - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn extend_lock(origin, amount: BalanceOf) -> DispatchResult { let user = ensure_signed(origin)?; @@ -72,7 +71,7 @@ decl_module! { } /// Releases all locked tokens - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn unlock_all(origin) -> DispatchResult { let user = ensure_signed(origin)?; diff --git a/pallets/offchain-demo/src/lib.rs b/pallets/offchain-demo/src/lib.rs index fff8c3e18..f6d1c6a83 100644 --- a/pallets/offchain-demo/src/lib.rs +++ b/pallets/offchain-demo/src/lib.rs @@ -8,7 +8,6 @@ mod tests; use frame_support::{ debug, dispatch::DispatchResult, decl_module, decl_storage, decl_event, decl_error, - weights::SimpleDispatchInfo, }; use core::convert::{TryInto}; @@ -103,14 +102,14 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn submit_number_signed(origin, number: u64) -> DispatchResult { debug::info!("submit_number_signed: {:?}", number); let who = ensure_signed(origin)?; Self::append_or_replace_number(Some(who), number) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn submit_number_unsigned(origin, _block: T::BlockNumber, number: u64) -> DispatchResult { debug::info!("submit_number_unsigned: {:?}", number); let _ = ensure_none(origin)?; diff --git a/pallets/randomness/src/lib.rs b/pallets/randomness/src/lib.rs index 48ae582e0..278fc9c61 100644 --- a/pallets/randomness/src/lib.rs +++ b/pallets/randomness/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, traits::Randomness, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use parity_scale_codec::Encode; @@ -45,7 +44,7 @@ decl_module! { fn deposit_event() = default; /// Grab a random seed and random value from the randomness collective flip pallet - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call_collective_flip(origin) -> DispatchResult { let _ = ensure_signed(origin)?; @@ -61,7 +60,7 @@ decl_module! { } /// Grab a random seed and random value from the babe pallet - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn call_babe_vrf(origin) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/reservable-currency/src/lib.rs b/pallets/reservable-currency/src/lib.rs index 311dfddb6..4729805a4 100644 --- a/pallets/reservable-currency/src/lib.rs +++ b/pallets/reservable-currency/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, traits::{Currency, ReservableCurrency, ExistenceRequirement::AllowDeath}, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -43,7 +42,7 @@ decl_module! { fn deposit_event() = default; /// Reserves the specified amount of funds from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn reserve_funds(origin, amount: BalanceOf) -> DispatchResult { let locker = ensure_signed(origin)?; @@ -57,7 +56,7 @@ decl_module! { } /// Unreserves the specified amount of funds from the caller - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn unreserve_funds(origin, amount: BalanceOf) -> DispatchResult { let unlocker = ensure_signed(origin)?; @@ -71,7 +70,7 @@ decl_module! { } /// Transfers funds. Essentially a wrapper around the Currency's own transfer method - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn transfer_funds(origin, dest: T::AccountId, amount: BalanceOf) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -85,7 +84,7 @@ decl_module! { /// Atomically unreserves funds and and transfers them. /// might be useful in closed economic systems - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn unreserve_and_transfer( origin, to_punish: T::AccountId, diff --git a/pallets/ringbuffer-queue/src/lib.rs b/pallets/ringbuffer-queue/src/lib.rs index 6dfcbe817..d92f4b6b9 100644 --- a/pallets/ringbuffer-queue/src/lib.rs +++ b/pallets/ringbuffer-queue/src/lib.rs @@ -7,7 +7,6 @@ use codec::{Decode, Encode}; use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; use sp_std::prelude::*; @@ -54,7 +53,7 @@ decl_module! { fn deposit_event() = default; /// Add an item to the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn add_to_queue(origin, integer: i32, boolean: bool) -> DispatchResult { // only a user can push into the queue let _user = ensure_signed(origin)?; @@ -66,7 +65,7 @@ decl_module! { } /// Add several items to the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn add_multiple(origin, integers: Vec, boolean: bool) -> DispatchResult { // only a user can push into the queue let _user = ensure_signed(origin)?; @@ -80,7 +79,7 @@ decl_module! { } /// Remove and return an item from the queue - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn pop_from_queue(origin) -> DispatchResult { // only a user can pop from the queue let _user = ensure_signed(origin)?; diff --git a/pallets/simple-event/src/lib.rs b/pallets/simple-event/src/lib.rs index f2a51daea..249eb6514 100644 --- a/pallets/simple-event/src/lib.rs +++ b/pallets/simple-event/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use system::ensure_signed; @@ -22,7 +21,7 @@ decl_module! { fn deposit_event() = default; /// A simple call that does little more than emit an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn do_something(origin, input: u32) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/simple-map/src/lib.rs b/pallets/simple-map/src/lib.rs index bf2bca1dc..cea608f06 100644 --- a/pallets/simple-map/src/lib.rs +++ b/pallets/simple-map/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{decl_event, decl_module, decl_storage, decl_error, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -65,7 +64,7 @@ decl_module! { fn deposit_event() = default; /// Set the value stored at a particular key - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_single_entry(origin, entry: u32) -> DispatchResult { // A user can only set their own entry let user = ensure_signed(origin)?; @@ -77,7 +76,7 @@ decl_module! { } /// Read the value stored at a particular key and emit it in an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn get_single_entry(origin, account: T::AccountId) -> DispatchResult { // Any user can get any other user's entry let getter = ensure_signed(origin)?; @@ -90,7 +89,7 @@ decl_module! { /// Read the value stored at a particular key,while removing it from the map. /// Also emit the read value in an event - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn take_single_entry(origin) -> DispatchResult { // A user can only take (delete) their own entry let user = ensure_signed(origin)?; @@ -102,7 +101,7 @@ decl_module! { } /// Increase the value associated with a particular key - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_single_entry(origin, add_this_val: u32) -> DispatchResult { // A user can only mutate their own entry let user = ensure_signed(origin)?; diff --git a/pallets/single-value/src/lib.rs b/pallets/single-value/src/lib.rs index 11814529c..10c72660e 100644 --- a/pallets/single-value/src/lib.rs +++ b/pallets/single-value/src/lib.rs @@ -4,7 +4,6 @@ use frame_support::{ decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -24,7 +23,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// Set the storaged u32 value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_value(origin, value: u32) -> DispatchResult { ensure_signed(origin)?; @@ -36,7 +35,7 @@ decl_module! { /// Set the stored Account Id. The syntax is slightly more complex than it was for the /// stored u32 because the `AccountId` type comes from the pallet's configuration trait. - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_account(origin) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/pallets/storage-cache/src/lib.rs b/pallets/storage-cache/src/lib.rs index 87e20c9e6..3ad9e3bd9 100644 --- a/pallets/storage-cache/src/lib.rs +++ b/pallets/storage-cache/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -54,7 +53,7 @@ decl_module! { /// (Copy) inefficient way of updating value in storage /// /// storage value -> storage_value * 2 + input_val - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_value_no_cache(origin, some_val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let original_call = ::get(); @@ -72,7 +71,7 @@ decl_module! { /// (Copy) more efficient value change /// /// storage value -> storage_value * 2 + input_val - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn increase_value_w_copy(origin, some_val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let original_call = ::get(); @@ -89,7 +88,7 @@ decl_module! { /// swaps the king account with Origin::signed() if /// (1) other account is member && /// (2) existing king isn't - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn swap_king_no_cache(origin) -> DispatchResult { let new_king = ensure_signed(origin)?; let existing_king = >::get(); @@ -113,7 +112,7 @@ decl_module! { /// swaps the king account with Origin::signed() if /// (1) other account is member && /// (2) existing king isn't - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn swap_king_with_cache(origin) -> DispatchResult { let new_king = ensure_signed(origin)?; let existing_king = >::get(); @@ -135,21 +134,21 @@ decl_module! { } // ---- for testing purposes ---- - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_copy(origin, val: u32) -> DispatchResult { let _ = ensure_signed(origin)?; ::put(val); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn set_king(origin) -> DispatchResult { let user = ensure_signed(origin)?; >::put(user); Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn mock_add_member(origin) -> DispatchResult { let added = ensure_signed(origin)?; ensure!(!Self::is_member(&added), "member already in group"); diff --git a/pallets/struct-storage/src/lib.rs b/pallets/struct-storage/src/lib.rs index 37c8312c6..cb33994ed 100644 --- a/pallets/struct-storage/src/lib.rs +++ b/pallets/struct-storage/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ codec::{Decode, Encode}, decl_event, decl_module, decl_storage, dispatch::DispatchResult, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -63,7 +62,7 @@ decl_module! { fn deposit_event() = default; /// Stores an `InnerThing` struct in the storage map - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_inner_thing(origin, number: u32, hash: T::Hash, balance: T::Balance) -> DispatchResult { let _ = ensure_signed(origin)?; let thing = InnerThing { @@ -78,7 +77,7 @@ decl_module! { /// Stores a `SuperThing` struct in the storage map using an `InnerThing` that was already /// stored - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_super_thing_with_existing_inner(origin, inner_number: u32, super_number: u32) -> DispatchResult { let _ = ensure_signed(origin)?; let inner_thing = Self::inner_things_by_numbers(inner_number); @@ -92,7 +91,7 @@ decl_module! { } /// Stores a `SuperThing` struct in the storage map using a new `InnerThing` - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn insert_super_thing_with_new_inner(origin, inner_number: u32, hash: T::Hash, balance: T::Balance, super_number: u32) -> DispatchResult { let _ = ensure_signed(origin)?; // construct and insert `inner_thing` first diff --git a/pallets/sum-storage/src/lib.rs b/pallets/sum-storage/src/lib.rs index 62e36d650..a7140a6ba 100644 --- a/pallets/sum-storage/src/lib.rs +++ b/pallets/sum-storage/src/lib.rs @@ -8,7 +8,6 @@ use frame_support::{ decl_module, decl_storage, decl_event, dispatch, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -35,7 +34,7 @@ decl_module! { fn deposit_event() = default; /// Sets the first simple storage value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn set_thing_1(origin, val: u32) -> dispatch::DispatchResult { let _ = ensure_signed(origin)?; @@ -46,7 +45,7 @@ decl_module! { } /// Sets the second stored value - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn set_thing_2(origin, val: u32) -> dispatch::DispatchResult { let _ = ensure_signed(origin)?; diff --git a/pallets/vec-set/src/lib.rs b/pallets/vec-set/src/lib.rs index aa1fbe1c3..93ca6f8a1 100644 --- a/pallets/vec-set/src/lib.rs +++ b/pallets/vec-set/src/lib.rs @@ -6,7 +6,6 @@ use frame_support::{ decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, - weights::SimpleDispatchInfo, }; use frame_system::{self as system, ensure_signed}; @@ -48,7 +47,7 @@ decl_module! { /// Appends an item to the vec using the `mutate` method /// Don't do this because it is slow /// (unless appending new entries AND mutating existing entries) - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn mutate_to_append(origin) -> DispatchResult { let user = ensure_signed(origin)?; @@ -60,7 +59,7 @@ decl_module! { /// Appends an item to the vec using the `append` method /// This method is faster, and therefore preferred, whenever possible - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn append_new_entries(origin) -> DispatchResult { let user = ensure_signed(origin)?; @@ -70,7 +69,7 @@ decl_module! { Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn add_member(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "must not be a member to be added"); @@ -79,7 +78,7 @@ decl_module! { Ok(()) } - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] fn remove_member(origin) -> DispatchResult { let old_member = ensure_signed(origin)?; ensure!(Self::is_member(&old_member), "must be a member in order to leave"); diff --git a/text/2-appetizers/1-hello-substrate.md b/text/2-appetizers/1-hello-substrate.md index ee0fd272e..04d0e8111 100644 --- a/text/2-appetizers/1-hello-substrate.md +++ b/text/2-appetizers/1-hello-substrate.md @@ -42,7 +42,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { /// A function that says hello to the user by printing messages to the node log - #[weight = SimpleDispatchInfo::default()] + #[weight = 10_000] pub fn say_hello(origin) -> DispatchResult { // --snip-- } @@ -55,7 +55,7 @@ decl_module! { As you can see, our `hello-substrate` pallet has a dispatchable call that takes a single argument, called `origin` which we'll investigate shortly. The call returns a [`DispatchResult`](https://substrate.dev/rustdocs/master/frame_support/dispatch/type.DispatchResult.html) which can be either `Ok(())` indicating that the call succeeded, or an `Err` which we'll investigate in the [appetizer about errors](./3-errors.md). ### Weight Annotations -Right before the `hello-substrate` function, we see the line `#[weight = SimpleDispatchInfo::default()]`. This line attaches a default weight to the call. Ultimately weights affect the fees a user will have to pay to call the function. Weights are a very interesting aspect of developing with Substrate, but they too shall be covered later in the section on [Weights](../3-entrees/weights.md). For now, and for may of the recipes pallets, we will simply use the default weight as we have done here. +Right before the `hello-substrate` function, we see the line `#[weight = 10_000]`. This line attaches a default weight to the call. Ultimately weights affect the fees a user will have to pay to call the function. Weights are a very interesting aspect of developing with Substrate, but they too shall be covered later in the section on [Weights](../3-entrees/weights.md). For now, and for may of the recipes pallets, we will simply use the default weight as we have done here. ## Inside a Dispatchable Call From c6e0e84b920800b8a1e4ae8e633164413027c0fd Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:09:23 -0400 Subject: [PATCH 30/38] changed append api --- pallets/check-membership/src/lib.rs | 2 +- pallets/double-map/src/lib.rs | 2 +- pallets/storage-cache/src/lib.rs | 2 +- pallets/vec-set/src/lib.rs | 6 ++++-- text/3-entrees/permissioned-methods.md | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pallets/check-membership/src/lib.rs b/pallets/check-membership/src/lib.rs index c94639fb8..4fd2605b6 100644 --- a/pallets/check-membership/src/lib.rs +++ b/pallets/check-membership/src/lib.rs @@ -45,7 +45,7 @@ decl_module! { // Ensure that the caller is not already a member ensure!(!Self::is_member(&new_member), "already a member"); - >::append(&[new_member.clone()])?; + >::append(&new_member); Self::deposit_event(RawEvent::AddMember(new_member)); Ok(()) } diff --git a/pallets/double-map/src/lib.rs b/pallets/double-map/src/lib.rs index 237c06378..9ee9d7a26 100644 --- a/pallets/double-map/src/lib.rs +++ b/pallets/double-map/src/lib.rs @@ -61,7 +61,7 @@ decl_module! { fn join_all_members(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "already a member, can't join"); - >::append(vec!(new_member.clone())).map_err(|_e| "appending new member error")?; + >::append(&new_member.clone()); Self::deposit_event(RawEvent::NewMember(new_member)); Ok(()) diff --git a/pallets/storage-cache/src/lib.rs b/pallets/storage-cache/src/lib.rs index 3ad9e3bd9..d84c2c979 100644 --- a/pallets/storage-cache/src/lib.rs +++ b/pallets/storage-cache/src/lib.rs @@ -152,7 +152,7 @@ decl_module! { fn mock_add_member(origin) -> DispatchResult { let added = ensure_signed(origin)?; ensure!(!Self::is_member(&added), "member already in group"); - >::append(vec![added])?; + >::append(added); Ok(()) } } diff --git a/pallets/vec-set/src/lib.rs b/pallets/vec-set/src/lib.rs index 93ca6f8a1..2b46bf984 100644 --- a/pallets/vec-set/src/lib.rs +++ b/pallets/vec-set/src/lib.rs @@ -64,7 +64,9 @@ decl_module! { let user = ensure_signed(origin)?; // this encodes the new values and appends them to the already encoded existing evc - ::append(Self::new_values())?; + Self::new_values() + .iter() + .for_each(CurrentValues::append); Self::deposit_event(RawEvent::AppendVec(user)); Ok(()) } @@ -73,7 +75,7 @@ decl_module! { fn add_member(origin) -> DispatchResult { let new_member = ensure_signed(origin)?; ensure!(!Self::is_member(&new_member), "must not be a member to be added"); - >::append(vec![new_member.clone()])?; + >::append(new_member.clone()); Self::deposit_event(RawEvent::MemberAdded(new_member)); Ok(()) } diff --git a/text/3-entrees/permissioned-methods.md b/text/3-entrees/permissioned-methods.md index ead135a16..42a112b30 100644 --- a/text/3-entrees/permissioned-methods.md +++ b/text/3-entrees/permissioned-methods.md @@ -31,7 +31,7 @@ fn add_member(origin) -> DispatchResult { // Ensure that the caller is not already a member ensure!(!Self::is_member(&new_member), "already a member"); - >::append(&[new_member.clone()])?; + >::append(&new_member); Self::deposit_event(RawEvent::AddMember(new_member)); Ok(()) } From a2be10cf01add204c0963c77e56a0466da75421f Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:16:24 -0400 Subject: [PATCH 31/38] API Runtime Compiles --- runtimes/api-runtime/src/lib.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/runtimes/api-runtime/src/lib.rs b/runtimes/api-runtime/src/lib.rs index 93e3dda6b..20e326173 100644 --- a/runtimes/api-runtime/src/lib.rs +++ b/runtimes/api-runtime/src/lib.rs @@ -44,7 +44,10 @@ pub use sp_runtime::{Permill, Perbill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, }; /// An index to a block. @@ -94,6 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -107,7 +111,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -138,6 +142,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -189,14 +201,12 @@ impl sudo::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: Balance = 0; pub const TransactionByteFee: Balance = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); From 8f4c61a757e09eeb1171ed43e5e1a389a2c91ddf Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:25:10 -0400 Subject: [PATCH 32/38] Start working on OCW runtime and pallet --- pallets/offchain-demo/src/lib.rs | 22 +++++++++++----------- runtimes/ocw-runtime/src/lib.rs | 14 +++++++++++--- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pallets/offchain-demo/src/lib.rs b/pallets/offchain-demo/src/lib.rs index f6d1c6a83..084625944 100644 --- a/pallets/offchain-demo/src/lib.rs +++ b/pallets/offchain-demo/src/lib.rs @@ -1,4 +1,4 @@ -//! A demonstration of an offchain worker that submits onchain callbacks +//! A demonstration of an offchain worker that sends onchain callbacks #![cfg_attr(not(feature = "std"), no_std)] @@ -57,10 +57,10 @@ pub trait Trait: system::Trait { type Call: From>; /// The overarching event type. type Event: From> + Into<::Event>; - /// The type to sign and submit transactions. - type SubmitSignedTransaction: offchain::SubmitSignedTransaction::Call>; - /// The type to submit unsigned transactions. - type SubmitUnsignedTransaction: offchain::SubmitUnsignedTransaction::Call>; + /// The type to sign and send transactions. + type SendSignedTransaction: offchain::SendSignedTransaction::Call>; + /// The type to send unsigned transactions. + type SendUnsignedTransaction: offchain::SendUnsignedTransaction::Call>; } // Custom data type @@ -159,8 +159,8 @@ impl Module { } fn choose_tx_type(block_number: T::BlockNumber) -> TransactionType { - // Decide what type of transaction to submit based on block number. - // Each block the offchain worker will submit one type of transaction back to the chain. + // Decide what type of transaction to send based on block number. + // Each block the offchain worker will send one type of transaction back to the chain. // First a signed transaction, then an unsigned transaction, then an http fetch and json parsing. match block_number.try_into().ok().unwrap() % 3 { 0 => TransactionType::SignedSubmitNumber, @@ -262,8 +262,8 @@ impl Module { } fn signed_submit_number(block_number: T::BlockNumber) -> Result<(), Error> { - use offchain::SubmitSignedTransaction; - if !T::SubmitSignedTransaction::can_sign() { + use offchain::SendSignedTransaction; + if !T::SendSignedTransaction::can_sign() { debug::error!("No local account available"); return Err(>::SignedSubmitNumberError); } @@ -276,7 +276,7 @@ impl Module { // representing the call, we've just created. // Submit signed will return a vector of results for all accounts that were found in the // local keystore with expected `KEY_TYPE`. - let results = T::SubmitSignedTransaction::submit_signed(call); + let results = T::SendSignedTransaction::submit_signed(call); for (_acc, res) in &results { match res { Ok(()) => { debug::native::info!("off-chain send_signed: acc: {}| number: {}", _acc, submission); }, @@ -290,7 +290,7 @@ impl Module { } fn unsigned_submit_number(block_number: T::BlockNumber) -> Result<(), Error> { - use offchain::SubmitUnsignedTransaction; + use offchain::SendUnsignedTransaction; let submission: u64 = block_number.try_into().ok().unwrap() as u64; // Submitting the current block number back on-chain. diff --git a/runtimes/ocw-runtime/src/lib.rs b/runtimes/ocw-runtime/src/lib.rs index 9940cba68..110ad4dce 100644 --- a/runtimes/ocw-runtime/src/lib.rs +++ b/runtimes/ocw-runtime/src/lib.rs @@ -42,6 +42,7 @@ pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, weights::Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, debug, }; @@ -98,6 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -111,7 +113,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -142,6 +144,14 @@ impl frame_system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -188,14 +198,12 @@ impl pallet_balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl pallet_transaction_payment::Trait for Runtime { type Currency = pallet_balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); From 227388d0ded8fc8c586df9dc6edeb8219b7230b7 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:32:45 -0400 Subject: [PATCH 33/38] Super runtime compiles --- pallets/basic-token/src/lib.rs | 6 +++--- runtimes/super-runtime/src/lib.rs | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pallets/basic-token/src/lib.rs b/pallets/basic-token/src/lib.rs index 92528cf24..3960d99c8 100644 --- a/pallets/basic-token/src/lib.rs +++ b/pallets/basic-token/src/lib.rs @@ -19,11 +19,11 @@ pub trait Trait: system::Trait { decl_storage! { trait Store for Module as Token { - pub Balances get(get_balance): map hasher(blake2_128_concat) T::AccountId => u64; + pub Balances get(fn get_balance): map hasher(blake2_128_concat) T::AccountId => u64; - pub TotalSupply get(total_supply): u64 = 21000000; + pub TotalSupply get(fn total_supply): u64 = 21000000; - Init get(is_init): bool; + Init get(fn is_init): bool; } } diff --git a/runtimes/super-runtime/src/lib.rs b/runtimes/super-runtime/src/lib.rs index 40ac69544..ffff69077 100644 --- a/runtimes/super-runtime/src/lib.rs +++ b/runtimes/super-runtime/src/lib.rs @@ -42,7 +42,10 @@ pub use sp_runtime::{Perbill, Permill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, debug, }; @@ -97,6 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; pub const MILLISECS_PER_BLOCK: u64 = 6000; @@ -112,7 +116,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -143,6 +147,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -189,14 +201,12 @@ impl balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); From 9ee61df9959848fbbad2bd22662d44c01e2b23ed Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:41:54 -0400 Subject: [PATCH 34/38] Weight fee runtime and weight pallet compile. Both will eed another look before merging this. --- pallets/weights/src/lib.rs | 24 ++++++++++++------------ runtimes/weight-fee-runtime/src/lib.rs | 22 +++++++++++++++------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/pallets/weights/src/lib.rs b/pallets/weights/src/lib.rs index 52c18cbca..f25d0fb78 100644 --- a/pallets/weights/src/lib.rs +++ b/pallets/weights/src/lib.rs @@ -7,7 +7,7 @@ use frame_support::{ decl_module, decl_storage, dispatch::{DispatchResult, WeighData, PaysFee}, - weights::{ DispatchClass, Weight, ClassifyDispatch, SimpleDispatchInfo}, + weights::{ DispatchClass, Weight, ClassifyDispatch, Pays}, }; use frame_system as system; @@ -30,15 +30,15 @@ impl WeighData<(&u32,)> for Linear { // Use saturation so that an extremely large parameter value // Does not cause overflow. - x.saturating_mul(self.0) + x.saturating_mul(self.0).into() } } // The PaysFee trait indicates whether fees should actually be charged from the caller. If not, // the weights are still applied toward the block maximums. impl PaysFee for Linear { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -63,7 +63,7 @@ impl WeighData<(&u32, &u32)> for Quadratic { let by = y.saturating_mul(self.1); let c = self.2; - ax2.saturating_add(by).saturating_add(c) + ax2.saturating_add(by).saturating_add(c).into() } } @@ -75,8 +75,8 @@ impl ClassifyDispatch for Quadratic { } impl PaysFee for Quadratic { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -93,13 +93,13 @@ impl WeighData<(&bool, &u32)> for Conditional { } else { self.0 - } + }.into() } } impl PaysFee for Conditional { - fn pays_fee(&self, _: T) -> bool { - true + fn pays_fee(&self, _: T) -> Pays { + Pays::Yes } } @@ -114,9 +114,9 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { // Store value does not loop at all so a fixed weight is appropriate. Fixed weights can - // be assigned using types available in the Substrate framework. No custom coding is + // be assigned using integer constants. No custom coding is // necessary. - #[weight = SimpleDispatchInfo::FixedNormal(100)] + #[weight = 10_000] fn store_value(_origin, entry: u32) -> DispatchResult { StoredValue::put(entry); diff --git a/runtimes/weight-fee-runtime/src/lib.rs b/runtimes/weight-fee-runtime/src/lib.rs index 20385be6e..15e3b764f 100644 --- a/runtimes/weight-fee-runtime/src/lib.rs +++ b/runtimes/weight-fee-runtime/src/lib.rs @@ -34,7 +34,10 @@ use sp_runtime::traits::{ }; use frame_support::{ traits::Get, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, }; use sp_api::impl_runtime_apis; use sp_version::RuntimeVersion; @@ -108,6 +111,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; /// The version infromation used to identify this runtime when compiled natively. @@ -121,7 +125,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -152,6 +156,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -275,8 +287,7 @@ parameter_types! { pub const WeightFeeLinear: u128 = 100; pub const WeightFeeQuadratic : u128 = 10; - // Establish the base- and byte-fees. These are used in all configurations. - pub const TransactionBaseFee: u128 = 0; + // Establish the byte-fee. It is used in all configurations. pub const TransactionByteFee: u128 = 1; } @@ -292,9 +303,6 @@ impl transaction_payment::Trait for Runtime { // What to do when fees are paid. () means take no additional actions. type OnTransactionPayment = (); - // Base fee is a fixed amount applied to every transaction - type TransactionBaseFee = TransactionBaseFee; - // Byte fee is multiplied by the length of the // serialized transaction in bytes type TransactionByteFee = TransactionByteFee; From 81fa2b532015105216e2103e5de0cb29cd4b996a Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 02:46:22 -0400 Subject: [PATCH 35/38] Babe-grandpa-untime compiles --- runtimes/babe-grandpa-runtime/src/lib.rs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/runtimes/babe-grandpa-runtime/src/lib.rs b/runtimes/babe-grandpa-runtime/src/lib.rs index 793e19694..ac0aaa88c 100644 --- a/runtimes/babe-grandpa-runtime/src/lib.rs +++ b/runtimes/babe-grandpa-runtime/src/lib.rs @@ -43,7 +43,10 @@ pub use sp_runtime::{Perbill, Permill}; pub use frame_support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, - weights::Weight, + weights::{ + Weight, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + }, debug, }; @@ -105,6 +108,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 1, impl_version: 1, apis: RUNTIME_API_VERSIONS, + transaction_version: 1, }; pub const MILLISECS_PER_BLOCK: u64 = 6000; @@ -132,7 +136,7 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 1_000_000_000; + pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; pub const Version: RuntimeVersion = VERSION; @@ -163,6 +167,14 @@ impl system::Trait for Runtime { type BlockHashCount = BlockHashCount; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. type MaximumBlockWeight = MaximumBlockWeight; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The weight of the overhead invoked on the block import process, independent of the + /// extrinsics included in that block. + type BlockExecutionWeight = BlockExecutionWeight; + /// The base weight of any extrinsic processed by the runtime, independent of the + /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) + type ExtrinsicBaseWeight = ExtrinsicBaseWeight; /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. type MaximumBlockLength = MaximumBlockLength; /// Portion of the block weight that is available to all normal transactions. @@ -224,14 +236,12 @@ impl balances::Trait for Runtime { } parameter_types! { - pub const TransactionBaseFee: u128 = 0; pub const TransactionByteFee: u128 = 1; } impl transaction_payment::Trait for Runtime { type Currency = balances::Module; type OnTransactionPayment = (); - type TransactionBaseFee = TransactionBaseFee; type TransactionByteFee = TransactionByteFee; type WeightToFee = ConvertInto; type FeeMultiplierUpdate = (); @@ -355,19 +365,19 @@ impl_runtime_apis! { } impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { + fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration { // The choice of `c` parameter (where `1 - c` represents the // probability of a slot being empty), is done in accordance to the // slot duration and expected target block time, for safely // resisting network delays of maximum two seconds. // - sp_consensus_babe::BabeConfiguration { + sp_consensus_babe::BabeGenesisConfiguration { slot_duration: Babe::slot_duration(), epoch_length: EpochDuration::get(), c: PRIMARY_PROBABILITY, genesis_authorities: Babe::authorities(), randomness: Babe::randomness(), - secondary_slots: true, + allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots, } } From 0f31fdc1e69e78a4330f24be5ca670815ff56107 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 16:41:37 -0400 Subject: [PATCH 36/38] re-apply dependency bumps (not sure where that work went) --- Cargo.lock | 7384 +++++++++++++++++++ README.md | 2 +- nodes/babe-grandpa-node/Cargo.toml | 42 +- nodes/basic-pow/Cargo.toml | 37 +- nodes/kitchen-node/Cargo.toml | 35 +- nodes/manual-seal/Cargo.toml | 39 +- nodes/rpc-node/Cargo.toml | 39 +- pallets/adding-machine/Cargo.toml | 12 +- pallets/basic-token/Cargo.toml | 12 +- pallets/charity/Cargo.toml | 16 +- pallets/check-membership/Cargo.toml | 12 +- pallets/child-trie/Cargo.toml | 12 +- pallets/compounding-interest/Cargo.toml | 16 +- pallets/constant-config/Cargo.toml | 12 +- pallets/currency-imbalances/Cargo.toml | 12 +- pallets/default-instance/Cargo.toml | 12 +- pallets/double-map/Cargo.toml | 14 +- pallets/execution-schedule/Cargo.toml | 14 +- pallets/fixed-point/Cargo.toml | 16 +- pallets/generic-event/Cargo.toml | 12 +- pallets/hello-substrate/Cargo.toml | 12 +- pallets/last-caller/Cargo.toml | 12 +- pallets/lockable-currency/Cargo.toml | 12 +- pallets/offchain-demo/Cargo.toml | 14 +- pallets/offchain-demo/src/lib.rs | 2 +- pallets/randomness/Cargo.toml | 20 +- pallets/reservable-currency/Cargo.toml | 12 +- pallets/ringbuffer-queue/Cargo.toml | 14 +- pallets/simple-crowdfund/Cargo.toml | 16 +- pallets/simple-event/Cargo.toml | 12 +- pallets/simple-map/Cargo.toml | 12 +- pallets/single-value/Cargo.toml | 12 +- pallets/storage-cache/Cargo.toml | 14 +- pallets/struct-storage/Cargo.toml | 14 +- pallets/sum-storage/Cargo.toml | 14 +- pallets/sum-storage/rpc/Cargo.toml | 8 +- pallets/sum-storage/runtime-api/Cargo.toml | 2 +- pallets/vec-set/Cargo.toml | 14 +- pallets/weights/Cargo.toml | 10 +- runtimes/api-runtime/Cargo.toml | 42 +- runtimes/babe-grandpa-runtime/Cargo.toml | 48 +- runtimes/ocw-runtime/Cargo.toml | 42 +- runtimes/super-runtime/Cargo.toml | 48 +- runtimes/weight-fee-runtime/Cargo.toml | 50 +- text/2-appetizers/4-events.md | 4 +- text/3-entrees/custom-rpc.md | 2 +- text/3-entrees/kitchen-node.md | 6 +- text/3-entrees/off-chain-workers/storage.md | 2 +- text/3-entrees/testing/mock.md | 6 +- 49 files changed, 7801 insertions(+), 425 deletions(-) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..6f1323f5e --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7384 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adding-machine" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "adler32" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" + +[[package]] +name = "ahash" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" +dependencies = [ + "const-random", +] + +[[package]] +name = "aho-corasick" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" +dependencies = [ + "memchr", +] + +[[package]] +name = "alga" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" +dependencies = [ + "approx", + "num-complex", + "num-traits 0.2.11", +] + +[[package]] +name = "alt_serde" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03beeddedd09889b96def26f78ba46e34ffd9bdaaa33b2c980cbaa1d0e762686" +dependencies = [ + "alt_serde_derive", +] + +[[package]] +name = "alt_serde_derive" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6757ed5faa82ccfbfa1837cd7a7a2e1bdb634236f21fa74d6c5c5736152838a1" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "anyhow" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" + +[[package]] +name = "api-runtime" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-indices", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "safe-mix", + "serde", + "sp-api", + "sp-block-builder", + "sp-core", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", + "sum-storage", + "sum-storage-runtime-api", +] + +[[package]] +name = "app_dirs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" +dependencies = [ + "ole32-sys", + "shell32-sys", + "winapi 0.2.8", + "xdg", +] + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +dependencies = [ + "num-traits 0.2.11", +] + +[[package]] +name = "arc-swap" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "asn1_der" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" +dependencies = [ + "asn1_der_derive", +] + +[[package]] +name = "asn1_der_derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" +dependencies = [ + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "assert_matches" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" + +[[package]] +name = "async-std" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" +dependencies = [ + "async-task", + "broadcaster", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "futures-core", + "futures-io", + "futures-timer 2.0.2", + "kv-log-macro", + "log", + "memchr", + "mio", + "mio-uds", + "num_cpus", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "async-task" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d" +dependencies = [ + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "async-tls" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95fd83426b89b034bf4e9ceb9c533c2f2386b813fd3dcae0a425ec6f1837d78a" +dependencies = [ + "futures 0.3.4", + "rustls", + "webpki", + "webpki-roots 0.19.0", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "babe-grandpa-node" +version = "2.0.0-alpha.7" +dependencies = [ + "babe-grandpa-runtime", + "ctrlc", + "derive_more 0.15.0", + "exit-future", + "futures 0.1.29", + "futures 0.3.4", + "log", + "parking_lot 0.9.0", + "sc-basic-authorship", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-consensus-babe", + "sc-executor", + "sc-finality-grandpa", + "sc-network", + "sc-service", + "sc-transaction-pool", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "tokio 0.1.22", + "trie-root 0.15.2", + "vergen", +] + +[[package]] +name = "babe-grandpa-runtime" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "safe-mix", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", +] + +[[package]] +name = "backtrace" +version = "0.3.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e" +dependencies = [ + "backtrace-sys", + "cfg-if", + "libc", + "rustc-demangle", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + +[[package]] +name = "basic-pow" +version = "2.0.0-alpha.7" +dependencies = [ + "futures 0.3.4", + "log", + "parity-scale-codec", + "rand 0.7.3", + "sc-basic-authorship", + "sc-cli", + "sc-client-api", + "sc-consensus-pow", + "sc-executor", + "sc-network", + "sc-service", + "sc-transaction-pool", + "sha3", + "sp-blockchain", + "sp-consensus", + "sp-consensus-pow", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "super-runtime", + "vergen", +] + +[[package]] +name = "basic-token" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "bindgen" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb26d6a69a335b8cb0e7c7e9775cd5666611dc50a37177c3f2cedcfc040e8c8" +dependencies = [ + "bitflags", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2 1.0.12", + "quote 1.0.4", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "bitmask" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" + +[[package]] +name = "bitvec" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +dependencies = [ + "either", + "radium", +] + +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac", + "digest", + "opaque-debug", +] + +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", +] + +[[package]] +name = "blake2s_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab9e07352b829279624ceb7c64adb4f585dacdb81d35cafae81139ccd617cf44" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "broadcaster" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "futures-util", + "parking_lot 0.10.2", + "slab", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bstr" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41" +dependencies = [ + "memchr", +] + +[[package]] +name = "bumpalo" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" + +[[package]] +name = "byte-slice-cast" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "either", + "iovec", +] + +[[package]] +name = "bytes" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" + +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" + +[[package]] +name = "cc" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "chacha20-poly1305-aead" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d2058ba29594f69c75e8a9018e0485e3914ca5084e3613cd64529042f5423b" +dependencies = [ + "constant_time_eq", +] + +[[package]] +name = "charity" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "check-membership" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "child-trie" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "chrono" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" +dependencies = [ + "num-integer", + "num-traits 0.2.11", + "time", +] + +[[package]] +name = "clang-sys" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" +dependencies = [ + "ansi_term 0.11.0", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clear_on_drop" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" +dependencies = [ + "cc", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "compounding-interest" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-fixed", +] + +[[package]] +name = "const-random" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" +dependencies = [ + "getrandom", + "proc-macro-hack", +] + +[[package]] +name = "constant-config" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + +[[package]] +name = "crc32fast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" +dependencies = [ + "crossbeam-utils", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +dependencies = [ + "autocfg 1.0.0", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "maybe-uninit", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg 1.0.0", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array", + "subtle 1.0.0", +] + +[[package]] +name = "ct-logs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" +dependencies = [ + "sct", +] + +[[package]] +name = "ctrlc" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a4ba686dff9fa4c1c9636ce1010b0cf98ceb421361b0bb3d6faeec43bd217a7" +dependencies = [ + "nix", + "winapi 0.3.8", +] + +[[package]] +name = "currency-imbalances" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "curve25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" +dependencies = [ + "byteorder", + "digest", + "rand_core 0.5.1", + "subtle 2.2.2", + "zeroize", +] + +[[package]] +name = "data-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" + +[[package]] +name = "default-instance" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "derive_more" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" +dependencies = [ + "lazy_static", + "proc-macro2 0.4.30", + "quote 0.6.13", + "regex", + "rustc_version", + "syn 0.15.44", +] + +[[package]] +name = "derive_more" +version = "0.99.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "dns-parser" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +dependencies = [ + "byteorder", + "quick-error", +] + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "double-map" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.0-pre.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" +dependencies = [ + "clear_on_drop", + "curve25519-dalek", + "rand 0.7.3", + "sha2", +] + +[[package]] +name = "either" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" + +[[package]] +name = "enum-primitive-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2b90e520ec62c1864c8c78d637acbfe8baf5f63240f2fb8165b8325c07812dd" +dependencies = [ + "num-traits 0.1.43", + "quote 0.3.15", + "syn 0.11.11", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "environmental" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" + +[[package]] +name = "erased-serde" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d88b6d1705e16a4d62e05ea61cc0496c2bd190f4fa8e5c1f11ce747be6bcf3d1" +dependencies = [ + "serde", +] + +[[package]] +name = "execution-schedule" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "rand 0.7.3", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "exit-future" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +dependencies = [ + "futures 0.3.4", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "synstructure", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fdlimit" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c" +dependencies = [ + "libc", +] + +[[package]] +name = "finality-grandpa" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4682570188cd105606e621b9992e580f717c15f8cd1b7d106b59f1c6e54680" +dependencies = [ + "either", + "futures 0.3.4", + "futures-timer 2.0.2", + "log", + "num-traits 0.2.11", + "parity-scale-codec", + "parking_lot 0.9.0", +] + +[[package]] +name = "fixed-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +dependencies = [ + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixed-point" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-fixed", +] + +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "flate2" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" +dependencies = [ + "cfg-if", + "crc32fast", + "libc", + "libz-sys", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" + +[[package]] +name = "fork-tree" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00caa7b4d3f6b29b211cd82dfceb1fbe30281fdf6f05e95f1d519837f92443a6" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "frame-benchmarking" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b22054d77cb9377dcb9660f9634e79b2e50fcd4129fae7921e98ca30dc5c12e7" +dependencies = [ + "frame-support", + "frame-system", + "linregress", + "parity-scale-codec", + "paste", + "sp-api", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", +] + +[[package]] +name = "frame-executive" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76692e90be57adc50ca89c08ff92b6d501a1ec9e0800aedd67f3c9eb9cd26b37" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "frame-metadata" +version = "11.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed1031c3ab5fd338d4922380ecaa1784d96c4670b5e329838c1be9821f1596" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "frame-support" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd5a22a0c3e66a82b4ca1965e21373d3e0d29266313130d04a5045906c81dc4" +dependencies = [ + "bitmask", + "frame-metadata", + "frame-support-procedural", + "impl-trait-for-tuples", + "log", + "once_cell", + "parity-scale-codec", + "paste", + "serde", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "frame-support-procedural" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a6b4279196725ff56647d12a285328a79685a7d05be6c507f55a11e00f492c0" +dependencies = [ + "frame-support-procedural-tools", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9135714a5cd9e01b9839c16433d5f075706ef87f8f2fc412944ff826fc8ccd1" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab73d20fca63196489400b98b71aa96a8709968d83dc26e7c99aa135ba1eaf4f" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "frame-system" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb202b187ce580c0414d9c7608478377bd2fe90bb15a5777e8c6b746d4c9519a" +dependencies = [ + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", +] + +[[package]] +name = "fs-swap" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" +dependencies = [ + "lazy_static", + "libc", + "libloading", + "winapi 0.3.8", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" + +[[package]] +name = "futures" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-channel-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" +dependencies = [ + "futures-core-preview", +] + +[[package]] +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" + +[[package]] +name = "futures-core-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" + +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +dependencies = [ + "futures 0.1.29", + "num_cpus", +] + +[[package]] +name = "futures-diagnose" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" +dependencies = [ + "futures 0.1.29", + "futures 0.3.4", + "lazy_static", + "log", + "parking_lot 0.9.0", + "pin-project", + "serde", + "serde_json 1.0.52", +] + +[[package]] +name = "futures-executor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" + +[[package]] +name = "futures-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +dependencies = [ + "proc-macro-hack", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" + +[[package]] +name = "futures-timer" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + +[[package]] +name = "futures-util" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +dependencies = [ + "futures 0.1.29", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "futures-util-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" +dependencies = [ + "futures-channel-preview", + "futures-core-preview", + "pin-utils", + "slab", +] + +[[package]] +name = "futures_codec" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0a73299e4718f5452e45980fc1d6957a070abe308d3700b63b8673f47e1c2b3" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.4", + "memchr", + "pin-project", +] + +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-event" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +dependencies = [ + "c_linked_list", + "get_if_addrs-sys", + "libc", + "winapi 0.2.8", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" +dependencies = [ + "gcc", + "libc", +] + +[[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "globset" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "h2" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +dependencies = [ + "byteorder", + "bytes 0.4.12", + "fnv", + "futures 0.1.29", + "http 0.1.21", + "indexmap", + "log", + "slab", + "string", + "tokio-io", +] + +[[package]] +name = "h2" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" +dependencies = [ + "bytes 0.5.4", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.1", + "indexmap", + "log", + "slab", + "tokio 0.2.20", + "tokio-util", +] + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +dependencies = [ + "ahash", + "autocfg 0.1.7", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hello-substrate" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "hermit-abi" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" + +[[package]] +name = "hex-literal" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" +dependencies = [ + "hex-literal-impl", + "proc-macro-hack", +] + +[[package]] +name = "hex-literal-impl" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" +dependencies = [ + "proc-macro-hack", +] + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac", + "digest", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest", + "generic-array", + "hmac", +] + +[[package]] +name = "http" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +dependencies = [ + "bytes 0.4.12", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +dependencies = [ + "bytes 0.5.4", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "http 0.1.21", + "tokio-buf", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +dependencies = [ + "bytes 0.5.4", + "http 0.2.1", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "hyper" +version = "0.12.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "futures-cpupool", + "h2 0.1.26", + "http 0.1.21", + "http-body 0.1.0", + "httparse", + "iovec", + "itoa", + "log", + "net2", + "rustc_version", + "time", + "tokio 0.1.22", + "tokio-buf", + "tokio-executor 0.1.10", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "want 0.2.0", +] + +[[package]] +name = "hyper" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" +dependencies = [ + "bytes 0.5.4", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.2.5", + "http 0.2.1", + "http-body 0.3.1", + "httparse", + "itoa", + "log", + "net2", + "pin-project", + "time", + "tokio 0.2.20", + "tower-service", + "want 0.3.0", +] + +[[package]] +name = "hyper-rustls" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" +dependencies = [ + "bytes 0.5.4", + "ct-logs", + "futures-util", + "hyper 0.13.5", + "log", + "rustls", + "rustls-native-certs", + "tokio 0.2.20", + "tokio-rustls", + "webpki", +] + +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "indexmap" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" + +[[package]] +name = "interleaved-ordered" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77" + +[[package]] +name = "intervalier" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" +dependencies = [ + "futures 0.3.4", + "futures-timer 2.0.2", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ip_network" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" + +[[package]] +name = "ipnet" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" + +[[package]] +name = "itertools" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" + +[[package]] +name = "jobserver" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-client-transports" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2307a7e78cf969759e390a8a2151ea12e783849a45bb00aa871b468ba58ea79e" +dependencies = [ + "failure", + "futures 0.1.29", + "jsonrpc-core", + "jsonrpc-pubsub", + "log", + "serde", + "serde_json 1.0.52", + "url 1.7.2", +] + +[[package]] +name = "jsonrpc-core" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25525f6002338fb4debb5167a89a0b47f727a5a48418417545ad3429758b7fec" +dependencies = [ + "futures 0.1.29", + "log", + "serde", + "serde_derive", + "serde_json 1.0.52", +] + +[[package]] +name = "jsonrpc-core-client" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f9382e831a6d630c658df103aac3f971da096deb57c136ea2b760d3b4e3f9f" +dependencies = [ + "jsonrpc-client-transports", +] + +[[package]] +name = "jsonrpc-derive" +version = "14.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "jsonrpc-http-server" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52860f0549694aa4abb12766856f56952ab46d3fb9f0815131b2db3d9cc2f29" +dependencies = [ + "hyper 0.12.35", + "jsonrpc-core", + "jsonrpc-server-utils", + "log", + "net2", + "parking_lot 0.10.2", + "unicase", +] + +[[package]] +name = "jsonrpc-pubsub" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4ca5e391d6c6a2261d4adca029f427fe63ea546ad6cef2957c654c08495ec16" +dependencies = [ + "jsonrpc-core", + "log", + "parking_lot 0.10.2", + "serde", +] + +[[package]] +name = "jsonrpc-server-utils" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f06add502b48351e05dd95814835327fb115e4e9f834ca42fd522d3b769d4d2" +dependencies = [ + "bytes 0.4.12", + "globset", + "jsonrpc-core", + "lazy_static", + "log", + "tokio 0.1.22", + "tokio-codec", + "unicase", +] + +[[package]] +name = "jsonrpc-ws-server" +version = "14.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017a7dd5083d9ed62c5e1dd3e317975c33c3115dac5447f4480fe05a8c354754" +dependencies = [ + "jsonrpc-core", + "jsonrpc-server-utils", + "log", + "parking_lot 0.10.2", + "slab", + "ws", +] + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "kitchen-node" +version = "2.0.0-alpha.7" +dependencies = [ + "ctrlc", + "derive_more 0.15.0", + "exit-future", + "futures 0.1.29", + "futures 0.3.4", + "log", + "parking_lot 0.9.0", + "sc-basic-authorship", + "sc-cli", + "sc-client-db", + "sc-consensus-manual-seal", + "sc-executor", + "sc-network", + "sc-service", + "sc-transaction-pool", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "super-runtime", + "tokio 0.1.22", + "trie-root 0.15.2", + "vergen", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2d3beed37e5483887d81eb39de6de03a8346531410e1306ca48a9a89bd3a51" +dependencies = [ + "log", +] + +[[package]] +name = "kvdb" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cad096c6849b2ef027fabe35c4aed356d0e3d3f586d0a8361e5e17f1e50a7ce5" +dependencies = [ + "parity-util-mem", + "smallvec 1.4.0", +] + +[[package]] +name = "kvdb-memorydb" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa954d12cfac958822dfd77aab34f3eec71f103b918c4ab79ab59a36ee594ea" +dependencies = [ + "kvdb", + "parity-util-mem", + "parking_lot 0.10.2", +] + +[[package]] +name = "kvdb-rocksdb" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3f14c3a10c8894d26175e57e9e26032e6d6c49c30cbe2468c5bf5f6b64bb0be" +dependencies = [ + "fs-swap", + "interleaved-ordered", + "kvdb", + "log", + "num_cpus", + "owning_ref", + "parity-util-mem", + "parking_lot 0.10.2", + "regex", + "rocksdb", + "smallvec 1.4.0", +] + +[[package]] +name = "last-caller" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" + +[[package]] +name = "libc" +version = "0.2.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" + +[[package]] +name = "libflate" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd" +dependencies = [ + "adler32", + "crc32fast", + "rle-decode-fast", + "take_mut", +] + +[[package]] +name = "libloading" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +dependencies = [ + "cc", + "winapi 0.3.8", +] + +[[package]] +name = "libm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" + +[[package]] +name = "libp2p" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ea742c86405b659c358223a8f0f9f5a9eb27bb6083894c6340959b05269662" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "libp2p-core-derive", + "libp2p-dns", + "libp2p-identify", + "libp2p-kad", + "libp2p-mdns", + "libp2p-mplex", + "libp2p-noise", + "libp2p-ping", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-wasm-ext", + "libp2p-websocket", + "libp2p-yamux", + "multihash", + "parity-multiaddr 0.8.0", + "parking_lot 0.10.2", + "pin-project", + "smallvec 1.4.0", + "wasm-timer", +] + +[[package]] +name = "libp2p-core" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d2c17158c4dca984a77a5927aac6f0862d7f50c013470a415f93be498b5739" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "either", + "fnv", + "futures 0.3.4", + "futures-timer 3.0.2", + "lazy_static", + "libsecp256k1", + "log", + "multihash", + "multistream-select", + "parity-multiaddr 0.8.0", + "parking_lot 0.10.2", + "pin-project", + "prost", + "prost-build", + "rand 0.7.3", + "ring", + "rw-stream-sink", + "sha2", + "smallvec 1.4.0", + "thiserror", + "unsigned-varint", + "void", + "zeroize", +] + +[[package]] +name = "libp2p-core-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "329127858e4728db5ab60c33d5ae352a999325fdf190ed022ec7d3a4685ae2e6" +dependencies = [ + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "libp2p-dns" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0d0993481203d68e5ce2f787d033fb0cac6b850659ed6c784612db678977c71" +dependencies = [ + "futures 0.3.4", + "libp2p-core", + "log", +] + +[[package]] +name = "libp2p-identify" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38ca3eb807789e26f41c82ca7cd2b3843c66c5587b8b5f709a2f421f3061414" +dependencies = [ + "futures 0.3.4", + "libp2p-core", + "libp2p-swarm", + "log", + "prost", + "prost-build", + "smallvec 1.4.0", + "wasm-timer", +] + +[[package]] +name = "libp2p-kad" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92cda1fb8149ea64d092a2b99d2bd7a2c309eee38ea322d02e4480bd6ee1759" +dependencies = [ + "arrayvec 0.5.1", + "bytes 0.5.4", + "either", + "fnv", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "libp2p-swarm", + "log", + "multihash", + "prost", + "prost-build", + "rand 0.7.3", + "sha2", + "smallvec 1.4.0", + "uint", + "unsigned-varint", + "void", + "wasm-timer", +] + +[[package]] +name = "libp2p-mdns" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41e908d2aaf8ff0ec6ad1f02fe1844fd777fb0b03a68a226423630750ab99471" +dependencies = [ + "async-std", + "data-encoding", + "dns-parser", + "either", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "libp2p-swarm", + "log", + "net2", + "rand 0.7.3", + "smallvec 1.4.0", + "void", + "wasm-timer", +] + +[[package]] +name = "libp2p-mplex" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0832882b06619b2e81d74e71447753ea3c068164a0bca67847d272e856a04a02" +dependencies = [ + "bytes 0.5.4", + "fnv", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "log", + "parking_lot 0.10.2", + "unsigned-varint", +] + +[[package]] +name = "libp2p-noise" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918e94a649e1139c24ee9f1f8c1f2adaba6d157b9471af787f2d9beac8c29c77" +dependencies = [ + "curve25519-dalek", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "log", + "prost", + "prost-build", + "rand 0.7.3", + "sha2", + "snow", + "static_assertions", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "libp2p-ping" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9bfbf87eebb492d040f9899c5c81c9738730465ac5e78d9b7a7d086d0f07230" +dependencies = [ + "futures 0.3.4", + "libp2p-core", + "libp2p-swarm", + "log", + "rand 0.7.3", + "void", + "wasm-timer", +] + +[[package]] +name = "libp2p-swarm" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44ab289ae44cc691da0a6fe96aefa43f26c86c6c7813998e203f6d80f1860f18" +dependencies = [ + "futures 0.3.4", + "libp2p-core", + "log", + "rand 0.7.3", + "smallvec 1.4.0", + "void", + "wasm-timer", +] + +[[package]] +name = "libp2p-tcp" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b37ea44823d3ed223e4605da94b50177bc520f05ae2452286700549a32d81669" +dependencies = [ + "async-std", + "futures 0.3.4", + "futures-timer 3.0.2", + "get_if_addrs", + "ipnet", + "libp2p-core", + "log", +] + +[[package]] +name = "libp2p-wasm-ext" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ac7dbde0f88cad191dcdfd073b8bae28d01823e8ca313f117b6ecb914160c3" +dependencies = [ + "futures 0.3.4", + "js-sys", + "libp2p-core", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "libp2p-websocket" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6874c9069ce93d899df9dc7b29f129c706b2a0fdc048f11d878935352b580190" +dependencies = [ + "async-tls", + "bytes 0.5.4", + "either", + "futures 0.3.4", + "libp2p-core", + "log", + "quicksink", + "rustls", + "rw-stream-sink", + "soketto", + "url 2.1.1", + "webpki", + "webpki-roots 0.18.0", +] + +[[package]] +name = "libp2p-yamux" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f91aea50f6571e0bc6c058dc0e9b270afd41ec28dd94e9e4bf607e78b9ab87" +dependencies = [ + "futures 0.3.4", + "libp2p-core", + "parking_lot 0.10.2", + "thiserror", + "yamux", +] + +[[package]] +name = "librocksdb-sys" +version = "6.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883213ae3d09bfc3d104aefe94b25ebb183b6f4d3a515b23b14817e1f4854005" +dependencies = [ + "bindgen", + "cc", + "glob", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest", + "hmac-drbg", + "rand 0.7.3", + "sha2", + "subtle 2.2.2", + "typenum", +] + +[[package]] +name = "libz-sys" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" + +[[package]] +name = "linked_hash_set" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "linregress" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9" +dependencies = [ + "failure", + "nalgebra", + "statrs", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lockable-currency" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "sp-core", + "sp-io", +] + +[[package]] +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "lru" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "manual-seal" +version = "2.0.0-alpha.7" +dependencies = [ + "futures 0.3.4", + "jsonrpc-core", + "log", + "parity-scale-codec", + "rand 0.7.3", + "sc-basic-authorship", + "sc-cli", + "sc-client-api", + "sc-client-db", + "sc-consensus-manual-seal", + "sc-executor", + "sc-network", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sha3", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "super-runtime", + "vergen", +] + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" + +[[package]] +name = "matrixmultiply" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +dependencies = [ + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "memoffset" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "memory-db" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be512cb2ccb4ecbdca937fdd4a62ea5f09f8e7195466a85e4632b3d5bcce82e6" +dependencies = [ + "ahash", + "hash-db", + "hashbrown", + "parity-util-mem", +] + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "merlin" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +dependencies = [ + "adler32", +] + +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + +[[package]] +name = "mio-uds" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +dependencies = [ + "iovec", + "libc", + "mio", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "multihash" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fbc227f7e2b1cb701f95404579ecb2668abbdd3c7ef7a6cbb3cc0d3b236869" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "digest", + "sha-1", + "sha2", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "multimap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" + +[[package]] +name = "multistream-select" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74cdcf7cfb3402881e15a1f95116cb033d69b33c83d481e1234777f5ef0c3d2c" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.4", + "log", + "pin-project", + "smallvec 1.4.0", + "unsigned-varint", +] + +[[package]] +name = "nalgebra" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" +dependencies = [ + "alga", + "approx", + "generic-array", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits 0.2.11", + "rand 0.6.5", + "typenum", +] + +[[package]] +name = "names" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" +dependencies = [ + "rand 0.3.23", +] + +[[package]] +name = "net2" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "netstat2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29449d242064c48d3057a194b049a2bdcccadda16faa18a91468677b44e8d422" +dependencies = [ + "bitflags", + "byteorder", + "enum-primitive-derive", + "libc", + "num-traits 0.2.11", + "thiserror", +] + +[[package]] +name = "nix" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "void", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "5.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "ntapi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26e041cd983acbc087e30fcba770380cfa352d0e392e175b2344ebaf7ea0602" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg 1.0.0", + "num-integer", + "num-traits 0.2.11", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg 1.0.0", + "num-traits 0.2.11", +] + +[[package]] +name = "num-integer" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +dependencies = [ + "autocfg 1.0.0", + "num-traits 0.2.11", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg 1.0.0", + "num-bigint", + "num-integer", + "num-traits 0.2.11", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.11", +] + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +dependencies = [ + "autocfg 1.0.0", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "ocw-runtime" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "offchain-demo", + "pallet-balances", + "pallet-indices", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "safe-mix", + "serde", + "sp-api", + "sp-block-builder", + "sp-core", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", +] + +[[package]] +name = "offchain-demo" +version = "2.0.0-alpha.7" +dependencies = [ + "alt_serde", + "frame-support", + "frame-system", + "parity-scale-codec", + "parking_lot 0.10.2", + "serde_json 1.0.44", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "ole32-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "once_cell" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" +dependencies = [ + "parking_lot 0.9.0", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + +[[package]] +name = "owning_ref" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "pallet-babe" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1d74c4e2175fccdf649463e4def9cc2d69a6a55cd192d96ad73774752e8a39" +dependencies = [ + "frame-support", + "frame-system", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-consensus-babe", + "sp-consensus-vrf", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "pallet-balances" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5933eed290294f48ae9c6ca9b83c48f73c0e50eb2d86532a388d2076806f9d37" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-finality-tracker" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b6aaf467788f82d9f18c940f57b6773e6114988120c63630ec1a30ef6af73d" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-finality-tracker", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-generic-asset" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360a50e10a05e9835c4ee53dc6227221399af150712ab68ae09300b67876087" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-grandpa" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0be9854b7b21a8ab2d14bc323d08b18b6d57d1bbdba1657f37169a02ac198162" +dependencies = [ + "frame-support", + "frame-system", + "pallet-finality-tracker", + "pallet-session", + "parity-scale-codec", + "serde", + "sp-core", + "sp-finality-grandpa", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-indices" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6941e40c29068970666b5737cc274d1a05ba9cabdb5b02059f585c69c4f96b4c" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-randomness-collective-flip" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6f06234e000e7b7554d75d62280e953f902981196d6dcde0d084ad5c7df4809" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-session" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aace05f197abe3905182ec817e6fadc3c985b3c2ec41bfc74bb9918d1585e9e" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-trie", +] + +[[package]] +name = "pallet-sudo" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246c9c0b5c29baff01d925ebadee6c0c642fa4c56ba8de1957f1ecc1438cc7dc" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-timestamp" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c90b652dfb8796d657a2df5fa6200ada33b9784554b81a32efd73de2fe00575" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "pallet-transaction-payment" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52333b8598b2bcb3af5e158c61cb2d30821220a5034e92a74c6a4ef116d82a7f" +dependencies = [ + "frame-support", + "frame-system", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f6cc2ebdaff949b9f38cc03f19e541bd22773ce32e84532ac1d85a481cb112" +dependencies = [ + "frame-support", + "parity-scale-codec", + "serde", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "parity-db" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d595e372d119261593297debbe4193811a4dc811d2a1ccbb8caaa6666ad7ab" +dependencies = [ + "blake2-rfc", + "crc32fast", + "libc", + "log", + "memmap", + "parking_lot 0.10.2", +] + +[[package]] +name = "parity-multiaddr" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f77055f9e81921a8cc7bebeb6cded3d128931d51f1e3dd6251f0770a6d431477" +dependencies = [ + "arrayref", + "bs58", + "byteorder", + "data-encoding", + "parity-multihash", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint", + "url 2.1.1", +] + +[[package]] +name = "parity-multiaddr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4db35e222f783ef4e6661873f6c165c4eb7b65e0c408349818517d5705c2d7d3" +dependencies = [ + "arrayref", + "bs58", + "byteorder", + "data-encoding", + "multihash", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint", + "url 2.1.1", +] + +[[package]] +name = "parity-multihash" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" +dependencies = [ + "blake2", + "bytes 0.5.4", + "rand 0.7.3", + "sha-1", + "sha2", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "parity-scale-codec" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17" +dependencies = [ + "arrayvec 0.5.1", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "parity-send-wrapper" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" + +[[package]] +name = "parity-util-mem" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c" +dependencies = [ + "cfg-if", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot 0.10.2", + "primitive-types", + "smallvec 1.4.0", + "winapi 0.3.8", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2 1.0.12", + "syn 1.0.19", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api", + "parking_lot_core 0.6.2", + "rustc_version", +] + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +dependencies = [ + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "rustc_version", + "smallvec 0.6.13", + "winapi 0.3.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "smallvec 1.4.0", + "winapi 0.3.8", +] + +[[package]] +name = "paste" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a229b1c58c692edcaa5b9b0948084f130f55d2dcc15b02fcc5340b2b4521476" +dependencies = [ + "paste-impl", + "proc-macro-hack", +] + +[[package]] +name = "paste-impl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0bf239e447e67ff6d16a8bb5e4d4bd2343acf5066061c0e8e06ac5ba8ca68c" +dependencies = [ + "proc-macro-hack", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +dependencies = [ + "byteorder", + "crypto-mac", +] + +[[package]] +name = "pdqselect" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "petgraph" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82c3bfbfb5bb42f99498c7234bbd768c220eb0cea6818259d0d18a1aa3d2595d" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccbf6449dcfb18562c015526b085b8df1aa3cdab180af8ec2ebd300a3bd28f63" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" + +[[package]] +name = "platforms" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" + +[[package]] +name = "ppv-lite86" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" + +[[package]] +name = "primitive-types" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde 0.3.1", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "syn-mid", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" + +[[package]] +name = "proc-macro-nested" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" +dependencies = [ + "unicode-xid 0.2.0", +] + +[[package]] +name = "procfs" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe50036aa1b71e553a4a0c48ab7baabf8aa8c7a5a61aae06bf38c2eab7430475" +dependencies = [ + "bitflags", + "byteorder", + "chrono", + "hex", + "lazy_static", + "libc", + "libflate", +] + +[[package]] +name = "prometheus" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "protobuf", + "spin", + "thiserror", +] + +[[package]] +name = "prost" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +dependencies = [ + "bytes 0.5.4", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" +dependencies = [ + "bytes 0.5.4", + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "prost-types" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +dependencies = [ + "bytes 0.5.4", + "prost", +] + +[[package]] +name = "protobuf" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e86d370532557ae7573551a1ec8235a0f8d6cb276c7c9e6aa490b511c447485" + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quicksink" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" +dependencies = [ + "futures-core", + "futures-sink", + "pin-project-lite", +] + +[[package]] +name = "quote" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" +dependencies = [ + "proc-macro2 1.0.12", +] + +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + +[[package]] +name = "rand" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" +dependencies = [ + "libc", + "rand 0.4.6", +] + +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi 0.3.8", +] + +[[package]] +name = "rand" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "winapi 0.3.8", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg 0.1.2", + "rand_xorshift", + "winapi 0.3.8", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg 0.2.1", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi 0.3.8", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.8", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "randomness" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-babe", + "pallet-randomness-collective-flip", + "pallet-timestamp", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +dependencies = [ + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" +dependencies = [ + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" + +[[package]] +name = "ref-cast" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a214c7875e1b63fc1618db7c80efc0954f6156c9ff07699fd9039e255accdd1" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602eb59cda66fcb9aec25841fb76bc01d2b34282dcdd705028da297db6f3eec8" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "regex" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" + +[[package]] +name = "remove_dir_all" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "reservable-currency" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "ring" +version = "0.16.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.8", +] + +[[package]] +name = "ringbuffer-queue" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "rle-decode-fast" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" + +[[package]] +name = "rocksdb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" +dependencies = [ + "libc", + "librocksdb-sys", +] + +[[package]] +name = "rpassword" +version = "4.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +dependencies = [ + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "rpc-node" +version = "2.0.0-alpha.7" +dependencies = [ + "api-runtime", + "ctrlc", + "futures 0.1.29", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log", + "parking_lot 0.9.0", + "sc-basic-authorship", + "sc-cli", + "sc-client-api", + "sc-client-db", + "sc-consensus-manual-seal", + "sc-executor", + "sc-network", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "sum-storage-rpc", + "tokio 0.1.22", + "trie-root 0.15.2", + "vergen", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + +[[package]] +name = "rustls" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + +[[package]] +name = "rw-stream-sink" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" +dependencies = [ + "futures 0.3.4", + "pin-project", + "static_assertions", +] + +[[package]] +name = "ryu" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" + +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "sc-basic-authorship" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "606bb1a659f6d10c9d6d1b1520d81b07df6cca26008c865ca4a1eb957841ebfb" +dependencies = [ + "futures 0.3.4", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-transaction-pool", + "tokio-executor 0.2.0-alpha.6", +] + +[[package]] +name = "sc-block-builder" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad86d3862ea0507e4ab26581b64ac902508f5e91f2bdae618327db12d70840c9" +dependencies = [ + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "sc-chain-spec" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ab12f5eabca6fd4e16c202f045dc8e7542b9049294b92747cfcabf037586a4" +dependencies = [ + "impl-trait-for-tuples", + "sc-chain-spec-derive", + "sc-network", + "sc-telemetry", + "serde", + "serde_json 1.0.52", + "sp-chain-spec", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sc-chain-spec-derive" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a11bc26f24e234d61e708f92339efe51ad3d299e0e11d368ee9b3bf94787076f" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "sc-cli" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd2a720cc286c964f011f94cd54eb32c9d612883e88b4df2a07902bd6d7822" +dependencies = [ + "ansi_term 0.12.1", + "app_dirs", + "atty", + "chrono", + "clap", + "derive_more 0.99.5", + "env_logger", + "fdlimit", + "futures 0.3.4", + "lazy_static", + "log", + "names", + "nix", + "parity-util-mem", + "regex", + "rpassword", + "sc-client-api", + "sc-informant", + "sc-network", + "sc-service", + "sc-telemetry", + "sc-tracing", + "serde_json 1.0.52", + "sp-blockchain", + "sp-core", + "sp-keyring", + "sp-panic-handler", + "sp-runtime", + "sp-state-machine", + "sp-utils", + "sp-version", + "structopt", + "substrate-prometheus-endpoint", + "time", + "tokio 0.2.20", +] + +[[package]] +name = "sc-client-api" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4242f40585bfd1375bbde27f169e2ecaaa40ef1b60b44294c454bc97d5048cdd" +dependencies = [ + "derive_more 0.99.5", + "fnv", + "futures 0.3.4", + "hash-db", + "hex-literal", + "kvdb", + "lazy_static", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "sc-executor", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-database", + "sp-externalities", + "sp-inherents", + "sp-keyring", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-trie", + "sp-utils", + "sp-version", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-client-db" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3395df025dfa8edf1be099a2ac941082b953707ea536cffeda5d3e51b23e896" +dependencies = [ + "blake2-rfc", + "hash-db", + "kvdb", + "kvdb-memorydb", + "kvdb-rocksdb", + "linked-hash-map", + "log", + "parity-db", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "sc-client-api", + "sc-executor", + "sc-state-db", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-database", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-consensus" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f7378c44bc005807c427fe3f342fb3a851ff2fe82289e73a10e794ab1a33eee" +dependencies = [ + "sc-client-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", +] + +[[package]] +name = "sc-consensus-babe" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092fc2604c71a2deb9464d4b9780d6a7238e379566e530b206b7a4557e299f9a" +dependencies = [ + "derive_more 0.99.5", + "fork-tree", + "futures 0.3.4", + "futures-timer 3.0.2", + "log", + "merlin", + "num-bigint", + "num-rational", + "num-traits 0.2.11", + "parity-scale-codec", + "parking_lot 0.10.2", + "pdqselect", + "rand 0.7.3", + "sc-client-api", + "sc-consensus-epochs", + "sc-consensus-slots", + "sc-consensus-uncles", + "sc-keystore", + "sc-telemetry", + "schnorrkel", + "serde", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-vrf", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-timestamp", + "sp-version", +] + +[[package]] +name = "sc-consensus-epochs" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a194e3025fe8bd0e54b126c1cf85a19ed186c9b325184dd34ee622e7d1a68ee1" +dependencies = [ + "fork-tree", + "parity-scale-codec", + "parking_lot 0.10.2", + "sc-client-api", + "sp-blockchain", + "sp-runtime", +] + +[[package]] +name = "sc-consensus-manual-seal" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e24894732dc4aa31546f2b8c329bf7caef143edbf7d4b50269b1581771237a" +dependencies = [ + "assert_matches", + "derive_more 0.99.5", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log", + "parking_lot 0.10.2", + "sc-client-api", + "sc-transaction-pool", + "serde", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-transaction-pool", +] + +[[package]] +name = "sc-consensus-pow" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fb7e3e5ee46d419a171d8b56efb60d210dcaf1911cdec984e2a2adefc9766f" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "log", + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-pow", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sc-consensus-slots" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d21cdecefdce1abe0fab714c2850f067093a2eed46422d748879a09e66aa2ecf" +dependencies = [ + "futures 0.3.4", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "sc-client-api", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "sc-consensus-uncles" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0445485b65ecf90d85caa7de51fa2297072050a687822a8f583bcae32fcc8d78" +dependencies = [ + "log", + "sc-client-api", + "sp-authorship", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", +] + +[[package]] +name = "sc-executor" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cba18b495c2959a9bfed031f4df4175dfebbbc827ff3524d6eeae05de1f4530" +dependencies = [ + "derive_more 0.99.5", + "lazy_static", + "libsecp256k1", + "log", + "parity-scale-codec", + "parity-wasm", + "parking_lot 0.10.2", + "sc-executor-common", + "sc-executor-wasmi", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-serializer", + "sp-trie", + "sp-version", + "sp-wasm-interface", + "wasmi", +] + +[[package]] +name = "sc-executor-common" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b92cabca9418211b63c407c939523672fae62051f0dd8088c3068ab3e883dae" +dependencies = [ + "derive_more 0.99.5", + "log", + "parity-scale-codec", + "parity-wasm", + "sp-allocator", + "sp-core", + "sp-runtime-interface", + "sp-serializer", + "sp-wasm-interface", + "wasmi", +] + +[[package]] +name = "sc-executor-wasmi" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8f35b44090ffdb0bbc4350dcf686ee649099ac7dc3ca0608d513018d4c84ae" +dependencies = [ + "log", + "parity-scale-codec", + "sc-executor-common", + "sp-allocator", + "sp-core", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmi", +] + +[[package]] +name = "sc-finality-grandpa" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a0e197ef12caf06b0d01d922dbe24d018e99a62d723da1df4a303efe9d86be" +dependencies = [ + "assert_matches", + "derive_more 0.99.5", + "finality-grandpa", + "fork-tree", + "futures 0.3.4", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "pin-project", + "rand 0.7.3", + "sc-block-builder", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-gossip", + "sc-telemetry", + "serde_json 1.0.52", + "sp-api", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-finality-grandpa", + "sp-finality-tracker", + "sp-inherents", + "sp-runtime", + "sp-utils", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-informant" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7560120ce244b775d755e8550f894b6b57bed6bbb20cb12164e2ceb25e1fc9c6" +dependencies = [ + "ansi_term 0.12.1", + "futures 0.3.4", + "log", + "parity-util-mem", + "sc-client-api", + "sc-network", + "sc-service", + "sp-blockchain", + "sp-runtime", + "wasm-timer", +] + +[[package]] +name = "sc-keystore" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e44f10a561c72a7fa604cb1a356564ef496609b8306a330b4185840231fe9d" +dependencies = [ + "derive_more 0.99.5", + "hex", + "parking_lot 0.10.2", + "rand 0.7.3", + "serde_json 1.0.52", + "sp-application-crypto", + "sp-core", + "subtle 2.2.2", +] + +[[package]] +name = "sc-network" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef69b5eb4ed887f9b4a02227f922412d814085023f38bc395ad194713f73749" +dependencies = [ + "bitflags", + "bytes 0.5.4", + "derive_more 0.99.5", + "either", + "erased-serde", + "fnv", + "fork-tree", + "futures 0.3.4", + "futures-timer 3.0.2", + "futures_codec", + "hex", + "ip_network", + "libp2p", + "linked-hash-map", + "linked_hash_set", + "log", + "lru", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.10.2", + "pin-project", + "prost", + "prost-build", + "rand 0.7.3", + "sc-block-builder", + "sc-client-api", + "sc-peerset", + "serde", + "serde_json 1.0.52", + "slog", + "slog_derive", + "smallvec 0.6.13", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-utils", + "substrate-prometheus-endpoint", + "thiserror", + "unsigned-varint", + "void", + "wasm-timer", + "zeroize", +] + +[[package]] +name = "sc-network-gossip" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4002e0430151434a6039e3187b84267cf89e04214de6f677d9ddd89e6a31dafd" +dependencies = [ + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log", + "lru", + "sc-network", + "sp-runtime", + "sp-utils", + "wasm-timer", +] + +[[package]] +name = "sc-offchain" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31712efd8cb5ff149885bc19c752555c696e95d27c8a075d1cc58ebb5d6cc957" +dependencies = [ + "bytes 0.5.4", + "fnv", + "futures 0.3.4", + "futures-timer 3.0.2", + "hyper 0.13.5", + "hyper-rustls", + "log", + "num_cpus", + "parity-scale-codec", + "parking_lot 0.10.2", + "rand 0.7.3", + "sc-client-api", + "sc-keystore", + "sc-network", + "sp-api", + "sp-core", + "sp-offchain", + "sp-runtime", + "sp-utils", + "threadpool", +] + +[[package]] +name = "sc-peerset" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c6d53c1c8de2f896ac3dec705285a216ea50b9b387a631362ae2635f6b6fe74" +dependencies = [ + "futures 0.3.4", + "libp2p", + "log", + "serde_json 1.0.52", + "sp-utils", + "wasm-timer", +] + +[[package]] +name = "sc-rpc" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02f88a10ad3271bc0da9e70d30fcfa182f33226b5e5e9af1b0e0dbeaab032bb" +dependencies = [ + "futures 0.3.4", + "hash-db", + "jsonrpc-core", + "jsonrpc-pubsub", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "sc-block-builder", + "sc-client-api", + "sc-executor", + "sc-keystore", + "sc-rpc-api", + "serde_json 1.0.52", + "sp-api", + "sp-blockchain", + "sp-chain-spec", + "sp-core", + "sp-offchain", + "sp-rpc", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-transaction-pool", + "sp-utils", + "sp-version", +] + +[[package]] +name = "sc-rpc-api" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27aa7d70aec2be0967110b5df9a11ac3aa76fe4c8576455c266d3135d8fe63a" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "serde_json 1.0.52", + "sp-chain-spec", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-transaction-pool", + "sp-version", +] + +[[package]] +name = "sc-rpc-server" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b5547f9bb330a6d4273f471b44f8f2b12791abb9cb8557135f372075c42372" +dependencies = [ + "jsonrpc-core", + "jsonrpc-http-server", + "jsonrpc-pubsub", + "jsonrpc-ws-server", + "log", + "serde", + "serde_json 1.0.52", + "sp-runtime", +] + +[[package]] +name = "sc-service" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361410fc964e1cc77435f4c3bd1c724b39ad518bdf145c40f7c80701782e6e78" +dependencies = [ + "derive_more 0.99.5", + "exit-future", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "hash-db", + "lazy_static", + "log", + "netstat2", + "parity-multiaddr 0.7.3", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "pin-project", + "procfs", + "rand 0.7.3", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-client-db", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-offchain", + "sc-rpc", + "sc-rpc-server", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "serde", + "serde_json 1.0.52", + "slog", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-transaction-pool", + "sp-trie", + "sp-utils", + "sp-version", + "substrate-prometheus-endpoint", + "sysinfo", + "tracing", + "wasm-timer", +] + +[[package]] +name = "sc-state-db" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f18e23f3d774df943bbd8a9fbe90140263de6dcae46aabb702a354198a7e3b4" +dependencies = [ + "log", + "parity-scale-codec", + "parity-util-mem", + "parity-util-mem-derive", + "parking_lot 0.10.2", + "sc-client-api", + "sp-core", +] + +[[package]] +name = "sc-telemetry" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9db676096e46d39083d9cccb62437234b515a085d77488a23b24443b6182ad" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log", + "parking_lot 0.10.2", + "pin-project", + "rand 0.7.3", + "serde", + "slog", + "slog-json", + "slog-scope", + "take_mut", + "void", + "wasm-timer", +] + +[[package]] +name = "sc-tracing" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3da8fdeb53322e32e8576c62170cbeea78a0417238b6bd510f7584a6e411fb" +dependencies = [ + "erased-serde", + "log", + "parking_lot 0.10.2", + "sc-telemetry", + "serde", + "serde_json 1.0.52", + "slog", + "tracing-core", +] + +[[package]] +name = "sc-transaction-graph" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48864c813861c919d5c167c11dce9875d74019d633384d66a3ae97ed7db17857" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "linked-hash-map", + "log", + "parity-util-mem", + "parking_lot 0.10.2", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-transaction-pool", + "sp-utils", + "wasm-timer", +] + +[[package]] +name = "sc-transaction-pool" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f59734238f19b1d8c3dd1fa0afa9569ee438ae0296a83417c5c9bdd0c6f2d24" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "futures-diagnose", + "intervalier", + "log", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "sc-client-api", + "sc-transaction-graph", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-tracing", + "sp-transaction-pool", + "sp-utils", + "substrate-prometheus-endpoint", + "wasm-timer", +] + +[[package]] +name = "schannel" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "039c25b130bd8c1321ee2d7de7fde2659fa9c2744e4bb29711cfc852ea53cd19" +dependencies = [ + "lazy_static", + "winapi 0.3.8", +] + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "curve25519-dalek", + "getrandom", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2", + "subtle 2.2.2", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sct" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" + +[[package]] +name = "serde" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "serde_json" +version = "1.0.44" +source = "git+https://github.com/Xanewok/json?branch=no-std#7954c3a363cf78bde5bbf2e875a222ff9ccafed4" +dependencies = [ + "alt_serde", + "itoa", + "ryu", +] + +[[package]] +name = "serde_json" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" + +[[package]] +name = "sha2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer", + "byte-tools", + "digest", + "keccak", + "opaque-debug", +] + +[[package]] +name = "shell32-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "signal-hook-registry" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +dependencies = [ + "arc-swap", + "libc", +] + +[[package]] +name = "simple-event" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "simple-map" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "single-value" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "slog" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" +dependencies = [ + "erased-serde", +] + +[[package]] +name = "slog-json" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" +dependencies = [ + "chrono", + "erased-serde", + "serde", + "serde_json 1.0.52", + "slog", +] + +[[package]] +name = "slog-scope" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" +dependencies = [ + "arc-swap", + "lazy_static", + "slog", +] + +[[package]] +name = "slog_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "smallvec" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +dependencies = [ + "maybe-uninit", +] + +[[package]] +name = "smallvec" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" + +[[package]] +name = "snow" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" +dependencies = [ + "arrayref", + "blake2-rfc", + "chacha20-poly1305-aead", + "rand 0.7.3", + "rand_core 0.5.1", + "ring", + "rustc_version", + "sha2", + "subtle 2.2.2", + "x25519-dalek", +] + +[[package]] +name = "soketto" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b" +dependencies = [ + "base64", + "bytes 0.5.4", + "flate2", + "futures 0.3.4", + "http 0.2.1", + "httparse", + "log", + "rand 0.7.3", + "sha1", + "smallvec 1.4.0", + "static_assertions", + "thiserror", +] + +[[package]] +name = "sp-allocator" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdb45d1695a4b2004ce17681387bfbeb7ef9ae370c7903de9333f7bf905fbb9" +dependencies = [ + "derive_more 0.99.5", + "log", + "sp-core", + "sp-std", + "sp-wasm-interface", +] + +[[package]] +name = "sp-api" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e34c770de3ada5729a094ed0e594a94fe03f4d6bfffd5d27f40e00778d20998" +dependencies = [ + "hash-db", + "parity-scale-codec", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-version", +] + +[[package]] +name = "sp-api-proc-macro" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53f6276132fc841a61e38d6eaa3a89acd10ccec1d8167cedf453c2fff0513b93" +dependencies = [ + "blake2-rfc", + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "sp-application-crypto" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2997e5072ef4fa6ac54658b0e79149095ececd89e3bd693f8fed90ad69862e8" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "sp-arithmetic" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ee0e06a6d46a3d6fb8706dfa2ca593b60a06c248fbd5173ab56070c209612e" +dependencies = [ + "integer-sqrt", + "num-traits 0.2.11", + "parity-scale-codec", + "primitive-types", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-authorship" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1787b702a5b1fbb2b172f94d8bc2aaa2f2eed21e0ff35a06d515d75425add4dd" +dependencies = [ + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-block-builder" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4b654cf89dd73ad85848b2c7e60812f231ba2785aeec9c4708a434323fecf9a" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-blockchain" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b9c16247ff5ddd2b5aae78c51ffb49eddd804492be6182442281afff391e1e" +dependencies = [ + "derive_more 0.99.5", + "log", + "lru", + "parity-scale-codec", + "parking_lot 0.10.2", + "sp-block-builder", + "sp-consensus", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "sp-chain-spec" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2997456fa5b605fec06c5f2267a0e7cb44708b210548b1a557ce89b07bc04211" +dependencies = [ + "serde", + "serde_json 1.0.52", +] + +[[package]] +name = "sp-consensus" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff4f5824b4d69bbe0db4e67018abadf76acad541b12b58b6880f67fdd6ecc53" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-utils", + "sp-version", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a8789e70d9c821572a8365b688200dec01442d3086130ce701f101485cf5fa" +dependencies = [ + "merlin", + "parity-scale-codec", + "sp-api", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-vrf", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-pow" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ef4315aa2b48dde5d6130390e7eaafb48640233e32a880abfb565c6adc5cae" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-consensus-vrf" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae850e7f455f312155d28623f2d910a37861d639bf8b3d16222823322c88c02a" +dependencies = [ + "parity-scale-codec", + "schnorrkel", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-core" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4d4e7309949c9ce65a0347b20bbc89cc09efee55b1918c3253392286dab0df9" +dependencies = [ + "base58", + "blake2-rfc", + "byteorder", + "ed25519-dalek", + "futures 0.3.4", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde 0.3.1", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits 0.2.11", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "primitive-types", + "rand 0.7.3", + "regex", + "schnorrkel", + "serde", + "sha2", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "substrate-bip39", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-database" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96e050dc3b7a9119e78254bdde9365a27d951a810f7afdcb58fc5799f8bddbb" +dependencies = [ + "kvdb", + "parking_lot 0.10.2", +] + +[[package]] +name = "sp-debug-derive" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c4cb00ba7694df96793cf024418e6a75d5f224716460961b5c9dbfa621c0e8" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "sp-externalities" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a826d5f8f0085804f5e7174885958611955a904ff184ae0ad289d6b83d8a3e" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-finality-grandpa" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91cc8d9e62f28d3dd90c3e4291f26147c5094f6f2587aeea4301bf3731d4a3c" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-api", + "sp-application-crypto", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-finality-tracker" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f050f19f1e07b63f61a872552fecf7239c75e77dc133a5f5ae00dac0e7b348d" +dependencies = [ + "parity-scale-codec", + "sp-inherents", + "sp-std", +] + +[[package]] +name = "sp-inherents" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8367b0e285f8c3ab00400a5f5b53ff0dba263005d2458fdc3e9652f824205f0b" +dependencies = [ + "derive_more 0.99.5", + "parity-scale-codec", + "parking_lot 0.10.2", + "sp-core", + "sp-std", +] + +[[package]] +name = "sp-io" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede88516c08b2070ad2b49f5e4ebff896910b11c0a63184eb5c20b0b604b8655" +dependencies = [ + "futures 0.3.4", + "hash-db", + "libsecp256k1", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "sp-core", + "sp-externalities", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-wasm-interface", +] + +[[package]] +name = "sp-keyring" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509e39a8b8c8c6532fcbea3140e3f92ec6712ee028bdc968f4ccb90181205c24" +dependencies = [ + "lazy_static", + "sp-core", + "sp-runtime", + "strum", +] + +[[package]] +name = "sp-offchain" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63092c0ecd8fc90971a14a169f62337b78d885873e55dee87f33fe5f76d6591" +dependencies = [ + "sp-api", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sp-panic-handler" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acec634cd613519673edad420f56d5bbd087da9923c05aa66708882ee9676d20" +dependencies = [ + "backtrace", + "log", +] + +[[package]] +name = "sp-rpc" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd0ae1f6a934590356ce844ce9d0ef71993cab223f6c9371c2fdea98b23c334" +dependencies = [ + "serde", + "sp-core", +] + +[[package]] +name = "sp-runtime" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d37f6a2e111dd82dd194fa9ef77ba49b17e70162afc237f99e7c5dc6f95834f" +dependencies = [ + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-std", +] + +[[package]] +name = "sp-runtime-interface" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc743ea280556cbaf82203ec63ade39f4167402cb571aaf012c6c43f092ccf33" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be673dffcf1084e6a0da85712866afde7bbdefa152e9e3e5dbf4a04f1994a673" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "sp-serializer" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747ed260860bde3b6b098caf3091905b1fcea95135fb73fb7fded7a7662ae622" +dependencies = [ + "serde", + "serde_json 1.0.52", +] + +[[package]] +name = "sp-session" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd4f193d095bb211ea75c14d924b97e03163e6807185b2ab45ff49a51d259fa8" +dependencies = [ + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-staking" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87f659f9742c456a35382af6ed58160cd1f23e0ddb51c38180b2cf80d5ac8a1" +dependencies = [ + "parity-scale-codec", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-state-machine" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd342d0b85891ea0e69c34483651df4e05420989b6fa74eb1982994118482985" +dependencies = [ + "hash-db", + "log", + "num-traits 0.2.11", + "parity-scale-codec", + "parking_lot 0.10.2", + "rand 0.7.3", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", + "trie-db", + "trie-root 0.16.0", +] + +[[package]] +name = "sp-std" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e32241a20350ba20f445c73fec53b4c904559756b922ca2c3dda87ab2c1be9e" + +[[package]] +name = "sp-storage" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645dcf4a75d63a5494eabdc076d19a834c3cc46df65d84506fc40e67bd0bdd40" +dependencies = [ + "impl-serde 0.2.3", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-timestamp" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f981570875b33311c4ae95a721511951689d4d89e2f58bd0933dcbfe67230364" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", + "wasm-timer", +] + +[[package]] +name = "sp-tracing" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11a4caabab12ba64d7e5d3ff6d2d5a698425227eb8c697f8b3dcac67813a192b" +dependencies = [ + "tracing", +] + +[[package]] +name = "sp-transaction-pool" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008ceb7db9fe134ced1e67226edb36db783e5f9434ca3544efcc94d8db9e1c99" +dependencies = [ + "derive_more 0.99.5", + "futures 0.3.4", + "log", + "parity-scale-codec", + "serde", + "sp-api", + "sp-runtime", + "sp-utils", +] + +[[package]] +name = "sp-trie" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1620f438771be44e7aee5445c348623c40bc32a15c875689ac9f2e3aecdc3aa3" +dependencies = [ + "hash-db", + "memory-db", + "parity-scale-codec", + "sp-core", + "sp-std", + "trie-db", + "trie-root 0.16.0", +] + +[[package]] +name = "sp-utils" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3aa5acc361bb7ccab3940584d9c032a587b8b4414cd949a92a7b391e6f39384" +dependencies = [ + "futures 0.3.4", + "futures-core", + "lazy_static", + "prometheus", +] + +[[package]] +name = "sp-version" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d032c1e5c3b484c0e88486a1a6e9bfb736cbe6cb68b074cf0436b2935d38372a" +dependencies = [ + "impl-serde 0.2.3", + "parity-scale-codec", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-wasm-interface" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0154beac23726c550f7fd68b9aad2fd97369221d5aa4b4e18d937e2eddc4246b" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std", + "wasmi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "statrs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8" +dependencies = [ + "rand 0.5.6", +] + +[[package]] +name = "storage-cache" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "string" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" +dependencies = [ + "bytes 0.4.12", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "struct-storage" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "structopt" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863246aaf5ddd0d6928dfeb1a9ca65f505599e4e1b399935ef7e75107516b4ef" +dependencies = [ + "clap", + "lazy_static", + "structopt-derive", +] + +[[package]] +name = "structopt-derive" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d239ca4b13aee7a2142e6795cbd69e457665ff8037aed33b3effdc430d2f927a" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "strum" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" +dependencies = [ + "heck", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "substrate-bip39" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb" +dependencies = [ + "hmac", + "pbkdf2", + "schnorrkel", + "sha2", +] + +[[package]] +name = "substrate-build-script-utils" +version = "2.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b350e0eacbf0f7a5d6394417e3371e6f29b412ce95b4df02bab46db16d66a5" +dependencies = [ + "platforms", +] + +[[package]] +name = "substrate-fixed" +version = "0.5.4" +source = "git+https://github.com/encointer/substrate-fixed.git?tag=v0.5.4+sub_v0.1#2c52170fa02507dc5b52c516061302670860869a" +dependencies = [ + "parity-scale-codec", + "typenum", +] + +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.8.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d0d8bbb7ede14a1d0212218945b83606e358878eac510685819d5c6394bcad9" +dependencies = [ + "async-std", + "derive_more 0.99.5", + "futures-util", + "hyper 0.13.5", + "log", + "prometheus", + "tokio 0.2.20", +] + +[[package]] +name = "substrate-wasm-builder-runner" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a" + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" + +[[package]] +name = "sum-storage" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sum-storage-rpc" +version = "2.0.0" +dependencies = [ + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-rpc", + "sp-runtime", + "sum-storage-runtime-api", +] + +[[package]] +name = "sum-storage-runtime-api" +version = "2.0.0" +dependencies = [ + "serde_json 1.0.52", + "sp-api", +] + +[[package]] +name = "super-runtime" +version = "2.0.0-alpha.7" +dependencies = [ + "adding-machine", + "basic-token", + "charity", + "check-membership", + "compounding-interest", + "constant-config", + "default-instance", + "double-map", + "execution-schedule", + "fixed-point", + "frame-executive", + "frame-support", + "frame-system", + "generic-event", + "hello-substrate", + "last-caller", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "randomness", + "ringbuffer-queue", + "safe-mix", + "serde", + "simple-event", + "simple-map", + "single-value", + "sp-api", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "storage-cache", + "struct-storage", + "substrate-wasm-builder-runner", + "vec-set", +] + +[[package]] +name = "syn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +dependencies = [ + "quote 0.3.15", + "synom", + "unicode-xid 0.0.4", +] + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8e5aa70697bb26ee62214ae3288465ecec0000f05182f039b477001f08f5ae7" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "unicode-xid 0.2.0", +] + +[[package]] +name = "syn-mid" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "synom" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +dependencies = [ + "unicode-xid 0.0.4", +] + +[[package]] +name = "synstructure" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "unicode-xid 0.2.0", +] + +[[package]] +name = "sysinfo" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac193374347e7c263c5f547524f36ff8ec6702d56c8799c8331d26dffe8c1e" +dependencies = [ + "cfg-if", + "doc-comment", + "libc", + "ntapi", + "once_cell", + "rayon", + "winapi 0.3.8", +] + +[[package]] +name = "take_mut" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" + +[[package]] +name = "tempfile" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +dependencies = [ + "cfg-if", + "libc", + "rand 0.7.3", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.8", +] + +[[package]] +name = "termcolor" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "threadpool" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8dae184447c15d5a6916d973c642aec485105a13cd238192a6927ae3e077d66" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +dependencies = [ + "libc", + "winapi 0.3.8", +] + +[[package]] +name = "tiny-bip39" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +dependencies = [ + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2", + "unicode-normalization", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tokio" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "mio", + "num_cpus", + "tokio-codec", + "tokio-current-thread", + "tokio-executor 0.1.10", + "tokio-fs", + "tokio-io", + "tokio-reactor", + "tokio-sync 0.1.8", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "tokio-udp", + "tokio-uds", +] + +[[package]] +name = "tokio" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c1d570eb1a36f0345a5ce9c6c6e665b70b73d11236912c0b477616aeec47b1" +dependencies = [ + "bytes 0.5.4", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "libc", + "memchr", + "mio", + "mio-uds", + "num_cpus", + "pin-project-lite", + "signal-hook-registry", + "slab", + "winapi 0.3.8", +] + +[[package]] +name = "tokio-buf" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" +dependencies = [ + "bytes 0.4.12", + "either", + "futures 0.1.29", +] + +[[package]] +name = "tokio-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "tokio-io", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +dependencies = [ + "futures 0.1.29", + "tokio-executor 0.1.10", +] + +[[package]] +name = "tokio-executor" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +dependencies = [ + "crossbeam-utils", + "futures 0.1.29", +] + +[[package]] +name = "tokio-executor" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" +dependencies = [ + "futures-util-preview", + "lazy_static", + "tokio-sync 0.2.0-alpha.6", +] + +[[package]] +name = "tokio-fs" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +dependencies = [ + "futures 0.1.29", + "tokio-io", + "tokio-threadpool", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "log", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +dependencies = [ + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log", + "mio", + "num_cpus", + "parking_lot 0.9.0", + "slab", + "tokio-executor 0.1.10", + "tokio-io", + "tokio-sync 0.1.8", +] + +[[package]] +name = "tokio-rustls" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" +dependencies = [ + "futures-core", + "rustls", + "tokio 0.2.20", + "webpki", +] + +[[package]] +name = "tokio-sync" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +dependencies = [ + "fnv", + "futures 0.1.29", +] + +[[package]] +name = "tokio-sync" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" +dependencies = [ + "fnv", + "futures-core-preview", + "futures-util-preview", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "iovec", + "mio", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +dependencies = [ + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor 0.1.10", +] + +[[package]] +name = "tokio-timer" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +dependencies = [ + "crossbeam-utils", + "futures 0.1.29", + "slab", + "tokio-executor 0.1.10", +] + +[[package]] +name = "tokio-udp" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "log", + "mio", + "tokio-codec", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-uds" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.29", + "iovec", + "libc", + "log", + "mio", + "mio-uds", + "tokio-codec", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +dependencies = [ + "bytes 0.5.4", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio 0.2.20", +] + +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde", +] + +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" + +[[package]] +name = "tracing" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1721cc8cf7d770cc4257872507180f35a4797272f5962f24c806af9e7faf52ab" +dependencies = [ + "cfg-if", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b" +dependencies = [ + "quote 1.0.4", + "syn 1.0.19", +] + +[[package]] +name = "tracing-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "trie-db" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc309f34008563989045a4c4dbcc5770467f3a3785ee80a9b5cc0d83362475f" +dependencies = [ + "hash-db", + "hashbrown", + "log", + "rustc-hex", + "smallvec 1.4.0", +] + +[[package]] +name = "trie-root" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b779f7c1c8fe9276365d9d5be5c4b5adeacf545117bb3f64c974305789c5c0b" +dependencies = [ + "hash-db", +] + +[[package]] +name = "trie-root" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" +dependencies = [ + "hash-db", +] + +[[package]] +name = "try-lock" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" + +[[package]] +name = "twox-hash" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56" +dependencies = [ + "rand 0.7.3", +] + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "uint" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681" +dependencies = [ + "byteorder", + "crunchy", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +dependencies = [ + "smallvec 1.4.0", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + +[[package]] +name = "unicode-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" + +[[package]] +name = "unicode-xid" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "unsigned-varint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67332660eb59a6f1eb24ff1220c9e8d01738a8503c6002e30bcfe4bd9f2b4a9" +dependencies = [ + "bytes 0.5.4", + "futures-io", + "futures-util", + "futures_codec", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +dependencies = [ + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", +] + +[[package]] +name = "url" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +dependencies = [ + "idna 0.2.0", + "matches", + "percent-encoding 2.1.0", +] + +[[package]] +name = "vcpkg" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" + +[[package]] +name = "vec-set" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "vergen" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ce50d8996df1f85af15f2cd8d33daae6e479575123ef4314a51a70a230739cb" +dependencies = [ + "bitflags", + "chrono", +] + +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "want" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +dependencies = [ + "futures 0.1.29", + "log", + "try-lock", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasm-bindgen" +version = "0.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a369c5e1dfb7569e14d62af4da642a3cbc2f9a3652fe586e26ac22222aa4b04" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776" +dependencies = [ + "quote 1.0.4", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" + +[[package]] +name = "wasm-timer" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" +dependencies = [ + "futures 0.3.4", + "js-sys", + "parking_lot 0.9.0", + "pin-utils", + "send_wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +dependencies = [ + "libc", + "memory_units", + "num-rational", + "num-traits 0.2.11", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "web-sys" +version = "0.3.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +dependencies = [ + "webpki", +] + +[[package]] +name = "weight-fee-runtime" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-executive", + "frame-support", + "frame-system", + "pallet-babe", + "pallet-balances", + "pallet-generic-asset", + "pallet-grandpa", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", + "weights", +] + +[[package]] +name = "weights" +version = "2.0.0-alpha.7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.8", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "ws" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" +dependencies = [ + "byteorder", + "bytes 0.4.12", + "httparse", + "log", + "mio", + "mio-extras", + "rand 0.7.3", + "sha-1", + "slab", + "url 2.1.1", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "x25519-dalek" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" +dependencies = [ + "curve25519-dalek", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + +[[package]] +name = "yamux" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84300bb493cc878f3638b981c62b4632ec1a5c52daaa3036651e8c106d3b55ea" +dependencies = [ + "futures 0.3.4", + "log", + "nohash-hasher", + "parking_lot 0.10.2", + "rand 0.7.3", + "static_assertions", +] + +[[package]] +name = "zeroize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" +dependencies = [ + "proc-macro2 1.0.12", + "quote 1.0.4", + "syn 1.0.19", + "synstructure", +] diff --git a/README.md b/README.md index ea6b372c6..e1099dceb 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,4 @@ The Substrate Recipes are [GPL 3.0 Licensed](LICENSE) It is open source and [ope ## Using Recipes in External Projects -The pallets and runtimes provided here are tested and ready to be used in other Substrate-based blockchains. The big caveat is that you must use the same upstream Substrate version throughout the project. The recipes currently use Substrate@`v2.0.0-alpha.6`. +The pallets and runtimes provided here are tested and ready to be used in other Substrate-based blockchains. The big caveat is that you must use the same upstream Substrate version throughout the project. The recipes currently use Substrate@`v2.0.0-alpha.7`. diff --git a/nodes/babe-grandpa-node/Cargo.toml b/nodes/babe-grandpa-node/Cargo.toml index eaee66547..8d742063c 100644 --- a/nodes/babe-grandpa-node/Cargo.toml +++ b/nodes/babe-grandpa-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babe-grandpa-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' @@ -23,24 +23,24 @@ tokio = "0.1.22" exit-future = "0.2.0" parking_lot = "0.9.0" trie-root = "0.15.2" -sp-io = '2.0.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client-api = '2.0.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-consensus-babe = '0.8.0-alpha.6' -sp-consensus-babe = '0.8.0-alpha.6' -sc-finality-grandpa = '0.8.0-alpha.6' -sp-finality-grandpa = '2.0.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' +sp-io = '2.0.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sc-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-consensus-babe = '0.8.0-alpha.7' +sp-consensus-babe = '0.8.0-alpha.7' +sc-finality-grandpa = '0.8.0-alpha.7' +sp-finality-grandpa = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' # This node only works with runtimes that can provide babe and grandpa authorities. # No other runtimes that come with the recipes provide these APIs, but the substrate demonstration @@ -50,12 +50,12 @@ runtime = { package = "babe-grandpa-runtime", path = "../../runtimes/babe-grandp # In theory the main Substrate node's runtime should work, but it is not published on crates.io # so a git dependency is necessary which leads to: # `perhaps two different versions of crate `sp_runtime` are being used?` -# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/", tag = "v2.0.0-alpha.6" } +# runtime = { package = "node-runtime", git = "https://github.com/paritytech/substrate/", tag = "v2.0.0-alpha.7" } [build-dependencies] vergen = "3.0.4" -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' [features] ocw = [] diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index 599b047d9..7c5d564d9 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -4,7 +4,7 @@ edition = '2018' homepage = 'https://substrate.dev/recipes' name = 'basic-pow' repository = 'https://github.com/substrate-developer-hub/recipes' -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" description = 'A Substrate node that demonstrates minimal proof of work consensus' license = "GPL-3.0-or-later" @@ -19,23 +19,22 @@ structopt = '0.3.8' parity-scale-codec = '1.3.0' sha3 = "0.8" rand = { version = "0.7", features = ["small_rng"] } -sc-consensus-pow = { version = '0.8.0-alpha.6' } -sp-consensus-pow = { version = '0.8.0-alpha.6' } -sc-client-api = { version = '2.0.0-alpha.6' } -sp-blockchain = { version = '2.0.0-alpha.6' } -sp-timestamp = '2.0.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-consensus-pow = { version = '0.8.0-alpha.7' } +sp-consensus-pow = { version = '0.8.0-alpha.7' } +sc-client-api = { version = '2.0.0-alpha.7' } +sp-blockchain = { version = '2.0.0-alpha.7' } +sp-timestamp = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- @@ -51,4 +50,4 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/nodes/kitchen-node/Cargo.toml b/nodes/kitchen-node/Cargo.toml index 2276a3c5a..72c4156b3 100644 --- a/nodes/kitchen-node/Cargo.toml +++ b/nodes/kitchen-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitchen-node" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" edition = "2018" authors = ['Joshy Orndorff', '4meta5', 'Jimmy Chu'] homepage = 'https://substrate.dev/recipes' @@ -23,22 +23,21 @@ tokio = "0.1.22" exit-future = "0.2.0" parking_lot = "0.9.0" trie-root = "0.15.2" -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal -sp-consensus = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-io = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-client-db = '0.8.0-alpha.7' # This became necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-io = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- @@ -59,7 +58,7 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = "3.0.4" -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' [features] ocw = [] diff --git a/nodes/manual-seal/Cargo.toml b/nodes/manual-seal/Cargo.toml index 5a4714847..f381b9a3a 100644 --- a/nodes/manual-seal/Cargo.toml +++ b/nodes/manual-seal/Cargo.toml @@ -5,7 +5,7 @@ edition = '2018' homepage = 'https://substrate.dev' name = 'manual-seal' repository = 'https://github.com/paritytech/substrate/' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' description = 'A Substrate-based node that uses the instant-seal and manual-seal consensus engines' license = "GPL-3.0-or-later" @@ -22,24 +22,23 @@ sha3 = "0.8" rand = { version = "0.7", features = ["small_rng"] } jsonrpc-core = "14.0.5" -sc-client-db = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-rpc = '2.0.0-alpha.6' -sc-client-api = '2.0.0-alpha.6' -sp-blockchain = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-client-db = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-rpc = '2.0.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sp-blockchain = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- @@ -57,4 +56,4 @@ runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/nodes/rpc-node/Cargo.toml b/nodes/rpc-node/Cargo.toml index c93c0e6c3..3b794d0b5 100644 --- a/nodes/rpc-node/Cargo.toml +++ b/nodes/rpc-node/Cargo.toml @@ -3,7 +3,7 @@ authors = ['Anonymous'] build = 'build.rs' edition = '2018' name = 'rpc-node' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' homepage = 'https://substrate.dev/recipes' repository = 'https://github.com/substrate-developer-hub/recipes' description = 'A Substrate node that demonstrates a custom RPC endpoint' @@ -23,27 +23,26 @@ structopt = "0.3.8" jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sc-rpc = { version = '2.0.0-alpha.6' } -sc-client-api = '2.0.0-alpha.6' -sc-client-db = '0.8.0-alpha.6' +sc-rpc = { version = '2.0.0-alpha.7' } +sc-client-api = '2.0.0-alpha.7' +sc-client-db = '0.8.0-alpha.7' sum-storage-rpc = { path = "../../pallets/sum-storage/rpc" } ctrlc = { features = ['termination'], version = '3.1.3' } futures01 = { package = 'futures', version = '0.1.29'} -sc-basic-authorship = '0.8.0-alpha.6' -sc-cli = '0.8.0-alpha.6' -sc-client = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' -sc-executor = '0.8.0-alpha.6' -sc-network = '0.8.0-alpha.6' -sc-service = '0.8.0-alpha.6' -sc-transaction-pool = '2.0.0-alpha.6' -sp-consensus = '0.8.0-alpha.6' -sp-core = '2.0.0-alpha.6' -sp-inherents = '2.0.0-alpha.6' -sp-io = '2.0.0-alpha.6' -sp-runtime = '2.0.0-alpha.6' -sp-timestamp = '2.0.0-alpha.6' -sp-transaction-pool = '2.0.0-alpha.6' +sc-basic-authorship = '0.8.0-alpha.7' +sc-cli = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' +sc-executor = '0.8.0-alpha.7' +sc-network = '0.8.0-alpha.7' +sc-service = '0.8.0-alpha.7' +sc-transaction-pool = '2.0.0-alpha.7' +sp-consensus = '0.8.0-alpha.7' +sp-core = '2.0.0-alpha.7' +sp-inherents = '2.0.0-alpha.7' +sp-io = '2.0.0-alpha.7' +sp-runtime = '2.0.0-alpha.7' +sp-timestamp = '2.0.0-alpha.7' +sp-transaction-pool = '2.0.0-alpha.7' # RPC Node only works with Runtime's that provide the sum-storage-runtime-api # That means it only works with the api-runtime @@ -51,4 +50,4 @@ runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } [build-dependencies] vergen = '3.0.4' -substrate-build-script-utils = '2.0.0-alpha.6' +substrate-build-script-utils = '2.0.0-alpha.7' diff --git a/pallets/adding-machine/Cargo.toml b/pallets/adding-machine/Cargo.toml index 2fd64e039..ab1d0bd6b 100644 --- a/pallets/adding-machine/Cargo.toml +++ b/pallets/adding-machine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "adding-machine" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5, Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/basic-token/Cargo.toml b/pallets/basic-token/Cargo.toml index 87838a081..dff8a420b 100644 --- a/pallets/basic-token/Cargo.toml +++ b/pallets/basic-token/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "basic-token" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,10 +15,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/charity/Cargo.toml b/pallets/charity/Cargo.toml index 7a8cf2124..09f5ebc9d 100644 --- a/pallets/charity/Cargo.toml +++ b/pallets/charity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "charity" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,35 +22,35 @@ parity-scale-codec = { version = "1.3.0", features = ["derive"], default-feature [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/check-membership/Cargo.toml b/pallets/check-membership/Cargo.toml index 484204e70..32a21835d 100644 --- a/pallets/check-membership/Cargo.toml +++ b/pallets/check-membership/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-membership" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -17,8 +17,8 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/child-trie/Cargo.toml b/pallets/child-trie/Cargo.toml index 7f26531d9..908eefdbb 100644 --- a/pallets/child-trie/Cargo.toml +++ b/pallets/child-trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "child-trie" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,28 +22,28 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.system] default_features = false package = 'frame-system' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.runtime-primitives] default_features = false package = 'sp-runtime' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.rstd] default_features = false package = 'sp-std' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.primitives] default_features = false package = 'sp-core' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/compounding-interest/Cargo.toml b/pallets/compounding-interest/Cargo.toml index 92b0a2872..dee20e87e 100644 --- a/pallets/compounding-interest/Cargo.toml +++ b/pallets/compounding-interest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "compounding-interest" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -28,34 +28,34 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-arithmetic] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/constant-config/Cargo.toml b/pallets/constant-config/Cargo.toml index a235a93ad..068e16aaf 100644 --- a/pallets/constant-config/Cargo.toml +++ b/pallets/constant-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "constant-config" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,24 +22,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/currency-imbalances/Cargo.toml b/pallets/currency-imbalances/Cargo.toml index dd14a2e9e..2c18dcb43 100644 --- a/pallets/currency-imbalances/Cargo.toml +++ b/pallets/currency-imbalances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "currency-imbalances" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,20 +21,20 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/default-instance/Cargo.toml b/pallets/default-instance/Cargo.toml index e4f1ec3dc..29e9b4ded 100644 --- a/pallets/default-instance/Cargo.toml +++ b/pallets/default-instance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "default-instance" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/double-map/Cargo.toml b/pallets/double-map/Cargo.toml index 1dac1dae8..efa2cb166 100644 --- a/pallets/double-map/Cargo.toml +++ b/pallets/double-map/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "double-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,29 +23,29 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/execution-schedule/Cargo.toml b/pallets/execution-schedule/Cargo.toml index 6fc6b9137..d1b8c01c1 100644 --- a/pallets/execution-schedule/Cargo.toml +++ b/pallets/execution-schedule/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "execution-schedule" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,24 +23,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies] rand = "0.7.2" -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/fixed-point/Cargo.toml b/pallets/fixed-point/Cargo.toml index e49bd97dd..cc13f7b69 100644 --- a/pallets/fixed-point/Cargo.toml +++ b/pallets/fixed-point/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fixed-point" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -28,34 +28,34 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-arithmetic] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/generic-event/Cargo.toml b/pallets/generic-event/Cargo.toml index b51099f23..1af85ed21 100644 --- a/pallets/generic-event/Cargo.toml +++ b/pallets/generic-event/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generic-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/hello-substrate/Cargo.toml b/pallets/hello-substrate/Cargo.toml index 0468f6604..fd92cc367 100644 --- a/pallets/hello-substrate/Cargo.toml +++ b/pallets/hello-substrate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hello-substrate" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["shawntabrizi"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,17 +16,17 @@ std = [ [dependencies] parity-scale-codec = { version = '1.3.0', features = ['derive'], default-features = false} -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/last-caller/Cargo.toml b/pallets/last-caller/Cargo.toml index 9331346fa..19381d4ba 100644 --- a/pallets/last-caller/Cargo.toml +++ b/pallets/last-caller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "last-caller" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/lockable-currency/Cargo.toml b/pallets/lockable-currency/Cargo.toml index adb78c996..146487bce 100644 --- a/pallets/lockable-currency/Cargo.toml +++ b/pallets/lockable-currency/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lockable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,25 +22,25 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/offchain-demo/Cargo.toml b/pallets/offchain-demo/Cargo.toml index bdc13d2fe..884f1edff 100644 --- a/pallets/offchain-demo/Cargo.toml +++ b/pallets/offchain-demo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "offchain-demo" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev/recipes/" @@ -17,12 +17,12 @@ alt_serde = { version = "1", default-features = false, features = ["derive"] } serde_json = { version = "1", default-features = false, git = "https://github.com/Xanewok/json", branch = "no-std", features = ["alloc"] } # Substrate dependencies -frame-support = { default-features = false, version = '2.0.0-alpha.6' } -frame-system = { default-features = false, version = '2.0.0-alpha.6' } -sp-core = { default-features = false, version = '2.0.0-alpha.6' } -sp-io = { default-features = false, version = '2.0.0-alpha.6' } -sp-runtime = { default-features = false, version = '2.0.0-alpha.6' } -sp-std = { default-features = false, version = '2.0.0-alpha.6' } +frame-support = { default-features = false, version = '2.0.0-alpha.7' } +frame-system = { default-features = false, version = '2.0.0-alpha.7' } +sp-core = { default-features = false, version = '2.0.0-alpha.7' } +sp-io = { default-features = false, version = '2.0.0-alpha.7' } +sp-runtime = { default-features = false, version = '2.0.0-alpha.7' } +sp-std = { default-features = false, version = '2.0.0-alpha.7' } [features] default = ['std'] diff --git a/pallets/offchain-demo/src/lib.rs b/pallets/offchain-demo/src/lib.rs index ceaa3b16f..580274fbf 100644 --- a/pallets/offchain-demo/src/lib.rs +++ b/pallets/offchain-demo/src/lib.rs @@ -221,7 +221,7 @@ impl Module { // If we are using a get-check-set access pattern, we likely want to use `mutate` to access // the storage in one go. // - // Ref: https://substrate.dev/rustdocs/v2.0.0-alpha.6/sp_runtime/offchain/storage/struct.StorageValueRef.html + // Ref: https://substrate.dev/rustdocs/v2.0.0-alpha.7/sp_runtime/offchain/storage/struct.StorageValueRef.html if let Some(Some(gh_info)) = s_info.get::() { // gh-info has already been fetched. Return early. debug::info!("cached gh-info: {:?}", gh_info); diff --git a/pallets/randomness/Cargo.toml b/pallets/randomness/Cargo.toml index e7198813e..3264ba6a8 100644 --- a/pallets/randomness/Cargo.toml +++ b/pallets/randomness/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "randomness" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,17 +10,17 @@ license = "GPL-3.0-or-later" parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } # Substrate pallet/frame dependencies -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } -sp-core = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-io = { version = '2.0.0-alpha.6' } -pallet-randomness-collective-flip = { version = '2.0.0-alpha.6' } -pallet-babe = { version = '2.0.0-alpha.6' } -pallet-timestamp = { version = '2.0.0-alpha.6' } +sp-io = { version = '2.0.0-alpha.7' } +pallet-randomness-collective-flip = { version = '2.0.0-alpha.7' } +pallet-babe = { version = '2.0.0-alpha.7' } +pallet-timestamp = { version = '2.0.0-alpha.7' } [features] default = ['std'] diff --git a/pallets/reservable-currency/Cargo.toml b/pallets/reservable-currency/Cargo.toml index cf8f89f81..86306d2fe 100644 --- a/pallets/reservable-currency/Cargo.toml +++ b/pallets/reservable-currency/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reservable-currency" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -22,15 +22,15 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false @@ -39,8 +39,8 @@ version = '2.0.0-alpha.5' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/ringbuffer-queue/Cargo.toml b/pallets/ringbuffer-queue/Cargo.toml index 1b64df42d..7036c1649 100644 --- a/pallets/ringbuffer-queue/Cargo.toml +++ b/pallets/ringbuffer-queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ringbuffer-queue" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["apopiak"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,11 +15,11 @@ std = [ [dependencies] codec = { package = 'parity-scale-codec', default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } -sp-std = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } +sp-std = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/simple-crowdfund/Cargo.toml b/pallets/simple-crowdfund/Cargo.toml index 680b18013..afe345245 100644 --- a/pallets/simple-crowdfund/Cargo.toml +++ b/pallets/simple-crowdfund/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-crowdfund" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -27,37 +27,37 @@ version = '1.3.0' default_features = false package = 'frame-support' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.system] default_features = false package = 'frame-system' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-storage] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.rstd] default_features = false package = 'sp-std' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/simple-event/Cargo.toml b/pallets/simple-event/Cargo.toml index b45ece06d..309453925 100644 --- a/pallets/simple-event/Cargo.toml +++ b/pallets/simple-event/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-event" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-support = { package = "frame-support", version = '2.0.0-alpha.6', default_features = false } -system = { package = "frame-system", version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = "frame-support", version = '2.0.0-alpha.7', default_features = false } +system = { package = "frame-system", version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/simple-map/Cargo.toml b/pallets/simple-map/Cargo.toml index 6965d9a2b..89fbe25a8 100644 --- a/pallets/simple-map/Cargo.toml +++ b/pallets/simple-map/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-map" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -15,10 +15,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { default_features = false, version = '2.0.0-alpha.6' } -frame-system = { default_features = false, version = '2.0.0-alpha.6' } +frame-support = { default_features = false, version = '2.0.0-alpha.7' } +frame-system = { default_features = false, version = '2.0.0-alpha.7' } [dev-dependencies] -sp-runtime = { default_features = false, version = '2.0.0-alpha.6' } -sp-core = { default_features = false, version = '2.0.0-alpha.6' } -sp-io = { default_features = false, version = '2.0.0-alpha.6' } +sp-runtime = { default_features = false, version = '2.0.0-alpha.7' } +sp-core = { default_features = false, version = '2.0.0-alpha.7' } +sp-io = { default_features = false, version = '2.0.0-alpha.7' } diff --git a/pallets/single-value/Cargo.toml b/pallets/single-value/Cargo.toml index 59ea6cf07..bde4eab7a 100644 --- a/pallets/single-value/Cargo.toml +++ b/pallets/single-value/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "single-value" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -16,10 +16,10 @@ std = [ [dependencies] parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } -frame-support = { version = '2.0.0-alpha.6', default_features = false } -frame-system = { version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { version = '2.0.0-alpha.7', default_features = false } +frame-system = { version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } diff --git a/pallets/storage-cache/Cargo.toml b/pallets/storage-cache/Cargo.toml index ee5803ae6..8f376c831 100644 --- a/pallets/storage-cache/Cargo.toml +++ b/pallets/storage-cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storage-cache" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,14 +10,14 @@ license = "GPL-3.0-or-later" parity-scale-codec = { default-features = false, features = ['derive'], version = '1.3.0' } # Substrate pallet/frame dependencies -frame-support = { package = 'frame-support', version = '2.0.0-alpha.6', default_features = false } -frame-system = { package = 'frame-system', version = '2.0.0-alpha.6', default_features = false } -sp-runtime = { version = '2.0.0-alpha.6', default_features = false } -sp-std = { version = '2.0.0-alpha.6', default_features = false } +frame-support = { package = 'frame-support', version = '2.0.0-alpha.7', default_features = false } +frame-system = { package = 'frame-system', version = '2.0.0-alpha.7', default_features = false } +sp-runtime = { version = '2.0.0-alpha.7', default_features = false } +sp-std = { version = '2.0.0-alpha.7', default_features = false } [dev-dependencies] -sp-core = { version = '2.0.0-alpha.6', default_features = false } -sp-io = { version = '2.0.0-alpha.6', default_features = false } +sp-core = { version = '2.0.0-alpha.7', default_features = false } +sp-io = { version = '2.0.0-alpha.7', default_features = false } [features] default = ['std'] diff --git a/pallets/struct-storage/Cargo.toml b/pallets/struct-storage/Cargo.toml index cdcfa0347..9b47e0eee 100644 --- a/pallets/struct-storage/Cargo.toml +++ b/pallets/struct-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "struct-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -23,31 +23,31 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.balances] default_features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.primitives] default_features = false package = 'sp-core' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/sum-storage/Cargo.toml b/pallets/sum-storage/Cargo.toml index acb17ce44..75e11ac54 100644 --- a/pallets/sum-storage/Cargo.toml +++ b/pallets/sum-storage/Cargo.toml @@ -1,21 +1,21 @@ [package] name = "sum-storage" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-std = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -frame-support = { version = '2.0.0-alpha.6', default_features = false} -frame-system = { version = '2.0.0-alpha.6', default_features = false} +sp-std = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +frame-support = { version = '2.0.0-alpha.7', default_features = false} +frame-system = { version = '2.0.0-alpha.7', default_features = false} [dev-dependencies] -sp-io = { version = '2.0.0-alpha.6', default_features = false} -sp-core = { version = '2.0.0-alpha.6', default_features = false} +sp-io = { version = '2.0.0-alpha.7', default_features = false} +sp-core = { version = '2.0.0-alpha.7', default_features = false} [features] default = ["std"] diff --git a/pallets/sum-storage/rpc/Cargo.toml b/pallets/sum-storage/rpc/Cargo.toml index c114084a8..eba01f405 100644 --- a/pallets/sum-storage/rpc/Cargo.toml +++ b/pallets/sum-storage/rpc/Cargo.toml @@ -12,10 +12,10 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" serde = { version = "1.0.101", features = ["derive"], optional = true } -sp-rpc = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -sp-blockchain = { version = '2.0.0-alpha.6', default_features = false} -sp-api = { version = '2.0.0-alpha.6', default_features = false } +sp-rpc = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +sp-blockchain = { version = '2.0.0-alpha.7', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false } sum-storage-runtime-api = { version = "2.0.0", path = "../runtime-api", default_features = false } diff --git a/pallets/sum-storage/runtime-api/Cargo.toml b/pallets/sum-storage/runtime-api/Cargo.toml index a3f475735..7e5c00ed4 100644 --- a/pallets/sum-storage/runtime-api/Cargo.toml +++ b/pallets/sum-storage/runtime-api/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] -sp-api = { version = '2.0.0-alpha.6', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false} [dev-dependencies] serde_json = "1.0.41" diff --git a/pallets/vec-set/Cargo.toml b/pallets/vec-set/Cargo.toml index e49c6f373..166c6d9cf 100644 --- a/pallets/vec-set/Cargo.toml +++ b/pallets/vec-set/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vec-set" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["4meta5"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,24 +21,24 @@ version = '1.3.0' [dependencies.frame-support] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-std] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/pallets/weights/Cargo.toml b/pallets/weights/Cargo.toml index 982a15588..34bee1e04 100644 --- a/pallets/weights/Cargo.toml +++ b/pallets/weights/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "weights" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -21,16 +21,16 @@ version = '1.3.0' [dependencies.frame-support] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.frame-system] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sp-runtime] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dev-dependencies.sp-core] default-features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' diff --git a/runtimes/api-runtime/Cargo.toml b/runtimes/api-runtime/Cargo.toml index 06b02a88b..2fa269a3c 100644 --- a/runtimes/api-runtime/Cargo.toml +++ b/runtimes/api-runtime/Cargo.toml @@ -1,35 +1,35 @@ [package] name = "api-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" [dependencies] -balances = { package = "pallet-balances", version = '2.0.0-alpha.6', default_features = false} -frame-support = { version = '2.0.0-alpha.6', default_features = false} -indices = { package = "pallet-indices", version = '2.0.0-alpha.6', default_features = false} -sudo = { package = "pallet-sudo", version = '2.0.0-alpha.6', default_features = false} -frame-system = { version = '2.0.0-alpha.6', default_features = false} -timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.6', default_features = false} -transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.6', default_features = false} -randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.6', default_features = false} +balances = { package = "pallet-balances", version = '2.0.0-alpha.7', default_features = false} +frame-support = { version = '2.0.0-alpha.7', default_features = false} +indices = { package = "pallet-indices", version = '2.0.0-alpha.7', default_features = false} +sudo = { package = "pallet-sudo", version = '2.0.0-alpha.7', default_features = false} +frame-system = { version = '2.0.0-alpha.7', default_features = false} +timestamp = { package = "pallet-timestamp", version = '2.0.0-alpha.7', default_features = false} +transaction-payment = { package = "pallet-transaction-payment", version = '2.0.0-alpha.7', default_features = false} +randomness-collective-flip = { package = "pallet-randomness-collective-flip", version = '2.0.0-alpha.7', default_features = false} parity-scale-codec = { version = "1.3.0", default-features = false, features = ["derive"] } -frame-executive = { version = '2.0.0-alpha.6', default_features = false} +frame-executive = { version = '2.0.0-alpha.7', default_features = false} safe-mix = { version = "1.0.0", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = '2.0.0-alpha.6', default_features = false} -sp-block-builder = { version = '2.0.0-alpha.6', default_features = false} -sp-core = { version = '2.0.0-alpha.6', default_features = false} -sp-inherents = { version = '2.0.0-alpha.6', default_features = false} -sp-io = { version = '2.0.0-alpha.6', default_features = false} -sp-offchain = { version = '2.0.0-alpha.6', default_features = false} -sp-runtime = { version = '2.0.0-alpha.6', default_features = false} -sp-session = { version = '2.0.0-alpha.6', default_features = false} -sp-std = { version = '2.0.0-alpha.6', default_features = false} -sp-transaction-pool = { version = '2.0.0-alpha.6', default_features = false} -sp-version = { version = '2.0.0-alpha.6', default_features = false} +sp-api = { version = '2.0.0-alpha.7', default_features = false} +sp-block-builder = { version = '2.0.0-alpha.7', default_features = false} +sp-core = { version = '2.0.0-alpha.7', default_features = false} +sp-inherents = { version = '2.0.0-alpha.7', default_features = false} +sp-io = { version = '2.0.0-alpha.7', default_features = false} +sp-offchain = { version = '2.0.0-alpha.7', default_features = false} +sp-runtime = { version = '2.0.0-alpha.7', default_features = false} +sp-session = { version = '2.0.0-alpha.7', default_features = false} +sp-std = { version = '2.0.0-alpha.7', default_features = false} +sp-transaction-pool = { version = '2.0.0-alpha.7', default_features = false} +sp-version = { version = '2.0.0-alpha.7', default_features = false} sum-storage = { default-features = false, path = "../../pallets/sum-storage" } sum-storage-runtime-api = { default-features = false, path = "../../pallets/sum-storage/runtime-api" } diff --git a/runtimes/babe-grandpa-runtime/Cargo.toml b/runtimes/babe-grandpa-runtime/Cargo.toml index f19af4d27..a191b5ea8 100644 --- a/runtimes/babe-grandpa-runtime/Cargo.toml +++ b/runtimes/babe-grandpa-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babe-grandpa-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -11,34 +11,34 @@ parity-scale-codec = { version = "1.3.0", default-features = false, features = [ serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false } # Substrate Pallets -babe = { package = 'pallet-babe', version = '2.0.0-alpha.6', default_features = false} -balances = { package = 'pallet-balances', version = '2.0.0-alpha.6', default-features = false } -grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.6', default-features = false } -randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.6', default-features = false } -sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.6', default-features = false } -transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.6', default-features = false } -timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.6', default-features = false } +babe = { package = 'pallet-babe', version = '2.0.0-alpha.7', default_features = false} +balances = { package = 'pallet-balances', version = '2.0.0-alpha.7', default-features = false } +grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.7', default-features = false } +randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.7', default-features = false } +sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.7', default-features = false } +transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.7', default-features = false } +timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets #TODO Maybe include Gautam's Validator Set allet here # Other Substrate dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [build-dependencies] diff --git a/runtimes/ocw-runtime/Cargo.toml b/runtimes/ocw-runtime/Cargo.toml index 8508322bd..f486c5d1f 100644 --- a/runtimes/ocw-runtime/Cargo.toml +++ b/runtimes/ocw-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ocw-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -11,26 +11,26 @@ safe-mix = { version = "1.0", default-features = false } parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } # Substrate pallets & dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -pallet-balances = { version = '2.0.0-alpha.6', default-features = false } -pallet-indices = { version = '2.0.0-alpha.6', default-features = false } -pallet-randomness-collective-flip = { version = '2.0.0-alpha.6', default-features = false } -pallet-sudo = { version = '2.0.0-alpha.6', default-features = false } -pallet-timestamp = { version = '2.0.0-alpha.6', default-features = false } -pallet-transaction-payment = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +pallet-balances = { version = '2.0.0-alpha.7', default-features = false } +pallet-indices = { version = '2.0.0-alpha.7', default-features = false } +pallet-randomness-collective-flip = { version = '2.0.0-alpha.7', default-features = false } +pallet-sudo = { version = '2.0.0-alpha.7', default-features = false } +pallet-timestamp = { version = '2.0.0-alpha.7', default-features = false } +pallet-transaction-payment = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets offchain-demo = { path = "../../pallets/offchain-demo", default-features = false } diff --git a/runtimes/super-runtime/Cargo.toml b/runtimes/super-runtime/Cargo.toml index 1527e1ec3..821d0f46d 100644 --- a/runtimes/super-runtime/Cargo.toml +++ b/runtimes/super-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "super-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Joshy Orndorff"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,13 +10,13 @@ parity-scale-codec = { version = "1.3.0", default-features = false, features = [ serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false } # Substrate Pallets -babe = { package = 'pallet-babe', version = '2.0.0-alpha.6', default_features = false} -balances = { package = 'pallet-balances', version = '2.0.0-alpha.6', default-features = false } -grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.6', default-features = false } -randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.6', default-features = false } -sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.6', default-features = false } -transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.6', default-features = false } -timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.6', default-features = false } +babe = { package = 'pallet-babe', version = '2.0.0-alpha.7', default_features = false} +balances = { package = 'pallet-balances', version = '2.0.0-alpha.7', default-features = false } +grandpa = { package = 'pallet-grandpa', version = '2.0.0-alpha.7', default-features = false } +randomness-collective-flip = { package = 'pallet-randomness-collective-flip', version = '2.0.0-alpha.7', default-features = false } +sudo = { package = 'pallet-sudo', version = '2.0.0-alpha.7', default-features = false } +transaction-payment = { package = 'pallet-transaction-payment', version = '2.0.0-alpha.7', default-features = false } +timestamp = { package = 'pallet-timestamp', version = '2.0.0-alpha.7', default-features = false } # Recipe Pallets adding-machine = { path = "../../pallets/adding-machine", default-features = false } @@ -42,22 +42,22 @@ struct-storage = { path = "../../pallets/struct-storage", default-features = fal vec-set = { path = "../../pallets/vec-set", default-features = false } # Other Substrate dependencies -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [build-dependencies] diff --git a/runtimes/weight-fee-runtime/Cargo.toml b/runtimes/weight-fee-runtime/Cargo.toml index c87884dd5..f17d34105 100644 --- a/runtimes/weight-fee-runtime/Cargo.toml +++ b/runtimes/weight-fee-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "weight-fee-runtime" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" authors = ["Anonymous"] edition = "2018" license = "GPL-3.0-or-later" @@ -10,62 +10,62 @@ serde = { version = "1.0", optional = true, features = ["derive"] } weights = { path = "../../pallets/weights", default-features = false } parity-scale-codec = { version = "1.3.0", features = ["derive"], default-features = false } -frame-executive = { version = '2.0.0-alpha.6', default-features = false } -frame-support = { version = '2.0.0-alpha.6', default-features = false } -frame-system = { version = '2.0.0-alpha.6', default-features = false } -sp-api = { version = '2.0.0-alpha.6', default-features = false } -sp-block-builder = { version = '2.0.0-alpha.6', default-features = false } -sp-consensus-babe = { version = '0.8.0-alpha.6', default-features = false } -sp-core = { version = '2.0.0-alpha.6', default-features = false } -sp-finality-grandpa = { version = '2.0.0-alpha.6', default-features = false } -sp-inherents = { version = '2.0.0-alpha.6', default-features = false } -sp-io = { version = '2.0.0-alpha.6', default-features = false } -sp-offchain = { version = '2.0.0-alpha.6', default-features = false } -sp-runtime = { version = '2.0.0-alpha.6', default-features = false } -sp-session = { version = '2.0.0-alpha.6', default-features = false } -sp-std = { version = '2.0.0-alpha.6', default-features = false } -sp-transaction-pool = { version = '2.0.0-alpha.6', default-features = false } -sp-version = { version = '2.0.0-alpha.6', default-features = false } +frame-executive = { version = '2.0.0-alpha.7', default-features = false } +frame-support = { version = '2.0.0-alpha.7', default-features = false } +frame-system = { version = '2.0.0-alpha.7', default-features = false } +sp-api = { version = '2.0.0-alpha.7', default-features = false } +sp-block-builder = { version = '2.0.0-alpha.7', default-features = false } +sp-consensus-babe = { version = '0.8.0-alpha.7', default-features = false } +sp-core = { version = '2.0.0-alpha.7', default-features = false } +sp-finality-grandpa = { version = '2.0.0-alpha.7', default-features = false } +sp-inherents = { version = '2.0.0-alpha.7', default-features = false } +sp-io = { version = '2.0.0-alpha.7', default-features = false } +sp-offchain = { version = '2.0.0-alpha.7', default-features = false } +sp-runtime = { version = '2.0.0-alpha.7', default-features = false } +sp-session = { version = '2.0.0-alpha.7', default-features = false } +sp-std = { version = '2.0.0-alpha.7', default-features = false } +sp-transaction-pool = { version = '2.0.0-alpha.7', default-features = false } +sp-version = { version = '2.0.0-alpha.7', default-features = false } [dependencies.balances] default-features = false package = 'pallet-balances' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.generic-asset] default-features = false package = 'pallet-generic-asset' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.transaction-payment] default-features = false package = 'pallet-transaction-payment' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.babe] default-features = false package = 'pallet-babe' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.grandpa] default-features = false package = 'pallet-grandpa' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.randomness-collective-flip] default-features = false package = 'pallet-randomness-collective-flip' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.timestamp] default-features = false package = 'pallet-timestamp' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [dependencies.sudo] default-features = false package = 'pallet-sudo' -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.4" } diff --git a/text/2-appetizers/4-events.md b/text/2-appetizers/4-events.md index 4082bbf74..f810e0895 100644 --- a/text/2-appetizers/4-events.md +++ b/text/2-appetizers/4-events.md @@ -64,9 +64,7 @@ This example also demonstrates how the `where` clause can be used to specify typ Events are emitted from dispatchable calls using the `deposit_event` method. -> Starting from -> [Substrate `v2.0.0-alpha.6`](https://github.com/paritytech/substrate/tree/v2.0.0-alpha.6), -> events are not emitted on block 0. So any dispatchable calls made during genesis block formation +> Events are not emitted on block 0. So any dispatchable calls made during genesis block formation > will have no events emitted. ### Simple Events diff --git a/text/3-entrees/custom-rpc.md b/text/3-entrees/custom-rpc.md index 73376d188..989e15df7 100644 --- a/text/3-entrees/custom-rpc.md +++ b/text/3-entrees/custom-rpc.md @@ -47,7 +47,7 @@ With our RPC written, we're ready to install it on our node. We begin with a few jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sc-rpc = { version = '2.0.0-alpha.6' } +sc-rpc = { version = '2.0.0-alpha.7' } ``` Next, in our `rpc-node`'s `service.rs` file, we extend the service with our RPC. We've chosen to install this RPC for full nodes, so we've included the code in the `new_full_start!` macro. You could also install the RPC on a light client by making the corresponding changes to `new_light`. diff --git a/text/3-entrees/kitchen-node.md b/text/3-entrees/kitchen-node.md index 498f1cd05..f38f1414b 100644 --- a/text/3-entrees/kitchen-node.md +++ b/text/3-entrees/kitchen-node.md @@ -63,9 +63,9 @@ The instant seal consensus engine, and its cousin the manual seal consensus engi Installing the instant seal engine has several dependencies whereas the runtime had only one. ```toml -sc-client-db = '0.8.0-alpha.6' # This became necessary when converting to instant seal -sp-consensus = '0.8.0-alpha.6' -sc-consensus-manual-seal = '0.8.0-alpha.6' +sc-client-db = '0.8.0-alpha.7' # This became necessary when converting to instant seal +sp-consensus = '0.8.0-alpha.7' +sc-consensus-manual-seal = '0.8.0-alpha.7' ``` The dependency on `sc-client-db` will become unnecessary once [issue #238](https://github.com/substrate-developer-hub/recipes/pull/238) is merged. diff --git a/text/3-entrees/off-chain-workers/storage.md b/text/3-entrees/off-chain-workers/storage.md index 8c1c0f6e2..368be983a 100644 --- a/text/3-entrees/off-chain-workers/storage.md +++ b/text/3-entrees/off-chain-workers/storage.md @@ -42,7 +42,7 @@ fn fetch_if_needed() -> Result<(), Error> { } ``` -Looking at the [API doc](https://substrate.dev/rustdocs/v2.0.0-alpha.6/sp_runtime/offchain/storage/struct.StorageValueRef.html), we see there are two type of StorageValueRef, created via `::persistent()` and `::local()`. `::local()` is not fully implemented yet and `::persistent()` is enough for this use cases. We passed in a key as our storage key. As storage keys are namespaced globally, a good practice would be to prepend our pallet name in front of our storage key. +Looking at the [API doc](https://substrate.dev/rustdocs/master/sp_runtime/offchain/storage/struct.StorageValueRef.html), we see there are two type of StorageValueRef, created via `::persistent()` and `::local()`. `::local()` is not fully implemented yet and `::persistent()` is enough for this use cases. We passed in a key as our storage key. As storage keys are namespaced globally, a good practice would be to prepend our pallet name in front of our storage key. ## Access diff --git a/text/3-entrees/testing/mock.md b/text/3-entrees/testing/mock.md index 980dc3754..48a0bd4ce 100644 --- a/text/3-entrees/testing/mock.md +++ b/text/3-entrees/testing/mock.md @@ -171,7 +171,7 @@ In the `Cargo.toml`, this only needs to be imported under `dev-dependencies` sin [dev-dependencies.sp-io] default_features = false -version = '2.0.0-alpha.6' +version = '2.0.0-alpha.7' ``` There is more than one pattern for building a mock runtime environment for testing pallet logic. Two patterns are presented below. The latter is generally favored for reasons discussed in [custom test environment](./externalities.md) @@ -313,9 +313,7 @@ pub trait Trait: 'static + Eq + Clone { ### Setting for Testing Event Emittances -Starting from -Substrate [`v2.0.0-alpha.6`](https://github.com/paritytech/substrate/tree/v2.0.0-alpha.6), -events are not emitted on block 0. So when testing for whether events are emitted, we manually +Events are not emitted on block 0. So when testing for whether events are emitted, we manually set the block number in the test environment from 0 to 1 as the following: ```rust From 464d2aa7344576b278e00fde87f8a37f0ba4057f Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 16:50:46 -0400 Subject: [PATCH 37/38] Babe-grandpa-node compiles --- nodes/babe-grandpa-node/src/service.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/nodes/babe-grandpa-node/src/service.rs b/nodes/babe-grandpa-node/src/service.rs index f59919f96..93591a42a 100644 --- a/nodes/babe-grandpa-node/src/service.rs +++ b/nodes/babe-grandpa-node/src/service.rs @@ -38,11 +38,15 @@ macro_rules! new_full_start { .with_select_chain(|_config, backend| { Ok(sc_consensus::LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, _fetcher| { + .with_transaction_pool(|config, client, _fetcher, prometheus_registry| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); - Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) + Ok(sc_transaction_pool::BasicPool::new( + config, + std::sync::Arc::new(pool_api), + prometheus_registry, + )) })? - .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { + .with_import_queue(|_config, client, mut select_chain, _transaction_pool, spawn_task_handle| { let select_chain = select_chain.take() .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = @@ -64,6 +68,7 @@ macro_rules! new_full_start { None, client, inherent_data_providers.clone(), + spawn_task_handle, )?; import_setup = Some((babe_block_import, grandpa_link, babe_link)); @@ -160,6 +165,7 @@ pub fn new_full(config: Configuration) telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry: service.prometheus_registry(), + shared_voter_state: sc_finality_grandpa::SharedVoterState::empty(), }; // the GRANDPA voter task is considered infallible, i.e. @@ -189,16 +195,19 @@ pub fn new_light(config: Configuration) .with_select_chain(|_config, backend| { Ok(LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, fetcher| { + .with_transaction_pool(|config, client, fetcher, prometheus_registry| { let fetcher = fetcher .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + config, + Arc::new(pool_api), + prometheus_registry, + sc_transaction_pool::RevalidationType::Light, ); Ok(pool) })? - .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| { + .with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool, spawn_task_handle| { let fetch_checker = fetcher .map(|fetcher| fetcher.checker().clone()) .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; @@ -223,6 +232,7 @@ pub fn new_light(config: Configuration) Some(Box::new(finality_proof_import)), client.clone(), inherent_data_providers.clone(), + spawn_task_handle, )?; Ok((import_queue, finality_proof_request_builder)) From 7ec98f5e43e27b281732a112f7e32bb6af23050f Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Fri, 8 May 2020 16:57:41 -0400 Subject: [PATCH 38/38] basic-pow compiles --- Cargo.lock | 3 ++- nodes/basic-pow/Cargo.toml | 13 +++++++------ nodes/basic-pow/src/service.rs | 25 +++++++++++++++++++------ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f1323f5e..9d33763dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,6 +392,7 @@ dependencies = [ "sc-basic-authorship", "sc-cli", "sc-client-api", + "sc-consensus", "sc-consensus-pow", "sc-executor", "sc-network", @@ -408,8 +409,8 @@ dependencies = [ "sp-transaction-pool", "structopt", "substrate-build-script-utils", - "super-runtime", "vergen", + "weight-fee-runtime", ] [[package]] diff --git a/nodes/basic-pow/Cargo.toml b/nodes/basic-pow/Cargo.toml index 7c5d564d9..4618773a8 100644 --- a/nodes/basic-pow/Cargo.toml +++ b/nodes/basic-pow/Cargo.toml @@ -19,10 +19,11 @@ structopt = '0.3.8' parity-scale-codec = '1.3.0' sha3 = "0.8" rand = { version = "0.7", features = ["small_rng"] } -sc-consensus-pow = { version = '0.8.0-alpha.7' } -sp-consensus-pow = { version = '0.8.0-alpha.7' } -sc-client-api = { version = '2.0.0-alpha.7' } -sp-blockchain = { version = '2.0.0-alpha.7' } +sc-consensus = '0.8.0-alpha.7' +sc-consensus-pow = '0.8.0-alpha.7' +sp-consensus-pow = '0.8.0-alpha.7' +sc-client-api = '2.0.0-alpha.7' +sp-blockchain = '2.0.0-alpha.7' sp-timestamp = '2.0.0-alpha.7' sc-basic-authorship = '0.8.0-alpha.7' sc-cli = '0.8.0-alpha.7' @@ -39,10 +40,10 @@ sp-transaction-pool = '2.0.0-alpha.7' # This node is compatible with any of the runtimes below # --- # Common runtime configured with most Recipes pallets. -runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } +# runtime = { package = "super-runtime", path = "../../runtimes/super-runtime" } # Runtime with custom weight and fee calculation. -# runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} +runtime = { package = "weight-fee-runtime", path = "../../runtimes/weight-fee-runtime"} # Runtime with custom runtime-api (custom API only used in rpc-node) # runtime = { package = "api-runtime", path = "../../runtimes/api-runtime" } diff --git a/nodes/basic-pow/src/service.rs b/nodes/basic-pow/src/service.rs index 9c9a0a0c6..52bbaa91b 100644 --- a/nodes/basic-pow/src/service.rs +++ b/nodes/basic-pow/src/service.rs @@ -44,11 +44,15 @@ macro_rules! new_full_start { .with_select_chain(|_config, backend| { Ok(sc_consensus::LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, _fetcher| { + .with_transaction_pool(|config, client, _fetcher, prometheus_registry| { let pool_api = sc_transaction_pool::FullChainApi::new(client.clone()); - Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api))) + Ok(sc_transaction_pool::BasicPool::new( + config, + std::sync::Arc::new(pool_api), + prometheus_registry, + )) })? - .with_import_queue(|_config, client, select_chain, _transaction_pool| { + .with_import_queue(|_config, client, select_chain, _transaction_pool, spawn_task_handle| { let pow_block_import = sc_consensus_pow::PowBlockImport::new( client.clone(), @@ -61,8 +65,11 @@ macro_rules! new_full_start { let import_queue = sc_consensus_pow::import_queue( Box::new(pow_block_import.clone()), + None, + None, crate::pow::Sha3Algorithm, inherent_data_providers.clone(), + spawn_task_handle, )?; import_setup = Some(pow_block_import); @@ -137,17 +144,20 @@ pub fn new_light(config: Configuration) .with_select_chain(|_config, backend| { Ok(LongestChain::new(backend.clone())) })? - .with_transaction_pool(|config, client, fetcher| { + .with_transaction_pool(|config, client, fetcher, prometheus_registry| { let fetcher = fetcher .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?; let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone()); let pool = sc_transaction_pool::BasicPool::with_revalidation_type( - config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light, + config, + Arc::new(pool_api), + prometheus_registry, + sc_transaction_pool::RevalidationType::Light, ); Ok(pool) })? - .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool| { + .with_import_queue_and_fprb(|_config, client, _backend, _fetcher, select_chain, _tx_pool, spawn_task_handle| { let finality_proof_request_builder = Box::new(DummyFinalityProofRequestBuilder::default()) as Box<_>; @@ -162,8 +172,11 @@ pub fn new_light(config: Configuration) let import_queue = sc_consensus_pow::import_queue( Box::new(pow_block_import), + None, + None, Sha3Algorithm, build_inherent_data_providers()?, + spawn_task_handle, )?; Ok((import_queue, finality_proof_request_builder))